Note that I’m switching to english for this blog entry but I’m not yet sure it will be always the case … I’m testing
After reporting a regression in M2 -> M3 upgrade (see MNG-4975) I discovered I didn’t understood how is computed the execution order of mojos in a Maven phase (Thanks Benjamin Bentmann).
As you know Maven is built around the notion of build lifecycle. You call a maven phase in your project and Maven will execute all phases to go up to the one you asked. For each phase it will execute a set of Mojos bound on it.
The question is what happens if several mojos (from the same or different plugins) are bound to the same phase. In which order are they executed ?
The reply is : in the order of declaration in the POM. Thus the important thing to understand is that the id used for an execution to bind a mojo to a phase isn’t used to compute this order.
And what about inheritance ? Executions of the parent are done before the child executions.
Our team will add a clear documentation about this in plugins configuration documentation. What is important to understand it is that there is no magic in Maven (just few holes in the documentation and we are doing our best to fill them).
Suivez moi !!!
Tags
Apache Archiva Apache Maven Blog Buzz Communauté Conférence CRaSH DevOps devoxx FeedBurner Git GitHub Google Gradle Groovy Hudson Java Java User Group Jenkinsci Jenkins User Conference JugSummerCamp LesCastCodeurs MacOS X Leopard modélisme octo Octo Technology Puppet Sonatype Nexus Subversion Université du SI Unix USI Vagrant Veewee WordPressCatégories
- Actualité (33)
- Le blog (3)
- Ma vie (4)
- Technologie (22)
-
Recent Posts
- 1ère édition DevopsDays PARIS – PROMO Inside
- Gagnez votre place pour Devoxx France 2013
- Launch a Maven build with a temporary empty local repository
- Maven : Filter only a given type of files
- Il ne faut pas CRaSHer dans la soupe … au JugSummerCamp
- Vers l’infini et au delà …
- Maven vs Gradle au LavaJUG
- Devoxx France 2012 – Gagnez votre place
- En avril, la Jenkins User Conference pose ses valises à Paris
- USI 2012 : Payez votre place à moitié prix.
Recent Comments
- Arnaud Héritier on Clone all repositories from a github organization
- Antoine_h on Clone all repositories from a github organization
- Antoine_h on Clone all repositories from a github organization
- Ansgar on Launch a Maven build with a temporary empty local repository
- Adrien on Launch a Maven build with a temporary empty local repository
Dernière publication

