星期五, 9月 01, 2017

Maven install reference

在舊版(3.0.5)mvn install 遇到以下問題:

  • [ERROR] ...
  • The following artifacts could not be resolved:
    • com.dummy:packageA:jar:1.0.0-SNAPSHOT,
    • com.dummy:packageB:jar:1.0.0-SNAPSHOT
    • ...
  • Could not find artifact ... in snapshots (http://your.artifact.com/libs-snapshot)

如果我們明明在本地端 Maven Repositories 能找到那些 JAR,但以上的指令固執地只找遠端,可以這麼修正:

  • rm ~/.m2/repository/com/dummy/packageA/1.0.0-SNAPSHOT/_maven.repositories
  • rm ~/.m2/repository/com/dummy/packageB/1.0.0-SNAPSHOT/_maven.repositories

沒有留言:

張貼留言