java - maven本地仓库存在为什么还要连接外网下载?
天蓬老师
天蓬老师 2017-04-18 10:24:07
0
3
870

我们配置有私服的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包了,运行的时候,工程还要去中央仓库下载呢?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

membalas semua(3)
小葫芦

Ia mungkin disebabkan oleh versi balang yang tidak konsisten atau versi jdk yang dikonfigurasikan!

阿神

Tiada log jadi sukar untuk mengetahui sebab tertentu Berikut adalah beberapa idea:
1. Mungkin versi pakej balang tempatan adalah salah fail yang berakhir dengan .lastupdated dalam direktori yang sepadan Alih keluar
2. Kompil semula: mvn clean install

大家讲道理

Adakah anda telah menyelesaikan masalah ini? Saya juga mengalami masalah yang sama dan saya juga menggunakan nexus

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan