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 http://xxxxxxx: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]
[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!