我们配置有私服的maven中央仓库,但是前几天停电服务器有问题了,现在私服的中央仓库连接不上,可是我在一个项目中需要下载jar包的时候,已经连接外网把jar下载下来了,然后我就又把地址改成私服的不能连接的中央仓库了(工程需要,我也不知道怎么回事),可是在又执行的时候,本地工程还要连接中央仓库进行下载,是不是从不同仓库下载下来的jar不能共用呢?
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/mybatis/generator/mybatis-generator-maven-plugin/1.3.2/mybatis-generator-maven-plugin-1.3.2.pom
[WARNING] Failed to retrieve plugin descriptor for org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2: Plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mybatis.generator:mybatis-generator-maven-plugin:jar:1.3.2
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
[INFO] Downloading: http://10.12.12.108:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
可是如果这个工程我连接到公网的仓库就可以运行,连接本地私服仓库就不能运行!!
终极问题 : 为什么我本地仓库已经存在这个jar包了,运行的时候,工程还要去中央仓库下载呢?
Cela peut être dû à une version jar incohérente ou à une version jdk configurée !
Il n'y a pas de journaux, il est donc difficile d'en déterminer la cause spécifique. Voici quelques idées :
1. Il se peut que la version du package jar local soit incorrecte. Supprimez d'abord le package jar local, puis supprimez le. fichiers se terminant par .lastupdated dans le répertoire correspondant Supprimer
2. Recompiler : mvn clean install
Avez-vous résolu ce problème ? J'ai également rencontré le même problème et j'ai également utilisé Nexus