I am trying to add Oracle JDBC to my project as a maven dependency. I followed several online tutorials that offer various ways to add third party dependencies.
I chose the local installation method, but, like ( this person ), I am having problems.
I run the following command to install jar:
mvn install:install-file -Dfile={lib/ojdbc7.jar} -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0.1 -Dpackaging=jar
and he succeeds:
[INFO] --- maven-install-plugin:2.3:install-file (default-cli) @ standalone-pom --- [INFO] Installing /home/<myfolder>/{lib/ojdbc7.jar} to /home/<myname>/.m2/repository/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar
Then I added the following message:
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc7</artifactId> <version>12.1.0.1</version> </dependency>
but when compiling I get the following:
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.307s [INFO] Finished at: Sat May 02 20:40:07 NZST 2015 [INFO] Final Memory: 8M/56M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project com.xxx:xxx:jar:1.0-SNAPSHOT: Failure to find com.oracle:ojdbc7:jar:12.1.0.1 in http:
I played with the -U and -o flags to no avail. I also tried to install the jar using the first cding in the lib directory (as suggested by Raghuram on another issue) without any changes.
source share