0
我使用maven jaxb2插件從xsd生成類。Maven JAXB插件
但是,XJC每次都會生成類,我運行mvn clean install
,儘管我沒有修改XSD /綁定文件。
PS:我必須做乾淨的安裝,因爲它是其他任務所必需的。
forceRegenerate =false
不工作
PLS指南。
的pom.xml
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<!-- TODO need to confirm if directly updating source files are ok.
or should we move to target directory -->
<bindingDirectory>${basedir}/src/main/resources/wsdl</bindingDirectory>
<generateDirectory>${basedir}/src/main/java</generateDirectory>
<generatePackage>com.abc.def.chg.beans</generatePackage>
<specVersion>2.1</specVersion>
<forceRegenerate>false</forceRegenerate>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.9.3</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-annotate</artifactId>
<version>1.0.1</version>
</plugin>
</plugins>
<args>
<arg>-Xannotate</arg>
<arg>-XtoString</arg>
</args>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory. -->
<directory>${basedir}/src/main/resources/wsdl</directory>
<!-- Defaults to schemaIncludes. -->
<includes>
<include>*.xsd</include>
</includes>
<!-- Defaults to schemaIncludes -->
</fileset>
</schema>
</schemas>
</configuration>
</plugin>