Introduction of Oracle Driver error in Maven missing artifact com.oracle:ojdbc14:jar:10.2.0.4.0 time: September 22, 2015 views: 9,361 times
Find Ojdbc in MAVEN Central Library, find the latest version is 10.2.0.4.0, then introduce OJDBC in MAVEN project, find error missing artifact Com.oracle:ojdbc14:jar : 10.2.0.4.0, as shown in 1:
Figure 1:missing Artifact
Found in the Central Library is clearly there, but in the project is how to introduce not to come in. Later on the Internet to find a solution, originally because Oracle's Ojdbc.jar is charged, so MAVEN's central repository does not have this resource, can only be loaded into the project by configuring a local library.
The method steps are as follows:
Step 1: Go to Oracle website to download OJDBC driver
Figure 2: Download Ojdbc6.jar
The latest is Ojdbc7.jar, I will download ojdbc6.jar here.
Step 2: Install to the local warehouse
Figure 3: Installing to a local warehouse
Copy the downloaded Ojdbc6.jar to the system default user directory, my user directory is C:\Users\YEDWARD, then open a command window under that directory and enter the following command:
MVN install:install-file-dgroupid=com.oracle-dartifactid=ojdbc14-dversion=10.2.0.4.0-dpackaging=jar-dfile= Ojdbc6.jar
As shown in 3, if a build SUCCESS is present, then the installation to the local repository is successful, then to the local repository, as shown in 4, you will find that it has been successfully installed.
Figure 4: Successful Installation
As shown in 4, the installation has been successful and the name has been changed. This time, then go to the project of the Pom.xml, you will find that everything is normal.
How to load an Oracle driver in a MAVEN project