Grails
  1. Grails
  2. GRAILS-8664

Transitive scope mappings cause problems

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0 final
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Transitive dependencies are not allocated to the correct scopes, which means that they can end up on completely the wrong classpath. This can be problematic for plugins in particular.

      Take the Release plugin as an example. It depends on the Svn plugin which in turn depends on SvnKit. Now, svnkit is required to build the Svn plugin, so it should be "compile" scope. The Svn plugin is not required to compile the Release plugin, but it is required when running the Release plugin commands. This sounds like a case of "runtime" scope. Lastly, a plugin or application would typically include the Release plugin as "build" scope since it isn't used at runtime in any way.

      Unfortunately, Grails will currently include both the Svn plugin and svnkit in an application's WAR file because they are declared "runtime" and "compile" respectively. As transitive dependencies of Release plugin, they should really be "build" scope or at least provided. Remember that svnkit is required to compile the Svn plugin. The "build" scope for svnkit may not allow this.

      We should certainly make sure that "compile" and "runtime" map to "build" or "provided" when included transitively via "build". "compile" should map to "runtime" if it's transitive. We probably need to work out some other mappings too.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter Ledbrook
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development