1

In this case, there are two remote repositories, one for release, the other for snapshot. i created two proxy repositories in Nexus, one is for the release repo, the other is for the snapshot repo. the part of settings.xml about repository is as following:

<repository>
    <id>aliyun_release</id>
    <url>http://192.168.xxx.xxx:8081/repository/aliyun_release/</url>
</repository>
<repository>
    <id>aliyun_snapshot</id>
    <url>http://192.168.xxx.xxx:8081/repository/aliyun_snapshot/</url>
</repository>

but there is an error while packaging

[ERROR] Failed to execute goal on project riskcontrol-service: Could not resolve `dependencies for project com.yueyue:riskcontrol-service:jar:3.0.0-SNAPSHOT: Failed to collect dependencies at org.springframework.cloud:spring-cloud-starter-pandora:jar:1.3 -> com.taobao.pandora:taobao-hsf.sar:jar:dev-SNAPSHOT: Failed to read artifact descriptor for com.taobao.pandora:taobao-hsf.sar:jar:dev-SNAPSHOT: Could not transfer artifact com.taobao.pandora:taobao-hsf.sar:pom:dev-SNAPSHOT from/to aliyun_release (http://192.168.200.224:8081/repository/aliyun_release/): Failed to transfer file: http://192.168.200.224:8081/repository/aliyun_release/com/taobao/pandora/taobao-hsf.sar/dev-SNAPSHOT/taobao-hsf.sar-dev-SNAPSHOT.pom. Return code is: 400 , ReasonPhrase:Repository version policy: RELEASE does not allow version: dev-SNAPSHOT. -> [Help 1]`

after changing the settings.xml to original remote repositories. the packaging process is OK. the original settings.xml is as following:

<repository>
    <id>rdc-releases</id>
    <url>https://repo.rdc.aliyun.com/repository/36007-release-InunWS/</url>
</repository>
 <repository>
    <id>rdc-snapshots</id>
    <url>https://repo.rdc.aliyun.com/repository/36007-snapshot-JRXl8h/</url>
 </repository>

the version of Nexus is 3.19.1 the settings of release proxy repo in Nexus is as following: enter image description here

the settings of snapshot proxy repo in Nexus is as following: enter image description here

what should i check first for this problem? Many thanks in advance!

shike
  • 23
  • 3
  • post the screenshots of the nexus repo settings. – seenukarthi Aug 09 '20 at 05:53
  • The problem is located here: `Return code is: 400 , ReasonPhrase:Repository version policy: RELEASE does not allow version: dev-SNAPSHOT.`... – khmarbaise Aug 09 '20 at 08:38
  • Hope this might help: https://stackoverflow.com/questions/40142162/release-a-snapshot-to-nexus-using-maven-3-0-5/40148423 – Sourav Aug 09 '20 at 19:15
  • hi, please find the settings of Nexus above. – shike Aug 10 '20 at 02:42
  • 1
    Is there a reason you're not using a group? It looks like you're manually adjusting the repo order, which is done automatically by a group. Alternatively (tho maybe too late for your setup) you could use mixed mode which allows both snapshot and release in one repo. – joedragons Aug 12 '20 at 21:32
  • hi joedragons, it works after setting the proxy repo to mixed mode. thanks for your hint! – shike Aug 13 '20 at 06:16

1 Answers1

0

It works after setting the proxy repo to Mixed type. Because there are both snapshot and release in the remote repo.

shike
  • 23
  • 3