Tag Archives: Failed to read artifact descriptor for org.apache.

[Solved] Failed to read artifact descriptor for org.apache.

The following error occurred after importing Maven project:

Failed to read artifact descriptor for org.apache.maven. plugins:maven-resources-plugin : jar:2.5

eclipse.buildId=unknown
java.version=1.7.0_45
java.vendor=OracleCorporation
BootLoaderconstants:OS=win32,ARCH=x86_64,WS=win32,NL=zh_CN
Command-linearguments:-oswin32-wswin32-archx86_64
Error
WedJun0310:06:32CST2015
Couldnotcalculatebuildplan:Pluginorg.apache.maven.plugins:maven-resources-plugin:2.5oroneofitsdependenciescouldnotberesolved:Failedtoreadartifactdescriptorfororg.apache.maven.plugins:maven-resources-plugin:jar:2.5
org.apache.maven.plugin.PluginResolutionException:Pluginorg.apache.maven.plugins:maven-resources-plugin:2.5oroneofitsdependenciescouldnotberesolved:Failedtoreadartifactdescriptorfororg.apache.maven.plugins:maven-resources-plugin:jar:2.5
atorg.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
atorg.eclipse.m2e.core.internal.project.registry.EclipsePluginDependenciesResolver.resolve(EclipsePluginDependenciesResolver.java:48)
atorg.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
atorg.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
atorg.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
atorg.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
atorg.eclipse.m2e.core.internal.embedder.MavenImpl.setupMojoExecution(MavenImpl.java:397)
atorg.eclipse.m2e.core.internal.embedder.MavenImpl$2.call(MavenImpl.java:409)
atorg.eclipse.m2e.core.internal.embedder.MavenImpl$2.call(MavenImpl.java:1)
atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:102)
atorg.eclipse.m2e.core.internal.embedder.MavenImpl.setupMojoExecution(MavenImpl.java:407)
atorg.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.setupMojoExecution(ProjectRegistryManager.java:880)
atorg.eclipse.m2e.core.internal.project.registry.MavenProjectFacade.getMojoExecution(MavenProjectFacade.java:362)
atorg.eclipse.m2e.core.project.configurator.AbstractCustomizableLifecycleMapping.getBuildParticipants(AbstractCustomizableLifecycleMapping.java:66)
atorg.eclipse.m2e.core.internal.builder.MavenBuilder$1$1.call(MavenBuilder.java:119)
atorg.eclipse.m2e.core.internal.builder.MavenBuilder$1$1.call(MavenBuilder.java:1)
atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
atorg.eclipse.m2e.core.internal.project.registry.MavenProjectManager.execute(MavenProjectManager.java:121)
atorg.eclipse.m2e.core.internal.builder.MavenBuilder$1.call(MavenBuilder.java:102)
atorg.eclipse.m2e.core.internal.builder.MavenBuilder$1.call(MavenBuilder.java:1)
atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:89)
atorg.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1305)
atorg.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:93)
atorg.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
atorg.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
atorg.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
atorg.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
atorg.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
atorg.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
atorg.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
atorg.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
atorg.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
atorg.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
atorg.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
atorg.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Causedby:org.sonatype.aether.resolution.ArtifactDescriptorException:Failedtoreadartifactdescriptorfororg.apache.maven.plugins:maven-resources-plugin:jar:2.5
atorg.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
atorg.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
atorg.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:279)
atorg.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
...38more
Causedby:org.sonatype.aether.resolution.ArtifactResolutionException:Failuretotransferorg.apache.maven.plugins:maven-resources-plugin:pom:2.5fromhttp://repo.maven.apache.org/maven2wascachedinthelocalrepository,resolutionwillnotbereattempteduntiltheupdateintervalofcentralhaselapsedorupdatesareforced.Originalerror:Couldnottransferartifactorg.apache.maven.plugins:maven-resources-plugin:pom:2.5from/tocentral(http://repo.maven.apache.org/maven2):nulltohttp://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom
atorg.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
atorg.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
atorg.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
atorg.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
...41more
Causedby:org.sonatype.aether.transfer.ArtifactTransferException:Failuretotransferorg.apache.maven.plugins:maven-resources-plugin:pom:2.5fromhttp://repo.maven.apache.org/maven2wascachedinthelocalrepository,resolutionwillnotbereattempteduntiltheupdateintervalofcentralhaselapsedorupdatesareforced.Originalerror:Couldnottransferartifactorg.apache.maven.plugins:maven-resources-plugin:pom:2.5from/tocentral(http://repo.maven.apache.org/maven2):nulltohttp://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom
atorg.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:237)
atorg.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:216)
atorg.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427)
...44more

Cause.

Missing maven-resources-plugin-2.5.jar file. This file is under {user.home}\.m2 \repository\org\apache\maven\plugins\maven-resources-plugin\2.5\. {user.home} is the maven configuration path, usually my documentation, is window-preferences-MyEclipse- Maven4MyEclipse-User Setting inside the Local Repository.

Solution.

1, delete {user.home}\.m2 \repository\org\apache\maven\plugins\maven-resources-plugin\ under the version 2.5 folder.

2. Right-click the project in myecplise and select Maven4Myecplise->Update Project… \update the project.