Add the Oracle JDBC driver to the Maven Repository

Source: Internet
Author: User

Add the Oracle JDBC driver to the Maven Repository

Due to Oracle authorization problems, Maven3 does not provide Oracle JDBC driver. To Apply Oracle JDBC driver to Maven projects, you must manually add the driver to the local repository.

1. Obtain the Oracle JDBC Driver

1. Download the appropriate version: http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html from the Oracle Official Website

2. The installation directory of Oracle is obtained at "{ORACLE_HOME} \ jdbc \ lib \ ojdbc14.jar"

2. Manual installation and Installation

For manual installation, refer to another article: Maven3 manually install local jar to the repository

Or run the following command:

Mvn install: install-file-Dfile = {Path/to/your/ojdbc. jar}-DgroupId = com. oracle-DartifactId = ojdbc6-Dversion = 11.2.0-Dpackaging = jar

3. After installation, add references to the pom. xml file.

<Dependencies>
<! -- Add oracle jdbc driver -->
<Dependency>
<GroupId> com. oracle </groupId>
<ArtifactId> ojdbc14 </artifactId>
<Version> 10.2.0.4.0 </version>
</Dependency>
</Dependencies>

Okay, you can reference it normally.

Maven official guide _ Chinese full version clear PDF

Maven 3.1.0 release, Project Build Tool

Install Maven in Linux

Maven3.0 configuration and simple use

Set up sun-jdk and Maven2 in Ubuntu

Get started with Maven

This article permanently updates the link address:

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.