Useful Maven commands

Home/Maven/Useful Maven commands

Maven Commands

maven-300x104 Useful Maven commands



Install Maven

Download and Install Java
Download Maven.
Unzip the downloaded file in a directory.
export variable M2_HOME to the unzipped directory
export variable PATH to M2_HOMEbin

Example in Unix:

Uninstall Maven

Delete the directory where the maven is unpacked
Delete the  .m2 directory present under USER_HOME (i,e., c:users.m2)
Delete the env. variables M2_HOME
Delete the .M2_HOME\bin in PATH variable

Maven Command line reference


The below maven commands creates  a project in current directory
 The below maven command Compile the project source.
The below maven command run the test cases of the project
 
 
To compile and Run unit test
 
 
The below command package the projects as an ear, jar, sar or other format mentioned in the POM file 
 
 
The below command generates reports of the project
 
The below command deploy the project as an archive file in local directory or to a server
 
 Compile, Package and deploy into remote repository

Install the packaged archive file in local/remote repository, that is c:\users\.m2\repository or archive

Delete and install the project in local repository

 





pgn Useful Maven commands

Govindan

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
pgn Useful Maven commands

Latest posts by Govindan (see all)

By | 2016-08-27T21:33:47+00:00 January 6th, 2016|Categories: Maven|Tags: , , , |0 Comments
Like us on Facebook.
Connect!