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.

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

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

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

Ojdbc5.jar Ojdbc6.jar These jar packs, which driver Oracle version is 11G

This depends on your JDK, if your JDK is JDK 1.4, 1.5 with Ojdbc5.jar, if JDK is 1.6, 1.7, 1.8 with Ojdbc6.jar. Because the writer is a 1.7 jdk, it uses Ojdbc6.jar two. Manual Installation

Commands are as follows: (First the computer installs Maven, and configures the MAVEN environment, Windows-cmd)

MVN INSTALL:INSTALL-FILE-DFILE=E:\SOFT\DEVSOFT\JAR\OJDBC6-11.2.0.3.JAR-DGROUPID=COM.ORACLE-DARTIFACTID=OJDBC6- Dversion=11.2.0.3-dpackaging=jar

Carriage return succeeded


E:\soft\devsoft\jar\ojdbc6-11.2.0.3.jar: This is my absolute path to this jar

And then introduced in the Pom file

<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>

It's good to keep it.

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.