Pages

Friday 24 May 2013

Maven usage

Maven to software  development

First go to start->run->cmd prompt

go to the path where you want the maven project to be placed.

Run the mvn archetype:generate command as shown below.



Now select the number which indicates the type of the project,
in below image, i have selected 6 for simple core java project and also enter group id,artifact id,version and package


now check the workspace selected , maven produced a nice project structure


Now develop all source code in that workspace.
lets assume we have done coding, so we need to compile and build our application
so issue mvn clean install command as below




Now check the project folder, there will be a target folder which is having all .class files compiled using maven command.
and also there will be a jar file for the application as its a core java application.

No comments:

Post a Comment