Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

M2E Failed to load all dependencies

I am using Spring Tool Suite 3.6.3 and M2E eclipse plugin 1.4.1, when I opened the POM file from one of the project, I observed not all the dependencies are getting added, I have added depnedecy configuration for jaxws-rt with version 2.2.8 which has many dependencies as follows

    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
    </dependency>
    <dependency>
        <groupId>javax.xml.ws</groupId>
        <artifactId>jaxws-api</artifactId>
    </dependency>
    <dependency>
        <groupId>javax.xml.soap</groupId>
        <artifactId>javax.xml.soap-api</artifactId>
    </dependency>
    <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
    </dependency>
    <dependency>
        <groupId>javax.jws</groupId>
        <artifactId>jsr181-api</artifactId>
    </dependency>
    <!-- Provided dependencies -->
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-core</artifactId>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>policy</artifactId>
    </dependency>
    <dependency>
        <groupId>org.glassfish.gmbal</groupId>
        <artifactId>gmbal-api-only</artifactId>
    </dependency>
    <dependency>
        <groupId>org.jvnet.staxex</groupId>
        <artifactId>stax-ex</artifactId>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.stream.buffer</groupId>
        <artifactId>streambuffer</artifactId>
    </dependency>
    <dependency>
        <groupId>org.jvnet.mimepull</groupId>
        <artifactId>mimepull</artifactId>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.fastinfoset</groupId>
        <artifactId>FastInfoset</artifactId>
    </dependency>
    <dependency>
        <groupId>org.glassfish.ha</groupId>
        <artifactId>ha-api</artifactId>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.messaging.saaj</groupId>
        <artifactId>saaj-impl</artifactId>
    </dependency>

    <dependency>
        <artifactId>woodstox-core-asl</artifactId>
        <groupId>org.codehaus.woodstox</groupId>
    </dependency>
    <dependency>
        <groupId>org.codehaus.woodstox</groupId>
        <artifactId>stax2-api</artifactId>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.sun.org.apache.xml.internal</groupId>
        <artifactId>resolver</artifactId>
    </dependency>

In STS when I open the POM, and navigates to the Dependency Hierarchy, I am not able to see policy, resolver and streambuffer dependencies.

But when I run mvn clean install from command prompt, all above mentioned jars gets added to .war file.

I think there is some issue with the m2e + STS, not sure why m2e is not able to get those missing dependencies.

like image 885
Yogesh Shinde Avatar asked Dec 30 '14 15:12

Yogesh Shinde


1 Answers

I found the solution

The machine where we faced this issue, had java 1.6 executable copied in system32 folder, and when we removed those files and updated path to use jdk 1.7, issue got resolved....

I tried to search for compatible java version for m2e 1.4.1 but didn't found anything, for new m2e version i.e. 1.5 required java version is specified.

like image 180
Yogesh Shinde Avatar answered Nov 03 '22 16:11

Yogesh Shinde