Question: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate
I am creating a project using following command:
Its giving following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:2.2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.archetype:archetype-descriptor:jar:2.2, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-5, org.codehaus.groovy:groovy:jar:1.8.3: Could not transfer artifact org.apache.maven.archetype:archetype-descriptor:jar:2.2 from/to ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2): Access denied to: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/archetype/archetype-descriptor/2.2/archetype-descriptor-2.2.jar , ReasonPhrase:Forbidden. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Suggest me the solution.
There was some error with the settings.xml file. I deleted the file settings.xml from the .m2 directory and now its working.
You might check the configuration in the settings.xml file and try to resolve the issue.