Tuesday, 6 October 2015

Creating a Maven project in Eclipse

This tutorial talks about how to create a Java project structure using Apache Maven. Here I am using the maven Eclipse plugin. These days Eclipse comes with maven plugin and you don't need to download and set up maven plugin yourself. To verify that you have maven plugin pre-configured in eclipse go to Windows - Preferences, there on the left side scrollable window search for Maven, if you have maven then it will look like this.

maven project in eclipse

Now coming back to our project structure note that I have used Eclipse luna 4.2.2 for this tutorial.

Creating project structure

Right click in Project Explorer, click New and then select Other

maven project in eclipse

That will open a Wizard, there select Maven and then Maven Project. Click Next.

maven project in eclipse

In the New Maven Project window, check Use default Workspace location. Click Next.

maven project in eclipse

In the next window "Select an archetype" select one with artifact ID "maven-archetype-quickstart" Click Next.

maven project in eclipse

In the next window provide group ID and artifact ID. Click Finish.

maven project in eclipse

That will create the project structure.

maven project in eclipse

That's all for this topic Creating a Maven project in Eclipse. If you have any doubt or any suggestions to make please drop a comment. Thanks!


Related Topics

  1. Spring example program using XML configuration
  2. Spring example program using JavaConfig and Annotations
  3. Spring example program using automatic configuration
  4. Autowiring using annotations in Spring

You may also like -

2 comments: