pom文件中build标签报错



pom文件中build标签报错:
Multiple annotations found at this line:- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven.dev.snaponglobal.com has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to maven.dev.snaponglobal.com (https://repo.maven.apache.org/maven2/): java.net.ConnectException: null to https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom



问题根源:

Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven.dev.snaponglobal.com has elapsed or updates are forced. 

https://repo.maven.apache.org/maven2/ is not accessible.

解决方法:修改本地maven的设置文件(settings.xml)

<mirrors>
            <mirror>
              <id>maven.dev.snaponglobal.comid>
              <name>Internal Artifactory Maven repositoryname>
              <url>https://repo.maven.apache.org/maven2/url>
              <mirrorOf>*mirrorOf>
            mirror>
  mirrors>

将mirror标签注释掉:

  <mirrors>
    
  mirrors>


by Mike Sun @ 20170901 Friday



你可能感兴趣的:(#MAVEN#)