maven pom 報錯 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile (default-compile) on project xxxxx: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile failed: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.1
or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.codehaus.plexus:plexus-compiler-api:jar:1.8, org.codehaus.plexus:plexus-compiler-manager:jar:1.8, org.codehaus.plexus:plexus-compiler-javac:jar:1.8: Failure
to find org.codehaus.plexus:plexus-compiler-api:jar:1.8 in
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
本來是沒問題的,maven里加上私服的配置就有問題了。
高了半天,很簡單,還是看這英文的報錯就行了,org.apache.maven.plugins:maven-compiler-plugin:2.3.1 這個在本地庫是存在的。
但是 org.codehaus.plexus:plexus-compiler-api:jar:1.8 等幾個jar 在本地庫沒有,刪除對應的資料夾,還是下不下來。我到私服上去看,發現沒有這個版本的index。我在網上下了缺少的這個jar放在本地庫後,沒問題了。估計他是去私服上去找了。但是私服上沒有對應的索引,所以出問題。
我把缺少的jar包放到私服上後,刪除倉庫中這些jar包。重新開啟程式,更新pom,ok!