`

maven jaxb xsd to pojo

    博客分类:
  • java
阅读更多

<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>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics