I use codehaus jaxb-maven-plugin to create Java classes from xml schemas:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>xjc</id>
<phase>generate-sources</phase>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>src/my.xsd</source>
</sources>
<packageName>mypackage</packageName>
</configuration>
</execution>
</executions>
</plugin>
Classes are generated as expected in target/generated-sources/jaxb, but this path is not added to the class path.
So, if I use some of the generated classes in other (non-generated) classes, maven cannot find it during the compilation process.
Any ideas? TIA!
source
share