eclipse中的JAXB2 maven插件显示错误 [英] JAXB2 maven plugin in eclipse shows error

查看:180
本文介绍了eclipse中的JAXB2 maven插件显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm using JDK 1.6 (due to dependencies) and to generate classes from xsd, I have added maven-jaxb2 plugin as shown below in pom.xml.

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

But the eclipse (Kepler) complains as below.


解析命令行时出错[[-Xsimplify,-episode,
D:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ -jaxb2-plugin:0.8.1:generate:jaxb-test:generate-sources)

Error parsing the command line [[-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>


推荐答案

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

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

The versions you have now are very old already.

这篇关于eclipse中的JAXB2 maven插件显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆