Add Oracle driver package to Maven Repository

Source: Internet
Author: User
When using Maven to build a project, it will certainly involve adding the Oracle database driver dependency. However, it is difficult to find Maven dependency configuration in the Maven repository.

When using Maven to build a project, it will certainly involve adding the Oracle database driver dependency. However, it is difficult to find Maven dependency configuration in the Maven repository.

When using Maven to build a project, it will certainly involve adding the Oracle database driver dependency. However, it is difficult to find Maven dependency configuration in the Maven repository. Currently, it seems that only the Oracle10g dependency configuration can be found, oracle 11g r2 driver is added here. After going online, it is said that this is an Oracle problem. Oracle does not disclose Maven's JDBC driver dependency, we need to manually add the built-in JDBC driver to the Maven repository. Many people on the Internet say that they want to add the driver to the user's folder. After my experiments, it is also possible not to put it in the user's directory, and it is not necessarily necessary to put it in the directory. The following is to add the JDBC driver to the Maven local repository through the mvn Command, as shown below:

Mvn install: install-file-DgroupId = com. oracle-DartifactId = ojdbc6_g
-Dversion = 11.2-Dpackaging = jar-Dfile = d: \ ojdbc6_g.jar

Where-Dfile is the path address of the driver package, which is not in the personal directory.

Running result:

Maven details: click here
Maven: click here

Related reading:

Add the Oracle JDBC driver to the Maven Repository

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

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.