2

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:

  1. I have deleted the repository folder inside .m2 and its created again by it self
  2. I have downloaded an external maven and used it
  3. I made the proxy in sittings on both the embedded and the external

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?

Community
  • 1
  • 1
Omar NourdeaN
  • 503
  • 2
  • 7

2 Answers2

2

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

Community
  • 1
  • 1
Omar NourdeaN
  • 503
  • 2
  • 7
0

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.

Nicola Musatti
  • 17,834
  • 2
  • 46
  • 55
  • i did try your solution as mentioned in my question its in http://stackoverflow.com/questions/15506043/create-a-maven-project-in-eclipse-complains-could-not-resolve-archetype @Nicola Musatti – Omar NourdeaN May 22 '14 at 12:12