今天使用自动发版时,突然报如下错误:
Failed to execute goal on project xxx: Could not resolve dependencies for project cn.sunline:xxx: Failed to collect dependencies at org.jetbrains:annotations:jar:RELEASE: Failed to read artifact descriptor for org.jetbrains:annotations:jar:RELEASE: Failed to resolve version for org.jetbrains:annotations:jar:RELEASE: Could not find metadata org.jetbrains:annotations/maven-metadata.xml in local (/usr/local/maven/repo) -> [Help 1]
问题排查:
1、验证本地环境是否能够install:
验证结果:可以install,但是有个警告(Some problems were encountered while building the effective model for cn.sunline:sunimp-app:jar:4.0.22
'dependencies.dependency.version' for org.jetbrains:annotations:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 171, column 22
It is highly recommended to fix these problems because they threaten the stability of your build.
For this reason, future Maven versions might no longer support building such malformed projects.)
翻译:在构建cn.sunline: sunimpp -app:jar:4.0.22的有效模型时遇到了一些问题
'dependencies.dependency.version'jetbrains:annotations:jar要么是LATEST要么是RELEASE(两者都已被弃用)@第171行,第22列
强烈建议修复这些问题,因为它们会威胁到构建的稳定性。
由于这个原因,未来的Maven版本可能不再支持构建这种不规范的项目。
2、原因:服务器Maven版本可能不再支持构建这种不规范的项目
3、解决措施:
①将鼠标悬浮在RELEASE上,会自动显示版本
②将RELEASE改成提示版本即可
4、验证解决措施是否有效:
①修改版本后本地install没有警告
②服务上可以正常打包部署