-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java 9 Maven Plugin Support #4
Comments
@greenwoodma why can we not rely on package-info? |
Never mind ;) Answer is here: openminted/omtd-share-annotations#45 (comment) |
So I've now had the chance to try using 3.0.2-SNAPSHOT and I have good news and bad news. The good news is that when running under Java 9 this version of the model produces a valid XML descriptor that validates against the XSD because XJC is run with the -npa option so as not to overwrite the custom details @courado added to package-info The bad new is that under Java 9 the package-info classes are still completely ignored which means that the custom namespace prefix info in the hand crafted package-info.java files are ignored, so we end up with ns1: instead of ms: in the generated files. While that's not ideal as you'll get different files when running under Java 8 and Java 9 both are valid given the XSD so that's probably good enough for me. I guess that means we need to do a new release of the model which the maven plugin can then depend on. |
Do you know if it is a known bug in Java 9 or JAXB that package-info is ignored? Do you have some issue tracker link? |
Unfortunately I've been unable to find any mention of what the actual problem is no matter what I google for. If anyone comes across anything I'd be interested in what they find, but for now as I said it just completely ignores the info in package-info but I don't know if the problem is in java 9, maven, or JAXB 2.3.0 unfortunately |
What custom details do you mean? The |
So in omtd-model:3.0.2 there is a In 3.0.2-SNAPSHOT (i.e. the develop branch which should really by 3.0.3-SNAPSHOT or something) there is actually a |
Right - found the |
To allow the model to correctly generate XML descriptors under Java 9 when the code is run from within a Maven plugin we can't rely on package-info so we need to internalise all the info by adding
-npa
to the call to XJC. See openminted/omtd-share-annotations#45 for full details.The text was updated successfully, but these errors were encountered: