Today to the STS tool to import a MAVEN project, import found Pom.xml file <dependency> error: Missing artifact com.oracle:ojdbc14:jar:10.2.0.4.0. Jar (simply translated to No Ojdbc.jar package found). Although it may not affect the operation, but for an obsessive-compulsive disorder people certainly can not bear.
So why does this error occur? this is due to Oracle's commercial copyright issue, which does not have a OJDBC driver package in Maven's central repository, so the OJDBC driver package needs to be installed in the MAVEN local library. Here's the solution:
1. Configure MAVEN Environment variables
Enter maven-v under CMD If the version information indicates that the MAVEN environment variable is configured, it is simple to configure the MAVEN environment variable if "not internal command" is present, as is the case with the configuration of the Java environment variable.
Copy the MAVEN path to the path at the end, note the front and back ";" and the direction of "\".
2. Install the OJDBC driver package in the MAVEN local library
First go to Oracle installation directory E:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc.jar(i installed on E-drive), rename Ojdbc.jar to Ojdbc14-10.2.0.4.0.jar
then go to cmd Input command: MVN install:install-file-dgroupid=com.oracle-dartifactid=ojdbc14-dversion=10.2.0.4.0-dpackaging =jar-dfile=E:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14-10.2.0.4.0.jar. a "BUILD SUCCESS" message appears stating that the installation was successful!. The Ojdbc14-10.2.0.4.0.jar driver package is now successfully installed in the local MAVEN library.
3, in the Java EE Project loading Ojdbc14-10.2.0.4.0.jar Drive Package
At this point if the error has not disappeared, because the project has not successfully loaded the driver package, right-click the project name->build path->configure Build path->
Copy the Ojdbc14-10.2.0.4.0.jar driver package to the Red line path, then reboot the STS and the error disappears.
The problem of Missing artifact Com.oracle:ojdbc14:jar:10.2.0.4.0.jar