Maven ojbc 6 jar not found in central repository
Asked Answered
K

3

3

Hi I have placed ojdbc jar in my local repository still I am getting the below error. Could not resolve dependencies for project Failure to find com.oracle:ojdbc6:jar:11.2.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

Settings.xml

<settings>
  <localRepository>C:\Rahul\Repository</localRepository> 
<proxies>
<proxy>
  <active>true</active> 
  <protocol>http</protocol> 
  <host><myProxyHost></host> 
  <port>0000</port> 
  <username>username</username> 
  <password>pass</password> 
 </proxy>
  </proxies>
  </settings>

This is the dependency I have given for ojdbc.

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

I have Placed the Ojdbc jar in C:\Rahul\Repository\com\oracle\ojdbc6\11.2.0.

Still I am getting the same error.Please let me know how to solve this. Thanks in advance.

Kelseykelsi answered 28/3, 2014 at 6:57 Comment(0)
A
7

download the jar, and install it manually into your maven local cache

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

if you have your nexus for your organization it would be better to place it there so it is shared across local developers

Arliearliene answered 28/3, 2014 at 7:0 Comment(2)
I have run the following command still getting the same exception.Kelseykelsi
groupId and artifactId and version are same ?Arliearliene
M
2

Make sure jar name includes version:

C:\Rahul\Repository\com\oracle\ojdbc6\11.2.0\ojdb6-11.2.0.jar
Marder answered 28/3, 2014 at 7:54 Comment(1)
This Solution has worked Thanks.I dont have enough reputation to vote up.Kelseykelsi
H
0

Oracle is now exposing a maven repository at maven.oracle.com However you need to be authenticated.

See https://blogs.oracle.com/WebLogicServer/entry/weblogic_server_and_the_oracle

According to the comments in the blog post the ojdbc driver should be available at the following coordinates:

<groupId>com.oracle.weblogic</groupId>
 <artifactId>ojdbc7</artifactId>
 <version>12.1.3-0-0</version>
 <packaging>jar</packaging>
Hydrophone answered 21/1, 2015 at 14:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.