Hi,
I'm running into an issue with Maven's JAXB2 plugin. I have 2 different schemas
(aaaaTestCaseSchema.xsd and bbbbTestCaseSchema.xsd) and want 2 different
packages (com.tmp.aaaa.dataDrivenTests and com.tmp.bbbb.dataDrivenTests) for
those schemas. I followed the recommendation in plugin's FAQ page
(http://mojo.codehaus.org/jaxb2-maven-plugin/faq.html
<https://owa.ku.edu/exchweb/bin/redir.asp?URL=http://mojo.codehaus.org/jaxb2-maven-plugin/faq.html>
) and created 2 executions in JAXB2 plugin declaration with each execution
having its own configuration declaration. In each configuration I specified the
schema and package to be run for that execution. The problem is that the last
execution always overwrites the first generated files, i.e., the plugin
generates com.tmp.aaaa.dataDrivenTests package and its associated java files
underneath this package and then overwrites it with
com.tmp.bbbb.dataDrivenTests package and its java files when it runs the second
execution. Here is my plugin declaration in pom.xml:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>da</id>
<phase>test</phase>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaDirectory>./src/test/resources</schemaDirectory>
<schemaFiles>aaaaTestCaseSchema.xsd</schemaFiles>
<removeOldOutput>true</removeOldOutput>
<generateDirectory>./src/test/java</generateDirectory>
<packageName>com.tmp.aaaa.dataDrivenTests</packageName>
<staleFile>${project.build.directory}/generated-sources/jaxb/.staleFlagAaaa</staleFile>
</configuration>
</execution>
<execution>
<id>scims</id>
<phase>test</phase>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaDirectory>./src/test/resources</schemaDirectory>
<schemaFiles>bbbbTestCaseSchema.xsd</schemaFiles>
<removeOldOutput>true</removeOldOutput>
<generateDirectory>./src/test/java</generateDirectory>
<packageName>com.tmp.bbbb.dataDrivenTests</packageName>
<staleFile>${project.build.directory}/generated-sources/jaxb/.staleFlagBbbb</staleFile>
</configuration>
</execution>
</executions>
</plugin>
Any idea as what I'm doing wrong?
Thanks
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email