Home > Build-Management, Software Engineering > Maven with Eclipse

Maven with Eclipse

Install Eclipse Plugin M2Eclipse

  • Go to “Help | Install New Software… | Add…” and paste:
Name: M2Eclipse
Location: http://m2eclipse.sonatype.org/sites/m2e
  • Choose the component listed under m2eclipse: “Maven Integration for Eclipse (Required)”.

Create Maven project

  • mvn archetype:generate -DinteractiveMode=false -DgroupId=org.mycompany.myproject -DartifactId=MvnHelloApp
  • cd MvnHelloApp
  • mvn package
  • java -cp target/MvnHelloApp-1.0-SNAPSHOT.jar org.mycompany.myproject.App

Create Eclipse project

  • cd MvnHelloApp
  • mvn eclipse:eclipse
  • import the project in Eclipse
  • right-click on your project in the eclipse package explorer and choose “Maven | Enable Dependency Management”.
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s