You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2018/02/25 13:53:29 UTC

[maven-release] branch master updated (419114d -> c72c431)

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

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


    from 419114d  [MRELEASE-998] Add ability to create custom phases
     new 2a49b7f  Copy javadoc
     new 2b3ce94  Add unittest for DefaultVersionPolicy
     new bb16d94  Reorganize if/then/else -statements to reduce nesting
     new c72c431  [MRELEASE-694] -SNAPSHOT is unexpectedly appended to version in branched pom.xml

The 4 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:
 .../shared/release/config/ReleaseDescriptor.java   | 263 ++++++++++++++++++++-
 .../shared/release/phase/MapVersionsPhase.java     |  63 +++--
 .../shared/release/phase/MapVersionsPhaseTest.java |  73 ++++++
 .../release/policies/DefaultVersionPolicyTest.java |  73 ++++++
 .../branch/{MRELEASE-458 => MRELEASE-694}/pom.xml  |  40 ++--
 .../MRELEASE-694}/test.properties                  |   9 +-
 .../{MRELEASE-976 => MRELEASE-694}/verify.groovy   |   9 +-
 7 files changed, 467 insertions(+), 63 deletions(-)
 create mode 100644 maven-release-manager/src/test/java/org/apache/maven/shared/release/policies/DefaultVersionPolicyTest.java
 copy maven-release-plugin/src/it/projects/branch/{MRELEASE-458 => MRELEASE-694}/pom.xml (72%)
 copy maven-release-plugin/src/it/projects/{prepare/MRELEASE-483 => branch/MRELEASE-694}/test.properties (84%)
 copy maven-release-plugin/src/it/projects/branch/{MRELEASE-976 => MRELEASE-694}/verify.groovy (75%)

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.

[maven-release] 01/04: Copy javadoc

Posted by rf...@apache.org.
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

commit 2a49b7fa2e85cfbdb46e869a9a0cd0ad82689e8b
Author: rfscholte <rf...@apache.org>
AuthorDate: Mon Feb 12 20:39:37 2018 +0100

    Copy javadoc
---
 .../shared/release/config/ReleaseDescriptor.java   | 263 ++++++++++++++++++++-
 1 file changed, 262 insertions(+), 1 deletion(-)

diff --git a/maven-release-api/src/main/java/org/apache/maven/shared/release/config/ReleaseDescriptor.java b/maven-release-api/src/main/java/org/apache/maven/shared/release/config/ReleaseDescriptor.java
index d9aa16a..042a347 100644
--- a/maven-release-api/src/main/java/org/apache/maven/shared/release/config/ReleaseDescriptor.java
+++ b/maven-release-api/src/main/java/org/apache/maven/shared/release/config/ReleaseDescriptor.java
@@ -29,110 +29,371 @@ import org.apache.maven.model.Scm;
  */
 public interface ReleaseDescriptor
 {
+    /**
+     * Get if updateDependencies is false, dependencies version won't be updated to the next development version.
+     * 
+     * @return boolean
+     */
     boolean isUpdateDependencies();
 
+    /**
+     * Get whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate.
+     * If set to true, this will set the property "performRelease" to true.
+     * 
+     * @return boolean
+     */
     boolean isUseReleaseProfile();
 
+    /**
+     * Get whether to use the parent pom version for submodule versions.
+     * 
+     * @return boolean
+     */
     boolean isAutoVersionSubmodules();
 
+    /**
+     * Get whether a SNAPSHOT of the release plugin is allowed.
+     * 
+     * @return boolean
+     */
     boolean isSnapshotReleasePluginAllowed();
 
+    /**
+     * Get the commits must be done by modules or not. Set it to true in case of flat directory structure.
+     * 
+     * @return boolean
+     */
     boolean isCommitByProject();
 
+    /**
+     * Get whether to create a branch instead of do a release.
+     * 
+     * @return boolean
+     */
     boolean isBranchCreation();
 
+    /**
+     * Get whether to update branch POM versions.
+     * 
+     * @return boolean
+     */
     boolean isUpdateBranchVersions();
 
+    /**
+     * Get whether to update working copy POM versions.
+     * 
+     * @return boolean
+     */
     boolean isUpdateWorkingCopyVersions();
 
+    /**
+     * Get whether to suppress a commit of changes to the working copy before a tag or branch is created.
+     * 
+     * @return boolean
+     */
     boolean isSuppressCommitBeforeTagOrBranch();
 
+    /**
+     * Get should timestamped SNAPSHOT dependencies be allowed? Default is to fail when any SNAPSHOT dependency is
+     * found.
+     * 
+     * @return boolean
+     */
     boolean isAllowTimestampedSnapshots();
 
+    /**
+     * Get whether to update branch versions to SNAPSHOT.
+     * 
+     * @return boolean
+     */
     boolean isUpdateVersionsToSnapshot();
 
+    /**
+     * Get nOTE : currently only implemented with svn scm. Enable a workaround to prevent issue due to svn client >
+     * 1.5.0 (http://jira.codehaus.org/browse/SCM-406).
+     * 
+     * @return boolean
+     */
     boolean isRemoteTagging();
 
+    /**
+     * Get if the scm provider should use local checkouts via file://${basedir} instead of doing a clean checkout over
+     * the network. This is very helpful for releasing large projects!
+     * 
+     * @return boolean
+     */
     boolean isLocalCheckout();
 
+    /**
+     * Get should distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change
+     * like a commit is only stored in your local copy of the repository. Pushing the change allows your to more easily
+     * share it with other users.
+     * 
+     * @return boolean
+     */
     boolean isPushChanges();
 
+    /**
+     * Get default version to use for new working copy.
+     * 
+     * @return String
+     */
     String getDefaultDevelopmentVersion();
 
+    /**
+     * Get relative path of the project returned by the checkout command.
+     * 
+     * @return String
+     */
     String getScmRelativePathProjectDirectory();
 
+    /**
+     * Get the directory where the tag will be checked out.
+     * 
+     * @return String
+     */
     String getCheckoutDirectory();
 
+    /**
+     * Get the goals to execute in perform phase for the release.
+     * 
+     * @return String
+     */
     String getPerformGoals();
 
+    /**
+     * Get default version to use for the tagged release or the new branch.
+     * 
+     * @return String
+     */
     String getDefaultReleaseVersion();
 
+    /**
+     * Get nOTE : currently only implemented with svn scm. It contains the revision of the committed released pom to
+     * remotely tag the source code with this revision.
+     * 
+     * @return String
+     */
     String getScmReleasedPomRevision();
 
+    /**
+     * Get whether to add the model schema to the top of the rewritten POM if it wasn't there already. If
+     * <code>false</code> then the root element will remain untouched.
+     * 
+     * @return boolean
+     */
     boolean isAddSchema();
 
+    /**
+     * Get whether to generate release POMs.
+     * 
+     * @return boolean
+     */
     boolean isGenerateReleasePoms();
 
+    /**
+     * Get whether the release process is interactive and the release manager should be prompted to confirm values, or
+     * whether the defaults are used regardless.
+     * 
+     * @return boolean
+     */
     boolean isInteractive();
 
+    /**
+     * Get whether to use edit mode when making SCM modifications. This setting is disregarded if the SCM does not
+     * support edit mode, or if edit mode is compulsory for the given SCM.
+     * 
+     * @return boolean
+     */
     boolean isScmUseEditMode();
 
+    /**
+     * Get the last completed phase.
+     * 
+     * @return String
+     */
     String getCompletedPhase();
 
+    /**
+     * Method getCheckModificationExcludes.
+     * 
+     * @return List
+     */
     List<String> getCheckModificationExcludes();
 
+    /**
+     * Get additional arguments to pass to any executed Maven process.
+     * 
+     * @return String
+     */
     String getAdditionalArguments();
 
+    /**
+     * Get the goals to execute in preparation for the release.
+     * 
+     * @return String
+     */
     String getPreparationGoals();
 
+    /**
+     * Get the goals to execute in on completion of preparation for the release.
+     * 
+     * @return String
+     */
     String getCompletionGoals();
 
+    /**
+     * Get the file name of the POM to pass to any executed Maven process.
+     * 
+     * @return String
+     */
     String getPomFileName();
 
+    /**
+     * Get the prefix of SCM modification messages.
+     * 
+     * @return String
+     */
     String getScmCommentPrefix();
 
+    /**
+     * Get pass phrase for the private key.
+     * 
+     * @return String
+     */
     String getScmPrivateKeyPassPhrase();
 
+    /**
+     * Get the password for the user interacting with the scm.
+     * 
+     * @return String
+     */
     String getScmPassword();
 
+    /**
+     * Get private key for an SSH based SCM repository.
+     * 
+     * @return String
+     */
     String getScmPrivateKey();
 
+    /**
+     * Get tag or branch name: the identifier for the tag/branch. Example: maven-release-plugin-2.0.
+     * 
+     * @return String
+     */
     String getScmReleaseLabel();
 
+    /**
+     * Get where you are going to put your tagged sources Example https://svn.apache.org/repos/asf/maven/plugins/tags.
+     * 
+     * @return String
+     */
     String getScmTagBase();
 
+    /**
+     * Get where you are going to put your branched sources Example
+     * https://svn.apache.org/repos/asf/maven/plugins/branches.
+     * 
+     * @return String
+     */
     String getScmBranchBase();
 
+    /**
+     * Get the id can be used to get the credentials by the server-id from the settings.xml.
+     * 
+     * @return String
+     */
     String getScmId();
 
+    /**
+     * Get this is a MavenSCM of where you're going to get the sources to make the release with. Example:
+     * scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-release-plugin.
+     * 
+     * @return String
+     */
     String getScmSourceUrl();
 
+    /**
+     * Get the user name to interact with the scm.
+     * 
+     * @return String
+     */
     String getScmUsername();
 
+    /**
+     * Get wait the specified number of seconds before creating a tag.
+     * 
+     * @return int
+     */
     int getWaitBeforeTagging();
 
+    /**
+     * Get the directory where the release is performed.
+     * 
+     * @return String
+     */
     String getWorkingDirectory();
 
+    /**
+     * Get specifies the format for generating a tag name. Property expansion is used with the optional prefix of
+     * project, where properties are delimited with @{ and }.
+     * 
+     * @return String
+     */
     String getScmTagNameFormat();
 
+    /**
+     * Get the role-hint for the NamingPolicy implementation used to calculate the project branch and tag names.
+     * 
+     * @return String
+     */
     String getProjectNamingPolicyId();
 
+    /**
+     * Get the role-hint for the VersionPolicy implementation used to calculate the project versions.
+     * 
+     * @return String
+     */
     String getProjectVersionPolicyId(); 
 
+    /**
+     * Get the role-hint for the release Strategy implementation.
+     * 
+     * @return String
+     */
     String getReleaseStrategyId();
 
+    /**
+     * Retrieve the original version for the resolved snapshot dependency.
+     *
+     */
     String getDependencyOriginalVersion( String artifactKey );
     
+    /**
+     * Retrieve the release version for the resolved snapshot dependency.
+     *
+     */
     String getDependencyReleaseVersion( String artifactKey ); 
-    
+
+    /**
+     * Retrieve the release version for the resolved snapshot dependency.
+     *
+     */
     String getDependencyDevelopmentVersion( String artifactKey ); 
 
+    
     String getProjectOriginalVersion( String projectKey );
 
     String getProjectDevelopmentVersion( String projectKey );
 
     String getProjectReleaseVersion( String key );
 
+    /**
+     * Method getOriginalScmInfo.
+     * 
+     * @return Map
+     */
     Scm getOriginalScmInfo( String projectKey );
 
     // Modifiable

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.

[maven-release] 03/04: Reorganize if/then/else -statements to reduce nesting

Posted by rf...@apache.org.
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

commit bb16d94e7ec12b0ee00e1c803789c8594523c195
Author: rfscholte <rf...@apache.org>
AuthorDate: Tue Feb 20 20:51:13 2018 +0100

    Reorganize if/then/else -statements to reduce nesting
---
 .../shared/release/phase/MapVersionsPhase.java     | 51 +++++++++-------------
 1 file changed, 21 insertions(+), 30 deletions(-)

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 1b585ab..8f4517d 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
@@ -117,21 +117,18 @@ public class MapVersionsPhase
 
             String nextVersion = resolveNextVersion( project, projectId, releaseDescriptor, result );
 
-            if ( convertToSnapshot )
+            if ( !convertToSnapshot )
             {
-                if ( releaseDescriptor.isBranchCreation() && convertToBranch )
-                {
-                    releaseDescriptor.addReleaseVersion( projectId, nextVersion );
-                }
-                else
-                {
-                    releaseDescriptor.addDevelopmentVersion( projectId, nextVersion );
-                }
+                releaseDescriptor.addReleaseVersion( projectId, nextVersion );
             }
-            else
+            else if ( releaseDescriptor.isBranchCreation() && convertToBranch )
             {
                 releaseDescriptor.addReleaseVersion( projectId, nextVersion );
             }
+            else
+            {
+                releaseDescriptor.addDevelopmentVersion( projectId, nextVersion );
+            }
 
             for ( MavenProject subProject : reactorProjects )
             {
@@ -173,21 +170,18 @@ public class MapVersionsPhase
 
                 String nextVersion = resolveNextVersion( project, projectId, releaseDescriptor, result );
 
-                if ( convertToSnapshot )
+                if ( !convertToSnapshot )
                 {
-                    if ( releaseDescriptor.isBranchCreation() && convertToBranch )
-                    {
-                        releaseDescriptor.addReleaseVersion( projectId, nextVersion );
-                    }
-                    else
-                    {
-                        releaseDescriptor.addDevelopmentVersion( projectId, nextVersion );
-                    }
+                    releaseDescriptor.addReleaseVersion( projectId, nextVersion );
                 }
-                else
+                else if ( releaseDescriptor.isBranchCreation() && convertToBranch )
                 {
                     releaseDescriptor.addReleaseVersion( projectId, nextVersion );
                 }
+                else
+                {
+                    releaseDescriptor.addDevelopmentVersion( projectId, nextVersion );
+                }
             }
         }
 
@@ -356,20 +350,17 @@ public class MapVersionsPhase
         {
             messageKey = "mapversion.branch.prompt";
         }
-        else if ( convertToSnapshot )
+        else if ( !convertToSnapshot )
         {
-            if ( releaseDescriptor.isBranchCreation() )
-            {
-                messageKey = "mapversion.workingcopy.prompt";
-            }
-            else
-            {
-                messageKey = "mapversion.development.prompt";
-            }
+            messageKey = "mapversion.release.prompt";
+        }
+        else if ( releaseDescriptor.isBranchCreation() )
+        {
+            messageKey = "mapversion.workingcopy.prompt";
         }
         else
         {
-            messageKey = "mapversion.release.prompt";
+            messageKey = "mapversion.development.prompt";
         }
         return messageKey;
     }

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.

[maven-release] 02/04: Add unittest for DefaultVersionPolicy

Posted by rf...@apache.org.
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

commit 2b3ce9436526be3d4b0018c6ad189a37dba7a784
Author: rfscholte <rf...@apache.org>
AuthorDate: Sun Feb 18 13:54:59 2018 +0100

    Add unittest for DefaultVersionPolicy
---
 .../release/policies/DefaultVersionPolicyTest.java | 73 ++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/policies/DefaultVersionPolicyTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/policies/DefaultVersionPolicyTest.java
new file mode 100644
index 0000000..9d923ea
--- /dev/null
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/policies/DefaultVersionPolicyTest.java
@@ -0,0 +1,73 @@
+package org.apache.maven.shared.release.policies;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.maven.shared.release.policy.version.VersionPolicy;
+import org.apache.maven.shared.release.policy.version.VersionPolicyRequest;
+import org.junit.Test;
+
+public class DefaultVersionPolicyTest
+{
+    private VersionPolicy policy = new DefaultVersionPolicy();
+
+    @Test
+    public void testOneDigitReleaseVersion() throws Exception
+    {
+        VersionPolicyRequest request = new VersionPolicyRequest().setVersion( "1-SNAPSHOT" );
+        assertEquals( "1", policy.getReleaseVersion( request ).getVersion() );
+    }
+
+    @Test
+    public void testOneDigitDevelopmentVersion() throws Exception
+    {
+        VersionPolicyRequest request = new VersionPolicyRequest().setVersion( "1" );
+        assertEquals( "2-SNAPSHOT", policy.getDevelopmentVersion( request ).getVersion() );
+    }
+    
+    @Test
+    public void testTwoDigitsReleaseVersion() throws Exception
+    {
+        VersionPolicyRequest request = new VersionPolicyRequest().setVersion( "1.0-SNAPSHOT" );
+        assertEquals( "1.0", policy.getReleaseVersion( request ).getVersion() );
+    }
+    
+    @Test
+    public void testTwoDigitsDevelopmentVersion() throws Exception
+    {
+        VersionPolicyRequest request = new VersionPolicyRequest().setVersion( "1.0" );
+        assertEquals( "1.1-SNAPSHOT", policy.getDevelopmentVersion( request ).getVersion() );
+    }
+
+    @Test
+    public void testThreeDigitsReleaseVersion() throws Exception
+    {
+        VersionPolicyRequest request = new VersionPolicyRequest().setVersion( "1.0.0-SNAPSHOT" );
+        assertEquals( "1.0.0", policy.getReleaseVersion( request ).getVersion() );
+    }
+    
+    @Test
+    public void testThreeDigitsDevelopmentVersion() throws Exception
+    {
+        VersionPolicyRequest request = new VersionPolicyRequest().setVersion( "1.0.0" );
+        assertEquals( "1.0.1-SNAPSHOT", policy.getDevelopmentVersion( request ).getVersion() );
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.

[maven-release] 04/04: [MRELEASE-694] -SNAPSHOT is unexpectedly appended to version in branched pom.xml

Posted by rf...@apache.org.
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

commit c72c43139994fb2fb99b5fb422d5882d1226311b
Author: rfscholte <rf...@apache.org>
AuthorDate: Sun Feb 25 14:53:17 2018 +0100

    [MRELEASE-694] -SNAPSHOT is unexpectedly appended to version in branched pom.xml
---
 .../shared/release/phase/MapVersionsPhase.java     | 12 +++-
 .../shared/release/phase/MapVersionsPhaseTest.java | 73 ++++++++++++++++++++
 .../src/it/projects/branch/MRELEASE-694/pom.xml    | 77 ++++++++++++++++++++++
 .../projects/branch/MRELEASE-694/test.properties   | 21 ++++++
 .../it/projects/branch/MRELEASE-694/verify.groovy  | 27 ++++++++
 5 files changed, 208 insertions(+), 2 deletions(-)

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 8f4517d..700f53d 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
@@ -281,7 +281,7 @@ public class MapVersionsPhase
                     {
                         throw new ReleaseExecutionException( e.getMessage(), e );
                     }
-               }
+                }
 
                 if ( releaseDescriptor.isInteractive() )
                 {
@@ -295,10 +295,18 @@ public class MapVersionsPhase
 
                   //@todo validate next version, maybe with DefaultArtifactVersion
                 }
-                else
+                else if ( defaultVersion == null )
                 {
                     nextVersion = suggestedVersion;
                 }
+                else if ( convertToSnapshot )
+                {
+                    throw new ReleaseExecutionException( defaultVersion + " is invalid, expected a snapshot" );
+                }
+                else
+                {
+                    throw new ReleaseExecutionException( defaultVersion + " is invalid, expected a non-snapshot" );
+                }
             }
         }
         catch ( PrompterException e )
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java
index 36e98bb..338d979 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java
@@ -2139,6 +2139,79 @@ public class MapVersionsPhaseTest
         // test
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
     }
+    
+    @Test
+    public void testUpdateBranchInvalidDefaultReleaseVersion_NonInteractive()
+        throws Exception
+    {
+        // prepare
+        ReleasePhase phase = (MapVersionsPhase) lookup( ReleasePhase.class, TEST_MAP_BRANCH_VERSIONS );
+
+        List<MavenProject> reactorProjects = Collections.singletonList( createProject( "bar", "1.11-SNAPSHOT" ) );
+
+        ReleaseDescriptorBuilder builder = new ReleaseDescriptorBuilder();
+        builder.setDefaultReleaseVersion( "3.0" );
+        builder.setInteractive( false );
+        builder.setUpdateBranchVersions( true );
+
+        // test
+        try {
+            phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
+            fail( "Should fail due to invalid version" );
+        }
+        catch( ReleaseExecutionException e )
+        {
+            assertEquals( "3.0 is invalid, expected a snapshot", e.getMessage() );
+        }
+    }
+    
+    @Test
+    public void testUpdateReleaseInvalidDefaultReleaseVersion_NonInteractive()
+        throws Exception
+    {
+        // prepare
+        ReleasePhase phase = (MapVersionsPhase) lookup( ReleasePhase.class, TEST_MAP_RELEASE_VERSIONS );
+
+        List<MavenProject> reactorProjects = Collections.singletonList( createProject( "bar", "1.11-SNAPSHOT" ) );
+
+        ReleaseDescriptorBuilder builder = new ReleaseDescriptorBuilder();
+        builder.setDefaultReleaseVersion( "3.0-SNAPSHOT" );
+        builder.setInteractive( false );
+
+        // test
+        try {
+            phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
+            fail( "Should fail due to invalid version" );
+        }
+        catch( ReleaseExecutionException e )
+        {
+            assertEquals( "3.0-SNAPSHOT is invalid, expected a non-snapshot", e.getMessage() );
+        }
+    }
+    
+    @Test
+    public void testUpdateDevelopmentInvalidDefaultDevelopmentVersion_NonInteractive()
+        throws Exception
+    {
+        // prepare
+        ReleasePhase phase = (MapVersionsPhase) lookup( ReleasePhase.class, TEST_MAP_DEVELOPMENT_VERSIONS );
+
+        List<MavenProject> reactorProjects = Collections.singletonList( createProject( "bar", "1.11-SNAPSHOT" ) );
+
+        ReleaseDescriptorBuilder builder = new ReleaseDescriptorBuilder();
+        builder.setDefaultDevelopmentVersion( "3.0" );
+        builder.setInteractive( false );
+
+        // test
+        try {
+            phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
+            fail( "Should fail due to invalid version" );
+        }
+        catch( ReleaseExecutionException e )
+        {
+            assertEquals( "3.0 is invalid, expected a snapshot", e.getMessage() );
+        }
+    }
 
     private static MavenProject createProject( String artifactId, String version )
     {
diff --git a/maven-release-plugin/src/it/projects/branch/MRELEASE-694/pom.xml b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/pom.xml
new file mode 100644
index 0000000..e84c5ea
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/pom.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+    <!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+    -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugin.release.it</groupId>
+  <artifactId>mrelease-694</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  
+  <scm>
+    <connection>scm:dummy|nul</connection>
+    <developerConnection>scm:dummy|nul</developerConnection>
+  </scm>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-release-plugin</artifactId>
+        <version>2.4.2</version>
+        <configuration>
+          <autoVersionSubmodules>true</autoVersionSubmodules>
+          <updateBranchVersions>true</updateBranchVersions>
+          <updateWorkingCopyVersions>true</updateWorkingCopyVersions>
+          <updateDependencies>true</updateDependencies>
+          <pushChanges>true</pushChanges>
+          <remoteTagging>false</remoteTagging>
+          <suppressCommitBeforeBranch>false</suppressCommitBeforeBranch>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.its.release</groupId>
+            <artifactId>maven-scm-provider-dummy</artifactId>
+            <version>1.0</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file
diff --git a/maven-release-plugin/src/it/projects/branch/MRELEASE-694/test.properties b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/test.properties
new file mode 100644
index 0000000..38e8076
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/test.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+branchName=RELEASE-2.6.0
+developmentVersion=2.6.1-DEV-SNAPSHOT
+releaseVersion=2.6.0-BRANCH-SNAPSHOT
+updateVersionsToSnapshot=false 
+dryRun=true
\ No newline at end of file
diff --git a/maven-release-plugin/src/it/projects/branch/MRELEASE-694/verify.groovy b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/verify.groovy
new file mode 100644
index 0000000..8d7f901
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/verify.groovy
@@ -0,0 +1,27 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def projectBranch = new XmlSlurper().parse( new File( basedir, "pom.xml.branch" ) )
+assert projectBranch.version.text() == "2.6.0-BRANCH-SNAPSHOT"
+
+def projectNext = new XmlSlurper().parse( new File( basedir, "pom.xml.next" ) )
+assert projectNext.version.text() == "2.6.1-DEV-SNAPSHOT"
+
+return true
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.