You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by Raymond Auge <ra...@liferay.com> on 2018/06/22 13:21:32 UTC

JSON-P & JSON-B jaxrs support mutually exclusive

Hello all,

I've found a small issue when trying to assemble a system from Johnzon's
JAXRS providers.

If you look at the package imports for johnzon-jaxrs:

  javax.ws.rs                            {version=[2.0,3)}
  javax.ws.rs.core                       {version=[2.0,3)}
  javax.ws.rs.ext                        {version=[2.0,3)}

and those from johnzon-jsonb:

  javax.ws.rs                            {version=[1.1,2),
resolution:=optional}
  javax.ws.rs.core                       {version=[1.1,2),
resolution:=optional}
  javax.ws.rs.ext                        {version=[1.1,2),
resolution:=optional}

You'll notice that they have mutually exclusive version ranges, which means
they will never work together properly in the same OSGi runtime (at least
not in a _hack-free_ runtime.)

So, will anyone mind if when the geronimo specs release with proper
Portable Java Contracts (shortly hopefully) that I send a PR to apply these
to johnzon?

I've created an issue for it
https://issues.apache.org/jira/browse/JOHNZON-174

Sincerely,
-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Re: JSON-P & JSON-B jaxrs support mutually exclusive

Posted by Raymond Auge <ra...@liferay.com>.
On Wed, Jun 27, 2018 at 10:10 AM, Raymond Auge <ra...@liferay.com>
wrote:

> Sorry, I'm travelling this week so that's why I didn't act on this yet.
>
> What you can do temporarily to solve the issue is to explicitly widen the
> range of the imports on BOTH modules (noting that the JAXRS spec is
> actually backward compatible through major versions).
>
> e.g.
>
> Import-Package: javax.ws.rs.*;=version='[1.0,3)'
>

Import-Package: javax.ws.rs.*;version='[1.0,3)'


>
> That would be the shortest path to solving the mutual exclusive ranges.
>
> - Ray
>
> On Wed, Jun 27, 2018 at 9:59 AM, Mark Struberg <st...@yahoo.de.invalid>
> wrote:
>
>>  Raymond do you have a quick fix at hand?Would love to ship a Johnzon
>> release. Have a spare cycle today...
>> LieGrue,strub
>>
>>     On Friday, 22 June 2018, 16:22:20 CEST, Romain Manni-Bucau <
>> rmannibucau@gmail.com> wrote:
>>
>>  Hi Raymond,
>>
>> looks weird, jaxrs should be [1.0,) for everything, it is due to the
>> spec.version in the pom and does it mean we "just" have to explicitly set
>> it?
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <https://rmannibucau.metawerx.net/> | Old Blog
>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
>> <https://www.packtpub.com/application-development/java-ee-8-
>> high-performance>
>>
>>
>> Le ven. 22 juin 2018 à 15:21, Raymond Auge <ra...@liferay.com> a
>> écrit :
>>
>> > Hello all,
>> >
>> > I've found a small issue when trying to assemble a system from Johnzon's
>> > JAXRS providers.
>> >
>> > If you look at the package imports for johnzon-jaxrs:
>> >
>> >  javax.ws.rs                            {version=[2.0,3)}
>> >  javax.ws.rs.core                      {version=[2.0,3)}
>> >  javax.ws.rs.ext                        {version=[2.0,3)}
>> >
>> > and those from johnzon-jsonb:
>> >
>> >  javax.ws.rs                            {version=[1.1,2),
>> > resolution:=optional}
>> >  javax.ws.rs.core                      {version=[1.1,2),
>> > resolution:=optional}
>> >  javax.ws.rs.ext                        {version=[1.1,2),
>> > resolution:=optional}
>> >
>> > You'll notice that they have mutually exclusive version ranges, which
>> means
>> > they will never work together properly in the same OSGi runtime (at
>> least
>> > not in a _hack-free_ runtime.)
>> >
>> > So, will anyone mind if when the geronimo specs release with proper
>> > Portable Java Contracts (shortly hopefully) that I send a PR to apply
>> these
>> > to johnzon?
>> >
>> > I've created an issue for it
>> > https://issues.apache.org/jira/browse/JOHNZON-174
>> >
>> > Sincerely,
>> > --
>> > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>> >  (@rotty3000)
>> > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>> >  (@Liferay)
>> > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
>> > (@OSGiAlliance)
>> >
>>
>
>
>
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> (@OSGiAlliance)
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Re: JSON-P & JSON-B jaxrs support mutually exclusive

Posted by Raymond Auge <ra...@liferay.com>.
Sorry, I'm travelling this week so that's why I didn't act on this yet.

What you can do temporarily to solve the issue is to explicitly widen the
range of the imports on BOTH modules (noting that the JAXRS spec is
actually backward compatible through major versions).

e.g.

Import-Package: javax.ws.rs.*;=version='[1.0,3)'

That would be the shortest path to solving the mutual exclusive ranges.

- Ray

On Wed, Jun 27, 2018 at 9:59 AM, Mark Struberg <st...@yahoo.de.invalid>
wrote:

>  Raymond do you have a quick fix at hand?Would love to ship a Johnzon
> release. Have a spare cycle today...
> LieGrue,strub
>
>     On Friday, 22 June 2018, 16:22:20 CEST, Romain Manni-Bucau <
> rmannibucau@gmail.com> wrote:
>
>  Hi Raymond,
>
> looks weird, jaxrs should be [1.0,) for everything, it is due to the
> spec.version in the pom and does it mean we "just" have to explicitly set
> it?
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-
> ee-8-high-performance>
>
>
> Le ven. 22 juin 2018 à 15:21, Raymond Auge <ra...@liferay.com> a
> écrit :
>
> > Hello all,
> >
> > I've found a small issue when trying to assemble a system from Johnzon's
> > JAXRS providers.
> >
> > If you look at the package imports for johnzon-jaxrs:
> >
> >  javax.ws.rs                            {version=[2.0,3)}
> >  javax.ws.rs.core                      {version=[2.0,3)}
> >  javax.ws.rs.ext                        {version=[2.0,3)}
> >
> > and those from johnzon-jsonb:
> >
> >  javax.ws.rs                            {version=[1.1,2),
> > resolution:=optional}
> >  javax.ws.rs.core                      {version=[1.1,2),
> > resolution:=optional}
> >  javax.ws.rs.ext                        {version=[1.1,2),
> > resolution:=optional}
> >
> > You'll notice that they have mutually exclusive version ranges, which
> means
> > they will never work together properly in the same OSGi runtime (at least
> > not in a _hack-free_ runtime.)
> >
> > So, will anyone mind if when the geronimo specs release with proper
> > Portable Java Contracts (shortly hopefully) that I send a PR to apply
> these
> > to johnzon?
> >
> > I've created an issue for it
> > https://issues.apache.org/jira/browse/JOHNZON-174
> >
> > Sincerely,
> > --
> > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
> >  (@rotty3000)
> > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
> >  (@Liferay)
> > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> > (@OSGiAlliance)
> >
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Re: JSON-P & JSON-B jaxrs support mutually exclusive

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
 Raymond do you have a quick fix at hand?Would love to ship a Johnzon release. Have a spare cycle today...
LieGrue,strub

    On Friday, 22 June 2018, 16:22:20 CEST, Romain Manni-Bucau <rm...@gmail.com> wrote:  
 
 Hi Raymond,

looks weird, jaxrs should be [1.0,) for everything, it is due to the
spec.version in the pom and does it mean we "just" have to explicitly set
it?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 22 juin 2018 à 15:21, Raymond Auge <ra...@liferay.com> a
écrit :

> Hello all,
>
> I've found a small issue when trying to assemble a system from Johnzon's
> JAXRS providers.
>
> If you look at the package imports for johnzon-jaxrs:
>
>  javax.ws.rs                            {version=[2.0,3)}
>  javax.ws.rs.core                      {version=[2.0,3)}
>  javax.ws.rs.ext                        {version=[2.0,3)}
>
> and those from johnzon-jsonb:
>
>  javax.ws.rs                            {version=[1.1,2),
> resolution:=optional}
>  javax.ws.rs.core                      {version=[1.1,2),
> resolution:=optional}
>  javax.ws.rs.ext                        {version=[1.1,2),
> resolution:=optional}
>
> You'll notice that they have mutually exclusive version ranges, which means
> they will never work together properly in the same OSGi runtime (at least
> not in a _hack-free_ runtime.)
>
> So, will anyone mind if when the geronimo specs release with proper
> Portable Java Contracts (shortly hopefully) that I send a PR to apply these
> to johnzon?
>
> I've created an issue for it
> https://issues.apache.org/jira/browse/JOHNZON-174
>
> Sincerely,
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> (@OSGiAlliance)
>  

Re: JSON-P & JSON-B jaxrs support mutually exclusive

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Raymond,

looks weird, jaxrs should be [1.0,) for everything, it is due to the
spec.version in the pom and does it mean we "just" have to explicitly set
it?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 22 juin 2018 à 15:21, Raymond Auge <ra...@liferay.com> a
écrit :

> Hello all,
>
> I've found a small issue when trying to assemble a system from Johnzon's
> JAXRS providers.
>
> If you look at the package imports for johnzon-jaxrs:
>
>   javax.ws.rs                            {version=[2.0,3)}
>   javax.ws.rs.core                       {version=[2.0,3)}
>   javax.ws.rs.ext                        {version=[2.0,3)}
>
> and those from johnzon-jsonb:
>
>   javax.ws.rs                            {version=[1.1,2),
> resolution:=optional}
>   javax.ws.rs.core                       {version=[1.1,2),
> resolution:=optional}
>   javax.ws.rs.ext                        {version=[1.1,2),
> resolution:=optional}
>
> You'll notice that they have mutually exclusive version ranges, which means
> they will never work together properly in the same OSGi runtime (at least
> not in a _hack-free_ runtime.)
>
> So, will anyone mind if when the geronimo specs release with proper
> Portable Java Contracts (shortly hopefully) that I send a PR to apply these
> to johnzon?
>
> I've created an issue for it
> https://issues.apache.org/jira/browse/JOHNZON-174
>
> Sincerely,
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> (@OSGiAlliance)
>