•  
Main
About Hippo Portal
Documentation
Community
Other

Using Eclipse

To import a Maven 1 project in Eclipse first you need to have the Eclipse plugin for Maven 1 installed and Eclipse configured to know about the location of the Maven 1 repository.

Installing and configuring the Eclipse plugin for Maven 1

Install the latest Eclipse plugin for Maven 1 :

maven plugin:download -DartifactId=maven-eclipse-plugin -DgroupId=maven -Dversion=1.12
(check the link above to determine the latest version, which is as of this writing version 1.12)

The .jar dependencies from a Maven 1 project's project.xml are stored in your local Maven repository. The location of this repository needs be configured in Eclipse to let Eclipse know where these .jar files are:

  • In Eclipse, go to Window > Preferences... > Java > Build Path > Classpath Variables
  • Press New...
  • Enter "MAVEN_REPO" for the name of the classpath variable. Use the Folder... button to select the location of your local Maven repository. By default, it is located at:
    • Windows: c:\Documents and Settings\<Your Name>\.maven\repository
    • Unix systems: ~/.maven/repository
    .

Creating and importing the Eclipse project with Maven 1

  • Go to the project's base folder via a console and type:
    maven eclipse
  • In Eclipse (3.2+), go to File > Import...
  • Choose Existing projects into Workspace and press next
  • Select Select root directory and press Browse..
  • Select the base folder of the project you want to import and press Finish