<!-- tag::wsdl[] -->
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<id>firstrun</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>my.package.osb.services.wsdl1</generatePackage>
<schemas>
<schema>
<url>http://x.x.x.x:8002/wsdl1?wsdl</url>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>secondrun</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>my.package.osb.services.wsdl2</generatePackage>
<schemas>
<schema>
<url>http://x.x.x.x:8002/wsdl2?wsdl</url>
</schema>
</schemas>
</configuration>
</execution>
</executions>
</plugin>
<!-- end::wsdl[] -->
My understanding is that the above should generate the POJOs described in the two URLS in two different packages.
I don't understand why it does not work. The error I am getting after mvn jaxb2:generate
is No schemas to compile. Skipping XJC execution.
Can one please provide a complete solution on how to do this properly but with WSDL urls?