This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch MNG-7804-plugin-execution-order-3.9 in repository https://gitbox.apache.org/repos/asf/maven.git
commit 9df11553cad70ce9f7113a3d08b88888cddd0938 Author: Hervé Boutemy <[email protected]> AuthorDate: Sun Jun 18 20:04:05 2023 +0200 [MNG-7804] Maven 3 priority as XML attribute --- .../internal/DefaultLifecyclePluginAnalyzer.java | 2 +- maven-model/src/main/mdo/maven.mdo | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java index 21f99e52a..dd5977764 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java @@ -159,7 +159,7 @@ public class DefaultLifecyclePluginAnalyzer implements LifeCyclePluginAnalyzer { PluginExecution execution = new PluginExecution(); execution.setId(getExecutionId(plugin, gs.goal)); execution.setPhase(phase); - execution.setPriority(i - mojos.size()); + execution.setPriority(1000 * (i - mojos.size())); execution.getGoals().add(gs.goal); execution.setLocation("", location); diff --git a/maven-model/src/main/mdo/maven.mdo b/maven-model/src/main/mdo/maven.mdo index ba90c49cf..4cc8c5001 100644 --- a/maven-model/src/main/mdo/maven.mdo +++ b/maven-model/src/main/mdo/maven.mdo @@ -2563,26 +2563,13 @@ <description>The build lifecycle phase to bind the goals in this execution to. If omitted, the goals will be bound to the default phase specified by the plugin. </description> </field> - <field xml.transient="true"> - <name>priority</name> - <version>4.0.0/4.1.0</version> - <type>int</type> - <description> - <![CDATA[ - The priority of this execution compared to other executions which are bound to the same phase. - <strong>Warning:</strong> This is an internal utility property that is only public for technical reasons, - it is not part of the public API. In particular, this property can be changed or deleted without prior - notice. - ]]> - </description> - </field> - <field> + <field xml.attribute="true"> <name>priority</name> - <version>4.2.0+</version> + <version>4.0.0+</version> <type>int</type> <description>The priority of this execution compared to other executions which are bound to the same phase. Executions derived from the default lifecycle have a negative priority by default so that they are executed - before any custom plugin executions. + before any custom plugin executions. This field is accessible only since Maven 3.9.3, was purely internal before. </description> </field> <field>
