Pages

Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

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.

Wednesday, 22 May 2013

Maven Setup Basics



Maven - Setup by downloading latest release.

Maven uses in software development
Lets see the maven setup step by step

1)Download the latest maven from the link  Maven download link
currently refer the latest version marked in the below image





2)unzip the downloaded maven zipped folder to any of your favorite location


3)set the following  Environment variables

1)JAVA_HOME - point to jdk folder of your java installed location
2)M2_HOME - point to  maven folder of your maven extracted location
3)PATH - bin of above 2 variables

Screenshots for the same are as below





4)Now check the maven is configured or not by issuing following command from comman prompt
mvn -version



Maven setup in your system is completed now.

Next post -  we will see how can we use maven to simplify our software development.