maven依赖项目deploy发布工程至私服时报错问题

场景:aas-core-auth-client想打包成项目基础jar包发布至maven私服,所有项目依赖于汇总的pom,aas-core-auth-client依赖于aas-core-common,在deploy发布aas-core-auth-common时没有问题(common没有依赖项目中其他模块),aas-core-auth-client依赖于aas-core-auth-common项目,在deploy时报错:[ERROR] Failed to execute goal on project aas-core-auth-client: Could not resolve dependencies for project com.aas.mdf:aas-core-auth-client:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at com.aas.mdf:aas-core-common:jar:1.0.0-SNAPSHOT: Failed to read artifact descriptor for com.aas.mdf:aas-core-common:jar:1.0.0-SNAPSHOT: Could not transfer artifact com.aas.mdf:aas-mdf:pom:1.0.0-SNAPSHOT from/to maven-central (http://localhost:8081/repository/maven-central/): Failed to transfer file: http://localhost:8081/repository/maven-central/com/aas/mdf/aas-mdf/1.0.0-SNAPSHOT/aas-mdf-1.0.0-SNAPSHOT.pom. Return code is: 400 , ReasonPhrase:Repository version policy: RELEASE does not allow version: 1.0.0-SNAPSHOT. -> [Help 1]

maven依赖项目deploy发布工程至私服时报错问题_第1张图片

解决方案:

在parent项目运行install命令后,然后再进行clean和deploy模块aas-core-auth-client既可以解决问题。

你可能感兴趣的:(maven)