Maven将u0000写入resolver-status.属性文件,导致后续构建失败



我正在使用MacOS,我正在使用版本3.8.7的Maven。我使用Java在11.0.17 Eclipse Temurin.

当构建一个大型Maven项目时,Maven会创建包含无效字符的resolver-status.properties文件:

.m2/repository/some-project/1.0-SNAPSHOT/resolver-status.properties:3:u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000=
.m2/repository/some-project/1.0-SNAPSHOT/resolver-status.properties:4:maven-metadata-willhaben-neu0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000=
.m2/repository/some-project/1.0-SNAPSHOT/resolver-status.properties:8:maven-metadata-shibboleth-u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000=

随后的Maven构建失败,并显示以下错误信息:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.281 s
[INFO] Finished at: 2023-01-17T09:19:29+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Malformed uxxxx encoding.
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

当我在一个线程和多个线程中运行Maven时发生错误。

我如何修复我的构建,使Maven不再写u0000resolver-status.properties文件?

我知道在执行Maven重新构建时从Nexus下载了损坏的文件。

在我们的CI上,它们是用较旧的Maven版本构建的,并且有多个线程。

最新更新