jaxb2-maven-plugin has the <xsdPathWithinArtifact>
option. Is there an equivalent in maven-jaxb2-plugin? What is the recommended way to include the schema file in the produced jar? I'm currently using Maven's native <resources>
.
Disclaimer: I'm the author of the maven-jaxb2-plugin.
No, there is no such option in maven-jaxb2-plugin and there will not be. Managing resources is not the concern of maven-jaxb2-plugin, there are other Maven plugins for that.
The recommended way is exactly what you're doing - place your schemas under src/main/resources
and they will be packaged in the resulting JAR.