I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14. In MVNrepository site the dependency to put in the POM is:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
</dependency>
of course this does't work as it is not in the central repository used by maven. 2 questions:
How do I find a repository (if any) that contains this artifact?
How do I add it so that Maven will use it?
You can find a Github simple sample project for use a Oracle JDBC Driver on Maven Project here.
You can find all explication for your continous integration + a sample and run on Travis-CI.
DEMO
Download the jar and place it in your project
src/lib
. Now you can use the maven installer plugin.Now you only have to execute
mvn clean
once and the oracle lib is installed in your local maven repository.Up to now, its not possible to use maven repositories. I'm using ivy as dependency management tool, but also use maven2' s ibiblio repositories. And this is working for ivy:
Maven2' s dependency could be something like that:
Notice that i define http://download.java.net/maven/2/ and http://mirrors.ibiblio.org/pub/mirrors/maven/mule/dependencies/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext] as external maven2 repos on my ivy settings.
If you are using Netbeans, goto Dependencies and manually install artifact. Locate your downloaded .jar file and its done. clean build will solve any issues.