You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/10/04 21:09:19 UTC

[GitHub] [maven] michael-o commented on a change in pull request #371: [MNG-5180] Fixes dangling snapshot versions in metadata after merge

michael-o commented on a change in pull request #371:
URL: https://github.com/apache/maven/pull/371#discussion_r499288608



##########
File path: maven-repository-metadata/src/main/mdo/metadata.mdo
##########
@@ -190,17 +192,24 @@ under the License.
                     {
                         s.setTimestamp( snapshot.getTimestamp() );
                         changed = true;
+                        updateSnapshotVersions = true;
                     }
                     if ( s.getBuildNumber() != snapshot.getBuildNumber() )
                     {
                         s.setBuildNumber( snapshot.getBuildNumber() );
                         changed = true;
+                        updateSnapshotVersions = true;
                     }
                     if ( s.isLocalCopy() != snapshot.isLocalCopy() )
                     {
                         s.setLocalCopy( snapshot.isLocalCopy() );
                         changed = true;
                     }
+                    if (updateSnapshotVersions)
+                    {
+                      v.setSnapshotVersions( new java.util.ArrayList<SnapshotVersion>( versioning.getSnapshotVersions() ) );

Review comment:
       I think this one is wrong because it has to work like versions. Test whether the collection contains if not, add it. You are replacing the list and not merging.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org