Adding the Oracle JDBC driver to the MAVEN repository

Source: Internet
Author: User

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

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.