fuss86 closed pull request #191: [MNG-5180] - Versioning's snapshot version list is not included in metadata merge URL: https://github.com/apache/maven/pull/191
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/maven-repository-metadata/src/main/mdo/metadata.mdo b/maven-repository-metadata/src/main/mdo/metadata.mdo index e2d0753397..82f3cc1575 100644 --- a/maven-repository-metadata/src/main/mdo/metadata.mdo +++ b/maven-repository-metadata/src/main/mdo/metadata.mdo @@ -202,6 +202,30 @@ under the License. changed = true; } } + + for ( SnapshotVersion snapshotVersion : versioning.getSnapshotVersions() ) + { + boolean exists = false; + + for ( SnapshotVersion sv : v.getSnapshotVersions() ) + { + if ( java.util.Objects.equals( snapshotVersion.getClassifier(), sv.getClassifier() ) && + java.util.Objects.equals( snapshotVersion.getExtension(), sv.getExtension() ) && + java.util.Objects.equals( snapshotVersion.getUpdated(), sv.getUpdated() ) && + java.util.Objects.equals( snapshotVersion.getVersion(), sv.getVersion() ) ) + { + exists = true; + break; + } + } + + if (!exists) + { + changed = true; + v.getSnapshotVersions().add( snapshotVersion ); + } + } + } } return changed; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services