缺少工件 com.oracle:ojdbc6:jar:11.2.0 ? [英] Missing artifact com.oracle:ojdbc6:jar:11.2.0 ?

查看:77
本文介绍了缺少工件 com.oracle:ojdbc6:jar:11.2.0 ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被问过好几次了.即使我在 WINDOWS 中也成功地做到了这一点.但是安装了 ubuntu 操作系统,除此之外所有设置都完成了.

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.

这是我做的以下事情.我有 oracle 11g 我下载了 ojdbc6.jar,安装了 Maven 并运行以下命令

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] ------------------------------------------------------------------------

并在 .m2 目录中ojdbc6-11.2.0.jar.lastUpdated ojdbc6-11.2.0.pom.lastUpdated 我清理了 mvn -U clean 并更新没有任何效果..希望有人能找到 BUG :)

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 :)

推荐答案

我遇到了同样的问题.我通过检查我的 maven settings.xml 文件解决了这个问题.我的 maven 本地存储库是我安装 ojdbc6.jar 的地方.而当我尝试使用 eclipse 构建我的项目时,eclipse 使用的 maven 存储库是不同的.这导致了问题.我在 eclipse 中更新了 Maven 设置,然后它对我来说很好用.

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.

在eclipse中更改maven repo路径

To change the maven repo path in eclipse

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

看起来像这样:

这篇关于缺少工件 com.oracle:ojdbc6:jar:11.2.0 ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆