I am trying to understand what mvn clean:clean actually does.
mvn -B help:describe -Dcmd=clean
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-one 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:2.2:describe (default-cli) @ sample-one ---
[INFO] 'clean' is a lifecycle with the following phases:
* pre-clean: Not defined
* clean: org.apache.maven.plugins:maven-clean-plugin:2.5:clean
* post-clean: Not defined
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.689 s
[INFO] Finished at: 2015-12-10T10:20:16-08:00
[INFO] Final Memory: 9M/245M
[INFO] ------------------------------------------------------------------------
It appears to me that mvn clean:clean
is same as doing mvn org.apache.maven.plugins:maven-clean-plugin:2.5:clean
. Therefore I am assuming the first clean
in mvn clean:clean
is just an alias for org.apache.maven.plugins:maven-clean-plugin:2.5
. Similarly mvn maven-surefire-plugin:2.12.4:test
is same as mvn surefire:test
.
So somehow, maven-surefire-plugin:2.12.4
seems to refer to surefire
and org.apache.maven.plugins:maven-clean-plugin:2.5
to clean
.
When I look at the effective-pom, I see the following maven-surefire-plugin 2.12.4 default-test test test maven-clean-plugin 2.5 default-clean clean clean
As you can see, the pom doesnt seem to define alias. So following are my questions
- Is my understanding about plugin aliases correct
- If my understanding about aliases is correct - a) how and where are they defined? b) Is there a way to list all aliases.