Bug 1218315 - Update to Jersey 2.x (2.17)
Summary: Update to Jersey 2.x (2.17)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: jersey
Version: rawhide
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: gil cattaneo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1222828 1223024 1223468
Blocks: 1223831
TreeView+ depends on / blocked
 
Reported: 2015-05-04 15:00 UTC by Roland Grunberg
Modified: 2015-05-29 14:12 UTC (History)
3 users (show)

Fixed In Version: 2.17-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-28 17:55:26 UTC
Type: Bug


Attachments (Terms of Use)

Description Roland Grunberg 2015-05-04 15:00:21 UTC
I'll be working towards getting docker-client (https://github.com/spotify/docker-client) into Fedora. The following Jersey pom/jars were fetched remotely in order get a build going. I guess jersey will need to need to be updated to Jersey to 2.x .

./org/glassfish/jersey/bundles/project/2.13/project-2.13.pom
./org/glassfish/jersey/bundles/repackaged/jersey-guava/2.13/jersey-guava-2.13.pom
./org/glassfish/jersey/bundles/repackaged/project/2.13/project-2.13.pom
./org/glassfish/jersey/connectors/jersey-apache-connector/2.13/jersey-apache-connector-2.13.pom
./org/glassfish/jersey/connectors/project/2.13/project-2.13.pom
./org/glassfish/jersey/core/jersey-client/2.13/jersey-client-2.13.pom
./org/glassfish/jersey/core/jersey-common/2.13/jersey-common-2.13.pom
./org/glassfish/jersey/media/jersey-media-json-jackson/2.13/jersey-media-json-jackson-2.13.pom
./org/glassfish/jersey/media/project/2.13/project-2.13.pom
./org/glassfish/jersey/project/2.13/project-2.13.pom

./org/glassfish/jersey/bundles/repackaged/jersey-guava/2.13/jersey-guava-2.13.jar
./org/glassfish/jersey/connectors/jersey-apache-connector/2.13/jersey-apache-connector-2.13.jar
./org/glassfish/jersey/core/jersey-client/2.13/jersey-client-2.13.jar
./org/glassfish/jersey/core/jersey-common/2.13/jersey-common-2.13.jar
./org/glassfish/jersey/media/jersey-media-json-jackson/2.13/jersey-media-json-jackson-2.13.jar

Comment 1 gil cattaneo 2015-05-04 17:32:53 UTC
I don't think is so easy, Jersey 1.x is required for Apache Hadoop and other projects. Should be contacted before the maintainers of these packages.
Otherwise you can import https://github.com/spotify/docker-client/blob/v2.5.0
which use the actual jersey release present in our repos.
regards

Comment 3 Roland Grunberg 2015-05-05 14:45:40 UTC
(In reply to comment #2)
> https://github.com/spotify/docker-client/tree/v2.5.0

Would a separate 2.x subpackage be possible so that either may be used ?

For a bit of context, the docker-client library is meant to be used by a set of Eclipse plugins that will provide support for managing containers. They are being developed and contributed towards the Eclipse Mars (4.5.0) Simultaneous Release upstream (https://wiki.eclipse.org/Linux_Tools_Project/Docker_Tooling).

There's a lot of improvements that went in to docker-client since v2.5.0 (eg. SSL/TLS support, jnr-unixsocket for unix socket support instead of older unmaintained library, unbounded waits, use > 2 connections per server, pause/unpause/exec/search commands) so I'm not sure how usable it would be if at all. The oldest version we've actually been testing is v2.7.9 (uses Jersey 2.x), and upstream we plan to use v2.7.18.

Comment 4 gil cattaneo 2015-05-05 21:53:59 UTC
(In reply to Roland Grunberg from comment #3)
> (In reply to comment #2)
> > https://github.com/spotify/docker-client/tree/v2.5.0
> 
> Would a separate 2.x subpackage be possible so that either may be used ?

Sorry, but i don't understand what it means

Comment 5 Roland Grunberg 2015-05-06 15:05:51 UTC
(In reply to comment #4)
> (In reply to Roland Grunberg from comment #3)
> > (In reply to comment #2)
> > > https://github.com/spotify/docker-client/tree/v2.5.0
> >
> > Would a separate 2.x subpackage be possible so that either may be used ?
> 
> Sorry, but i don't understand what it means

I meant having a compatibility package (eg. jersey1-1.18.3-2, jersey-2.14.0-1) for packages unable to migrate to 2.x.

Comment 6 gil cattaneo 2015-05-15 08:17:56 UTC
(In reply to Roland Grunberg from comment #5)
> I meant having a compatibility package (eg. jersey1-1.18.3-2,
> jersey-2.14.0-1) for packages unable to migrate to 2.x.

This mean also create grizzly (and its dependencies) compatibility package/s.
I have no time for maintains also these ones

Comment 7 Roland Grunberg 2015-05-19 15:51:18 UTC
(In reply to comment #6)
> (In reply to Roland Grunberg from comment #5)
> > I meant having a compatibility package (eg. jersey1-1.18.3-2,
> > jersey-2.14.0-1) for packages unable to migrate to 2.x.
> 
> This mean also create grizzly (and its dependencies) compatibility package/s.
> I have no time for maintains also these ones

Understood, but I actually don't need all of the Jersey 2.x modules for the new feature I eventually plan to introduce. I would only need jersey-apache-connector, jersey-client, jersey-common,  jersey-guava, and jersey-media-json-jackson. The dependencies for these are all in Fedora, and I was able to build using https://rgrunber.fedorapeople.org/jersey2/jersey2.spec . The only issue is I think glassfish-hk2 will need to be updated from 2.1.93 to at least 2.3.0.

Comment 8 gil cattaneo 2015-05-19 20:14:28 UTC
(In reply to Roland Grunberg from comment #7)

> https://rgrunber.fedorapeople.org/jersey2/jersey2.spec . The only issue is I
> think glassfish-hk2 will need to be updated from 2.1.93 to at least 2.3.0.

glassfish-hk2-2.3.0 is available only in rawhide:
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=9795496

Comment 9 gil cattaneo 2015-05-20 09:05:14 UTC
(In reply to Roland Grunberg from comment #7)
> Understood, but I actually don't need all of the Jersey 2.x modules for the
>  I would only need jersey-guava
Is not possible use this artifact. cause:
https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Why_no_Bundled_Libraries
other artifacts which can't be packaged:
grizzly-connector, use org.glassfish.grizzly:grizzly-http-client:1.8 (bundle com.ning:async-http-client:1.8.11))
jersey-container-simple-http and jersey-test-framework-provider-simple use old
org.simpleframework:simple:5.1.4 (available 6.0.1)

Comment 10 gil cattaneo 2015-05-20 09:35:28 UTC
grizzly-2.3.19 is available only in rawhide:
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=9799745

Comment 11 Roland Grunberg 2015-05-20 14:47:50 UTC
(In reply to comment #9)
> (In reply to Roland Grunberg from comment #7)
> > Understood, but I actually don't need all of the Jersey 2.x modules for the
> >  I would only need jersey-guava
> Is not possible use this artifact. cause:
> https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Why_no_Bundled_Libraries
> other artifacts which can't be packaged:
> grizzly-connector, use org.glassfish.grizzly:grizzly-http-client:1.8 (bundle
> com.ning:async-http-client:1.8.11))
> jersey-container-simple-http and jersey-test-framework-provider-simple use old
> org.simpleframework:simple:5.1.4 (available 6.0.1)

First, thank-you for pushing the glassfish-hk2 2.3.0 into rawhide. I'm trying things out on f22 VM and hopefully things should work. If all is fine, would it be possible to push to f22 as an update also ?

Regarding jersey-guava, you're right. jersey-guava simply takes com.google.guava:guava:14.0.1 and uses maven-shade-plugin to repackage under a modified namespace. It doesn't provide any of its own classes, so we can basically remove it and change the needed modules to depend properly on guava.

Comment 12 gil cattaneo 2015-05-28 17:55:26 UTC
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=9867269

Comment 13 Roland Grunberg 2015-05-28 19:43:49 UTC
I'm testing it out and this works for me. I just need jersey-apache-connector to be an OSGi bundle. Upstream OSGi-ifies various artifacts but not this one. I found that just doing :

# Generate OSGi manifest for apache-connector
%pom_add_plugin org.apache.felix:maven-bundle-plugin connectors/apache-connector

solves the issues. Would it be possible to add this ?

Comment 14 gil cattaneo 2015-05-29 07:29:12 UTC
(In reply to Roland Grunberg from comment #13)
> I'm testing it out and this works for me. I just need
> jersey-apache-connector to be an OSGi bundle. Upstream OSGi-ifies various
> artifacts but not this one. I found that just doing :
> 
> # Generate OSGi manifest for apache-connector
> %pom_add_plugin org.apache.felix:maven-bundle-plugin
> connectors/apache-connector
> 
> solves the issues. Would it be possible to add this ?

yes sure, i hope to do it by this evening

Comment 15 gil cattaneo 2015-05-29 07:42:19 UTC
(In reply to gil cattaneo from comment #14)
> (In reply to Roland Grunberg from comment #13)
> > I'm testing it out and this works for me. I just need
> > jersey-apache-connector to be an OSGi bundle. Upstream OSGi-ifies various
> > artifacts but not this one. I found that just doing :
> > 
> > # Generate OSGi manifest for apache-connector
> > %pom_add_plugin org.apache.felix:maven-bundle-plugin
> > connectors/apache-connector
> > 
> > solves the issues. Would it be possible to add this ?
> 
> yes sure, i hope to do it by this evening

have you the apache-connector's manifest file used in docker-client project?
it needs some particular item?

Comment 16 gil cattaneo 2015-05-29 07:44:33 UTC
the manifest which i generate have these entries:

Manifest-Version: 1.0
Bnd-LastModified: 1432885289076
Build-Jdk: 1.7.0_79
Built-By: me
Bundle-Description: Jersey Client Transport via Apache
Bundle-DocURL: http://www.oracle.com/
Bundle-License: http://glassfish.java.net/public/CDDL+GPL_1_1.html
Bundle-ManifestVersion: 2
Bundle-Name: jersey-connectors-apache
Bundle-SymbolicName: org.glassfish.jersey.connectors.jersey-apache-conne
 ctor
Bundle-Vendor: Oracle Corporation
Bundle-Version: 2.17.0
Created-By: Apache Maven Bundle Plugin
Export-Package: org.glassfish.jersey.apache.connector;uses:="org.glassfi
 sh.jersey.internal.util,org.glassfish.jersey.client,org.glassfish.jerse
 y.client.spi,org.glassfish.jersey.message.internal,org.apache.http.enti
 ty,org.apache.http,org.apache.http.conn,org.apache.http.config,org.apac
 he.http.impl.conn,org.apache.http.conn.routing,org.apache.http.io,org.a
 pache.http.impl.io,org.apache.http.conn.socket,org.apache.http.protocol
 ,javax.ws.rs,org.apache.http.client,org.glassfish.jersey,org.apache.htt
 p.impl.client,org.apache.http.impl.auth,org.apache.http.client.config,j
 avax.net.ssl,javax.ws.rs.core,org.apache.http.conn.ssl,org.apache.http.
 client.protocol,javax.net,com.google.common.util.concurrent,javax.ws.rs
 .client,org.apache.http.util,org.apache.http.client.methods,org.apache.
 http.auth,org.glassfish.jersey.internal.l10n";version="2.17.0"
Import-Package: com.google.common.util.concurrent;version="[18.0,19)",ja
 vax.net,javax.net.ssl,javax.ws.rs;version="[2.0,3)",javax.ws.rs.client;
 version="[2.0,3)",javax.ws.rs.core;version="[2.0,3)",org.apache.http,or
 g.apache.http.auth,org.apache.http.client,org.apache.http.client.config
 ,org.apache.http.client.methods,org.apache.http.client.protocol,org.apa
 che.http.config,org.apache.http.conn,org.apache.http.conn.routing,org.a
 pache.http.conn.socket,org.apache.http.conn.ssl,org.apache.http.entity,
 org.apache.http.impl.auth,org.apache.http.impl.client,org.apache.http.i
 mpl.conn,org.apache.http.impl.io,org.apache.http.io,org.apache.http.pro
 tocol,org.apache.http.util,org.glassfish.jersey;version="[2.17,3)",org.
 glassfish.jersey.client;version="[2.17,3)",org.glassfish.jersey.client.
 spi;version="[2.17,3)",org.glassfish.jersey.internal.l10n;version="[2.1
 7,3)",org.glassfish.jersey.internal.util;version="[2.17,3)",org.glassfi
 sh.jersey.message.internal;version="[2.17,3)"
Tool: Bnd-1.50.0

Comment 17 gil cattaneo 2015-05-29 08:44:54 UTC
(In reply to Roland Grunberg from comment #13)
> I'm testing it out and this works for me. I just need
> jersey-apache-connector to be an OSGi bundle. Upstream OSGi-ifies various
> artifacts but not this one. I found that just doing :
> 
> # Generate OSGi manifest for apache-connector
> %pom_add_plugin org.apache.felix:maven-bundle-plugin
> connectors/apache-connector
> 
> solves the issues. Would it be possible to add this ?

should be fix in jersey-2.17-2.fc23
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=9875150

Comment 18 Roland Grunberg 2015-05-29 14:12:10 UTC
(In reply to comment #15)
> (In reply to gil cattaneo from comment #14)
> > (In reply to Roland Grunberg from comment #13)
> > > I'm testing it out and this works for me. I just need
> > > jersey-apache-connector to be an OSGi bundle. Upstream OSGi-ifies various
> > > artifacts but not this one. I found that just doing :
> > >
> > > # Generate OSGi manifest for apache-connector
> > > %pom_add_plugin org.apache.felix:maven-bundle-plugin
> > > connectors/apache-connector
> > >
> > > solves the issues. Would it be possible to add this ?
> >
> > yes sure, i hope to do it by this evening
> 
> have you the apache-connector's manifest file used in docker-client project?
> it needs some particular item?

Thanks for doing this. Yes, the apache-connector is a direct dependency of the docker-client ( 
https://rgrunber.fedorapeople.org/docker-client-deps.svg ), but since we're using all of these from within Eclipse, they need to have Import-Package/Export-Package defined, and a few other attributes. maven-bundle-plugin should handle these.


Note You need to log in before you can comment on or make changes to this bug.