Skip to content

Commit

Permalink
Merge pull request #192 from basil/testScoped
Browse files Browse the repository at this point in the history
Plugin compatibility tester is re-adding test-scoped dependencies rather than merely updating them
  • Loading branch information
raul-arabaolaza authored Sep 30, 2019
2 parents f7d00ce + 1d8d9da commit ba980f3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ public void addDependencies(Map<String,VersionNumber> toAdd, Map<String,VersionN
}
}
version.addText(replacement.toString());
toReplaceUsed.put(trimmedArtifactId, replacement);
Element scope = mavenDependency.element("scope");
if (scope != null && scope.getTextTrim().equals("test")) {
toReplaceTestUsed.put(trimmedArtifactId, replacement);
} else {
toReplaceUsed.put(trimmedArtifactId, replacement);
}
}
// If the replacement dependencies weren't explicitly present in the pom, add them directly now
toReplace.entrySet().removeAll(toReplaceUsed.entrySet());
Expand Down

0 comments on commit ba980f3

Please sign in to comment.