You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/12/18 00:08:24 UTC

[maven] branch MNG-7636_maven-3.8.x updated (64fae2b68 -> d1ad9ca0a)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch MNG-7636_maven-3.8.x
in repository https://gitbox.apache.org/repos/asf/maven.git


 discard 64fae2b68 [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)
     new d1ad9ca0a [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (64fae2b68)
            \
             N -- N -- N   refs/heads/MNG-7636_maven-3.8.x (d1ad9ca0a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 maven-core/src/main/java/org/apache/maven/project/MavenProject.java | 2 --
 1 file changed, 2 deletions(-)


[maven] 01/01: [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-7636_maven-3.8.x
in repository https://gitbox.apache.org/repos/asf/maven.git

commit d1ad9ca0ad76757adfef4dcf7946f80d4c464022
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Dec 18 00:21:30 2022 +0100

    [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)
---
 .../main/java/org/apache/maven/project/MavenProject.java   | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
index db0f4a901..666bc721d 100644
--- a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@@ -945,13 +945,21 @@ public class MavenProject
         }
     }
 
+    /**
+     * 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.
+     *
+     * @return the attached artifacts of this project
+     */
     public List<Artifact> getAttachedArtifacts()
     {
         if ( attachedArtifacts == null )
         {
             attachedArtifacts = new ArrayList<>();
         }
-        return Collections.unmodifiableList( attachedArtifacts );
+        return attachedArtifacts;
     }
 
     public Xpp3Dom getGoalConfiguration( String pluginGroupId, String pluginArtifactId, String executionId,
@@ -1073,7 +1081,7 @@ public class MavenProject
         MavenProject that = (MavenProject) other;
 
         return Objects.equals( getArtifactId(), that.getArtifactId() )
-            && Objects.equals( getGroupId(), that.getGroupId() ) 
+            && Objects.equals( getGroupId(), that.getGroupId() )
             && Objects.equals( getVersion(), that.getVersion() );
     }
 
@@ -1488,7 +1496,6 @@ public class MavenProject
     // Everything below will be removed for Maven 4.0.0
     //
     // ----------------------------------------------------------------------------------------------------------------
-
     private ProjectBuildingRequest projectBuilderConfiguration;
 
     private Map<String, String> moduleAdjustments;
@@ -1893,7 +1900,6 @@ public class MavenProject
         // we have a limitation in modello that will be remedied shortly. So
         // for now I have to iterate through and see what we have.
         // ----------------------------------------------------------------------
-
         if ( getReportPlugins() != null )
         {
             for ( ReportPlugin plugin : getReportPlugins() )