The depth first DAG traversal of Maven modules in a build is a great and under appreciated thing, but sometimes I wish for a different way of working. Particularly for CI, I'd want to compile everything first, *then* run tests. Two DAG traversals, if you like. This is possible, like so:
mvn clean install -DskipTests -Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY mvn surefire:test -Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY I'm separating out the local maven repo bcause SNAPSHOT items can drop in on the "install" action, but still later fail tests. And I'd not want other builds on the same machine to utilize those jars of dubious quality (even if they are over written a lot). Question: Anyway, is there a critical (but subtle) goal/phase that's going to be skipped with this way of working? - Paul