This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-release-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 1270c8e Simplify.
1270c8e is described below
commit 1270c8e90eef88474726c65f908e3d69ce18a465
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Mar 12 13:23:57 2022 -0500
Simplify.
---
.../release/plugin/mojos/CommonsDistributionDetachmentMojo.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git
a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
index 0197f70..5d6d4ae 100755
---
a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
+++
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
@@ -137,11 +137,9 @@ public class CommonsDistributionDetachmentMojo extends
AbstractMojo {
// https://issues.apache.org/jira/browse/MNG-7316
try {
// (1) Try the normal way
- for (final Artifact artifactToRemove : detachedArtifacts) {
- // Maven 3.8.3 throws an exception here because
MavenProject.getAttachedArtifacts()
- // returns an IMMUTABLE collection.
- project.getAttachedArtifacts().remove(artifactToRemove);
- }
+ // Maven 3.8.3 throws an exception here because
MavenProject.getAttachedArtifacts()
+ // returns an IMMUTABLE collection.
+ project.getAttachedArtifacts().removeAll(detachedArtifacts);
} catch (UnsupportedOperationException e) {
// (2) HACK workaround for
https://issues.apache.org/jira/browse/MNG-7316
final ArrayList<Artifact> arrayList = new
ArrayList<>(project.getAttachedArtifacts());