Creating an Eclipse Project from Maven Template

1. Create a Project from Maven Template:

Open a new command line terminal.
In the terminal navigate to the folder under which you want to create the Java project and type this command:-

mvn archetype:generate -DgroupId=com.fm -DartifactId=FindMatch -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

This tells Maven to create a Java project ‘FindMatch’ from the Maven maven-archetype-quickstart template.
If you ignore the archetypeArtifactId option, a huge list of the Maven templates will be listed.

Once the command executes successfully, all the files and folders for the project will get created under FindMatch directory.

2. To make this as an Eclipse project, in the terminal navigate to ‘FindMatch’ directory and type this command :

mvn eclipse:eclipse

It will generate all project files that are required by Eclipse IDE.

3. Import the project into Eclipse.

Leave a Reply

Your email address will not be published. Required fields are marked *