Home > Java > javaTutorial > Where Can I Find the Oracle JDBC Driver (ojdbc14) for Maven and How Do I Add It?

Where Can I Find the Oracle JDBC Driver (ojdbc14) for Maven and How Do I Add It?

Susan Sarandon
Release: 2024-12-02 17:51:11
Original
1040 people have browsed it

Where Can I Find the Oracle JDBC Driver (ojdbc14) for Maven and How Do I Add It?

Finding the Oracle JDBC Driver in the Maven Repository

In your project, you want to incorporate the oracle jdbc driver as a dependency (runtime scope) - ojdbc14. As this artifact isn't available in Maven's central repository, it poses some challenges.

Identifying a Suitable Repository

Regrettably, due to licensing constraints, the Oracle Driver JAR is not hosted in any public repository. This is a concern with several dependencies, not a flaw in Maven. Finding a public repository containing the JAR likely indicates an illegal distribution.

Adding the Repository to Maven

Though some JARs with licensing limitations do not have a public repository, they might have a "pom" entry in the Maven Central repo. Checking this entry provides vital Maven information, including:

  • Group ID: com.oracle
  • Artifact ID: ojdbc14
  • Version: 10.2.0.3.0

The entry also contains the download URL for the JAR: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html.

Once the JAR is downloaded, you can add it to your computer repository using the following command:

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 \
     -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=ojdbc.jar -DgeneratePom=true
Copy after login

Generating a POM with the last parameter prevents warnings in the pom.xml.

If your team maintains a local Maven repository, this guide provides instructions for uploading the JAR: [Guide to Uploading JAR to Local Maven Repository](link to guide).

The above is the detailed content of Where Can I Find the Oracle JDBC Driver (ojdbc14) for Maven and How Do I Add It?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template