Reputation: 503
I have installed the last version of kepler the one has the maven embedded in it when I tried many times to create application from any archetype I always got
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 (C:\Users\onourdean\.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 (C:\Users\onourdean\.m2\repository)
even though:
any other ideas? My settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>stsproxy</host>
<port>8080</port>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
<servers>
</servers>
<mirrors>
</mirrors>
<profiles>
</profiles>
</settings>
Note That:
i have tried all the soultions in the Create a Maven project in Eclipse complains "Could not resolve archetype" except making a variable for maven due to company restriction so is this variable necessary to run the embedded version?
Upvotes: 2
Views: 390
Reputation: 503
Its seems there is a bug in the embedded version even if i use it outside of the proxy just used the external version
then use wagon-http-lightweight-2.2.jar
as described in
Can access maven repository from behind proxy, need help
and its worked
Upvotes: 2
Reputation: 18228
I'm not sure if it's still the same with Kepler, but with earlier Eclipse (and M2E) releases this problem usually goes away if you go to Window -> Preferences -> Maven -> Installations
and add your local, external Maven installation, which usually causes Eclipse to pick up the correct settings.xml
file.
Upvotes: 0