jersey
  1. jersey
  2. JERSEY-1884

Jersey 2.0 Maven artiifact depends on non repackaged Guava and old ASM version

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc2, 2.3.1
    • Fix Version/s: 2.6
    • Component/s: core
    • Labels:
      None

      Description

      With <repositories>
      <repository>
      <id>jvnet-nexus-promoted</id>
      <name>Java.net Promoted Repositories</name>
      <url>https://maven.java.net/content/repositories/promoted/</url>
      <releases>
      <enabled>true</enabled>
      </releases>
      <snapshots>
      <enabled>false</enabled>
      </snapshots>
      </repository>
      </repositories>

      and
      <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>javax.ws.rs-api</artifactId>
      <version>2.0</version>
      </dependency>
      <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-server</artifactId>
      <version>2.0</version>
      </dependency>

      for a web application, we end up with non desired and/or obsolete dependencies in the resulting WEB-INF/lib area with:

      1- jersey-client 2.0 ? Why I want a server!
      2-asm-all-repackaged-2.1.88: why? First this is the old ASM 3.x non compatible with Java 7, then it is NOT repackaged at all, so any Web App cannot use ASM4.x and Jersey 2.0 together...This would be a blocker for Java 7 support, and not being repackaged is very serious
      3- osgi-resource-locator: Why OSGI in a pure JAX-RS simple App?
      4 javax.inject-2.1.88 : what is this 2.1.88 version? Is it ancient? Modern? Why tight to hk2?
      5 guava-14.0.1.jar: what will happen if/when there is guava15 and my Web App Needs to depend on it, but Jersey is not upgraded?

      A Maven nightmare.
      Key ones are: ASM not being 4.1 so not being Java 7 compatible (stack map frame processing for bytecode 51) and Guava should be repackaged to be a private implementation.
      Look at the jarjar tools that does that.

      Hint: You can use the NetBeans Maven graph viewer on a very simple pom have my 2 entries and you'll see the

        Issue Links

          Activity

          Hide
          aaronjwhiteside added a comment -

          And the dependency on

          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
          <version>1.2</version>
          

          is not resolving for me.. so I had to manually exclude it and include:

                  <dependency>
                      <groupId>javax.annotation</groupId>
                      <artifactId>javax.annotation-api</artifactId>
                      <version>1.2-b04</version>
                  </dependency>
          

          which is the latest one in the central maven repo..

          Show
          aaronjwhiteside added a comment - And the dependency on <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <version>1.2</version> is not resolving for me.. so I had to manually exclude it and include: <dependency> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <version>1.2-b04</version> </dependency> which is the latest one in the central maven repo..
          Hide
          aaronjwhiteside added a comment - - edited

          It should also be noted that guava-14.0.1.jar cannot be deployed in a JEE7 container due to CDI being enabled by default (without a beans.xml).

          https://code.google.com/p/guava-libraries/issues/detail?id=1433

          Update: This now appears to be a CDI 1.1 spec compliance issue, Glassfish 4.0 b90 does not support section 12.1 and 12.4 of the CDI spec at the moment, which makes it impossible to use guava-14.0.1.

          Show
          aaronjwhiteside added a comment - - edited It should also be noted that guava-14.0.1.jar cannot be deployed in a JEE7 container due to CDI being enabled by default (without a beans.xml). https://code.google.com/p/guava-libraries/issues/detail?id=1433 Update: This now appears to be a CDI 1.1 spec compliance issue, Glassfish 4.0 b90 does not support section 12.1 and 12.4 of the CDI spec at the moment, which makes it impossible to use guava-14.0.1.

            People

            • Assignee:
              Michal Gajdos
              Reporter:
              ludo
            • Votes:
              7 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: