项目场景:
新部署的nexus3.9,代理旧的nexus。
问题描述:
无法获取Snapshot的jar或者pom。
关键错误:
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ com.***.boot.parents ---
Downloading from ci-snapshots: http://maven.xxx.com/repository/maven-snapshots/com/***/boot/com.***.boot.parents/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.***.boot:com.***.boot.parents:0.0.1-SNAPSHOT/maven-metadata.xml from/to ci-snapshots (http://maven.xxx.com/repository/maven-snapshots/): Failed to transfer file: http://maven.xxx.com/repository/maven-snapshots/com/***/boot/com.***.boot.parents/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 502 , ReasonPhrase:Bad Gateway.
Could not transfer metadata com.***.boot:com.***.boot.parents:0.0.1-SNAPSHOT/maven-metadata.xml from/to ci-snapshots (http://maven.xxx.com/repository/maven-snapshots/): Failed to transfer file: http://maven.xxx.com/repository/maven-snapshots/com/***/boot/com.***.boot.parents/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 502 , ReasonPhrase:Bad Gateway.
原因分析:
没有代理到不稳定的snapshot。
解决方案:
在创建新仓库的时候,Version policy选择 Mixed即可解决问题。