Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse error message for jvnet maven-jaxb2-plugin version 0.13.0

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

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:

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

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.

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>
like image 821
dunfa Avatar asked Feb 09 '23 09:02

dunfa


1 Answers

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

after pressing Alt+F5 (Update Project) everything was ok.

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

like image 173
Del Pedro Avatar answered Feb 10 '23 23:02

Del Pedro