maven有时失败有时成功

hts6caw3  于 2021-06-30  发布在  Java
关注(0)|答案(1)|浏览(333)

这个问题就像maven编译,有时失败,有时成功,只是我的项目中没有lombok。
还有,我在跑步 mvn clean verify 每次从命令行。它失败了 Unresolved compilation problem . 可能是别的什么东西在篡改我的生成目录还是别的什么?
我试着打扫 ~/.m2 所以它会再次下载每个依赖项,但这并没有起作用。
这些就是我犯的错误

MessageBuilderTest.nullTimestampThrowsError:135 »  Unresolved compilation prob...
  MessageBuilderTest.nullUUIDAnonymousIdThrowsException:115 »  Unresolved compil...
  MessageBuilderTest.nullUUIDAnonymousIdThrowsException:115 »  Unresolved compil...
  MessageBuilderTest.nullUUIDAnonymousIdThrowsException:115 »  Unresolved compil...
  MessageBuilderTest.nullUUIDAnonymousIdThrowsException:115 »  Unresolved compil...
  MessageBuilderTest.nullUUIDAnonymousIdThrowsException:115 »  Unresolved compil...
  MessageBuilderTest.nullUUIDAnonymousIdThrowsException:115 »  Unresolved compil...
  MessageBuilderTest.nullUUIDMessageIdThrowsException:47 »  Unresolved compilati...
  MessageBuilderTest.nullUUIDMessageIdThrowsException:47 »  Unresolved compilati...
  MessageBuilderTest.nullUUIDMessageIdThrowsException:47 »  Unresolved compilati...
  MessageBuilderTest.nullUUIDMessageIdThrowsException:47 »  Unresolved compilati...
  MessageBuilderTest.nullUUIDMessageIdThrowsException:47 »  Unresolved compilati...
  MessageBuilderTest.nullUUIDMessageIdThrowsException:47 »  Unresolved compilati...
  MessageBuilderTest.providingUserIdBuildsSuccessfully:161 »  Unresolved compila...
  MessageBuilderTest.providingUserIdBuildsSuccessfully:161 »  Unresolved compila...
  MessageBuilderTest.providingUserIdBuildsSuccessfully:161 »  Unresolved compila...
  MessageBuilderTest.providingUserIdBuildsSuccessfully:161 »  Unresolved compila...

此处显示完整的错误消息
当我转到其中任何一个时,它们都会调用不推荐使用的方法。但这些应该是可以使用的(对吧?)。
这里的原因可能是什么? mvn -version 退货:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 11.0.9, vendor: Oracle Corporation, runtime: /usr/local/Cellar/openjdk@11/11.0.9/libexec/openjdk.jdk/Contents/Home
Default locale: pt_BR, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.6", arch: "x86_64", family: "mac"

编辑:
我注意到了一件有趣的事情:看起来只有当我打开了vscode中的project时,错误才会发生。vscode安装了java扩展包。也许这是个暗示?

dojqjjoe

dojqjjoe1#

我遇到过和你一样的问题,我也忍了很久,直到我换了maven根目录,问题才解决了,虽然这个比较麻烦,你可以试试:)

相关问题