1-й, вам нужно извлечь jar, содержащий XSD, используя плагин maven-dependency-plugin, как этот.
<plugin>
<!-- Unpack the jar into target directory -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>unpack</id>
<phase>validate</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${unpack.directory}</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
<includeGroupIds>com.companyname</includeGroupIds>
<includeArtifactIds>jarname</includeArtifactIds>
<excludes>**/*.html,samples/**</excludes>
</configuration>
</execution>
</executions>
Позже вам нужно использовать maven-jaxb2-plugin для преобразования извлеченных xsds в java-классы, как указано ниже.
<plugin>
<!-- Convert XSD to java classes using jaxb plugin -->
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.2</version>
<configuration>
<extension>true</extension>
<generateDirectory>${generated.source.directory}</generateDirectory>
</configuration>
<executions>
<execution>
<id>Generate java-from-schema</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>${unpack.directory}/XXX</schemaDirectory>
<catalog>${unpack.directory}/catalog</catalog>
<schemaIncludes>
<schemaInclude>aaa/*.xsd</schemaInclude>
<schemaInclude>bbb/*.xsd</schemaInclude>
<schemaInclude>ccc/*.xsd</schemaInclude>
</schemaIncludes>
</configuration>
</execution>
</executions>