[cdi-dev] Duplicate javax.annotation packages and Java 9

Antoine Sabot-Durand asd at redhat.com
Mon Oct 23 04:17:12 EDT 2017


I encountered the same type of collision with
java.transaction.InvalidTransactionException which is in the JDK and in
JTA. I remember sending this problem to jigsaw ML [1], but obviously they
didn't have time to do something or expect having Java EE spec do the
required stuff :-(.
Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will be)
to support jigsaw, we'll probably have to change packages names :-(.


Antoine

[1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-July/008779.html


On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <mkouba at redhat.com> wrote:

> For the record, the CDI API itself does not define a dependency on
> javax.annotation at all.
>
> In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
> reasons are similar to why javax.annotation.Priority only has
> @Target({TYPE,PARAMETER}) (even if we tried to push other element types
> :-(.
>
> M
>
> Dne 21.10.2017 v 16:22 John Ament napsal(a):
> > Hey all
> >
> >
> > Not sure where else to turn 😊
> >
> >
> > I'm trying to start testing my apps on Java 9, I believe Java 9 kicks
> > back the javax.annotation dependency that CDI declares due to a package
> > collision with the built in JDK's javax.annotation package
> > <
> https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html
> >.
> > The errors I get are due to missing javax/annotation/Priority.  I'm
> > wondering if anyone else has tried this, and if there's a clean work
> around?
> >
> >
> > John
> >
> > ------------------------------------------------------------------------
> > NOTICE: This e-mail message and any attachments may contain
> > confidential, proprietary, and/or privileged information which should be
> > treated accordingly. If you are not the intended recipient, please
> > notify the sender immediately by return e-mail, delete this message, and
> > destroy all physical and electronic copies. Thank you.
> >
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2 (
> http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> provided on this list, the provider waives all patent and other
> intellectual property rights inherent in such information.
> >
>
> --
> Martin Kouba
> Senior Software Engineer
> Red Hat, Czech Republic
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2 (
> http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> provided on this list, the provider waives all patent and other
> intellectual property rights inherent in such information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20171023/ce6d5c6a/attachment-0001.html 


More information about the cdi-dev mailing list