Artikel Terbaru

Thursday, 1 December 2011

Maven commands

As we have encountered the usage of maven in java projects, following are the list of maven commands for your reference. Whenever you run maven command with different goals, It tries to download the different dependencies from the different repositories configured in xml file. If mvn install command unable to download dependent artifacts from repositories, then use the following command with proxy settings enabled
mvn install -Dhttps.proxyHost="" -Dhttps.proxyPort=""
To run the maven by skipping unit and integration tests
mvn clean install -Dmaven.test.skip=true or 
mvn clean install -DskipTests=true
To run the maven without downloading artifacts from the repositories i.e offline
mvn -o install
To run one test class using maven
mvn clean test -Pintegration-test -Dtest=java test class
To execute the maven profile
mvn -PprofileName install