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

问题描述

我正在尝试使用来自GitHub的jvnet maven-jaxb2-plugin的示例JAXB Maven项目。我使用的是最新版本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:

有趣的是,我仍然可以使用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:

-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错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 20:22