You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2022/12/18 14:05:00 UTC
[jira] [Closed] (MNG-7316) REGRESSION: MavenProject.getAttachedArtifacts() is read-only
[ https://issues.apache.org/jira/browse/MNG-7316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MNG-7316.
-------------------------------
Resolution: Fixed
This has been implicitly addressed by MNG-7636 for the 3.x line. [~chtompki], still owes me an explanation why he attaches and then detaches the same artifacts. [~laeubi], though I do not fully understand your usecase, I think it is justified. Feel free to raise a new ticket to improve the {{MavenProjectHelper}}.
> REGRESSION: MavenProject.getAttachedArtifacts() is read-only
> ------------------------------------------------------------
>
> Key: MNG-7316
> URL: https://issues.apache.org/jira/browse/MNG-7316
> Project: Maven
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.8.2, 3.8.3
> Reporter: Gary D. Gregory
> Assignee: Michael Osipov
> Priority: Critical
> Fix For: 3.9.0, 3.8.7
>
>
> The method {{MavenProject.getAttachedArtifacts()}} as of 3.8.2 breaks releasing components for us at Apache Commons using our Maven Release plugin because the list returned is now immutable, we now get an exception when calling {{remove()}} on the collection returned by the API; see [https://github.com/apache/commons-release-plugin/blob/master/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java#L137]
> This worked fine in 3.8.1, may you please change it back for 3.8.4?
> We cannot use Maven 3.8.2 and 3.8.3 to release our components.
> ([~michael-o]: Ironically, I discovered this trying to create a release candidate for Apache Commons CLI.)
> The exception in 3.8.3:
> {quote}Caused by: java.lang.UnsupportedOperationException
> at java.util.Collections$UnmodifiableCollection.remove (Collections.java:1060)
> at org.apache.commons.release.plugin.mojos.CommonsDistributionDetachmentMojo.execute (CommonsDistributionDetachmentMojo.java:136)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
> {quote}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)