Missing artifact com.oracle:ojdbc6:jar:11.2.0 ?

回眸只為那壹抹淺笑 提交于 2019-12-25 07:40:36

问题


I know this question has been asked several times.Even i have successfully done this in WINDOWS.But installed ubuntu OS and all set up is done except this.

Here are the following things i did.I Have oracle 11g i downloaded ojdbc6.jar,Installed Maven and run following command

sudo mvn install:install-file -Dfile=/home/nawaz/Downloads/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install-file (default-cli) @ standalone-pom ---
[INFO] pom.xml not found in ojdbc6.jar
[INFO] Installing /home/nawaz/Downloads/ojdbc6.jar to /root/.m2/repository/com/oracle/ojdbc6/11.2.0/ojdbc6-11.2.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.545 s
[INFO] Finished at: 2016-07-15T17:48:32+05:30
[INFO] Final Memory: 8M/208M
[INFO] ------------------------------------------------------------------------

and in .m2 directory ojdbc6-11.2.0.jar.lastUpdated ojdbc6-11.2.0.pom.lastUpdated I cleaned the mvn -U clean and Update nothing works..Hope someone can find the BUG :)


回答1:


I faced the same issue. I resolved this issue by checking my maven settings.xml file. My maven local repository is the place where I installed ojdbc6.jar. And when I tried to build my project using eclipse, the maven repository used by eclipse is different. This is causing the problem. I updated maven settings in eclipse and then it's worked fine for me.

To change the maven repo path in eclipse

1.Windows --> preferences    
2. Maven --> User Settings    
3. And in right side window update the settings

It looks like this:



来源:https://stackoverflow.com/questions/38396032/missing-artifact-com-oracleojdbc6jar11-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!