I am having trouble configuring the jaxb2-maven-plugin
to generate Java classes from a WSDL and multiple XSD files that all exist in the same standard directory src/main/xsd
.
how to use jaxb2 maven plugin with inline XSD? is related only in that the answers correctly suggest using the wsdl
parameter in the plugin config but that question is really concerned with inline XSDs and my XSDs are external.
The plugin goal parameters are listed here.
My plugin configuration is:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>com.x.y.model</packageName>
<wsdl>true</wsdl>
</configuration>
</plugin>
I am testing this with mvn -X clean jaxb2:xjc
but the plugin is ignoring the .wsdl
as seen in the debug output
[DEBUG] accept false for file c:\projects\foo\src\main\xsd\service.wsdl
[DEBUG] accept true for file c:\projects\foo\src\main\xsd\datatypes.xsd
[DEBUG] accept true for file c:\projects\foo\src\main\xsd\more-datatypes.xsd