Oracle JDBC ojdbc6 Jar as a Maven Dependency
It is better to add new Maven repository (preferably using your own artifactory) to your project instead of installing it to your local repository.
Maven syntax:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
...
<repositories>
<repository>
<id>codelds</id>
<url>https://code.lds.org/nexus/content/groups/main-repo</url>
</repository>
</repositories>
Grails example:
mavenRepo "https://code.lds.org/nexus/content/groups/main-repo"
build 'com.oracle:ojdbc6:11.2.0.3'
For anyone reading this post in the future, you don't need to cd to the directory where the jar is present. Here is what you need to do -
Go to your project folder from where you can run maven commands (When you do an ls -ltr in this folder, you should see pom.xml)
Do this -
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=<Path where the jar is, example downloads>/ojdbc6.jar -DgeneratePom=true
Once this is done, you can add the dependency in your pom.xml, something like this -
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>