I need oracle drivers for a maven project that i am working on. My question is how to install the drivers on the maven repository (local). I am looking for complete command line thing for maven.I know that it goes something like:
mvn install:install-file -Dfile={Should i put complete path here?} -DgroupId=org.jdbc.OracleDriver <-- is this right?
I dont know what should come in artifact and version. Can someone give me the whole command line thing?
Actually, because you are placing the jar into your local repository, you can use any name and version you like. Personally, I would use a group id of "com.oracle.jdbc" and an artifact id of the actual jar file name without any version number or the jar suffix (I'd be more specific, but I don't use Oracle).
What I usually do is update my pom.xml file to include a dependency on JAR. Then I know how I want to reference the JAR. When I run mvn, it gives me the full command line for installing the jar.
And yes, you should provide the full path for the file property.
I actually posted this question a while back on maven mailing list (but in my utter stupidity while i was cleaning my stored / archived mails) i deleted the command / chain which helped me solve the problem earlier.
Here's the actual command that would work for reference (It should presumably help others as well, i am going to post this on my site's maven basics section ) :
After that you can run mvn clean install and it works! Oh and you have to manually copy jars to m2 repository folder m2/com/oracle/ <<YOUR VERSION>>/ <<JARS GO HERE>>
Why do you have to manually copy the JAR files? The mvn install command should be doing that for you.
Anirudh Vyas
Ranch Hand
Joined: Oct 23, 2006
Posts: 93
posted
0
Oh it will? I didn't know that, I 'll give it a try.
Thanks!
Rhett Wang
Greenhorn
Joined: Apr 03, 2008
Posts: 12
posted
0
Anirudh Vyas wrote:Hi,
I need oracle drivers for a maven project that i am working on. My question is how to install the drivers on the maven repository (local).
I am looking for complete command line thing for maven.I know that it goes something like:
mvn install:install-file -Dfile={Should i put complete path here?} -DgroupId=org.jdbc.OracleDriver <-- is this right?
I dont know what should come in artifact and version. Can someone give me the whole command line thing?