JBA 2, 3 14 You maybe want to have a look at this link docs. Change the scope to compile: But when I run mvn package , the resulting jar file still complains about a missing jdbc driver. Have a look at this:
|Date Added:||4 April 2009|
|File Size:||36.56 Mb|
|Operating Systems:||Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X|
|Price:||Free* [*Free Regsitration Required]|
maven – Can I install the mysql jdbc connector using mvn install:install-file? – Stack Overflow
Yep, the above method of just adding it to your pom. I have the following: I needed to build an uber pom, using the answer maven mysql jdbc the link above – this builds in the dependencies in this case the mysql jar file into a single SNAPSHOT jar file.
By the scope runtime you are telling maven that it must not pack that dependeny into your final jar since the execution environment will “provide that dependency at runtime. Is the m2 repo on the classpath? Most Maven mysql jdbc will anyways ignore the scopes and add all maven mysql jdbc your dependencies to their classpath e.
Anyhow I would like to prefer to use the mvn deploy: Utkarsh Gupta mtsql 1 2.
Sign up using Facebook. Subsequent requests from this or orher projects for it will use that JAR.
Java Connector Using Maven
Here is a quick info for your background: I had the same maven mysql jdbc and here is what I did: I’ve included this part in my pom. Faxriddin Abdullayev 1 6 I’m basically looking for a way to get the mysql jdbc jar loaded into my maven repository.
The only solution which worked for me was building an uber pom.
And if you are getting a. Change the scope to compile: The first one to copy dependencies maven mysql jdbc a folder inside target folder e. When it detects it is not in your local Maven repository on your hard driveit will load it from Maven Central.
Maven Repository: mysql » mysql-connector-java »
Sergey Brunov 9, 4 25 I’m maven mysql jdbc the process of setting up a machine for Java development, and need to mhsql sure I have access to the mysql DB first. JBA 2, 3 14 The MySQL jar is in my. Thanks, but I tried that and no difference.
The “install-file” or “deploy-file” goals are used for myaql or deploying artifacts to your local or internal maven mysql jdbc that are not available from Maven Central or other external repositories that you may have configured.
Basically I plan to use maven for a planned project and would like to only have one copy maven mysql jdbc the mysql jdbc jar file on my machine and figured I should be able to pull it using a maven command. Thanks for all the insight!