maven missing artifact 但是 jar 存在 repository

今天打开Eclipse发现POM文件出现了好多问题。

10/12/17 9:50:46 AM SGT: Missing artifact org.antlr:antlr-runtime:jar:3.1.1:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.eclipse.jdt:core:jar:3.4.2.v_883_R34x:compile
10/12/17 9:50:46 AM SGT: Missing artifact janino:janino:jar:2.5.15:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.drools:drools-decisiontables:jar:5.0.1:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.drools:drools-templates:jar:5.0.1:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.resteasy:resteasy-jaxrs:jar:2.3.10.Final-redhat-1:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.resteasy:jaxrs-api:jar:2.3.10.Final-redhat-1:provided
10/12/17 9:50:46 AM SGT: Missing artifact junit:junit:jar:4.11:test
10/12/17 9:50:46 AM SGT: Missing artifact org.hamcrest:hamcrest-core:jar:1.3:test
10/12/17 9:50:46 AM SGT: Missing artifact org.scannotation:scannotation:jar:1.0.3.redhat-4:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.javassist:javassist:jar:3.18.1.GA-redhat-1:provided
10/12/17 9:50:46 AM SGT: Missing artifact javax.annotation:jsr250-api:jar:1.0:provided
10/12/17 9:50:46 AM SGT: Missing artifact javax.activation:activation:jar:1.1.1:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.apache.httpcomponents:httpclient:jar:4.3.6.redhat-1:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.apache.httpcomponents:httpcore:jar:4.3.3.redhat-1:provided
10/12/17 9:50:46 AM SGT: Missing artifact net.jcip:jcip-annotations:jar:1.0.0.redhat-7:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.logging:jboss-logging:jar:3.1.4.GA-redhat-2:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.resteasy:resteasy-jaxb-provider:jar:2.3.10.Final-redhat-1:provided
10/12/17 9:50:46 AM SGT: Missing artifact com.sun.xml.bind:jaxb-impl:jar:2.2.5.redhat-9:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar:1.0.4.Final:provided
10/12/17 9:50:46 AM SGT: Missing artifact com.sun.istack:istack-commons-runtime:jar:2.6.1.redhat-3:provided
10/12/17 9:50:46 AM SGT: Missing artifact com.sun.xml.txw2:txw2:jar:20110809.0.0.redhat-5:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.resteasy:resteasy-atom-provider:jar:2.3.10.Final-redhat-1:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.cache:jbosscache-core:jar:3.2.11.GA:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss:jboss-common-core:jar:2.2.17.GA-redhat-3:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.jgroups:jgroups:jar:2.6.17.GA:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.josql:josql:jar:2.1:compile
10/12/17 9:50:46 AM SGT: Missing artifact net.sf.json-lib:json-lib:jar:jdk15:2.3:compile
10/12/17 9:50:46 AM SGT: Missing artifact net.sf.ezmorph:ezmorph:jar:1.0.6:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar:1.0.2.Final:provided
10/12/17 9:50:46 AM SGT: Missing artifact org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.2.Final:provided
10/12/17 9:50:46 AM SGT: Missing artifact javax.transaction:jta:jar:1.1:provided
10/12/17 9:50:46 AM SGT: Missing artifact commons-codec:commons-codec:jar:1.7:compile
10/12/17 9:50:46 AM SGT: Missing artifact org.apache.commons:commons-compress:jar:1.0:compile
10/12/17 9:50:46 AM SGT: Missing artifact commons-discovery:commons-discovery:jar:0.2:compile
10/12/17 9:50:46 AM SGT: Missing artifact commons-httpclient:commons-httpclient:jar:3.1:compile

常见的几种方法如下:

  • Eclipse的menu下的Project -> Clean
  • 选择项目右键 Maven->Update Project Configuration
  • 选择项目右键 Maven->Disable Dependency Management;然后,选择项目右键Maven->Enable Dependency Management
  • 检查proxy的设置

然而发现都不管用,最后切换到命令行下,执行了:

mvn dependency:resolve //发现没有问题
mvn clean

然后再在Eclipse里面update dependence,恢复正常。

  • 4
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值