This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/maven-remote-resources-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new ed999c5 Compute plugin ordering once instead of on every
parent-plugin iteration (#271) (#285)
ed999c5 is described below
commit ed999c59d170572c20ce6fda94f37bdb41b02c21
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Wed Oct 28 13:55:21 2026 +0000
Compute plugin ordering once instead of on every parent-plugin iteration
(#271) (#285)
---
.../apache/maven/plugin/resources/remote/ModelUtils.java | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git
a/src/main/java/org/apache/maven/plugin/resources/remote/ModelUtils.java
b/src/main/java/org/apache/maven/plugin/resources/remote/ModelUtils.java
index bc94f83..7d89bdd 100644
--- a/src/main/java/org/apache/maven/plugin/resources/remote/ModelUtils.java
+++ b/src/main/java/org/apache/maven/plugin/resources/remote/ModelUtils.java
@@ -105,16 +105,18 @@ public final class ModelUtils {
parentPlugin.unsetInheritanceApplied();
}
}
+ }
- // very important to use the parentPlugins List, rather than
parentContainer.getPlugins()
- // since this list is a local one, and may have been modified
during processing.
- List<Plugin> results =
- ModelUtils.orderAfterMerge(assembledPlugins,
parentPlugins, childContainer.getPlugins());
+ // very important to use the parentPlugins List, rather than
parentContainer.getPlugins()
+ // since this list is a local one, and may have been modified
during processing.
+ // The ordering only depends on the final assembled plugins, so
compute it once after
+ // the loop instead of on every iteration.
+ List<Plugin> results =
+ ModelUtils.orderAfterMerge(assembledPlugins,
parentPlugins, childContainer.getPlugins());
- childContainer.setPlugins(results);
+ childContainer.setPlugins(results);
- childContainer.flushPluginMap();
- }
+ childContainer.flushPluginMap();
}
}