I am running a single test with Maven.
Which is the difference of running it in these two ways:
mvn -Dtest=DatabaseTest test
mvn -Dtest=DatabaseTest surefire:test
I can see that test shows:
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rac.mybatis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rac.mybatis ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ rac.mybatis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/etomort/smip/oracle-rac/mybatis-rac/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ rac.mybatis ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ rac.mybatis ---
[INFO] Surefire report directory: /home/etomort/smip/oracle-rac/mybatis-rac/target/surefire-reports
While surefire:test shows:
[INFO] --- maven-surefire-plugin:2.12.4:test (default-cli) @ rac.mybatis ---
[INFO] Surefire report directory: /home/etomort/smip/oracle-rac/mybatis-rac/target/surefire-reports
This question has very valuable explanation, though current one points to a typical doubt one can face and it is a very concrete use case. The answer provided by @Shadow clarifies it. The maven-lifecycle-vs-phase-vs-plugin-vs-goal question can be consulted to widen and for deeper understand of Maven way of working.