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

mvn -o install

mvn clean test -Pintegration-test -Dtest=java test class

mvn -PprofileName install

Similar Posts