My MVN Notes

  1. To view dependency tree:
mvn dependency:tree
  1. To skip running test:
mvn install -DskipTests
mvn install -DskipTests=true  //to override skipTests property in pom
  1. To skip compiling and runing tests:
mvn install -Dmaven.test.skip=true
  1. To run maven in offline mode, to avoid downloading:
mvn -o install
mvn --offline install
  1. To force check for updates of snapshots and releases from remote repositories:
mvn -U install
mvn --update-snapshots install
  1. To list all maven profiles, and see which is the active profile:
mvn help:all-profiles
  1. To override maven surefire plugin forkMode:
mvn test -DforkMode=never
mvn test -DforkMode=always