Grails
  1. Grails
  2. GRAILS-6315

too many dependencies being packaged

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.4
    • Component/s: Project infrastructure
    • Labels:
      None
    • Environment:
      irrelevant
    • Testcase included:
      yes

      Description

      javadoc and java source JARs are being packaged into the WAR. This can be seen with a dependency such as:

      dependencies {
      compile("net.sf.ehcache:ehcache-web:2.0.0")
      }

      You will find
      WEB-INF\lib\ehcache-web-2.0.0-javadoc.jar
      WEB-INF\lib\ehcache-web-2.0.0-javadoc.jar

      in your WAR.

      'provided' scoped dependencies are also being included in the WAR.
      One example I have found is from 'http://download.java.net/maven/2/' repository:

      dependencies {
      compile('com.sun.jersey:jersey-server:1.1.5.1')
      }

      That artifact's POM declares dependencies like:
      <dependency>
      <groupId>com.sun.grizzly</groupId>
      <artifactId>grizzly-servlet-webserver</artifactId>
      <version>1.9.8</version>
      <scope>provided</scope>
      </dependency>

      You will find the grizzly JARs in your WAR.

      1. grizzly-servlet-webserver-1.9.8.pom
        4 kB
        Kallin Nagelberg
      2. jersey-server-1.1.5.1.pom
        7 kB
        Kallin Nagelberg

        Activity

        Hide
        Kallin Nagelberg added a comment -

        My project depends on the artifact defined in jersey-server-1.1.5.1.pom.

        It has a provided dependency on grizzly-servlet-webserver.

        My WAR ends up containing 7 grizzly related .JARs via transitive dependencies of the provided dependency. My understanding is that any type of a transitive dependency of a provided dependency should be treated as provided.

        http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-transitive.html#table-transitive-dep-and-scope

        Show
        Kallin Nagelberg added a comment - My project depends on the artifact defined in jersey-server-1.1.5.1.pom. It has a provided dependency on grizzly-servlet-webserver. My WAR ends up containing 7 grizzly related .JARs via transitive dependencies of the provided dependency. My understanding is that any type of a transitive dependency of a provided dependency should be treated as provided. http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-transitive.html#table-transitive-dep-and-scope
        Hide
        Kallin Nagelberg added a comment -

        The repository I find jersey artifact in is
        http://download.java.net/maven/2

        Show
        Kallin Nagelberg added a comment - The repository I find jersey artifact in is http://download.java.net/maven/2
        Hide
        Graeme Rocher added a comment -

        I'm closing against because I have declared

        		provided 'com.sun.jersey:jersey-server:1.1.5.1'
        

        In an application and cannot get the provided dependencies to be packaged in the WAR, therefore I cannot reproduce the problem.

        Show
        Graeme Rocher added a comment - I'm closing against because I have declared provided 'com.sun.jersey:jersey-server:1.1.5.1' In an application and cannot get the provided dependencies to be packaged in the WAR, therefore I cannot reproduce the problem.
        Hide
        Graeme Rocher added a comment -

        Fix for GRAILS-6427 causes a regression of this issue, working on an alternative solution

        Show
        Graeme Rocher added a comment - Fix for GRAILS-6427 causes a regression of this issue, working on an alternative solution
        Show
        Graeme Rocher added a comment - Fixed (again): http://github.com/grails/grails-core/commit/7dbcd9d9ebefc283943a7e13ce144ea48e750faf

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Kallin Nagelberg
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development