0
我使用JDK 1.6(由於依賴關係)並且從xsd生成類,我已經在pom.xml中添加了如下所示的maven-jaxb2插件。eclipse中的JAXB2 maven插件顯示錯誤
但日食(開普勒)抱怨如下。
錯誤解析命令行[[-Xsimplify,-episode, d:\測試\工作空間\樣品\目標\產生來源\ XJC \ META-INF \太陽jaxb.episode] ( org.jvnet.jaxb2.maven2:Maven的JAXB2-插件:0.8.1:產生:JAXB測試:產生來源)
的pom.xml
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.9.0</version>
<executions>
<execution>
<id>jaxb-test</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<forceRegenerate>true</forceRegenerate>
<schemaDirectory>src/main/resources</schemaDirectory>
<schemaIncludes>
<include>sample.xsd</include>
</schemaIncludes>
<xjbSources>
<xjbSource>bindings.xjb</xjbSource>
</xjbSources>
</configuration>
</execution>
</executions>
<configuration>
<extension>true</extension>
<args>
<arg>-Xsimplify</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.6.0</version>
</plugin>
</plugins>
</configuration>
</plugin>
</plugins>
嘗試升級到'maven-jaxb2-plugin' 0.13.1和'jaxb2-basics' 0.11.0。你現在的版本已經很老了。 – lexicore
謝謝你解決了eclipse pom.xml錯誤。但是我仍然發現生成的類有aorB。 – ulab
@lexicore你可以請看看這個[鏈接](http://stackoverflow.com/questions/34704757/jaxb2-simplify-plugin-elements-not-simpllified) – ulab