<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Plan on Jean-Christophe Gay</title><link>https://jeanchristophegay.com/tags/plan/</link><description>Recent content in Plan on Jean-Christophe Gay</description><generator>Hugo -- gohugo.io</generator><language>fr-FR</language><copyright>© 2026 Jean-Christophe Gay</copyright><lastBuildDate>Tue, 18 Aug 2026 23:08:47 +0200</lastBuildDate><atom:link href="https://jeanchristophegay.com/tags/plan/index.xml" rel="self" type="application/rss+xml"/><item><title>Le cycle de vie de son build Maven</title><link>https://jeanchristophegay.com/posts/maven-build-plan/</link><pubDate>Sat, 22 Mar 2014 19:24:00 +0200</pubDate><guid>https://jeanchristophegay.com/posts/maven-build-plan/</guid><description>&lt;p&gt;Avec Maven, je me suis souvent retrouvé un peu seul devant un &lt;a href="https://maven.apache.org/guides/introduction/introduction-to-the-pom.html" target="_blank" rel="noreferrer"&gt;POM&lt;/a&gt; en me demandant ce que pouvait bien exécuter mon build sans devoir aller lister toutes les exécutions déclarées. Depuis Maven 3 il est possible de prévoir ce qu&amp;rsquo;un build va exécuter au sein de son cycle de vie. Etrangement il n&amp;rsquo;y a rien qui permet d&amp;rsquo;afficher facilement ce plan de build calculé. Voici le &lt;a href="http://buildplan.jcgay.fr" target="_blank" rel="noreferrer"&gt;buildplan-maven-plugin&lt;/a&gt;.&lt;/p&gt;

&lt;h1 class="relative group"&gt;Configuration
 &lt;div id="configuration" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#configuration" aria-label="Ancre"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h1&gt;
&lt;p&gt;Pour utiliser le plugin facilement, déclarer son &lt;code&gt;groupId&lt;/code&gt; au sein de la configuration de Maven (ie &lt;code&gt;settings.xml&lt;/code&gt;) :&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;pluginGroups&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;pluginGroup&amp;gt;&lt;/span&gt;fr.jcgay.maven.plugins&lt;span class="nt"&gt;&amp;lt;/pluginGroup&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/pluginGroups&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 class="relative group"&gt;Afficher le plan du build
 &lt;div id="afficher-le-plan-du-build" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#afficher-le-plan-du-build" aria-label="Ancre"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h1&gt;
&lt;p&gt;Il est possible de lister toutes les exécutions de goals qui font parties du build. La simulation se déroule jusqu&amp;rsquo;à la phase &lt;code&gt;deploy&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; mvn buildplan:list

[INFO] --- buildplan-maven-plugin:1.0:list (default-cli) @ buildplan-maven-plugin ---
[INFO] --------------------------------------------------------------------------------------------------------------------
[INFO] PLUGIN | PHASE | ID | GOAL
[INFO] --------------------------------------------------------------------------------------------------------------------
[INFO] maven-plugin-plugin | generate-sources | help-goal | helpmojo
[INFO] maven-plugin-plugin | process-classes | default-descriptor | descriptor
[INFO] maven-resources-plugin | process-resources | default-resources | resources
[INFO] maven-compiler-plugin | compile | default-compile | compile
[INFO] maven-plugin-plugin | process-classes | mojo-descriptor | descriptor
[INFO] maven-resources-plugin | process-test-resources | default-testResources | testResources
[INFO] maven-compiler-plugin | test-compile | default-testCompile | testCompile
[INFO] maven-surefire-plugin | test | default-test | test
[INFO] animal-sniffer-maven-plugin | process-classes | check-signature | check
[INFO] maven-jar-plugin | package | default-jar | jar
[INFO] maven-plugin-plugin | package | default-addPluginArtifactMetadata | addPluginArtifactMetadata
[INFO] maven-source-plugin | package | attach-sources | jar-no-fork
[INFO] license-maven-plugin | verify | default | check
[INFO] maven-install-plugin | install | default-install | install
[INFO] maven-deploy-plugin | deploy | default-deploy | deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;h1 class="relative group"&gt;Lister les phases du plan
 &lt;div id="lister-les-phases-du-plan" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#lister-les-phases-du-plan" aria-label="Ancre"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h1&gt;
&lt;p&gt;Une vue par phase au sein du build est disponible. On peut ainsi voir rapidement quels plugins seront exécutés au sein d&amp;rsquo;une phase.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; mvn buildplan:list-phase

[INFO] --- buildplan-maven-plugin:1.0:list-phase (default-cli) @ buildplan-maven-plugin ---
[INFO] install ------------------------------------------------------------------------------------------
[INFO] + maven-install-plugin | default-install | install
[INFO] generate-sources ---------------------------------------------------------------------------------
[INFO] + maven-plugin-plugin | help-goal | helpmojo
[INFO] process-resources --------------------------------------------------------------------------------
[INFO] + maven-resources-plugin | default-resources | resources
[INFO] test ---------------------------------------------------------------------------------------------
[INFO] + maven-surefire-plugin | default-test | test
[INFO] test-compile -------------------------------------------------------------------------------------
[INFO] + maven-compiler-plugin | default-testCompile | testCompile
[INFO] process-test-resources ---------------------------------------------------------------------------
[INFO] + maven-resources-plugin | default-testResources | testResources
[INFO] verify -------------------------------------------------------------------------------------------
[INFO] + license-maven-plugin | default | check
[INFO] process-classes ----------------------------------------------------------------------------------
[INFO] + maven-plugin-plugin | default-descriptor | descriptor
[INFO] + maven-plugin-plugin | mojo-descriptor | descriptor
[INFO] + animal-sniffer-maven-plugin | check-signature | check
[INFO] compile ------------------------------------------------------------------------------------------
[INFO] + maven-compiler-plugin | default-compile | compile
[INFO] package ------------------------------------------------------------------------------------------
[INFO] + maven-jar-plugin | default-jar | jar
[INFO] + maven-plugin-plugin | default-addPluginArtifactMetadata | addPluginArtifactMetadata
[INFO] + maven-source-plugin | attach-sources | jar-no-fork
[INFO] deploy -------------------------------------------------------------------------------------------
[INFO] + maven-deploy-plugin | default-deploy | deploy
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Pour filtrer la description d&amp;rsquo;une seule phase, utiliser le paramètre &lt;code&gt;buildplan.phase&lt;/code&gt; :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mvn buildplan:list-phase -Dbuildplan.phase=test
&lt;/code&gt;&lt;/pre&gt;

&lt;h1 class="relative group"&gt;Lister les plugins
 &lt;div id="lister-les-plugins" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#lister-les-plugins" aria-label="Ancre"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h1&gt;
&lt;p&gt;On peut grouper les exécutions par plugin.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; mvn buildplan:list-plugin

[INFO] --- buildplan-maven-plugin:1.0:list-plugin (default-cli) @ buildplan-maven-plugin ---
[INFO] maven-deploy-plugin -------------------------------------------------------------------------
[INFO] + deploy | default-deploy | deploy
[INFO] maven-source-plugin -------------------------------------------------------------------------
[INFO] + package | attach-sources | jar-no-fork
[INFO] license-maven-plugin ------------------------------------------------------------------------
[INFO] + verify | default | check
[INFO] maven-resources-plugin ----------------------------------------------------------------------
[INFO] + process-resources | default-resources | resources
[INFO] + process-test-resources | default-testResources | testResources
[INFO] maven-plugin-plugin -------------------------------------------------------------------------
[INFO] + generate-sources | help-goal | helpmojo
[INFO] + process-classes | default-descriptor | descriptor
[INFO] + process-classes | mojo-descriptor | descriptor
[INFO] + package | default-addPluginArtifactMetadata | addPluginArtifactMetadata
[INFO] maven-jar-plugin ----------------------------------------------------------------------------
[INFO] + package | default-jar | jar
[INFO] animal-sniffer-maven-plugin -----------------------------------------------------------------
[INFO] + process-classes | check-signature | check
[INFO] maven-surefire-plugin -----------------------------------------------------------------------
[INFO] + test | default-test | test
[INFO] maven-compiler-plugin -----------------------------------------------------------------------
[INFO] + compile | default-compile | compile
[INFO] + test-compile | default-testCompile | testCompile
[INFO] maven-install-plugin ------------------------------------------------------------------------
[INFO] + install | default-install | install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Le paramètre &lt;code&gt;buildplan.plugin&lt;/code&gt; permet de filtrer un plugin en particulier :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mvn buildplan:list-plugin -Dbuildplan.plugin=maven-compiler-plugin
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Et voilà comment on peut explorer ce que va exécuter Maven pendant un build !&lt;/p&gt;</description></item></channel></rss>