Create a Simple Maven Project



Open Eclipse.
Create a new maven project. File--New--Other
New Wizard will open. There go to maven icon and expand it. Then Select Maven Project item.




Click Next.
In the New Maven Project wizard, select the create a simple project (skip archetype selection) check box.



Click Next
In the New Maven Project wizard enter the following values.


Group Id: org.test.testapp
Artifact Id: testapp
Version: 0.0.1-SNAPSHOT
Packaging: jar




Click Finish.

New Maven Project will be created and display in the Project Explore.
Here is the initial project structure of the created simple Maven project with a jar packaging. 




  Pom.xml file will contain the following initial details


	4.0.0
	org.test.testapp
	testapp
	0.0.1-SNAPSHOT









Run the Project

Executing Maven Goals.
Right Click on the testapp.
Select Run as
Here you can see the configured goals.
Maven install, Maven clean etc

maven install goal will install all the necessary dependancies inside pom.xml and create the packaging file which is jar or war file.

In this project we haven't done anything.

In the next post I will show you haow to create a simple spring-hibernate project.

After we creating the project inside eclipse we can run the application even through command line, if you have installed Apache Maven in to you PC.

For that you have to open commandline and go to the project directory thorugh command line and execute the mvn commands such as mvn clean, mvn install, etc.

ex: %testapp> mvn install


5 comments

Popular posts from this blog

Yield Price Sri Lanka - Android Application

Manage SOAPAction of the Out Message

Remove duplicate XML elements using XSLT