Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member216035
Discoverer
0 Kudos

Problem:

I want to use Eclipse to develop a maven web application, so I download newest eclipse "kepler Java EE" for it has already integrated maven. But the result is errors occur when I try to create a maven project. Then I want to solve this problem.

My Try:

I download eclipse Indigo Java EE which has not integrated maven. And then I follow the official document on eclipse website and try to install newest maven with url "http://download.eclipse.org/technology/m2e/releases/http://download.eclipse.org/technology/m2e/releases/ ",but error occurs. It prompts "lack some jar". :mad: I am going to mad.

I download eclipse Indigo for java Development, and it has already integrated with Maven, and I succeed to create a Maven Project. Wow, it's a good news. So I wonder maybe the newest maven has errors about dependency install.Then Let's try to install older mavens.

I choose http://download.eclipse.org/technology/m2e/releases/1.0/1.0.200.20111228-1245 to install maven, and it is fine. I get it.

HINT: About how to install maven in detail, you can follow eclipse guide http://wiki.eclipse.org/M2E_updatesite_and_gittags

Problem:

I have stated that I use Eclipse to develop a maven web application. I follow http://crunchify.com/how-to-create-dynamic-web-project-using-maven-in-eclipse/ to create a dynamci maven web application, but I run into errors "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"

I google it and conclude that this problem results from proxy configuration less. I need to configure it in settings.xml, but where it is. I just can't find it under .m2/. I check eclipse->window->preference->maven->setting, and it also prompt "no settings.xml file". So I decide to create one by myself, and it likes below.

<?xml version="1.0" encoding="UTF-8"?>

  <settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <profiles> <profile></profile></profiles>

  <activeProfiles>

    <activeProfile>general</activeProfile>

  </activeProfiles>

  <proxies>

    <proxy>

      <id>proxy</id>

      <active>true</active>

      <protocol>http</protocol>

      <host>hostname</host>

      <port>portnumber</port>

      <username></username>

      <password></password>

    </proxy>

  </proxies>

</settings>

Just change the host and port to yours. Then reset settings.xml path under eclipse->window->preference->maven->setting. Ok, it works.