Oracle driver package maven download failure resolved

Source: Internet
Author: User

Oracle is paid, so the jar package is not a casual one, which can cause Maven to download and compile, because we can't go directly to the MAVEN repository. The solution is to get the jar package from somewhere else and put it in the local repository so that you can run Maven successfully. I am now compiling the oracle11g jar package, the Pom file is dependent on the following

<dependency>    <groupId>com.oracle</groupId>    <artifactid>ojdbc6</artifactid >    <version>11.2.0.1.0</version></dependency>

  

First to get the jar, usually to the Oracle official website (http://www.oracle.com/technetwork/indexes/downloads/index.html to DRIVES->JDBC drives search) , there are many enthusiastic comrades themselves have to share out the various, or their own machine has installed Oracle to install the directory similar to Product\11.2.0\dbhome_1\jdbc\lib. Note here that different Oracle databases correspond to different versions of the installation package:

Oracle version     JDK version                   recommended jar Package    Oracle 8i     JDK 1.1.x               classes111.zip     Oracle 8i     JDK 1.1.x               Classes12.zip     Oracle 9i     JDK 1.1.x               classes111.jar or classes111.zip     Oracle 9i     JDK 1.2 and JDK 1.3     Classes12.jar or classes12.zip     Oracle 9i     JDK 1.4                 ojdbc14.jar     Oracle 9i     JDK 1.5                 Ojdbc5.jar     Oracle 9i     JDK 1.6                 ojdbc6.jar     Oracle 10g    JDK 1.2 and JDK 1.3.    Classes12.jar     Oracle 10g    JDK 1.4 and 5.0         ojdbc14.jar     Oracle 11g    jdk5                    Ojdbc5.jar     Oracle 11g    jdk6                    Ojdbc6.jar

  

With the jar you need to throw it to the local MAVEN repository, assuming now that I'm using the oracle11g version, I've got the Ojdbc6.jar and put it on the desktop, then execute it with the cmd command.

C:\USERS\ADMINISTRATOR>CD Desktop

C:\USERS\ADMINISTRATOR\DESKTOP&GT;MVN Install:install-file-dgroupid=com.oracle-da
Rtifactid=ojdbc6-dversion=11.2.0.1.0-dpackaging=jar-dfile=ojdbc6.jar
[INFO] Scanning for projects ...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]---maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom
---
[INFO] Installing C:\Users\Administrator\Desktop\ojdbc6.jar to C:\Users\Administ
Rator\.m2\repository\com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.jar
[INFO] Installing c:\users\admini~1\appdata\local\temp\mvninstall706539994468491
3981.pom to C:\Users\Administrator\.m2\repository\com\oracle\ojdbc6\11.2.0.1.0\o
Jdbc6-11.2.0.1.0.pom
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO] Total time:3.791 S
[INFO] Finished at:2017-08-12t11:41:57+08:00
[INFO] Final memory:7m/77m
[INFO]------------------------------------------------------------------------

It is possible to see the Com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.jar in the local repository and then execute the MAVEN Package command successfully.

Oracle driver package maven download failure resolved

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.