[maven-release] branch master updated: Ensure all Maps in ReleaseDescriptor have proper generics

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven-release] branch master updated: Ensure all Maps in ReleaseDescriptor have proper generics

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

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-release.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ad75c8  Ensure all Maps in ReleaseDescriptor have proper generics
9ad75c8 is described below

commit 9ad75c8ee06ac2652585d88f0e8480d82083f2e3
Author: rfscholte <[hidden email]>
AuthorDate: Fri Jan 12 14:34:57 2018 +0100

    Ensure all Maps in ReleaseDescriptor have proper generics
---
 maven-release-manager/pom.xml                      |   2 +-
 .../release/phase/AbstractRewritePomsPhase.java    |   1 -
 .../release/phase/GenerateReleasePomsPhase.java    |   1 -
 .../shared/release/phase/InputVariablesPhase.java  |   2 +-
 .../shared/release/phase/MapVersionsPhase.java     |   4 +-
 .../release/phase/RewritePomVersionsPhase.java     |   1 -
 .../release/phase/RewritePomsForBranchPhase.java   |   1 -
 .../phase/RewritePomsForDevelopmentPhase.java      |   3 -
 .../release/phase/RewritePomsForReleasePhase.java  |   1 -
 .../maven/shared/release/versions/VersionInfo.java |   2 +-
 .../src/main/mdo/release-descriptor.mdo            | 237 ++++++++++++++++-----
 .../shared/release/config/ReleaseUtilsTest.java    |   6 +-
 .../phase/CheckDependencySnapshotsPhaseTest.java   |  16 +-
 .../maven/plugins/release/UpdateVersionsMojo.java  |  10 +-
 pom.xml                                            |   4 -
 15 files changed, 198 insertions(+), 93 deletions(-)

diff --git a/maven-release-manager/pom.xml b/maven-release-manager/pom.xml
index b8b26b5..6d970d7 100644
--- a/maven-release-manager/pom.xml
+++ b/maven-release-manager/pom.xml
@@ -200,7 +200,7 @@
       <plugin>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
-        <version>1.7</version>
+        <version>1.9.1</version>
         <executions>
           <execution>
             <goals>
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
index 01f8952..6fd4cb6 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
@@ -241,7 +241,6 @@ public abstract class AbstractRewritePomsPhase
     {
         Map<String, String> mappedVersions = getNextVersionMap( releaseDescriptor );
         Map<String, String> originalVersions = getOriginalVersionMap( releaseDescriptor, reactorProjects, simulate );
-        @SuppressWarnings( "unchecked" )
         Map<String, Map<String, String>> resolvedSnapshotDependencies =
             releaseDescriptor.getResolvedSnapshotDependencies();
         Model model = project.getModel();
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java
index 0265dfe..fbb0749 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java
@@ -425,7 +425,6 @@ public class GenerateReleasePomsPhase
         return releaseDescriptor.getOriginalVersions( reactorProjects );
     }
 
-    @SuppressWarnings( "unchecked" )
     protected Map<String, String> getNextVersionMap( ReleaseDescriptor releaseDescriptor )
     {
         return releaseDescriptor.getReleaseVersions();
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/InputVariablesPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/InputVariablesPhase.java
index 7373c69..985b9cf 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/InputVariablesPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/InputVariablesPhase.java
@@ -134,7 +134,7 @@ public class InputVariablesPhase
         {
             // Must get default version from mapped versions, as the project will be the incorrect snapshot
             String key = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() );
-            String releaseVersion = (String) releaseDescriptor.getReleaseVersions().get( key );
+            String releaseVersion = releaseDescriptor.getReleaseVersions().get( key );
             if ( releaseVersion == null )
             {
                 throw new ReleaseExecutionException( "Project tag cannot be selected if version is not yet mapped" );
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java
index 4ae295a..443d9fd 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java
@@ -337,7 +337,7 @@ public class MapVersionsPhase
         String defaultVersion = releaseDescriptor.getDefaultDevelopmentVersion();
         if ( StringUtils.isEmpty( defaultVersion ) )
         {
-            defaultVersion = ( String ) releaseDescriptor.getDevelopmentVersions().get( projectId );
+            defaultVersion = releaseDescriptor.getDevelopmentVersions().get( projectId );
         }
         return defaultVersion;
     }
@@ -347,7 +347,7 @@ public class MapVersionsPhase
         String nextVersion = releaseDescriptor.getDefaultReleaseVersion();
         if ( StringUtils.isEmpty( nextVersion ) )
         {
-            nextVersion = ( String ) releaseDescriptor.getReleaseVersions().get( projectId );
+            nextVersion = releaseDescriptor.getReleaseVersions().get( projectId );
         }
         return nextVersion;
     }
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java
index 2a44539..2ed4376 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java
@@ -67,7 +67,6 @@ public class RewritePomVersionsPhase
         return releaseDescriptor.getOriginalVersions( reactorProjects );
     }
 
-    @SuppressWarnings( "unchecked" )
     @Override
     protected Map<String, String> getNextVersionMap( ReleaseDescriptor releaseDescriptor )
     {
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhase.java
index 0686230..1907e6a 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhase.java
@@ -250,7 +250,6 @@ public class RewritePomsForBranchPhase
         return releaseDescriptor.getOriginalVersions( reactorProjects );
     }
 
-    @SuppressWarnings( "unchecked" )
     @Override
     protected Map<String, String> getNextVersionMap( ReleaseDescriptor releaseDescriptor )
     {
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhase.java
index 0bd27bc..01bd7ef 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhase.java
@@ -59,7 +59,6 @@ public class RewritePomsForDevelopmentPhase
             Scm scmRoot = modelTarget.getScm();
             if ( scmRoot != null )
             {
-                @SuppressWarnings( "unchecked" )
                 Map<String, Scm> originalScmInfo = releaseDescriptor.getOriginalScmInfo();
                 // check containsKey, not == null, as we store null as a value
                 if ( !originalScmInfo.containsKey( projectId ) )
@@ -96,7 +95,6 @@ public class RewritePomsForDevelopmentPhase
         }
     }
 
-    @SuppressWarnings( "unchecked" )
     @Override
     protected Map<String, String> getOriginalVersionMap( ReleaseDescriptor releaseDescriptor,
                                                          List<MavenProject> reactorProjects, boolean simulate )
@@ -106,7 +104,6 @@ public class RewritePomsForDevelopmentPhase
             : releaseDescriptor.getReleaseVersions();
     }
 
-    @SuppressWarnings( "unchecked" )
     @Override
     protected Map<String, String> getNextVersionMap( ReleaseDescriptor releaseDescriptor )
     {
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhase.java
index 5ad3af5..6e2b47e 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhase.java
@@ -244,7 +244,6 @@ public class RewritePomsForReleasePhase
         return releaseDescriptor.getOriginalVersions( reactorProjects );
     }
 
-    @SuppressWarnings( "unchecked" )
     @Override
     protected Map<String, String> getNextVersionMap( ReleaseDescriptor releaseDescriptor )
     {
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/versions/VersionInfo.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/versions/VersionInfo.java
index 46ae13b..de2c994 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/versions/VersionInfo.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/versions/VersionInfo.java
@@ -20,7 +20,7 @@ package org.apache.maven.shared.release.versions;
  */
 
 /**
- * @todo this has an overlap with ArtifactVersion in maven-artifact - would be good to migrate this there.
+ * Represent the different version representations during the release-prepare phase
  */
 public interface VersionInfo
     extends Comparable<VersionInfo>
diff --git a/maven-release-manager/src/main/mdo/release-descriptor.mdo b/maven-release-manager/src/main/mdo/release-descriptor.mdo
index 3c5304b..c430cb1 100644
--- a/maven-release-manager/src/main/mdo/release-descriptor.mdo
+++ b/maven-release-manager/src/main/mdo/release-descriptor.mdo
@@ -162,42 +162,42 @@
           </description>
         </field>
         <!-- Maven Information -->
-        <field>
-          <name>releaseVersions</name>
-          <version>1.0.0+</version>
-          <type>Map</type>
-          <association>
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-          <description>
-            A map of projects to versions to use when releasing the given projects.
-          </description>
-        </field>
-        <field>
-          <name>developmentVersions</name>
-          <version>1.0.0+</version>
-          <type>Map</type>
-          <association>
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-          <description>
-            A map of projects to versions to use when moving the given projects back into development after release.
-          </description>
-        </field>
-        <field>
-          <name>resolvedSnapshotDependencies</name>
-          <version>1.0.0+</version>
-          <type>Map</type>
-          <association>
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-          <description>
-            A map of resolved snapshot dependencies versions.
-          </description>
-        </field>
+<!--         <field> -->
+<!--           <name>releaseVersions</name> -->
+<!--           <version>1.0.0+</version> -->
+<!--           <type>Map</type> -->
+<!--           <association> -->
+<!--             <type>String</type> -->
+<!--             <multiplicity>*</multiplicity> -->
+<!--           </association> -->
+<!--           <description> -->
+<!--             A map of projects to versions to use when releasing the given projects. -->
+<!--           </description> -->
+<!--         </field> -->
+<!--         <field> -->
+<!--           <name>developmentVersions</name> -->
+<!--           <version>1.0.0+</version> -->
+<!--           <type>Map</type> -->
+<!--           <association> -->
+<!--             <type>String</type> -->
+<!--             <multiplicity>*</multiplicity> -->
+<!--           </association> -->
+<!--           <description> -->
+<!--             A map of projects to versions to use when moving the given projects back into development after release. -->
+<!--           </description> -->
+<!--         </field> -->
+<!--         <field> -->
+<!--           <name>resolvedSnapshotDependencies</name> -->
+<!--           <version>1.0.0+</version> -->
+<!--           <type>Map</type> -->
+<!--           <association> -->
+<!--             <type>String</type> -->
+<!--             <multiplicity>*</multiplicity> -->
+<!--           </association> -->
+<!--           <description> -->
+<!--             A map of resolved snapshot dependencies versions. -->
+<!--           </description> -->
+<!--         </field> -->
         <field>
           <name>updateDependencies</name>
           <version>1.0.0+</version>
@@ -217,18 +217,18 @@
             If set to true, this will set the property "performRelease" to true.
           </description>
         </field>
-        <field>
-          <name>originalScmInfo</name>
-          <version>1.0.0+</version>
-          <type>Map</type>
-          <association>
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-          <description>
-            A map of projects to original SCM information.
-          </description>
-        </field>
+<!--         <field> -->
+<!--           <name>originalScmInfo</name> -->
+<!--           <version>1.0.0+</version> -->
+<!--           <type>Map</type> -->
+<!--           <association> -->
+<!--             <type>String</type> -->
+<!--             <multiplicity>*</multiplicity> -->
+<!--           </association> -->
+<!--           <description> -->
+<!--             A map of projects to original SCM information. -->
+<!--           </description> -->
+<!--         </field> -->
         <field>
           <name>workingDirectory</name>
           <version>1.0.0+</version>
@@ -532,6 +532,129 @@
     public static final String ORIGINAL_VERSION = "original";
 
     /**
+     * Field resolvedSnapshotDependencies.
+     */
+    private java.util.Map<String, java.util.Map<String, String>> resolvedSnapshotDependencies;
+
+    /**
+     * Field releaseVersions.
+     */
+    private java.util.Map<String, String> releaseVersions;
+
+    /**
+     * Field developmentVersions.
+     */
+    private java.util.Map<String, String> developmentVersions;
+    
+    /**
+     * Field originalScmInfo.
+     */
+    private java.util.Map<String, org.apache.maven.model.Scm> originalScmInfo;
+    
+    /**
+     * Method getResolvedSnapshotDependencies.
+     *
+     * @return Map
+     */
+    public java.util.Map<String, java.util.Map<String, String>> getResolvedSnapshotDependencies()
+    {
+        if ( this.resolvedSnapshotDependencies == null )
+        {
+            this.resolvedSnapshotDependencies = new java.util.HashMap<>();
+        }
+
+        return this.resolvedSnapshotDependencies;
+    } //-- java.util.Map<String, java.util.Map<String, String>> getResolvedSnapshotDependencies()
+    
+    /**
+     * Set a map of resolved snapshot dependencies versions.
+     *
+     * @param resolvedSnapshotDependencies
+     */
+    public void setResolvedSnapshotDependencies( java.util.Map<String, java.util.Map<String, String>> resolvedSnapshotDependencies )
+    {
+        this.resolvedSnapshotDependencies = resolvedSnapshotDependencies;
+    } //-- void setResolvedSnapshotDependencies( java.util.Map<String, java.util.Map<String, String>> )
+
+    /**
+     * Method getReleaseVersions.
+     *
+     * @return Map
+     */
+    public java.util.Map<String, String> getReleaseVersions()
+    {
+        if ( this.releaseVersions == null )
+        {
+            this.releaseVersions = new java.util.HashMap<>();
+        }
+
+        return this.releaseVersions;
+    } //-- java.util.Map<String, String> getReleaseVersions()
+
+    /**
+     * Method addReleaseVersion.
+     *
+     * @param key
+     * @param value
+     */
+    public void addReleaseVersion( String key, String value )
+    {
+        getReleaseVersions().put( key, value );
+    } //-- void addReleaseVersion( String, String )
+
+    /**
+     * Method getDevelopmentVersions.
+     *
+     * @return Map
+     */
+    public java.util.Map<String, String> getDevelopmentVersions()
+    {
+        if ( this.developmentVersions == null )
+        {
+            this.developmentVersions = new java.util.HashMap<>();
+        }
+
+        return this.developmentVersions;
+    } //-- java.util.Map<String, String> getDevelopmentVersions()
+
+    /**
+     * Method addDevelopmentVersion.
+     *
+     * @param key
+     * @param value
+     */
+    public void addDevelopmentVersion( String key, String value )
+    {
+        getDevelopmentVersions().put( key, value );
+    } //-- void addDevelopmentVersion( String, String )
+
+    /**
+     * Method getOriginalScmInfo.
+     *
+     * @return Map
+     */
+    public java.util.Map<String, org.apache.maven.model.Scm> getOriginalScmInfo()
+    {
+        if ( this.originalScmInfo == null )
+        {
+            this.originalScmInfo = new java.util.HashMap<>();
+        }
+
+        return this.originalScmInfo;
+    } //-- java.util.Map<Object, String> getOriginalScmInfo()
+    
+    /**
+     * Method addOriginalScmInfo.
+     *
+     * @param key
+     * @param value
+     */
+    public void addOriginalScmInfo( String key, org.apache.maven.model.Scm value )
+    {
+        getOriginalScmInfo().put( key, value );
+    } //-- void addOriginalScmInfo( String, org.apache.maven.model.Scm )
+
+    /**
      * Map a given snapshot dependency to a specified version from when it is released.
      *
      */
@@ -546,7 +669,7 @@
             assert !resolvedSnapshotDependencies.containsKey( artifactName );
         }
 
-        java.util.Map versionsMap = new java.util.HashMap();
+        java.util.Map versionsMap = new java.util.HashMap<>();
 
         versionsMap.put( DEVELOPMENT_KEY, developmentVersion );
         versionsMap.put( RELEASE_KEY, releaseVersion );
@@ -563,7 +686,7 @@
     {
         if ( releaseVersions == null )
         {
-            releaseVersions = new java.util.HashMap();
+            releaseVersions = new java.util.HashMap<>();
         }
 
         releaseVersions.put( projectId, nextVersion );
@@ -579,7 +702,7 @@
     {
         if ( developmentVersions == null )
         {
-            developmentVersions = new java.util.HashMap();
+            developmentVersions = new java.util.HashMap<>();
         }
 
         developmentVersions.put( projectId, nextVersion );
@@ -595,7 +718,7 @@
     {
         if ( originalScmInfo == null )
         {
-            originalScmInfo = new java.util.HashMap();
+            originalScmInfo = new java.util.HashMap<>();
         }
         else
         {
@@ -621,7 +744,7 @@
     {
         if ( originalVersions == null )
         {
-            originalVersions = new java.util.HashMap();
+            originalVersions = new java.util.HashMap<>();
             for ( org.apache.maven.project.MavenProject project : reactorProjects )
             {
                 originalVersions.put( org.apache.maven.artifact.ArtifactUtils.versionlessKey( project.getGroupId(),
@@ -639,8 +762,8 @@
     {
         if ( ( resolvedSnapshotDependencies == null ) && ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) ) )
         {
-            java.util.Map versionMap = ( java.util.Map ) resolvedSnapshotDependencies.get( artifactConflictId );
-            return ( String ) versionMap.get( DEVELOPMENT_KEY );
+            java.util.Map<String, String> versionMap = resolvedSnapshotDependencies.get( artifactConflictId );
+            return versionMap.get( DEVELOPMENT_KEY );
         }
         return null;
     }
@@ -653,8 +776,8 @@
     {
         if ( ( resolvedSnapshotDependencies == null ) && ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) ) )
         {
-            java.util.Map versionMap = ( java.util.Map ) resolvedSnapshotDependencies.get( artifactConflictId );
-            return ( String ) versionMap.get( RELEASE_KEY );
+            java.util.Map<String, String> versionMap = resolvedSnapshotDependencies.get( artifactConflictId );
+            return versionMap.get( RELEASE_KEY );
         }
         return null;
     }
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/config/ReleaseUtilsTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/config/ReleaseUtilsTest.java
index fd9311e..ea85a18 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/config/ReleaseUtilsTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/config/ReleaseUtilsTest.java
@@ -262,7 +262,7 @@ public class ReleaseUtilsTest
         properties.put( "dependency." + dependencyKey + ".development", "1.3-SNAPSHOT" );
         ReleaseDescriptor descriptor = ReleaseUtils.copyPropertiesToReleaseDescriptor( properties );
 
-        Map<String, String> versionMap = (Map<String, String>) descriptor.getResolvedSnapshotDependencies().get( dependencyKey );
+        Map<String, String> versionMap = descriptor.getResolvedSnapshotDependencies().get( dependencyKey );
         assertEquals( "1.3", versionMap.get( ReleaseDescriptor.RELEASE_KEY ) );
         assertEquals( "1.3-SNAPSHOT", versionMap.get( ReleaseDescriptor.DEVELOPMENT_KEY) );
     }
@@ -277,10 +277,10 @@ public class ReleaseUtilsTest
         properties.put( "dependency." + devDependencyKey + ".development", "1.3-SNAPSHOT" );
         ReleaseDescriptor descriptor = ReleaseUtils.copyPropertiesToReleaseDescriptor( properties );
 
-        Map<String, String> versionMap = (Map<String, String>) descriptor.getResolvedSnapshotDependencies().get( relDependencyKey );
+        Map<String, String> versionMap = descriptor.getResolvedSnapshotDependencies().get( relDependencyKey );
         assertEquals( "1.3", versionMap.get( ReleaseDescriptor.RELEASE_KEY ) );
 
-        versionMap = (Map<String, String>) descriptor.getResolvedSnapshotDependencies().get( devDependencyKey );
+        versionMap = descriptor.getResolvedSnapshotDependencies().get( devDependencyKey );
         assertEquals( "1.3-SNAPSHOT", versionMap.get( ReleaseDescriptor.DEVELOPMENT_KEY) );
     }
 
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhaseTest.java
index e10073f..879b0c1 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhaseTest.java
@@ -507,7 +507,7 @@ public class CheckDependencySnapshotsPhaseTest
 
         // validate
         @SuppressWarnings( "rawtypes" )
-        Map versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
+        Map versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.1-SNAPSHOT", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
@@ -551,7 +551,7 @@ public class CheckDependencySnapshotsPhaseTest
 
         // validate
         @SuppressWarnings( "rawtypes" )
-        Map versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
+        Map versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.0-SNAPSHOT", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
@@ -581,7 +581,7 @@ public class CheckDependencySnapshotsPhaseTest
 
         // validate
         @SuppressWarnings( "rawtypes" )
-        Map versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
+        Map versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.0", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
@@ -611,7 +611,7 @@ public class CheckDependencySnapshotsPhaseTest
 
         // validate
         @SuppressWarnings( "rawtypes" )
-        Map versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
+        Map versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.0", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
@@ -645,7 +645,7 @@ public class CheckDependencySnapshotsPhaseTest
 
         // validate
         @SuppressWarnings( "rawtypes" )
-        Map versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
+        Map versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.0", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
@@ -689,13 +689,13 @@ public class CheckDependencySnapshotsPhaseTest
         assertTrue( resolvedDependencies.containsKey( "external:artifactId2" ) );
 
         @SuppressWarnings( "rawtypes" )
-        Map versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
+        Map versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.1-SNAPSHOT", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
         assertEquals( "1.0", versionsMap.get( ReleaseDescriptor.RELEASE_KEY ) );
 
-        versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId2" );
+        versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "external:artifactId2" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.1-SNAPSHOT", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
@@ -1093,7 +1093,7 @@ public class CheckDependencySnapshotsPhaseTest
 
         // validate
         @SuppressWarnings( "rawtypes" )
-        Map versionsMap = (Map) releaseDescriptor.getResolvedSnapshotDependencies().get( "groupId:parent-external" );
+        Map versionsMap = releaseDescriptor.getResolvedSnapshotDependencies().get( "groupId:parent-external" );
 
         assertNotNull( versionsMap );
         assertEquals( "1.0-test", versionsMap.get( ReleaseDescriptor.DEVELOPMENT_KEY ) );
diff --git a/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java b/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java
index 04d04b8..c67ef62 100644
--- a/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java
+++ b/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java
@@ -19,11 +19,7 @@ package org.apache.maven.plugins.release;
  * under the License.
  */
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.maven.artifact.ArtifactUtils;
-import org.apache.maven.model.Scm;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
@@ -109,10 +105,8 @@ public class UpdateVersionsMojo
         config.setUpdateDependencies( updateDependencies );
         config.setProjectVersionPolicyId( projectVersionPolicyId );
 
-        Map<String, Scm> originalScmInfo = new HashMap<>();
-        originalScmInfo.put( ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ),
-                             project.getScm() );
-        config.setOriginalScmInfo( originalScmInfo );
+        config.addOriginalScmInfo( ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ),
+                                   project.getScm() );
 
         // Create a config containing values from the session properties (ie command line properties with cli).
         ReleaseDescriptor sysPropertiesConfig =
diff --git a/pom.xml b/pom.xml
index 962328f..815149c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,10 +98,6 @@
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
             <excludes combine.children="append">
-              <!--
-                This module is not yet included
-              -->
-              <exclude>maven-release-policies/maven-release-semver-policy/**/*.*</exclude>
               <exclude>.repository</exclude>
               <exclude>Jenkinsfile</exclude>
             </excludes>

--
To stop receiving notification emails like this one, please contact
['"[hidden email]" <[hidden email]>'].