Because of Oracle licensing issues, MAVEN does not provide Oracle JDBC driver, which must be manually added to the local warehouse in order to apply the Oracle JDBC driver in the MAVEN project.
I. Obtaining the Oracle JDBC Driver
1. Download the appropriate version from the official Oracle website: http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
2. Obtained through the installation directory of ORACLE, located in the "{Oracle_home}\jdbc\lib\ojdbc14.jar
Of course, other available drivers can be
Two. Manually install to the local warehouse
The command is as follows:
MVN install:install-file-dgroupid=com.oracle-dartifactid=ojdbc14-dversion=10.2.0.4.0-dpackaging=jar-dfile=d:\ Document_x64\downloads\ojdbc14.jar
Version of Oracle for-dversion
-dpackaging Package Type
-dfile= here means the actual position of your drive.
The actual resulting package is
three. Adding references in the Pom.xml file
The dependency of Maven is
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> < Version>10.2.0.4.0</version></dependency>
Other references: http://www.tuicool.com/articles/JNZvu2q
Adding the Oracle JDBC driver to the MAVEN repository