Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

java - Maven ojbc 6 jar not found in central repository

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:RahulRepository</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:RahulRepositorycomoracleojdbc611.2.0.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...