Could not resolve archetype org-apache-maven-archetypes-maven-webapp
2015-01-20 13:24
891 查看
今天创建maven项目是遇到了这个问题,多亏了百度,让我苦苦找了n久时间没有找到答案,于是果断翻墙找到了办法,我就贴过来一起分享吧
could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype
ORCreate Maven project Eclipse complains
OR
Create a Maven project in Eclipse complains “Could not resolve archetype”
OR if you get below exception:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories. Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\username\.m2\repository) Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\username\.m2\repository)
If you get above error when try to create maven project in eclipse. It’s proxy issue and due to proxy it blocks archetype. Please follow below steps:
Go to your Maven installation folder C:\apache-maven-3.1.0\conf\ ( For example: here we have installed maven in c:\ drive)
Copy settings.xml to C:\Users\[UserFolder]\.m2 (Your local repository)
Modify the proxy in settings.xml based on the info that you get from the above link.
<proxy> <active>true</active> <protocol>http</protocol> <host>your proxy</host> <port>your port</port> </proxy>
Note: If you are not sure how to find proxy sever name which your local system is using: Please
use this post
Open eclipse
Go to: Windows > Preferences > Maven > User Settings
Browse the settings.xml from .m2 folder
Click Update Settings
Click Reindex
Apply the changes and Click OK
![](http://javahonk.com/wp-content/uploads/2014/01/maven5.png)
Issue should be resolved after setting above. If above solution not worked then try below:Go to your local .m2 folder that should be C:\Users\[UserFolder]\.m2 or search based on your user
Delete folder name repository manually
Now open eclipse again
Go to: Windows > Preferences > Maven > User Settings
Click Update Settings
Click Reindex
Apply the changes and Click OK
This will create repository again refresh your eclipse and try again
This should resolve the issue.
Below are some other solution if still not works try below:Solution #1:Please see if your network is using proxy then change proxy in settings.xml file:Find proxy name in Internet explorer:To find proxy host name go to IE -> tools -> connection -> LAN settings -> advanced-> HTTP
![](http://javahonk.com/wp-content/uploads/2014/01/maven_error.png)
![](http://javahonk.com/wp-content/uploads/2014/01/maven_error2.png)
![](http://javahonk.com/wp-content/uploads/2014/01/maven_error3.png)
Solution #2:For any other issues delete maven local repository and run mvn:install again.
RELATED POST - YOU MAY ALSO LIKE
InstallAdd Custom Jar Maven Local Repository
Configure
maven offline development
Create
multiple module project maven eclipse
Change
maven default settings
Maven
Environment configuration SetUp
Error
with maven jar file cannot read not valid ZIP file
could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype
ORCreate Maven project Eclipse complains
OR
Create a Maven project in Eclipse complains “Could not resolve archetype”
OR if you get below exception:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories. Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\username\.m2\repository) Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\username\.m2\repository)
If you get above error when try to create maven project in eclipse. It’s proxy issue and due to proxy it blocks archetype. Please follow below steps:
Go to your Maven installation folder C:\apache-maven-3.1.0\conf\ ( For example: here we have installed maven in c:\ drive)
Copy settings.xml to C:\Users\[UserFolder]\.m2 (Your local repository)
Modify the proxy in settings.xml based on the info that you get from the above link.
<proxy> <active>true</active> <protocol>http</protocol> <host>your proxy</host> <port>your port</port> </proxy>
Note: If you are not sure how to find proxy sever name which your local system is using: Please
use this post
Open eclipse
Go to: Windows > Preferences > Maven > User Settings
Browse the settings.xml from .m2 folder
Click Update Settings
Click Reindex
Apply the changes and Click OK
![](http://javahonk.com/wp-content/uploads/2014/01/maven5.png)
Issue should be resolved after setting above. If above solution not worked then try below:Go to your local .m2 folder that should be C:\Users\[UserFolder]\.m2 or search based on your user
Delete folder name repository manually
Now open eclipse again
Go to: Windows > Preferences > Maven > User Settings
Click Update Settings
Click Reindex
Apply the changes and Click OK
This will create repository again refresh your eclipse and try again
This should resolve the issue.
Below are some other solution if still not works try below:Solution #1:Please see if your network is using proxy then change proxy in settings.xml file:Find proxy name in Internet explorer:To find proxy host name go to IE -> tools -> connection -> LAN settings -> advanced-> HTTP
![](http://javahonk.com/wp-content/uploads/2014/01/maven_error.png)
![](http://javahonk.com/wp-content/uploads/2014/01/maven_error2.png)
![](http://javahonk.com/wp-content/uploads/2014/01/maven_error3.png)
Solution #2:For any other issues delete maven local repository and run mvn:install again.
RELATED POST - YOU MAY ALSO LIKE
InstallAdd Custom Jar Maven Local Repository
Configure
maven offline development
Create
multiple module project maven eclipse
Change
maven default settings
Maven
Environment configuration SetUp
Error
with maven jar file cannot read not valid ZIP file
相关文章推荐
- Maven报错: Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp
- eclipse报: Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 错误
- Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories.
- Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of t
- Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of t
- Maven新建webapp项目报错Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE
- Maven web 工程创建异常----Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:po
- Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of t
- 解决eclipse创建maven项目报错!Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp
- Eclipse下创建maven项目时出现Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:R
- eclipse报: Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 错误
- Maven新建webapp项目报错Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:R
- eclipse创建Maven项目报错Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp
- eclipse报:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from
- Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of t
- 解决eclipse创建maven项目报错!Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:
- 解决eclipse创建maven项目报错!Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:
- eclipse创建maven工程报错 Could not resolve archetype org.apache.maven.archetypes-webapp-1.0......
- Eclipse使用Maven创建Web时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webap
- myeclipse创建maven工程报错 Could not resolve archetype org.apache.maven.archetypes 解决