This is an automated email from the ASF dual-hosted git repository. tibordigana pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/master by this push: new 5376261 [SUREFIRE-1564] Can't override platform version through project/plugin dependencies 5376261 is described below commit 537626138008c6cfaea15938ca7322741a3cecb8 Author: Tibor17 <tibordig...@apache.org> AuthorDate: Sun Oct 7 21:09:42 2018 +0200 [SUREFIRE-1564] Can't override platform version through project/plugin dependencies --- .../maven/plugin/surefire/AbstractSurefireMojo.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java index 4253b8c..c976a23 100644 --- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java +++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java @@ -1777,8 +1777,23 @@ public abstract class AbstractSurefireMojo Artifact... inPluginArtifacts ) { Set<Artifact> result = new LinkedHashSet<Artifact>(); - addAll( result, inPluginArtifacts ); - result.removeAll( providerArtifacts ); + for ( Artifact inPluginArtifact : inPluginArtifacts ) + { + boolean contains = false; + for ( Artifact providerArtifact : providerArtifacts ) + { + if ( providerArtifact.getGroupId().equals( inPluginArtifact.getGroupId() ) + && providerArtifact.getArtifactId().equals( inPluginArtifact.getArtifactId() ) ) + { + contains = true; + break; + } + } + if ( !contains ) + { + result.add( inPluginArtifact ); + } + } return result; }