this is my relevant part of pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaDirectory>src/main/xsd</schemaDirectory>
<schemaFiles>BILL.xsd</schemaFiles>
<bindingDirectory>src/main/java/xml</bindingDirectory>
<bindingFiles>binding.xml</bindingFiles>
<clearOutputDir>true</clearOutputDir>
<extension>true</extension>
</configuration>
</execution>
</executions>
I am using jdk 1.7. When running,its parsing the given xsd file and corresposding JAXB classes are being generated but my requirement is to generate separate classes, not inner ones as being currently generated. For this, I have a very generic binding.xml
But on running jaxb2 plugin xjc; JAXB classes with inner static classes are being generated.
Any suggestions....
`
This is an old question. For me, it worked with version
0.14.0
of themaven-jaxb2-plugin
by using the<bindings>
configuration:You can find the list of possible configurations on the cheat sheet.