the OSGi manifest to make the import of the XML Binding packages
optional (resolution:=optional). I agree that that would make things
more clear that these packages are optional. Thanks for the suggestion!
Any disagreement or other thoughts before I make this change?
Thanks,
Andy
On Mon, Sep 21, 2020 at 9:43 AM Lukas Jungmann
<lukas.jungmann@xxxxxxxxxx <mailto:lukas.jungmann@xxxxxxxxxx>> wrote:
On 9/21/20 3:23 PM, Andy McCright wrote:
> > So, jax-rs requires jaxb when building. Building the api?
Building
> jersey? both?
>
> Building the API for sure - I'm not sure about Jersey, but I
would think
> that it would also require the dependency if it is implementing
the Link
> (and especially the Link.JaxbAdapter inner class) API.
>
>> Does the resulting api binary have a dependency on jaxb? If it
does,
> then that's a problem.
>
> Yes it does. But users should not notice the dependency unless they
> explicitly use the Link class. Since the vast majority of
RESTful WS
> function is available without using that class, I would claim
that it is
> an /optional/ dependency.
Java SE 11 as well as OSGi are going to treat the dependency of
jakarta.ws.rs-api 3.0.0 which is in staging right now on jaxb-api as
required. Java SE 11 is probably not important but OSGi should be...
thanks,
--lukas
>
>> I'm not clear on this "Link" class. I guess this gets back to the
> previous question. If the dependency on jaxb is soft and
dynamic, and
> the only time that the dependency is required is when this "Link"
class
> is utilized, then we're getting closer to workable solution.
>
> It is certainly a hard dependency from the Link.JaxbAdapter inner
> class. It is not soft/dynamic from the perspective that it is
loaded
> reflectively and handled gracefully if not available. If a user
> attempts to use this class without having Jakarta XML Binding in
their
> classpath, they will see a nasty
> ClassNotFoundException/NoClassDefFoundError like Scott reported.
>
>> Is this "Link" class marked "optional" as part of the API?
>
> The javadoc has the wording I mentioned previously. Is there a more
> official way to mark the class as "optional"?
>
>
>> Does the TCK test this "Link" class and are those tests marked
optional?
>
> The TCK does use the Link class, and afaict those tests are not
> currently marked optional.
>
> In the Jakarta RESTful WS spec, there are requirements for
> implementations when other Jakarta APIs are available. For
example, an
> implementation is required to supply a built-in JSON-B provider
if the
> JSON-B APIs are available. I don't know how (or if) this is
tested in
> the TCK, but IMO we should use a similar mechanism to test the Link
> class - basically something like JUnit's "assume" method - i.e.
> assumeThat(canLoadJakartaXMLBindingAPIs()); That should prevent
the test
> from failing if the environment does not have XML Binding, but
should
> perform the test if it does.
>
> Hope this helps,
>
> Andy
>
>
> On Fri, Sep 18, 2020 at 7:49 AM Kevin Sutter <sutter@xxxxxxxxxx
<mailto:sutter@xxxxxxxxxx>
> <mailto:sutter@xxxxxxxxxx <mailto:sutter@xxxxxxxxxx>>> wrote:
>
> Hi Andy,
> Thanks for the background information. But, I'm just not
familiar
> enough with the jax-rs architecture to know if the solution is
> sufficient.
>
> > So, what this means is that RESTful WS depends on XML
Binding API at
> build time. The Link class is rarely used in user
applications, but
> when it is, users must ensure that their runtime environment
> includes XML Binding APIs and an implementation. For most users,
> they will not need a runtime dependency on XML Binding.
>
> So, jax-rs requires jaxb when building. Building the api?
Building
> jersey? both?
>
> Does the resulting api binary have a dependency on jaxb? If it
> does, then that's a problem.
>
> I'm not clear on this "Link" class. I guess this gets back
to the
> previous question. If the dependency on jaxb is soft and
dynamic,
> and the only time that the dependency is required is when this
> "Link" class is utilized, then we're getting closer to workable
> solution. Is this "Link" class marked "optional" as part of the
> API? Does the TCK test this "Link" class and are those tests
marked
> optional?
>
> Bottom line is that with jaxb being marked as an Optional
> technology, then the standard jax-rs and jakarta ee runtime
can not
> have a hard, non-optional dependency on jaxb.
>
> ---------------------------------------------------
> Kevin Sutter
> STSM, MicroProfile and Jakarta EE architect @ IBM
> e-mail: sutter@xxxxxxxxxx <mailto:sutter@xxxxxxxxxx>
<mailto:sutter@xxxxxxxxxx <mailto:sutter@xxxxxxxxxx>> Twitter:
> @kwsutter
> phone: tl-553-3620 (office), 507-253-3620 (office)
> LinkedIn: https://www.linkedin.com/in/kevinwsutter
<https://urldefense.com/v3/__https://www.linkedin.com/in/kevinwsutter__;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6U2DJXtEs$>
>
<https://urldefense.com/v3/__https://www.linkedin.com/in/kevinwsutter__;!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5Lcvbm6VUM$>
>
>
>
> From: Andy McCright <j.andrew.mccright@xxxxxxxxx
<mailto:j.andrew.mccright@xxxxxxxxx>
> <mailto:j.andrew.mccright@xxxxxxxxx
<mailto:j.andrew.mccright@xxxxxxxxx>>>
> To: jakartaee-platform developer discussions
> <jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>
> <mailto:jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>>>
> Cc: Kevin Sutter <sutter@xxxxxxxxxx
<mailto:sutter@xxxxxxxxxx> <mailto:sutter@xxxxxxxxxx
<mailto:sutter@xxxxxxxxxx>>>
> Date: 09/17/2020 20:26
> Subject: [EXTERNAL] Re: [jakartaee-platform-dev] What does it
mean
> for Jakarta EE 9 Full Platform that Jakarta RESTful Web
Services are
> depending on (optional) Jakarta XML Binding in Jakarta EE 9?
>
------------------------------------------------------------------------
>
>
>
> Hi All, The dependency has been there since JAX-RS 2.0. When
we had
> discussed this...
> *This Message Is From an External Sender*
> This message came from outside your organization.
>
>
> Hi All,
>
> The dependency has been there since JAX-RS 2.0. When we had
> discussed this previously we decided that we could not remove the
> dependency as that would be a breaking change. Instead we decided
> that user applications that use this API are responsible for
> providing the Jakarta XML Binding APIs and implementation
> (either through their own app or through the vendor app server).
> Back in March, I added these lines to the Javadocs:
>
> * Note that usage of this class requires the Jakarta XML
> Binding API and an implementation. The Jakarta RESTful Web
> * Services implementation is not required to provide these
> dependencies.
>
> So, what this means is that RESTful WS depends on XML Binding
API at
> build time. The Link class is rarely used in user
applications, but
> when it is, users must ensure that their runtime environment
> includes XML Binding APIs and an implementation. For most users,
> they will not need a runtime dependency on XML Binding.
>
> At the time we discussed this, it was approved by the RESTful WS
> project and at least consensus reached by the platform committee,
> but if we don't like that answer now, I'm open to considering
other
> options.
>
> Hope this helps,
>
> Andy
>
> On Thu, Sep 17, 2020 at 2:20 PM Scott Marlow
<_smarlow@redhat.com_
> <mailto:smarlow@xxxxxxxxxx <mailto:smarlow@xxxxxxxxxx>>> wrote:
>
>
>
> On 9/17/20 2:41 PM, Kevin Sutter wrote:
> > According to the early discussions on this topic, the
JAX-RS team had
> > indicated they would be changing their spec, api, javadoc
(whatever) to
> > allow for jaxb to be optional. Â It looks like the javadoc
(at least)
> > still indicates that jaxb is required. That has to change
(at a
> > minimum). Â Once this is properly delineated as optional,
then any
> > corresponding TCKs will need to be marked optional as well.
 Which would
> > then flow into the Platform TCK...
> _
> __https://github.com/eclipse-ee4j/jaxrs-api/issues/906_
<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/jaxrs-api/issues/906___;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UM6dk8AI$>
>
<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/jaxrs-api/issues/906__;!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5LcqVlYRpw$>is
> for updating
> jakarta.ws.rs.core.Link to not depend on optional (for
Jakarta EE 9)
> jakarta.xml.bind (JAXB). The issue includes a link to this
mailing
> list
> conversation.
>
> Scott
>
> >
> > ---------------------------------------------------
> > Kevin Sutter
> > STSM, MicroProfile and Jakarta EE architect @ IBM
> > e-mail: Â _sutter@xxxxxx.com_ <mailto:sutter@xxxxxxxxxx
<mailto:sutter@xxxxxxxxxx>>Â Â Twitter: Â @kwsutter
> > phone: tl-553-3620 (office), 507-253-3620 (office)
> > LinkedIn: _https://www.linkedin.com/in/kevinwsutter_
<https://urldefense.com/v3/__https://www.linkedin.com/in/kevinwsutter___;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UvQe-yWI$>
>
<https://urldefense.com/v3/__https://www.linkedin.com/in/kevinwsutter__;!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5Lcvbm6VUM$>
> >
> >
> >
> > From: Scott Marlow <_smarlow@redhat.com_
<mailto:smarlow@xxxxxxxxxx <mailto:smarlow@xxxxxxxxxx>>>
> > To: jakartaee-platform developer discussions
> > <_jakartaee-platform-dev@eclipse.org_
> <mailto:jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>>>
> > Date: 09/17/2020 13:26
> > Subject: [EXTERNAL] [jakartaee-platform-dev] What does it
mean for
> > Jakarta EE 9 Full Platform that Jakarta RESTful Web
Services are
> > depending on (optional) Jakarta XML Binding in Jakarta EE 9?
> > Sent by: _jakartaee-platform-dev-bounces@eclipse.org_
> <mailto:jakartaee-platform-dev-bounces@xxxxxxxxxxx
<mailto:jakartaee-platform-dev-bounces@xxxxxxxxxxx>>
> >
------------------------------------------------------------------------
> >
> >
> >
> > Hi,
> >
> > It looks like Jakarta RESTful Web Services SPEC API depends on
> > (optional) Jakarta XML Binding. Â See line 28 in jaxrs-api
[1] (line 551
> > is also interesting).
> >
> > How can Jakarta XML Binding be optional [2] if Jakarta
RESTful Web
> > Services depends on them?
> >
> > Thanks Alwin for mentioning this on
jakartaee-tck/issues/491 [3]!
> >
> > Scott
> >
> > [1]
> >
_https://github.com/eclipse-ee4j/jaxrs-api/blob/master/jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java#L28_
<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/jaxrs-api/blob/master/jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java*L28___;Iw!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UEL4KTmI$>
>
<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/jaxrs-api/blob/master/jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java*L28__;Iw!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5LcSEil0c8$>
> >
> > [2]
> >
_https://jakarta.ee/specifications/platform/9/platform-spec-9-SNAPSHOT.html#xml-binding-3-0-requirements-optional_
<https://urldefense.com/v3/__https://jakarta.ee/specifications/platform/9/platform-spec-9-SNAPSHOT.html*xml-binding-3-0-requirements-optional___;Iw!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UxDC5MEY$>
>
<https://urldefense.com/v3/__https://jakarta.ee/specifications/platform/9/platform-spec-9-SNAPSHOT.html*xml-binding-3-0-requirements-optional__;Iw!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5Lcr9b3jDE$>
> >
> > [3]
> >
_https://github.com/eclipse-ee4j/jakartaee-tck/issues/491#issuecomment-694324790_
<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/jakartaee-tck/issues/491*issuecomment-694324790___;Iw!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UuUz-v9M$>
>
<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/jakartaee-tck/issues/491*issuecomment-694324790__;Iw!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5LcPqHfyxY$>
> >
> > _______________________________________________
> > jakartaee-platform-dev mailing list
> > _jakartaee-platform-dev@eclipse.org_
> <mailto:jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>>
> > To unsubscribe from this list, visit
> >
_https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev_
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev___;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UeHDqCMw$>
>
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5LcT70MgGk$>
> >
> >
> >
> >
> >
> > _______________________________________________
> > jakartaee-platform-dev mailing list
> > _jakartaee-platform-dev@eclipse.org_
> <mailto:jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>>
> > To unsubscribe from this list, visit
_https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev_
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev___;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UeHDqCMw$>
>
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5LcT70MgGk$>
> >
>
> _______________________________________________
> jakartaee-platform-dev mailing list_
> __jakartaee-platform-dev@eclipse.org_
> <mailto:jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>>
> To unsubscribe from this list, visit
>
_https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev_
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev___;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6UeHDqCMw$>
>
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5LcT70MgGk$>
>
>
>
> _______________________________________________
> jakartaee-platform-dev mailing list
> jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>
> To unsubscribe from this list, visit
https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!GqivPVa7Brio!LOpV0OJr4FvJcQfpms6k_Ib9uHtQ0Ns5AXwCs-AhMo3qHmuTins-AFn_O5LcT70MgGk$
>
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6ULuVA7YY$>
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!GqivPVa7Brio!IaopMSJE857XaubVbMNtIDRvMcegzY1GgbJK1GM8hI6a9AvwZ1RoK93BD_6ULuVA7YY$