Is there a way print a graph or simple chart of all the phases, goals, profiles, and plugins running during a given run of Maven? It seems like this would be useful to see a big picture of what is going on. I know you can turn on debug mode via -X
, but I'm looking for something more concise. Specifically to show which plugins are running in which phases, but showing all goals, phases, and profiles would be useful as well.
Here are some of the phases and default goals bound to them: compiler:compile – the compile goal from the compiler plugin is bound to the compile phase. compiler:testCompile is bound to the test-compile phase. surefire:test is bound to the test phase.
Maven makes the day-to-day work of Java developers easier and helps with the building and running of any Java-based project. Maven Lifecycle: Below is a representation of the default Maven lifecycle and its 8 steps: Validate, Compile, Test, Package, Integration test, Verify, Install and Deploy.
A Build profile is a set of configuration values, which can be used to set or override default values of Maven build. Using a build profile, you can customize build for different environments such as Production v/s Development environments.
This is the primary life cycle of Maven and is used to build the application. It has the following 21 phases.
You can use buildplan-maven-plugin, which has the goal list-phase
for displaying plugin executions within lifecycle phases.
mvn fr.jcgay.maven.plugins:buildplan-maven-plugin:list-phase
You can run this for a specific profile: just tack on -P profile-name
.
Example output on an empty Maven project:
process-resources ---------------------------------------------------
+ maven-resources-plugin | default-resources | resources
compile -------------------------------------------------------------
+ maven-compiler-plugin | default-compile | compile
process-test-resources ----------------------------------------------
+ maven-resources-plugin | default-testResources | testResources
test-compile --------------------------------------------------------
+ maven-compiler-plugin | default-testCompile | testCompile
test ----------------------------------------------------------------
+ maven-surefire-plugin | default-test | test
package -------------------------------------------------------------
+ maven-jar-plugin | default-jar | jar
install -------------------------------------------------------------
+ maven-install-plugin | default-install | install
deploy --------------------------------------------------------------
+ maven-deploy-plugin | default-deploy | deploy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With