maven加载缺少jar本地包,用mvn install把下载的jar导入本地maven仓库,再次maven加载还是没有
错误信息
[ERROR] Failed to execute goal on project common: Could not resolve dependencies for project
com.qsbl.culturecloud:common:jar:1.0: Failed to collect dependencies at
org.apache.activemq:activemq-all:jar:5.8.0 -> org.apache.activemq:activemq-amqp:jar:5.8.0 ->
org.apache.qpid:proton-jms:jar:0.3.0-fuse-2: Failed to read artifact descriptor for
org.apache.qpid:proton-jms:jar:0.3.0-fuse-2: Could not transfer artifact
org.apache.qpid:proton-jms:pom:0.3.0-fuse-2 from/to com.fusesource.m2
(http://repo.fusesource.com/nexus/content/groups/public/): Transfer failed for
http://repo.fusesource.com/nexus/content/groups/public/org/apache/qpid/proton-jms/0.3.0-fuse-2/proton-jms-0.3.0-fuse-2.pom
503 Service Unavailable -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
项目pom文件加载成功
jar包能从公网下载,那么一般公有的maven仓库中也有,在settings.xml中设置多个maven仓库,一个本地,一个公有。需要访问哪个仓库时,临时改一下,把那个仓库配置移到前面。
如果要上传本地maven仓库,确认上传成功了吗?
依赖那么多,每次都下载上传,会很麻烦的。
file中配置下就可以了
可以在settings.xml中设置阿里云公共仓库,
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
先去本地仓库看看 需要的jar包是否成功打到仓库中了
已经解决了,把包的版本提到有的jar上(我刚来,可能同事给我增加难度,把版本变了?但又没看到变更),哈哈,有点烦躁,采纳的话就说的最多的吧,感谢各位的回答。