1. 程式人生 > >Maven報錯was cached in the local repository.

Maven報錯was cached in the local repository.

在使用maven clean package時報錯,

具體資訊

[ERROR] Failed to execute goal on project rabbitmq-user: Could not resolve dependencies for project com.wangyk.rabbitmq:rabbitmq-user:jar:1.0.0: The following artifacts could not be res
olved: com.google.zxing:core:jar:3.2.0, com.google.zxing:javase:jar:3.3.0, fr.w3blog:zebra-zpl:jar:0.0.1: Failure to find com.google.zxing:core:jar:3.2.0 in http://10.158.34.100:8081/nexus
/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]

原因:本地的jar包與私服nexus的jar包不同步,我這裡的原因是因為自己下載jar包到本地倉庫,打包的時候用的是私服的倉庫,從而報錯。

解決辦法:刪除本地倉庫的jar包,確保私服nexus中有需要用到的jar包