使用maven打包的时候报了这个错误:
Failed to read artifact descriptor for org.clojars.strongh:rserveengine:jar:1.7.0: Could not transfer artifact org.clojars.strongh:rserveengine:pom:1.7.0 from/to clojars (http://clojars.org/repo/): hostname in certificate didn't match:!= OR -> [Help 1]
查看服务器上本地仓库地址:
mvn -X
到目标仓库查看一下:
cd /root/.m2/repository
发现仓库是空的。
思路1:1.定位到包(仓库在哪找见第一种解决方案描述),然后发现压根没有jar(其实所有导包失败基本都是因为没有jar所致)
2.访问中央仓库:https://mvnrepository.com/,下载指定的jar
https://mvnrepository.com/artifact/org.clojars.strongh/rserveengine
3.删除后缀为:.jar.lastUpdated,将刚刚下载的jar放到这里
思路2:apache-maven-3.3.9confsettings.xml 修改一下镜像:
alimaven
aliyun maven
http://maven.aliyun.com/nexus/content/groups/public/
central
CN
OSChina Central
http://maven.oschina.net/content/groups/public/
central
ui
central
Human Readable Name for this Mirror.
http://uk.maven.org/maven2/
sprintio
central
Human Readable Name for this Mirror.
https://repo.spring.io/libs-snapshot/
思路3:
我本地是可以下载的,使用Jenkins打包部署的时候,下载不下来,我就把本地仓库里面的文件同步到服务器上的仓库里面,问题解决。



