![maven repository mysql connector for java maven repository mysql connector for java](https://www.roseindia.net/images/images3/84898.400x300.Maven-Dependency-mysql-connector-java-6-0-2.png)
if 2 does not work, then try step 2 again but run mvn with -o flag.If the problem persists, then manually download mysql-connector-java-5.1.36.jar and place it there.Make sure you do chmod +777 to that path. You should go to /conf/settings.xml and uncomment and change /path/to/local/repo to a path. Go to your maven installation and specify a different repository location.Then, we'll also look at some external libraries including MyBatis, Apache Cayenne and Spring. We'll start by looking at arguably the most popular options using JDBC and Hibernate.
Maven repository mysql connector for java how to#
I just copied your pom and i was able to successfully build. There are many ways we can connect to a MySQL database from Java and in this tutorial, we're going to explore several options to see how to achieve this.
• Upgrade to maven 3 if you are on maven 2. Maven: Add the mysql:mysql-connector-java library to the dependencies element of your pom.xml file:Central repository is by default configured with maven installation.
![maven repository mysql connector for java maven repository mysql connector for java](https://donnesuivretemoin.com/grklkq/TeN8MfvhUQeY9uhSe74oNgAAAA.jpg)
if you are using either nexus or artifactory repositories in your organization.m2/repository/mysql-connector-java/5.1.36 there is only pom.xml file.
![maven repository mysql connector for java maven repository mysql connector for java](https://i.stack.imgur.com/a4EoE.png)
My IDE is not showing me any errors.Īlso, here is my dependency in the POM : įrom the OP response, it looks like in. I have also tried blowing it away, and running : mvn cleanīut the error just will not go away. I have checked, the jar is there, right where maven is looking. I am getting the following error : Failed to execute goal :maven-shade-plugin:2.3:shade (default) on project rest-api: Error creating shaded jar: error in opening zip file /Users/ldelaney/.m2/repository/mysql/mysql-connector-java/5.1.36/mysql-connector-java-5.1.36.jar I am trying to build my dropwizard project using the following command : mvn package