corretto-11
corretto-11 copied to clipboard
Javadoc does not handle annotations in package-info.java correctly
In 11.0.17.8.1 the OpenJDK version was updated. Javadoc in this OpenJDK version fails to resolve package level annotations in package-info.java. See also: https://bugs.openjdk.org/browse/JDK-8295850.
I've attached a simple Spring Boot Sample project where I added the situation where this error occurs. Using jaxb2 to generate example classes, which creates a package-info.java file.
On Amazon Corretto 11.0.17 ./mvnw verify gives the following error:
[ERROR] /Users/<user>/Downloads/demo/target/generated-sources/xjc/com/example/demo/dto/package-info.java:8: error: unknown tag: javax.xml.bind.annotation.XmlSchema
[ERROR] @javax.xml.bind.annotation.XmlSchema(namespace = "http://localhost/WebService/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
[ERROR] ^
[ERROR]
[ERROR] Command line was: /Users/<user>/.sdkman/candidates/java/11.0.17-amzn/bin/javadoc @options @packages
On Amazon Corretto 11.0.16 this command does not fail.