These steps worked for me. I have java 1.8 and maven 3.6 on my machine. The same process failed with java 1.7
Download the relevant jar files from the oracle website (Link shown below)
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
Extract the jar files to a specific folder on your machine
Ensure you have maven AND java on your path by running mvn -version command on your terminal (Im using Windows 10 btw.
C:\Windows\system32>mvn -version
You will get something like this if all is fine .
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10 -24T20:41:47+02:00)
Maven home: C:\apache-maven-3.6.0\bin\..
Add the downloaded jar file to your maven repository by running the command below.
C:\Windows\system32>mvn install:install-file -Dfile=C:\\Users\\Mwagiru\\Desktop\\Projects\\BPR\ojdbc-full\\OJDBC-Full\\ojdbc7.jar -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0 -Dpackaging=jar -
(Remember to update the command with the location where you unzipped your ojdbc jar file)
- Maven will fetch any plugins needed and update specified ojdbc jar file to your local repository
See sample out put below :
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (3.9 kB at 1.7 kB/s)INFO] Installing C:\Users\Mwagiru\Desktop\Projects\BPR\ojdbc-full\OJDBC-Full\ojdbc7.jar to C:\Users\Mwagiru\.m2\repository\com\oracle\ojdbc7\12.1.0\ojdbc7-12.1.0.jar
[INFO] Installing C:\Users\Mwagiru\AppData\Local\Temp\mvninstall581357638187646
6278.pom to C:\Users\Mwagiru\.m2\repository\com\oracle\ojdbc7\12.1.0\ojdbc7-12.1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.711 s
[INFO] Finished at: 2018-11-21T13:08:37+02:00
[INFO] ------------------------------------------------------------------------
You may now add oracle depedency to your projects by adding it to your pom files. See sample below.
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0</version>
</dependency>