[ https://issues.apache.org/jira/browse/MNG-7636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17648956#comment-17648956 ]
ASF GitHub Bot commented on MNG-7636: ------------------------------------- michael-o commented on code in PR #920: URL: https://github.com/apache/maven/pull/920#discussion_r1051506897 ########## maven-core/src/main/java/org/apache/maven/project/MavenProject.java: ########## @@ -945,13 +945,21 @@ public void addAttachedArtifact( Artifact artifact ) } } + /** + * Returns a mutable list of the attached artifacts to this project. It is highly advised <em>not</em> + * to modify this list, but rather use the {@link MavenProjectHelper}. + * <p> + * <strong>Note</strong>: This list will be made read-only Maven 4. + * Review Comment: Good catch. > Partially revert MNG-5868 to restore backward compatibility (see MNG-7316) > -------------------------------------------------------------------------- > > Key: MNG-7636 > URL: https://issues.apache.org/jira/browse/MNG-7636 > Project: Maven > Issue Type: Task > Affects Versions: 3.8.6 > Reporter: Michael Osipov > Assignee: Michael Osipov > Priority: Major > Fix For: 3.9.0, 3.8.7 > > > Due to the lack of documentation it was never clear whether > {{org.apache.maven.project.MavenProject.getAttachedArtifacts()}} is mutable > or not. Components used or abused this collection. The change was done in > 3.8.x in a patch release which was unfortunately and make things obvious. To > better address the breaking situation this change will be partially reverted > in 3.8.x, but documented in 3.9.0 and 4.0.0 that the collection is read-only. > A proper solution to remove attached is desired in the future. -- This message was sent by Atlassian Jira (v8.20.10#820010)