Maven dependency problem (plugin m2) in Eclipse

Asked

Viewed 767 times

1

I’m new to Java development and I don’t know much about Maven. The little I learned was through research and tutorials on the internet, and now I’m facing a problem that seems to be related to settings and do not know how to solve.

Come on. I’m using Maven (EMBEDDED version 3.2.1 / 1.5.1.50109-1819) which comes along with Eclipse Juno to manage my dependencies. Along with them, I also use the jboss Tools plugin to send my application to Openshift. So far so good.

I am facing problems with my Tomcat 8 in openshift and from some logs and searches, I could see that the problem is apparently a version bug 5.0.8 mysql-Connector-java.jar contained in my project. So I went to Maven Repository to get the latest version of mysql-Java and change it to my pom.xml file.

Of

<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.0.8</version> </dependency>

for

    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.38</version>
    </dependency>

When saving pom.xml after changing from 5.0.8 to 5.1.38 mysql-Connector-java, Maven does not seem to copy the mysql-Connector-java-5.1.38.jar file to the WEB-INF/lib folder of my local project, but when I build a Maven with Goal clean install, Maven builds successfully, and in the target/Meuapp.0.0.1-SNAPSHOT/WEB-INF/lib folder is both mysql-Connector-java.5.0.8-bin. jar how much mysql-Connector-java-5.1.38.jar. What might be happening? Is the correct Maven stream when changing the version of a dependency on the pom.xml file not downloaded and saved in the local application’s WEB-INF/lib folder and deleted the previous version? Please, any help is welcome =)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.