Maven build plan and execution order

March 10, 2025 by Michael

Update: The plugin is now hosted on Mojohaus, has a new artefact id and thus is automatically available in Maven without to having to supply the group id. I updated the snippets below. The latest version displays also the versions of the plugins being used.

I recently stumbled upon the buildplan-maven-plugin and I find it quite useful

Run it on your project with

mvn buildplan:list

to list all steps in order and

mvn buildplan:list-phase

On the core project of Neo4js JDBC driver it looks like this:

[INFO] Build Plan for Neo4j JDBC Driver (Core): 
---------------------------------------------------------------------------------------------------------------------
PHASE                  | PLUGIN                         | VERSION | GOAL                      | EXECUTION ID         
---------------------------------------------------------------------------------------------------------------------
validate               | maven-enforcer-plugin          | 3.5.0   | enforce                   | enforce              
verify                 | duplicate-finder-maven-plugin  | 2.0.1   | check                     | default              
validate               | sortpom-maven-plugin           | 4.0.0   | verify                    | default              
verify                 | license-maven-plugin           | 4.6     | check                     | validate             
validate               | spring-javaformat-maven-plugin | 0.0.43  | validate                  | default              
verify                 | maven-checkstyle-plugin        | 3.6.0   | check                     | checkstyle-validation
initialize             | git-commit-id-maven-plugin     | 9.0.1   | revision                  | get-the-git-infos    
initialize             | jacoco-maven-plugin            | 0.8.12  | prepare-agent             | pre-unit-test        
process-resources      | maven-resources-plugin         | 3.3.1   | resources                 | default-resources    
compile                | maven-compiler-plugin          | 3.14.0  | compile                   | default-compile      
process-test-resources | maven-resources-plugin         | 3.3.1   | testResources             | default-testResources
test-compile           | maven-compiler-plugin          | 3.14.0  | testCompile               | default-testCompile  
test                   | maven-surefire-plugin          | 3.5.2   | test                      | default-test         
package                | maven-jar-plugin               | 3.4.2   | jar                       | default-jar          
package                | maven-source-plugin            | 3.3.1   | jar-no-fork               | attach-sources       
package                | maven-javadoc-plugin           | 3.11.2  | jar                       | attach-javadocs      
verify                 | japicmp-maven-plugin           | 0.23.1  | cmp                       | default              
pre-integration-test   | jacoco-maven-plugin            | 0.8.12  | prepare-agent-integration | pre-integration-test 
verify                 | jacoco-maven-plugin            | 0.8.12  | report                    | report-and-check     
verify                 | jacoco-maven-plugin            | 0.8.12  | check                     | report-and-check     
install                | maven-install-plugin           | 3.1.4   | install                   | default-install      
deploy                 | maven-deploy-plugin            | 3.1.4   | deploy                    | default-deploy

respectively

[INFO] Build Plan for Neo4j JDBC Driver (Core): 
validate ----------------------------------------------------------------------------------------
    + maven-enforcer-plugin          | enforce                   | enforce              
    + duplicate-finder-maven-plugin  | check                     | default              
    + sortpom-maven-plugin           | verify                    | default              
    + license-maven-plugin           | check                     | validate             
    + spring-javaformat-maven-plugin | validate                  | default              
    + maven-checkstyle-plugin        | check                     | checkstyle-validation
initialize --------------------------------------------------------------------------------------
    + git-commit-id-maven-plugin     | revision                  | get-the-git-infos    
    + jacoco-maven-plugin            | prepare-agent             | pre-unit-test        
process-resources -------------------------------------------------------------------------------
    + maven-resources-plugin         | resources                 | default-resources    
compile -----------------------------------------------------------------------------------------
    + maven-compiler-plugin          | compile                   | default-compile      
process-test-resources --------------------------------------------------------------------------
    + maven-resources-plugin         | testResources             | default-testResources
test-compile ------------------------------------------------------------------------------------
    + maven-compiler-plugin          | testCompile               | default-testCompile  
test --------------------------------------------------------------------------------------------
    + maven-surefire-plugin          | test                      | default-test         
package -----------------------------------------------------------------------------------------
    + maven-jar-plugin               | jar                       | default-jar          
    + maven-source-plugin            | jar-no-fork               | attach-sources       
    + maven-javadoc-plugin           | jar                       | attach-javadocs      
    + japicmp-maven-plugin           | cmp                       | default              
pre-integration-test ----------------------------------------------------------------------------
    + jacoco-maven-plugin            | prepare-agent-integration | pre-integration-test 
post-integration-test ---------------------------------------------------------------------------
    + jacoco-maven-plugin            | report                    | report-and-check     
    + jacoco-maven-plugin            | check                     | report-and-check     
install -----------------------------------------------------------------------------------------
    + maven-install-plugin           | install                   | default-install      
deploy ------------------------------------------------------------------------------------------
    + maven-deploy-plugin            | deploy                    | default-deploy

Helpful.

No comments yet

One Trackback/Pingback
  1. Java Weekly, Issue 585 | Baeldung on March 13, 2025 at 4:01 PM

    […] Maven build plan and execution order […]

Post a Comment

Your email is never published. We need your name and email address only for verifying a legitimate comment. For more information, a copy of your saved data or a request to delete any data under this address, please send a short notice to michael@simons.ac from the address you used to comment on this entry.
By entering and submitting a comment, wether with or without name or email address, you'll agree that all data you have entered including your IP address will be checked and stored for a limited time by Automattic Inc., 60 29th Street #343, San Francisco, CA 94110-4929, USA. only for the purpose of avoiding spam. You can deny further storage of your data by sending an email to support@wordpress.com, with subject “Deletion of Data stored by Akismet”.
Required fields are marked *