jvnet maven-jaxb2-plugin版本0.13.0的Eclipse错误消息 [英] Eclipse error message for jvnet maven-jaxb2-plugin version 0.13.0

查看:48
本文介绍了jvnet maven-jaxb2-plugin版本0.13.0的Eclipse错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用来自GitHub的jvnet maven-jaxb2-plugin的示例JAXB Maven项目 https ://github.com/highsource/maven-jaxb2-plugin/releases 。我使用的是最新版本0.13.0并下载了maven-jaxb2-plugin-sample-jaxbplugins-0.13.0-maven-src.zip

I am trying the sample JAXB Maven project with jvnet maven-jaxb2-plugin from GitHub https://github.com/highsource/maven-jaxb2-plugin/releases. I am using the latest version 0.13.0 and downloaded maven-jaxb2-plugin-sample-jaxbplugins-0.13.0-maven-src.zip

我成功运行通过命令行安装mvn clean。但是当我将它导入Eclipse Luna时,我收到如下错误消息:

I am successful in running the mvn clean install via command line. But when I import it into Eclipse Luna, I got an error message like this:


目标的执行默认值
org.jvnet .jaxb2.maven2:maven-jaxb2-plugin:0.13.0:生成失败:执行
org.jvnet.jaxb2.maven2时缺少
必需的类:maven-jaxb2-plugin:0.13.0 :generate:
com / sun / xml / bind / api / ErrorListener

Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.0:generate failed: A required class was missing while executing org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.0:generate: com/sun/xml/bind/api/ErrorListener

有趣的是,我仍然可以使用Maven工具以Maven安装的方式运行并获取生成的类。但错误信息让我烦恼。这是一些Eclipse的bug还是什么?请帮忙。

It is interesting that I can still use the Maven tool to run as Maven install and get the generated classes. But the error message is there annoying me. Is that some Eclipse bug or what? Please help.

这是pom.xml的核心部分

This is the core part of the pom.xml

<dependencies>
    <dependency>
        <groupId>org.glassfish.jaxb</groupId>
        <artifactId>jaxb-runtime</artifactId>
        <version>2.2.11</version>
    </dependency>
    <dependency>
        <groupId>org.jvnet.jaxb2_commons</groupId>
        <artifactId>jaxb2-basics-runtime</artifactId>
        <version>0.9.0</version>
    </dependency>
</dependencies>
<build>
    <defaultGoal>install</defaultGoal>
    <plugins>
    <plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb2-plugin</artifactId>
        <version>0.13.0</version>
        <executions>
            <execution>
                <goals>
                    <goal>generate</goal>
                </goals>
                <configuration>
                    <args>
                    <arg>-XtoString</arg>
                    <arg>-Xequals</arg>
                    <arg>-XhashCode</arg>
                    <arg>-Xcopyable</arg>
                    </args>
                    <plugins>
                    <plugin>
                    <groupId>org.jvnet.jaxb2_commons</groupId>
                    <artifactId>jaxb2-basics</artifactId>
                    <version>0.9.0</version>
                    </plugin>
                    </plugins>
                </configuration>
            </execution>
        </executions>
    </plugin>
    </plugins>
</build>


推荐答案

我能够摆脱那些问题通过在我的eclipse ini中添加以下行,如下所述:

I was able to get rid of those "Problems" by adding the following line into my eclipse ini like described in:

http://diggingthroughcode.blogspot.de/2016/05/trouble-with-maven-jaxb2-plugin-and.html

-vm
C:\Program Files\Java\jdk1.8.0_92\bin\javaw.exe

我的设置java:1.8.0_92 / eclipse:Luna SR2(4.4.2)= STS 3.7.0

my setup java: 1.8.0_92 / eclipse: Luna SR2 (4.4.2) = STS 3.7.0

这篇关于jvnet maven-jaxb2-plugin版本0.13.0的Eclipse错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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