You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/04/29 21:29:17 UTC

svn commit: r398224 [2/5] - in /maven/plugins/trunk/maven-release-plugin/src: main/java/org/apache/maven/plugins/release/phase/ main/resources/META-INF/plexus/ test/java/org/apache/maven/plugins/release/phase/ test/resources/org/apache/maven/plugins/re...

Added: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java Sat Apr 29 12:29:10 2006
@@ -0,0 +1,569 @@
+package org.apache.maven.plugins.release.phase;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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 org.apache.maven.plugins.release.ReleaseExecutionException;
+import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.scm.DefaultScmRepositoryConfigurator;
+import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
+import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
+import org.apache.maven.plugins.release.scm.ScmRepositoryConfigurator;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.command.edit.EditScmResult;
+import org.apache.maven.scm.manager.NoSuchScmProviderException;
+import org.apache.maven.scm.manager.ScmManager;
+import org.apache.maven.scm.manager.ScmManagerStub;
+import org.apache.maven.scm.provider.ScmProvider;
+import org.apache.maven.scm.provider.ScmProviderStub;
+import org.apache.maven.scm.repository.ScmRepositoryException;
+import org.codehaus.plexus.util.FileUtils;
+import org.jmock.cglib.Mock;
+import org.jmock.core.constraint.IsEqual;
+import org.jmock.core.matcher.InvokeAtLeastOnceMatcher;
+import org.jmock.core.matcher.TestFailureMatcher;
+import org.jmock.core.stub.ThrowStub;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Base class with tests for rewriting POMs.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public abstract class AbstractRewritingReleasePhaseTestCase
+    extends AbstractReleaseTestCase
+{
+    public void testRewriteBasicPom()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        mapNextVersion( config, "groupId:artifactId" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomWithParent()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationForPomWithParentAlternateNextVersion( "pom-with-parent" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomWithUnmappedParent()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( "pom-with-parent" );
+
+        mapAlternateNextVersion( config, "groupId:subproject1" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomWithReleasedParent()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( "pom-with-released-parent" );
+
+        mapAlternateNextVersion( config, "groupId:subproject1" );
+        config.mapReleaseVersion( "groupId:artifactId", "1" );
+        config.mapDevelopmentVersion( "groupId:artifactId", "1" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    protected abstract void mapAlternateNextVersion( ReleaseConfiguration config, String projectId );
+
+    public void testRewritePomWithInheritedVersion()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationForWithParentNextVersion( "pom-with-inherited-version" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomWithChangedInheritedVersion()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationForPomWithParentAlternateNextVersion( "pom-with-inherited-version" );
+
+        phase.execute( config );
+
+        MavenProject project =
+            (MavenProject) getProjectsAsMap( config.getReactorProjects() ).get( "groupId:subproject1" );
+
+        String actual = FileUtils.fileRead( project.getFile() );
+        String expected =
+            FileUtils.fileRead( new File( project.getFile().getParentFile(), "expected-pom-version-changed.xml" ) );
+        assertEquals( "Check the transformed POM", expected, actual );
+    }
+
+    protected abstract ReleaseConfiguration createConfigurationForPomWithParentAlternateNextVersion( String path )
+        throws Exception;
+
+    public void testRewritePomDependencies()
+        throws Exception
+    {
+        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-dependencies" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomUnmappedDependencies()
+        throws Exception
+    {
+        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-dependencies" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomDependenciesDifferentVersion()
+        throws Exception
+    {
+        ReleaseConfiguration config = createDifferingVersionConfiguration( "internal-differing-snapshot-dependencies" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewriteManagedPomDependencies()
+        throws Exception
+    {
+        ReleaseConfiguration config = createMappedConfiguration( "internal-managed-snapshot-dependency" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewriteManagedPomUnmappedDependencies()
+        throws Exception
+    {
+        ReleaseConfiguration config = createUnmappedConfiguration( "internal-managed-snapshot-dependency" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomPlugins()
+        throws Exception
+    {
+        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-plugins" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomUnmappedPlugins()
+        throws Exception
+    {
+        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-plugins" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomPluginsDifferentVersion()
+        throws Exception
+    {
+        ReleaseConfiguration config = createDifferingVersionConfiguration( "internal-differing-snapshot-plugins" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewriteManagedPomPlugins()
+        throws Exception
+    {
+        ReleaseConfiguration config = createMappedConfiguration( "internal-managed-snapshot-plugin" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewriteManagedPomUnmappedPlugins()
+        throws Exception
+    {
+        ReleaseConfiguration config = createUnmappedConfiguration( "internal-managed-snapshot-plugin" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomReportPlugins()
+        throws Exception
+    {
+        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-report-plugins" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomUnmappedReportPlugins()
+        throws Exception
+    {
+        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-report-plugins" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomReportPluginsDifferentVersion()
+        throws Exception
+    {
+        ReleaseConfiguration config =
+            createDifferingVersionConfiguration( "internal-differing-snapshot-report-plugins" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomExtension()
+        throws Exception
+    {
+        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-extension" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomUnmappedExtension()
+        throws Exception
+    {
+        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-extension" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomExtensionDifferentVersion()
+        throws Exception
+    {
+        ReleaseConfiguration config = createDifferingVersionConfiguration( "internal-differing-snapshot-extension" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewriteBasicPomWithEditMode()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.setUseEditMode( true );
+        mapNextVersion( config, "groupId:artifactId" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewriteBasicPomWithEditModeFailure()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.setUseEditMode( true );
+        mapNextVersion( config, "groupId:artifactId" );
+
+        ScmManagerStub scmManager = new ScmManagerStub();
+        DefaultScmRepositoryConfigurator configurator =
+            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
+        configurator.setScmManager( scmManager );
+
+        ScmProviderStub providerStub = (ScmProviderStub) scmManager.getProviderByUrl( config.getUrl() );
+        providerStub.setEditScmResult( new EditScmResult( "", "", "", false ) );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseScmCommandException e )
+        {
+            assertNull( "Check no other cause", e.getCause() );
+        }
+    }
+
+    public void testRewriteBasicPomWithEditModeException()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.setUseEditMode( true );
+        mapNextVersion( config, "groupId:artifactId" );
+
+        Mock scmProviderMock = new Mock( ScmProvider.class );
+        scmProviderMock.expects( new InvokeAtLeastOnceMatcher() ).method( "edit" ).will(
+            new ThrowStub( new ScmException( "..." ) ) );
+
+        ScmManagerStub scmManager = new ScmManagerStub();
+        DefaultScmRepositoryConfigurator configurator =
+            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
+        configurator.setScmManager( scmManager );
+        scmManager.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertEquals( "Check cause", ScmException.class, e.getCause().getClass() );
+        }
+    }
+
+    public void testRewriteAddSchema()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        mapNextVersion( config, "groupId:artifactId" );
+        config.setAddSchema( true );
+
+        // Run a second time to check they are not duplicated
+        for ( int i = 0; i < 2; i++ )
+        {
+            phase.execute( config );
+
+            String expected = readTestProjectFile( "basic-pom/expected-pom-with-schema.xml" );
+            String actual = readTestProjectFile( "basic-pom/pom.xml" );
+            assertEquals( "Check the transformed POM", expected, actual );
+        }
+    }
+
+    public void testSimulateRewriteEditModeSkipped()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.setUseEditMode( true );
+        mapNextVersion( config, "groupId:artifactId" );
+
+        Mock scmProviderMock = new Mock( ScmProvider.class );
+        scmProviderMock.expects( new TestFailureMatcher( "edit should not be called" ) ).method( "edit" );
+
+        ScmManagerStub scmManager = new ScmManagerStub();
+        DefaultScmRepositoryConfigurator configurator =
+            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
+        configurator.setScmManager( scmManager );
+        scmManager.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
+
+        phase.simulate( config );
+
+        // Getting past mock is success
+        assertTrue( true );
+    }
+
+    public void testRewriteUnmappedPom()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewriteBasicPomWithScmRepoException()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.setUseEditMode( true );
+        mapNextVersion( config, "groupId:artifactId" );
+
+        Mock scmManagerMock = new Mock( ScmManager.class );
+        scmManagerMock.expects( new InvokeAtLeastOnceMatcher() ).method( "makeScmRepository" ).with(
+            new IsEqual( config.getUrl() ) ).will( new ThrowStub( new ScmRepositoryException( "..." ) ) );
+
+        setMockScmManager( scmManagerMock );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseScmRepositoryException e )
+        {
+            assertNull( "Check no additional cause", e.getCause() );
+        }
+    }
+
+    public void testRewriteBasicPomWithNoSuchProviderException()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.setUseEditMode( true );
+        mapNextVersion( config, "groupId:artifactId" );
+
+        Mock scmManagerMock = new Mock( ScmManager.class );
+        scmManagerMock.expects( new InvokeAtLeastOnceMatcher() ).method( "makeScmRepository" ).with(
+            new IsEqual( config.getUrl() ) ).will( new ThrowStub( new NoSuchScmProviderException( "..." ) ) );
+
+        setMockScmManager( scmManagerMock );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertEquals( "Check cause", NoSuchScmProviderException.class, e.getCause().getClass() );
+        }
+    }
+
+    private ReleaseConfiguration createUnmappedConfiguration( String path )
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( path );
+
+        unmapNextVersion( config, "groupId:subproject1" );
+        mapNextVersion( config, "groupId:subproject2" );
+        mapNextVersion( config, "groupId:subproject3" );
+        mapNextVersion( config, "groupId:artifactId" );
+        return config;
+    }
+
+    private ReleaseConfiguration createDefaultConfiguration( String path )
+        throws Exception
+    {
+        ReleaseConfiguration config = createMappedConfiguration( path );
+
+        mapNextVersion( config, "groupId:subproject4" );
+        return config;
+    }
+
+    private ReleaseConfiguration createMappedConfiguration( String path )
+        throws Exception
+    {
+        ReleaseConfiguration config = createDifferingVersionConfiguration( path );
+
+        mapNextVersion( config, "groupId:subproject3" );
+        return config;
+    }
+
+    private ReleaseConfiguration createDifferingVersionConfiguration( String path )
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationForWithParentNextVersion( path );
+
+        mapNextVersion( config, "groupId:subproject2" );
+        return config;
+    }
+
+    protected abstract ReleaseConfiguration createConfigurationForWithParentNextVersion( String path )
+        throws Exception;
+
+    protected abstract void unmapNextVersion( ReleaseConfiguration config, String projectId );
+
+    protected abstract void mapNextVersion( ReleaseConfiguration config, String projectId );
+
+    protected abstract ReleaseConfiguration createConfigurationFromProjects( String path )
+        throws Exception;
+
+    protected abstract ReleaseConfiguration createConfigurationFromBasicPom()
+        throws Exception;
+
+    protected abstract String readTestProjectFile( String fileName )
+        throws IOException;
+}

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhaseTest.java?rev=398224&r1=398223&r2=398224&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhaseTest.java Sat Apr 29 12:29:10 2006
@@ -27,8 +27,6 @@
 public class CheckDependencySnapshotsPhaseTest
     extends AbstractReleaseTestCase
 {
-    private ReleasePhase phase;
-
     protected void setUp()
         throws Exception
     {

Added: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java Sat Apr 29 12:29:10 2006
@@ -0,0 +1,147 @@
+package org.apache.maven.plugins.release.phase;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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 org.apache.maven.model.Scm;
+import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.IOException;
+
+/**
+ * Test the SCM modification check phase.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public class RewritePomsForDevelopmentPhaseTest
+    extends AbstractRewritingReleasePhaseTestCase
+{
+    private static final String NEXT_VERSION = "1.1-SNAPSHOT";
+
+    private static final String ALTERNATIVE_NEXT_VERSION = "2.1-SNAPSHOT";
+
+    private static final String RELEASE_VERSION = "1.0";
+
+    private static final String ALTERNATIVE_RELEASE_VERSION = "2.0";
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        phase = (ReleasePhase) lookup( ReleasePhase.ROLE, "rewrite-poms-for-development" );
+    }
+
+    protected String readTestProjectFile( String fileName )
+        throws IOException
+    {
+        return FileUtils.fileRead( getTestFile( "target/test-classes/projects/rewrite-for-development/" + fileName ) );
+    }
+
+    protected ReleaseConfiguration createConfigurationFromProjects( String path )
+        throws Exception
+    {
+        ReleaseConfiguration releaseConfiguration = createConfigurationFromProjects( "rewrite-for-development/", path );
+        releaseConfiguration.setUrl( "scm:svn:file://localhost/tmp/scm-repo" );
+        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+
+        return releaseConfiguration;
+    }
+
+    protected ReleaseConfiguration createConfigurationFromBasicPom()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
+
+        mapScm( config );
+
+        return config;
+    }
+
+    private void mapScm( ReleaseConfiguration config )
+    {
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
+        scm.setDeveloperConnection( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
+        scm.setUrl( "file://localhost/tmp/scm-repo/trunk" );
+        config.mapOriginalScmInfo( "groupId:artifactId", scm );
+    }
+
+    public void testSimulateRewrite()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
+        config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
+
+        String expected = readTestProjectFile( "basic-pom/pom.xml" );
+
+        phase.simulate( config );
+
+        String actual = readTestProjectFile( "basic-pom/pom.xml" );
+        assertEquals( "Check the original POM untouched", expected, actual );
+
+        expected = readTestProjectFile( "basic-pom/expected-pom.xml" );
+        actual = readTestProjectFile( "basic-pom/pom.xml.next" );
+        assertEquals( "Check the transformed POM", expected, actual );
+    }
+
+    protected void mapAlternateNextVersion( ReleaseConfiguration config, String projectId )
+    {
+        config.mapReleaseVersion( projectId, ALTERNATIVE_RELEASE_VERSION );
+        config.mapDevelopmentVersion( projectId, ALTERNATIVE_NEXT_VERSION );
+    }
+
+    protected void mapNextVersion( ReleaseConfiguration config, String projectId )
+    {
+        config.mapReleaseVersion( projectId, RELEASE_VERSION );
+        config.mapDevelopmentVersion( projectId, NEXT_VERSION );
+    }
+
+    protected void unmapNextVersion( ReleaseConfiguration config, String projectId )
+    {
+        config.mapReleaseVersion( projectId, RELEASE_VERSION );
+    }
+
+    protected ReleaseConfiguration createConfigurationForPomWithParentAlternateNextVersion( String path )
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( path );
+
+        config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
+        config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
+        config.mapReleaseVersion( "groupId:subproject1", ALTERNATIVE_RELEASE_VERSION );
+        config.mapDevelopmentVersion( "groupId:subproject1", ALTERNATIVE_NEXT_VERSION );
+        mapScm( config );
+
+        return config;
+    }
+
+    protected ReleaseConfiguration createConfigurationForWithParentNextVersion( String path )
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( path );
+
+        config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
+        config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
+        config.mapReleaseVersion( "groupId:subproject1", RELEASE_VERSION );
+        config.mapDevelopmentVersion( "groupId:subproject1", NEXT_VERSION );
+        mapScm( config );
+
+        return config;
+    }
+}

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java?rev=398224&r1=398223&r2=398224&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java Sat Apr 29 12:29:10 2006
@@ -16,36 +16,10 @@
  * limitations under the License.
  */
 
-import org.apache.maven.artifact.ArtifactUtils;
-import org.apache.maven.plugins.release.ReleaseExecutionException;
 import org.apache.maven.plugins.release.config.ReleaseConfiguration;
-import org.apache.maven.plugins.release.scm.DefaultScmRepositoryConfigurator;
-import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
-import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
-import org.apache.maven.plugins.release.scm.ScmRepositoryConfigurator;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.command.edit.EditScmResult;
-import org.apache.maven.scm.manager.NoSuchScmProviderException;
-import org.apache.maven.scm.manager.ScmManager;
-import org.apache.maven.scm.manager.ScmManagerStub;
-import org.apache.maven.scm.provider.ScmProvider;
-import org.apache.maven.scm.provider.ScmProviderStub;
-import org.apache.maven.scm.repository.ScmRepositoryException;
 import org.codehaus.plexus.util.FileUtils;
-import org.jmock.cglib.Mock;
-import org.jmock.core.constraint.IsEqual;
-import org.jmock.core.matcher.InvokeAtLeastOnceMatcher;
-import org.jmock.core.matcher.TestFailureMatcher;
-import org.jmock.core.stub.ThrowStub;
 
-import java.io.File;
 import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
 
 /**
  * Test the SCM modification check phase.
@@ -53,9 +27,11 @@
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  */
 public class RewritePomsForReleasePhaseTest
-    extends AbstractReleaseTestCase
+    extends AbstractRewritingReleasePhaseTestCase
 {
-    private ReleasePhase phase;
+    private static final String NEXT_VERSION = "1.0";
+
+    private static final String ALTERNATIVE_NEXT_VERSION = "2.0";
 
     protected void setUp()
         throws Exception
@@ -65,410 +41,34 @@
         phase = (ReleasePhase) lookup( ReleasePhase.ROLE, "rewrite-poms-for-release" );
     }
 
-    public void testRewriteBasicPom()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomWithParent()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationForPomWithParent( "pom-with-parent", "2.0" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomWithUnmappedParent()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationFromProjects( "pom-with-parent" );
-
-        // remove parent from processing so it fails when looking at the parent of the child instead
-        MavenProject project =
-            (MavenProject) getProjectsAsMap( config.getReactorProjects() ).get( "groupId:subproject1" );
-        config.setReactorProjects( Collections.singletonList( project ) );
-        config.mapReleaseVersion( "groupId:subproject1", "2.0" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomWithReleasedParent()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationFromProjects( "pom-with-released-parent" );
-
-        config.mapReleaseVersion( "groupId:subproject1", "2.0" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomWithInheritedVersion()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationForPomWithParent( "pom-with-inherited-version", "1.0" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomWithChangedInheritedVersion()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationForPomWithParent( "pom-with-inherited-version", "2.0" );
-
-        phase.execute( config );
-
-        MavenProject project =
-            (MavenProject) getProjectsAsMap( config.getReactorProjects() ).get( "groupId:subproject1" );
-
-        String actual = FileUtils.fileRead( project.getFile() );
-        String expected =
-            FileUtils.fileRead( new File( project.getFile().getParentFile(), "expected-pom-version-changed.xml" ) );
-        assertEquals( "Check the transformed POM", expected, actual );
-    }
-
-    public void testRewritePomDependencies()
-        throws Exception
-    {
-        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-dependencies" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomUnmappedDependencies()
-        throws Exception
-    {
-        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-dependencies" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomDependenciesDifferentVersion()
-        throws Exception
-    {
-        ReleaseConfiguration config = createDifferingVersionConfiguration( "internal-differing-snapshot-dependencies" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewriteManagedPomDependencies()
-        throws Exception
-    {
-        ReleaseConfiguration config = createMappedConfiguration( "internal-managed-snapshot-dependency" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewriteManagedPomUnmappedDependencies()
-        throws Exception
-    {
-        ReleaseConfiguration config = createUnmappedConfiguration( "internal-managed-snapshot-dependency" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomPlugins()
-        throws Exception
-    {
-        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-plugins" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomUnmappedPlugins()
-        throws Exception
-    {
-        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-plugins" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomPluginsDifferentVersion()
-        throws Exception
-    {
-        ReleaseConfiguration config = createDifferingVersionConfiguration( "internal-differing-snapshot-plugins" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewriteManagedPomPlugins()
-        throws Exception
-    {
-        ReleaseConfiguration config = createMappedConfiguration( "internal-managed-snapshot-plugin" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewriteManagedPomUnmappedPlugins()
-        throws Exception
-    {
-        ReleaseConfiguration config = createUnmappedConfiguration( "internal-managed-snapshot-plugin" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomReportPlugins()
-        throws Exception
-    {
-        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-report-plugins" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomUnmappedReportPlugins()
-        throws Exception
-    {
-        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-report-plugins" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomReportPluginsDifferentVersion()
+    protected ReleaseConfiguration createConfigurationFromProjects( String path )
         throws Exception
     {
-        ReleaseConfiguration config =
-            createDifferingVersionConfiguration( "internal-differing-snapshot-report-plugins" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomExtension()
-        throws Exception
-    {
-        ReleaseConfiguration config = createDefaultConfiguration( "internal-snapshot-extension" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
-
-    public void testRewritePomUnmappedExtension()
-        throws Exception
-    {
-        ReleaseConfiguration config = createUnmappedConfiguration( "internal-snapshot-extension" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewritePomExtensionDifferentVersion()
-        throws Exception
-    {
-        ReleaseConfiguration config = createDifferingVersionConfiguration( "internal-differing-snapshot-extension" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
-    }
-
-    public void testRewriteBasicPomWithEditMode()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.setUseEditMode( true );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-
-        phase.execute( config );
-
-        assertTrue( compareFiles( config.getReactorProjects() ) );
-    }
+        ReleaseConfiguration releaseConfiguration = createConfigurationFromProjects( "rewrite-for-release/", path );
+        releaseConfiguration.setUrl( "scm:svn:file://localhost/tmp/scm-repo" );
+        releaseConfiguration.setReleaseLabel( "release-label" );
+        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
 
-    public void testRewriteBasicPomWithEditModeFailure()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.setUseEditMode( true );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-
-        ScmManagerStub scmManager = new ScmManagerStub();
-        DefaultScmRepositoryConfigurator configurator =
-            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
-        configurator.setScmManager( scmManager );
-
-        ScmProviderStub providerStub = (ScmProviderStub) scmManager.getProviderByUrl( config.getUrl() );
-        providerStub.setEditScmResult( new EditScmResult( "", "", "", false ) );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseScmCommandException e )
-        {
-            assertNull( "Check no other cause", e.getCause() );
-        }
+        return releaseConfiguration;
     }
 
-    public void testRewriteBasicPomWithEditModeException()
-        throws Exception
+    protected String readTestProjectFile( String fileName )
+        throws IOException
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.setUseEditMode( true );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-
-        Mock scmProviderMock = new Mock( ScmProvider.class );
-        scmProviderMock.expects( new InvokeAtLeastOnceMatcher() ).method( "edit" ).will(
-            new ThrowStub( new ScmException( "..." ) ) );
-
-        ScmManagerStub scmManager = new ScmManagerStub();
-        DefaultScmRepositoryConfigurator configurator =
-            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
-        configurator.setScmManager( scmManager );
-        scmManager.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertEquals( "Check cause", ScmException.class, e.getCause().getClass() );
-        }
+        return FileUtils.fileRead( getTestFile( "target/test-classes/projects/rewrite-for-release/" + fileName ) );
     }
 
-    public void testRewriteAddSchema()
+    protected ReleaseConfiguration createConfigurationFromBasicPom()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-        config.setAddSchema( true );
-
-        // Run a second time to check they are not duplicated
-        for ( int i = 0; i < 2; i++ )
-        {
-            phase.execute( config );
-
-            String expected = readTestProjectFile( "basic-pom/expected-pom-with-schema.xml" );
-            String actual = readTestProjectFile( "basic-pom/pom.xml" );
-            assertEquals( "Check the transformed POM", expected, actual );
-        }
+        return createConfigurationFromProjects( "basic-pom" );
     }
 
     public void testSimulateRewrite()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
+        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         String expected = readTestProjectFile( "basic-pom/pom.xml" );
 
@@ -482,199 +82,38 @@
         assertEquals( "Check the transformed POM", expected, actual );
     }
 
-    public void testSimulateRewriteEditModeSkipped()
-        throws Exception
+    protected void mapAlternateNextVersion( ReleaseConfiguration config, String projectId )
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.setUseEditMode( true );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-
-        Mock scmProviderMock = new Mock( ScmProvider.class );
-        scmProviderMock.expects( new TestFailureMatcher( "edit should not be called" ) ).method( "edit" );
-
-        ScmManagerStub scmManager = new ScmManagerStub();
-        DefaultScmRepositoryConfigurator configurator =
-            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
-        configurator.setScmManager( scmManager );
-        scmManager.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
-
-        phase.simulate( config );
-
-        // Getting past mock is success
-        assertTrue( true );
+        config.mapReleaseVersion( projectId, ALTERNATIVE_NEXT_VERSION );
     }
 
-    public void testRewriteUnmappedPom()
-        throws Exception
+    protected void mapNextVersion( ReleaseConfiguration config, String projectId )
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertNull( "Check no cause", e.getCause() );
-        }
+        config.mapReleaseVersion( projectId, NEXT_VERSION );
     }
 
-    public void testRewriteBasicPomWithScmRepoException()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.setUseEditMode( true );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-
-        Mock scmManagerMock = new Mock( ScmManager.class );
-        scmManagerMock.expects( new InvokeAtLeastOnceMatcher() ).method( "makeScmRepository" ).with(
-            new IsEqual( config.getUrl() ) ).will( new ThrowStub( new ScmRepositoryException( "..." ) ) );
-
-        setMockScmManager( scmManagerMock );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseScmRepositoryException e )
-        {
-            assertNull( "Check no additional cause", e.getCause() );
-        }
-    }
-
-    public void testRewriteBasicPomWithNoSuchProviderException()
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom" );
-        config.setUseEditMode( true );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-
-        Mock scmManagerMock = new Mock( ScmManager.class );
-        scmManagerMock.expects( new InvokeAtLeastOnceMatcher() ).method( "makeScmRepository" ).with(
-            new IsEqual( config.getUrl() ) ).will( new ThrowStub( new NoSuchScmProviderException( "..." ) ) );
-
-        setMockScmManager( scmManagerMock );
-
-        try
-        {
-            phase.execute( config );
-
-            fail( "Should have thrown an exception" );
-        }
-        catch ( ReleaseExecutionException e )
-        {
-            assertEquals( "Check cause", NoSuchScmProviderException.class, e.getCause().getClass() );
-        }
-    }
-
-    private static String readTestProjectFile( String fileName )
-        throws IOException
-    {
-        return FileUtils.fileRead( getTestFile( "target/test-classes/projects/rewrite-for-release/" + fileName ) );
-    }
-
-    private ReleaseConfiguration createConfigurationFromProjects( String path )
-        throws Exception
-    {
-        ReleaseConfiguration releaseConfiguration = createConfigurationFromProjects( "rewrite-for-release/", path );
-        releaseConfiguration.setUrl( "scm:svn:file://localhost/tmp/scm-repo" );
-        releaseConfiguration.setReleaseLabel( "release-label" );
-        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
-
-        return releaseConfiguration;
-    }
-
-    private boolean compareFiles( List reactorProjects )
-        throws IOException
-    {
-        for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
-        {
-            MavenProject project = (MavenProject) i.next();
-
-            File actualFile = project.getFile();
-            String actual = FileUtils.fileRead( actualFile );
-            File expectedFile = new File( actualFile.getParentFile(), "expected-pom.xml" );
-            String expected = FileUtils.fileRead( expectedFile );
-            assertEquals( "Check the transformed POM", expected, actual );
-        }
-        return true;
-    }
-
-    private static Map getProjectsAsMap( List reactorProjects )
-    {
-        Map map = new HashMap();
-        for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
-        {
-            MavenProject project = (MavenProject) i.next();
-
-            map.put( ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ), project );
-        }
-        return map;
-    }
-
-    private ReleaseConfiguration createUnmappedConfiguration( String path )
+    protected ReleaseConfiguration createConfigurationForPomWithParentAlternateNextVersion( String path )
         throws Exception
     {
         ReleaseConfiguration config = createConfigurationFromProjects( path );
 
-        MavenProject project =
-            (MavenProject) getProjectsAsMap( config.getReactorProjects() ).get( "groupId:subproject2" );
-        config.setReactorProjects( Collections.singletonList( project ) );
-
-        config.mapReleaseVersion( "groupId:subproject2", "1.0" );
-        config.mapReleaseVersion( "groupId:subproject3", "1.0" );
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-        return config;
-    }
-
-    private ReleaseConfiguration createDefaultConfiguration( String path )
-        throws Exception
-    {
-        ReleaseConfiguration config = createMappedConfiguration( path );
-
-        config.mapReleaseVersion( "groupId:subproject4", "1.0" );
-        return config;
-    }
-
-    private ReleaseConfiguration createMappedConfiguration( String path )
-        throws Exception
-    {
-        ReleaseConfiguration config = createDifferingVersionConfiguration( path );
-
-        config.mapReleaseVersion( "groupId:subproject3", "1.0" );
-        return config;
-    }
-
-    private ReleaseConfiguration createDifferingVersionConfiguration( String path )
-        throws Exception
-    {
-        ReleaseConfiguration config = createConfigurationForPomWithParent( path, "1.0" );
-
-        config.mapReleaseVersion( "groupId:subproject2", "1.0" );
+        config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
+        config.mapReleaseVersion( "groupId:subproject1", ALTERNATIVE_NEXT_VERSION );
         return config;
     }
 
-    private ReleaseConfiguration createConfigurationForPomWithParent( String path, String nextVersion )
+    protected ReleaseConfiguration createConfigurationForWithParentNextVersion( String path )
         throws Exception
     {
         ReleaseConfiguration config = createConfigurationFromProjects( path );
 
-        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
-        config.mapReleaseVersion( "groupId:subproject1", nextVersion );
+        config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
+        config.mapReleaseVersion( "groupId:subproject1", NEXT_VERSION );
         return config;
     }
 
-    private void setMockScmManager( Mock scmManagerMock )
-        throws Exception
+    protected void unmapNextVersion( ReleaseConfiguration config, String projectId )
     {
-        ScmManager scmManager = (ScmManager) scmManagerMock.proxy();
-        DefaultScmRepositoryConfigurator configurator =
-            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
-        configurator.setScmManager( scmManager );
+        // nothing to do
     }
-
 }

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,29 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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.
+  -->
+
+<component-set>
+  <components>
+    <!-- Turn off info messages -->
+    <component>
+      <role>org.codehaus.plexus.logging.LoggerManager</role>
+      <implementation>org.codehaus.plexus.logging.console.ConsoleLoggerManager</implementation>
+      <lifecycle-handler>basic</lifecycle-handler>
+      <configuration>
+        <threshold>ERROR</threshold>
+      </configuration>
+    </component>
+  </components>
+</component-set>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom-with-schema.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom-with-schema.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom-with-schema.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom-with-schema.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.1-SNAPSHOT</version>
+
+  <scm>
+    <connection>scm:svn:file://localhost/tmp/scm-repo/trunk</connection>
+    <developerConnection>scm:svn:file://localhost/tmp/scm-repo/trunk</developerConnection>
+    <url>file://localhost/tmp/scm-repo/trunk</url>
+  </scm>
+</project>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom-with-schema.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom-with-schema.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.1-SNAPSHOT</version>
+
+  <scm>
+    <connection>scm:svn:file://localhost/tmp/scm-repo/trunk</connection>
+    <developerConnection>scm:svn:file://localhost/tmp/scm-repo/trunk</developerConnection>
+    <url>file://localhost/tmp/scm-repo/trunk</url>
+  </scm>
+</project>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0</version>
+
+  <scm>
+    <connection>scm:svn:file://localhost/tmp/scm-repo/tags/release-label</connection>
+    <developerConnection>scm:svn:file://localhost/tmp/scm-repo/tags/release-label</developerConnection>
+    <url>file://localhost/tmp/scm-repo/tags/release-label</url>
+  </scm>
+</project>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/basic-pom/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/expected-pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/expected-pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,28 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module>
+    <module>subproject2</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,28 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module>
+    <module>subproject2</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/expected-pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/expected-pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,26 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,26 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/expected-pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/expected-pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,34 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject2</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>groupId</groupId>
+      <artifactId>subproject1</artifactId>
+      <version>0.5</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,34 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>subproject2</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>groupId</groupId>
+      <artifactId>subproject1</artifactId>
+      <version>0.5</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-dependencies/subproject2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/expected-pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/expected-pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,28 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module>
+    <module>subproject2</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,28 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module>
+    <module>subproject2</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/expected-pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/expected-pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,26 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,26 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject2/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject2/expected-pom.xml?rev=398224&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject2/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject2/expected-pom.xml Sat Apr 29 12:29:10 2006
@@ -0,0 +1,37 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject2</artifactId>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject1</artifactId>
+        <version>0.5</version>
+      </extension>
+    </extensions>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject2/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-development/internal-differing-snapshot-extension/subproject2/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision