jaxb-tools icon indicating copy to clipboard operation
jaxb-tools copied to clipboard

Plugin is not aware of maven toolchains plugin

Open jmsoliveira opened this issue 9 years ago • 1 comments
trafficstars

I was using maven 3.3.9 and java 8 and configured the maven toolchains plugin in my project to compile the project using the jdk 6 toolchain.

In this configuration I had this error when compiling the generated sources:

cannot find symbol
[ERROR] symbol  : method required()
[ERROR] location: @interface javax.xml.bind.annotation.XmlElementRef

I added <specVersion>2.1</specVersion> to the jaxb2 plugin configuration and it worked.

I think it would be good if the specVersion took into account the version of the target toolchain so there wouldn't be another place to configure when using the toolchains plugin.

Of course this would only be valid if the user hadn't specified a specVersion. If the user specifies a version then it should take precedence and issue a warning if it is incompatible.

jmsoliveira avatar Jan 12 '16 15:01 jmsoliveira

Would you please PR a test project with a toolset configured?

https://github.com/highsource/maven-jaxb2-plugin/tree/master/tests/gh-issue-82

Take the po project as basis, for instance.

highsource avatar Jan 14 '16 07:01 highsource