0

我正在使用 JDK 1.6(由于依赖项)并从 xsd 生成类,我在 pom.xml 中添加了 maven-jaxb2 插件,如下所示。

但是日食(开普勒)抱怨如下。

解析命令行时出错 [[-Xsimplify, -episode, D:\test\workspace\sample\target\generated-sources\xjc\META-INF\sun-jaxb.episode]] (org.jvnet.jaxb2.maven2: maven-jaxb2-plugin:0.8.1:generate:jaxb-test:generate-sources)

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

1 回答 1

1

尝试升级到maven-jaxb2-plugin 0.13.1jaxb2-basics 0.11.0

您现在拥有的版本已经很旧了。

于 2016-01-11T16:14:59.893 回答