Add Oracle JDBC Driver (11g) to the MAVEN repository ____oracle

Source: Internet
Author: User


Due to Oracle licensing issues, MAVEN3 does not provide Oracle JDBC driver, in order to apply Oracle JDBC driver to the MAVEN project, it must be added to the local repository manually.



This document is for Oracle 11g.

  first, to get Oracle JDBC Driver



1. Download the corresponding version through the official Oracle website: http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html



2. Obtained via ORACLE installation directory, located in "{Oracle_home}\jdbc\lib\ojdbc6.jar"



Add:



The Oracle installation directory has a db_1/jdbc/lib directory



Ojdbc5.jar Ojdbc5_g.jar Ojdbc5dms.jar



Ojdbc5dms_g.jar Ojdbc6.jar Ojdbc6_g.jar



Ojdbc6dms.jar Ojdbc6dms_g.jar



These few jar packs, so which driver version is 11G



This depends on your JDK, if your JDK is 1.5 with Ojdbc5.jar, if the JDK is 1.6 with Ojdbc6.jar.



Ojdbc5_g.jar, Ojdbc6dms_g.jar only compile with javac-g, generate all debugging information



Because the writer is a 1.7 jdk, it uses Ojdbc6.jar

 Second Manual Installation



The order is as follows:



MVN install:install-file-dfile=D:\app\nyp\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar -dgroupid=com.oracle-dartifactid=ojdbc6-dversion=11.2.0-dpackaging=jar



D:\app\nyp\product\11.2.0\dbhome_1\jdbc\lib\ Ojdbc6.jar: This is the author's Ojdbc6.jar Absolute Path





to be in the same list of " D:\ideaprojects\springdemo>mvn install:install-file -dfile=d:\app\nyp\product\11.2.0\dbhome_1 \jdbc\lib\ojdbc6.jar -dgroupid=com.oracle -dartifactid=oj dbc6 -dversion=11.2.0 -dpackaging =jar [Info] scanning for projects ... downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/ Maven-surefire-plugin-2.4.3.pom downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/ maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom  (7 kb at 1.3 kb/s

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.