<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>schemagen</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/xsd</schemaDirectory>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
<packageName>com.cyb.test</packageName>
<clearOutputDir>false</clearOutputDir>
</configuration>
</plugin>
</plugins>
</build>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>schema1-xjc</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaFiles>Transaction.xsd</schemaFiles>
<packageName>com.xxx.domain</packageName> <!-- The name of your generated source package -->
<staleFile>${project.build.directory}/jaxb2/.schema1XjcStaleFlag</staleFile>
</configuration>
</execution>
<execution>
<id>schema2-xjc</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaFiles>STModels.xsd</schemaFiles>
<packageName>com.xxx.st.domain</packageName> <!-- The name of your generated source package -->
<staleFile>${project.build.directory}/jaxb2/.schema2XjcStaleFlag</staleFile>
<clearOutputDir>false</clearOutputDir>
</configuration>
</execution>
</executions>
</plugin>