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

Martin Kouba mkouba at redhat.com
Mon Oct 23 04:20:10 EDT 2017


Dne 23.10.2017 v 10:17 Antoine Sabot-Durand napsal(a):
> 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 :-(.

What packages do you have in mind? We don't "own" javax.annotation and 
we cannot introduce our own priority annotation...

> 
> 
> 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 
> <mailto: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 <mailto: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 <mailto: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


More information about the cdi-dev mailing list