The code I\'m working on is using jaxb2-maven-plugin
from org.codehaus.mojo
to generate Java classes from XSD schema. I\'m looking for a way to aut
This is the easiest way to do. Please update version as per your requirements.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-commons-lang</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>JAXB generate content classes</id>
<phase>generate-sources</phase>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/schema</schemaDirectory>
<outputDirectory>${project.build.directory}/generated-sources/jaxb</outputDirectory>
<schemaFiles>**/*.xsd</schemaFiles>
<packageName>com.lexus.web.content.model</packageName>
<arguments>-Xcommons-lang</arguments>
</configuration>
</execution>
</executions>
</plugin>