I have configured maven3.0.3 in my local machine. Have installed m2e eclipse plugin. But when i try to create a new maven project using maven-archetype-webapp, i get the following exception.
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories. Could not resolve artifact org.apache.maven.archetypes:maven-archetype- webapp:pom:RELEASE Failed to resolve version for org.apache.maven.archetypes:maven-archetype- webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype- webapp/maven-metadata.xml in local ([HOME]/.m2/repository) Failed to resolve version for org.apache.maven.archetypes:maven-archetype- webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype- webapp/maven-metadata.xml in local ([HOME]/.m2/repository)
I do some processing behind a proxy and the proxy configurations are updated in {HOME}/.m2/settings.xml and M2_HOME/conf/settings.xml.
The archetype generate command works fine in command line. It downloaded the dependencies through proxy.
Any help is greatly appreciated.
Edit 05-10-2012 While creating a new Maven Web project in eclipse, the archetype "maven-archetype-webapp" version is displayed as RELEASE. Is this in anyway linked?
m2 folder located in your user home directory and delete the 1.1 folder located here : . m2\repository\org\apache\maven\archetypes\maven-archetype-quickstart . Restart Eclipse and try creating the project. This should download it again.
In short, Archetype is a Maven project templating toolkit. An archetype is defined as an original pattern or model from which all other things of the same kind are made. The names fits as we are trying to provide a system that provides a consistent means of generating Maven projects.
If you want a web application, use maven-archetype-webapp, or if you want a simple application use maven-archetype-quickstart. They are useful because you will be able to expand them with no problem. Note that this is in the Eclipse plugin by default (at least it is today).
I had the same problem. I fixed it by adding the maven archetype catalog to eclipse. Steps are provided below:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With