Java SE JSR 250 annotations module renamed to java.xml.ws.annotation?
Alan.Bateman at oracle.com
Mon Feb 13 14:34:38 UTC 2017
On 13/02/2017 13:34, Guillaume Smet wrote:
> This doesn't work anymore as the Java SE JSR 250 annotations (@Generated,
> @PreDestroy, @PostConstruct, @Resource...) that were previously in a module
> called java.annotations.common were moved to a module called
> java.xml.ws.annotation as part of the aforementioned issue.
There will be a some shimmer in the module graph and names until things
are final so anything depending on the names in the EA builds may need
to deal with changes. Yes, it is mildly disruptive but hopefully not too
many changes before JSR 379 and JDK 9 is final.
> As far as I understand it, these annotations are supposed to be common
> annotations available in the JDK (see JSR 250: Common Annotations for the
> JavaTM Platform). Some are used by a lot of projects out there: nearly
> every project based on generated code requires the @Generated annotation to
> be present as most tools generating code use it.
> I don't know why these annotations were hosted in the jaxws part of the
> source code to begin with but I don't think we can limit them to this usage.
> At the end, I'm wondering if these classes shouldn't be part of the default
> set of classes exposed without requiring an --add-modules option.
The small subset of the JSR-250 defined "Common Annotations" that you
see in Java SE is part of the web services stack that was added in Java
SE 6. If it weren't for JAX-WS then these annotations would have no
business being in Java SE or the JDK.
The rational for why this module is not resolved by default is
documented in JEP 261. For those that don't deploy with the Java EE
version of these annotations then it does mean using `--add-modules
One thing to be aware of is that the JSR 379 EDR proposes to deprecate
this module for removal and hopefully it can be removed in Java SE 10.
More information about the jigsaw-dev