How to load an Oracle driver in a MAVEN project

Source: Internet
Author: User
Tags maven central

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.