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/08/30 06:03:49 UTC

svn commit: r438341 [5/5] - in /maven/plugins/trunk/maven-release-plugin/src: main/java/org/apache/maven/plugins/release/ main/java/org/apache/maven/plugins/release/config/ main/java/org/apache/maven/plugins/release/phase/ main/java/org/apache/maven/pl...

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java?rev=438341&r1=438340&r2=438341&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhaseTest.java Tue Aug 29 21:03:46 2006
@@ -18,7 +18,7 @@
 
 import org.apache.maven.model.Scm;
 import org.apache.maven.plugins.release.ReleaseExecutionException;
-import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.FileUtils;
 
@@ -52,13 +52,13 @@
     public void testSimulateRewrite()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        ReleaseDescriptor config = createConfigurationFromBasicPom();
         config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
 
         String expected = readTestProjectFile( "basic-pom/pom.xml" );
 
-        phase.simulate( config );
+        phase.simulate( config, null, getReactorProjects() );
 
         String actual = readTestProjectFile( "basic-pom/pom.xml" );
         assertEquals( "Check the original POM untouched", expected, actual );
@@ -71,7 +71,7 @@
     public void testClean()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        ReleaseDescriptor config = createConfigurationFromBasicPom();
         config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
 
@@ -79,11 +79,11 @@
         testFile.delete();
         assertFalse( testFile.exists() );
 
-        phase.simulate( config );
+        phase.simulate( config, null, getReactorProjects() );
 
         assertTrue( testFile.exists() );
 
-        phase.clean( config );
+        phase.clean( reactorProjects );
 
         assertFalse( testFile.exists() );
     }
@@ -91,7 +91,7 @@
     public void testCleanNotExists()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        ReleaseDescriptor config = createConfigurationFromBasicPom();
         config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
 
@@ -99,7 +99,7 @@
         testFile.delete();
         assertFalse( testFile.exists() );
 
-        phase.clean( config );
+        phase.clean( reactorProjects );
 
         assertFalse( testFile.exists() );
     }
@@ -107,13 +107,13 @@
     public void testRewriteBasicPomUnmappedScm()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom", true );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom", true );
 
         mapNextVersion( config, "groupId:artifactId" );
 
         try
         {
-            phase.execute( config );
+            phase.execute( config, null, getReactorProjects() );
 
             fail( "Expected failure" );
         }
@@ -129,38 +129,38 @@
         return FileUtils.fileRead( getTestFile( "target/test-classes/projects/rewrite-for-development/" + fileName ) );
     }
 
-    protected ReleaseConfiguration createConfigurationFromProjects( String path, boolean copyFiles )
+    protected ReleaseDescriptor createConfigurationFromProjects( String path, boolean copyFiles )
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration =
-            createConfigurationFromProjects( "rewrite-for-development/", path, copyFiles );
+        ReleaseDescriptor releaseDescriptor =
+            createDescriptorFromProjects( "rewrite-for-development/", path, copyFiles );
 
-        MavenProject rootProject = (MavenProject) releaseConfiguration.getReactorProjects().get( 0 );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
         if ( rootProject.getScm() == null )
         {
-            releaseConfiguration.setUrl( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
+            releaseDescriptor.setScmSourceUrl( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
         }
         else
         {
-            releaseConfiguration.setUrl( rootProject.getScm().getConnection() );
+            releaseDescriptor.setScmSourceUrl( rootProject.getScm().getConnection() );
         }
 
-        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+        releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
 
-        return releaseConfiguration;
+        return releaseDescriptor;
     }
 
-    protected ReleaseConfiguration createConfigurationFromBasicPom( boolean copyFiles )
+    protected ReleaseDescriptor createConfigurationFromBasicPom( boolean copyFiles )
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom", copyFiles );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom", copyFiles );
 
         mapScm( config );
 
         return config;
     }
 
-    private void mapScm( ReleaseConfiguration config )
+    private void mapScm( ReleaseDescriptor config )
     {
         Scm scm = new Scm();
         scm.setConnection( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
@@ -169,27 +169,27 @@
         config.mapOriginalScmInfo( "groupId:artifactId", scm );
     }
 
-    protected void mapAlternateNextVersion( ReleaseConfiguration config, String projectId )
+    protected void mapAlternateNextVersion( ReleaseDescriptor config, String projectId )
     {
         config.mapReleaseVersion( projectId, ALTERNATIVE_RELEASE_VERSION );
         config.mapDevelopmentVersion( projectId, ALTERNATIVE_NEXT_VERSION );
     }
 
-    protected void mapNextVersion( ReleaseConfiguration config, String projectId )
+    protected void mapNextVersion( ReleaseDescriptor config, String projectId )
     {
         config.mapReleaseVersion( projectId, RELEASE_VERSION );
         config.mapDevelopmentVersion( projectId, NEXT_VERSION );
     }
 
-    protected void unmapNextVersion( ReleaseConfiguration config, String projectId )
+    protected void unmapNextVersion( ReleaseDescriptor config, String projectId )
     {
         config.mapReleaseVersion( projectId, RELEASE_VERSION );
     }
 
-    protected ReleaseConfiguration createConfigurationForPomWithParentAlternateNextVersion( String path )
+    protected ReleaseDescriptor createConfigurationForPomWithParentAlternateNextVersion( String path )
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( path );
+        ReleaseDescriptor config = createConfigurationFromProjects( path );
 
         config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
@@ -200,10 +200,10 @@
         return config;
     }
 
-    protected ReleaseConfiguration createConfigurationForWithParentNextVersion( String path )
+    protected ReleaseDescriptor createConfigurationForWithParentNextVersion( String path )
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( path );
+        ReleaseDescriptor config = createConfigurationFromProjects( path );
 
         config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
@@ -217,7 +217,7 @@
     public void testRewriteBasicPomWithCvs()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom-with-cvs" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom-with-cvs" );
         mapNextVersion( config, "groupId:artifactId" );
 
         Scm scm = new Scm();
@@ -226,15 +226,15 @@
         scm.setUrl( "http://localhost/viewcvs.cgi/module" );
         config.mapOriginalScmInfo( "groupId:artifactId", scm );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 
     public void testRewriteBasicPomWithCvsFromTag()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom-with-cvs-from-tag" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom-with-cvs-from-tag" );
         mapNextVersion( config, "groupId:artifactId" );
 
         Scm scm = new Scm();
@@ -244,15 +244,15 @@
         scm.setTag( "original-label" );
         config.mapOriginalScmInfo( "groupId:artifactId", scm );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 
     public void testRewriteBasicPomWithInheritedScm()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom-inherited-scm" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom-inherited-scm" );
 
         config.mapReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         config.mapDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
@@ -264,8 +264,8 @@
         config.mapOriginalScmInfo( "groupId:subproject1", null );
         config.mapOriginalScmInfo( "groupId:subsubproject", null );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java?rev=438341&r1=438340&r2=438341&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 Tue Aug 29 21:03:46 2006
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.FileUtils;
 
@@ -44,26 +44,25 @@
         phase = (ReleasePhase) lookup( ReleasePhase.ROLE, "rewrite-poms-for-release" );
     }
 
-    protected ReleaseConfiguration createConfigurationFromProjects( String path, boolean copyFiles )
+    protected ReleaseDescriptor createConfigurationFromProjects( String path, boolean copyFiles )
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration =
-            createConfigurationFromProjects( "rewrite-for-release/", path, copyFiles );
+        ReleaseDescriptor releaseDescriptor = createDescriptorFromProjects( "rewrite-for-release/", path, copyFiles );
 
-        MavenProject rootProject = (MavenProject) releaseConfiguration.getReactorProjects().get( 0 );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
         if ( rootProject.getScm() == null )
         {
-            releaseConfiguration.setUrl( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
+            releaseDescriptor.setScmSourceUrl( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
         }
         else
         {
-            releaseConfiguration.setUrl( rootProject.getScm().getConnection() );
+            releaseDescriptor.setScmSourceUrl( rootProject.getScm().getConnection() );
         }
 
-        releaseConfiguration.setReleaseLabel( "release-label" );
-        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+        releaseDescriptor.setScmReleaseLabel( "release-label" );
+        releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
 
-        return releaseConfiguration;
+        return releaseDescriptor;
     }
 
     protected String readTestProjectFile( String fileName )
@@ -72,7 +71,7 @@
         return FileUtils.fileRead( getTestFile( "target/test-classes/projects/rewrite-for-release/" + fileName ) );
     }
 
-    protected ReleaseConfiguration createConfigurationFromBasicPom( boolean copyFiles )
+    protected ReleaseDescriptor createConfigurationFromBasicPom( boolean copyFiles )
         throws Exception
     {
         return createConfigurationFromProjects( "basic-pom", copyFiles );
@@ -81,12 +80,12 @@
     public void testSimulateRewrite()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        ReleaseDescriptor config = createConfigurationFromBasicPom();
         config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         String expected = readTestProjectFile( "basic-pom/pom.xml" );
 
-        phase.simulate( config );
+        phase.simulate( config, null, getReactorProjects() );
 
         String actual = readTestProjectFile( "basic-pom/pom.xml" );
         assertEquals( "Check the original POM untouched", expected, actual );
@@ -99,18 +98,18 @@
     public void testClean()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        ReleaseDescriptor config = createConfigurationFromBasicPom();
         config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         File testFile = getTestFile( "target/test-classes/projects/rewrite-for-release/basic-pom/pom.xml.tag" );
         testFile.delete();
         assertFalse( testFile.exists() );
 
-        phase.simulate( config );
+        phase.simulate( config, null, getReactorProjects() );
 
         assertTrue( testFile.exists() );
 
-        phase.clean( config );
+        phase.clean( reactorProjects );
 
         assertFalse( testFile.exists() );
     }
@@ -118,14 +117,14 @@
     public void testCleanNotExists()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromBasicPom();
+        ReleaseDescriptor config = createConfigurationFromBasicPom();
         config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         File testFile = getTestFile( "target/test-classes/projects/rewrite-for-release/basic-pom/pom.xml.tag" );
         testFile.delete();
         assertFalse( testFile.exists() );
 
-        phase.clean( config );
+        phase.clean( reactorProjects );
 
         assertFalse( testFile.exists() );
     }
@@ -134,45 +133,45 @@
     public void testScmOverridden()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationForWithParentNextVersion( "pom-with-overridden-scm" );
+        ReleaseDescriptor config = createConfigurationForWithParentNextVersion( "pom-with-overridden-scm" );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 */
 
-    protected void mapAlternateNextVersion( ReleaseConfiguration config, String projectId )
+    protected void mapAlternateNextVersion( ReleaseDescriptor config, String projectId )
     {
         config.mapReleaseVersion( projectId, ALTERNATIVE_NEXT_VERSION );
     }
 
-    protected void mapNextVersion( ReleaseConfiguration config, String projectId )
+    protected void mapNextVersion( ReleaseDescriptor config, String projectId )
     {
         config.mapReleaseVersion( projectId, NEXT_VERSION );
     }
 
-    protected ReleaseConfiguration createConfigurationForPomWithParentAlternateNextVersion( String path )
+    protected ReleaseDescriptor createConfigurationForPomWithParentAlternateNextVersion( String path )
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( path );
+        ReleaseDescriptor config = createConfigurationFromProjects( path );
 
         config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         config.mapReleaseVersion( "groupId:subproject1", ALTERNATIVE_NEXT_VERSION );
         return config;
     }
 
-    protected ReleaseConfiguration createConfigurationForWithParentNextVersion( String path )
+    protected ReleaseDescriptor createConfigurationForWithParentNextVersion( String path )
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( path );
+        ReleaseDescriptor config = createConfigurationFromProjects( path );
 
         config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         config.mapReleaseVersion( "groupId:subproject1", NEXT_VERSION );
         return config;
     }
 
-    protected void unmapNextVersion( ReleaseConfiguration config, String projectId )
+    protected void unmapNextVersion( ReleaseDescriptor config, String projectId )
     {
         // nothing to do
     }
@@ -180,71 +179,71 @@
     public void testRewriteBasicPomWithCvs()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom-with-cvs" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom-with-cvs" );
         mapNextVersion( config, "groupId:artifactId" );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 
     public void testRewriteBasicPomWithTagBase()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom-with-tag-base" );
-        config.setTagBase( "file://localhost/tmp/scm-repo/releases" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom-with-tag-base" );
+        config.setScmTagBase( "file://localhost/tmp/scm-repo/releases" );
         mapNextVersion( config, "groupId:artifactId" );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 
     public void testRewriteBasicPomWithCvsFromTag()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom-with-cvs-from-tag" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom-with-cvs-from-tag" );
         mapNextVersion( config, "groupId:artifactId" );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 
     public void testRewriteBasicPomWithEmptyScm()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "basic-pom-with-empty-scm" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "basic-pom-with-empty-scm" );
         mapNextVersion( config, "groupId:artifactId" );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 
     public void testRewriteInterpolatedVersions()
         throws Exception
     {
-        ReleaseConfiguration config = createMappedConfiguration( "interpolated-versions" );
+        ReleaseDescriptor config = createMappedConfiguration( "interpolated-versions" );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 
     public void testRewriteInterpolatedVersionsDifferentVersion()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "interpolated-versions" );
+        ReleaseDescriptor config = createConfigurationFromProjects( "interpolated-versions" );
 
         config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         config.mapReleaseVersion( "groupId:subproject1", ALTERNATIVE_NEXT_VERSION );
         config.mapReleaseVersion( "groupId:subproject2", NEXT_VERSION );
         config.mapReleaseVersion( "groupId:subproject3", NEXT_VERSION );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        for ( Iterator i = config.getReactorProjects().iterator(); i.hasNext(); )
+        for ( Iterator i = getReactorProjects().iterator(); i.hasNext(); )
         {
             MavenProject project = (MavenProject) i.next();
 
@@ -263,11 +262,11 @@
     public void testRewriteBasicPomWithInheritedScm()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationForWithParentNextVersion( "basic-pom-inherited-scm" );
+        ReleaseDescriptor config = createConfigurationForWithParentNextVersion( "basic-pom-inherited-scm" );
         config.mapReleaseVersion( "groupId:subsubproject", NEXT_VERSION );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
-        assertTrue( compareFiles( config.getReactorProjects() ) );
+        assertTrue( compareFiles( getReactorProjects() ) );
     }
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RunGoalsPhaseTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RunGoalsPhaseTest.java?rev=438341&r1=438340&r2=438341&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RunGoalsPhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RunGoalsPhaseTest.java Tue Aug 29 21:03:46 2006
@@ -17,14 +17,13 @@
  */
 
 import org.apache.maven.plugins.release.ReleaseExecutionException;
-import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.plugins.release.exec.MavenExecutor;
 import org.apache.maven.plugins.release.exec.MavenExecutorException;
 import org.codehaus.plexus.PlexusTestCase;
 import org.jmock.Mock;
 import org.jmock.core.constraint.IsEqual;
 import org.jmock.core.constraint.IsNull;
-import org.jmock.core.constraint.IsSame;
 import org.jmock.core.matcher.InvokeOnceMatcher;
 import org.jmock.core.matcher.TestFailureMatcher;
 import org.jmock.core.stub.ThrowStub;
@@ -54,19 +53,19 @@
     {
         File testFile = getTestFile( "target/working-directory" );
 
-        ReleaseConfiguration config = new ReleaseConfiguration();
+        ReleaseDescriptor config = new ReleaseDescriptor();
         config.setPreparationGoals( "clean integration-test" );
-        config.setWorkingDirectory( testFile );
+        config.setWorkingDirectory( testFile.getAbsolutePath() );
 
         Mock mock = new Mock( MavenExecutor.class );
-        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsSame( testFile ),
+        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsEqual( testFile ),
                                                                                new IsEqual( "clean integration-test" ),
                                                                                new IsEqual( Boolean.TRUE ),
                                                                                new IsNull() );
 
         phase.setMavenExecutor( (MavenExecutor) mock.proxy() );
 
-        phase.execute( config );
+        phase.execute( config, null, null );
 
         // just needs to survive the mock
         assertTrue( true );
@@ -77,19 +76,19 @@
     {
         File testFile = getTestFile( "target/working-directory" );
 
-        ReleaseConfiguration config = new ReleaseConfiguration();
+        ReleaseDescriptor config = new ReleaseDescriptor();
         config.setPreparationGoals( "clean integration-test" );
-        config.setWorkingDirectory( testFile );
+        config.setWorkingDirectory( testFile.getAbsolutePath() );
 
         Mock mock = new Mock( MavenExecutor.class );
-        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsSame( testFile ),
+        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsEqual( testFile ),
                                                                                new IsEqual( "clean integration-test" ),
                                                                                new IsEqual( Boolean.TRUE ),
                                                                                new IsNull() );
 
         phase.setMavenExecutor( (MavenExecutor) mock.proxy() );
 
-        phase.simulate( config );
+        phase.simulate( config, null, null );
 
         // just needs to survive the mock
         assertTrue( true );
@@ -99,12 +98,12 @@
     {
         File testFile = getTestFile( "target/working-directory" );
 
-        ReleaseConfiguration config = new ReleaseConfiguration();
+        ReleaseDescriptor config = new ReleaseDescriptor();
         config.setPreparationGoals( "clean integration-test" );
-        config.setWorkingDirectory( testFile );
+        config.setWorkingDirectory( testFile.getAbsolutePath() );
 
         Mock mock = new Mock( MavenExecutor.class );
-        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsSame( testFile ),
+        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsEqual( testFile ),
                                                                                new IsEqual( "clean integration-test" ),
                                                                                new IsEqual( Boolean.TRUE ),
                                                                                new IsNull() ).will(
@@ -114,7 +113,7 @@
 
         try
         {
-            phase.execute( config );
+            phase.execute( config, null, null );
 
             fail( "Should have thrown an exception" );
         }
@@ -128,12 +127,12 @@
     {
         File testFile = getTestFile( "target/working-directory" );
 
-        ReleaseConfiguration config = new ReleaseConfiguration();
+        ReleaseDescriptor config = new ReleaseDescriptor();
         config.setPreparationGoals( "clean integration-test" );
-        config.setWorkingDirectory( testFile );
+        config.setWorkingDirectory( testFile.getAbsolutePath() );
 
         Mock mock = new Mock( MavenExecutor.class );
-        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsSame( testFile ),
+        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( new IsEqual( testFile ),
                                                                                new IsEqual( "clean integration-test" ),
                                                                                new IsEqual( Boolean.TRUE ),
                                                                                new IsNull() ).will(
@@ -143,7 +142,7 @@
 
         try
         {
-            phase.simulate( config );
+            phase.simulate( config, null, null );
 
             fail( "Should have thrown an exception" );
         }
@@ -158,16 +157,16 @@
     {
         File testFile = getTestFile( "target/working-directory" );
 
-        ReleaseConfiguration config = new ReleaseConfiguration();
+        ReleaseDescriptor config = new ReleaseDescriptor();
         config.setPreparationGoals( "" );
-        config.setWorkingDirectory( testFile );
+        config.setWorkingDirectory( testFile.getAbsolutePath() );
 
         Mock mock = new Mock( MavenExecutor.class );
-        mock.expects( new TestFailureMatcher( "Shouldn't invoke executeGoals" ) ) .method( "executeGoals" );
+        mock.expects( new TestFailureMatcher( "Shouldn't invoke executeGoals" ) ).method( "executeGoals" );
 
         phase.setMavenExecutor( (MavenExecutor) mock.proxy() );
 
-        phase.execute( config );
+        phase.execute( config, null, null );
 
         // just needs to survive the mock
         assertTrue( true );

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhaseTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhaseTest.java?rev=438341&r1=438340&r2=438341&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhaseTest.java Tue Aug 29 21:03:46 2006
@@ -18,7 +18,7 @@
 
 import org.apache.maven.plugins.release.ReleaseExecutionException;
 import org.apache.maven.plugins.release.ReleaseFailureException;
-import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.plugins.release.scm.DefaultScmRepositoryConfigurator;
 import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
 import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
@@ -66,9 +66,9 @@
     public void testNoSuchScmProviderExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm-url" );
-        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm-url" );
+        releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
 
         Mock scmManagerMock = new Mock( ScmManager.class );
         scmManagerMock.expects( new InvokeAtLeastOnceMatcher() ).method( "makeScmRepository" ).with(
@@ -81,7 +81,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -92,7 +92,7 @@
 
         try
         {
-            phase.simulate( releaseConfiguration );
+            phase.simulate( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -105,9 +105,9 @@
     public void testScmRepositoryExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm-url" );
-        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm-url" );
+        releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
 
         Mock scmManagerMock = new Mock( ScmManager.class );
         scmManagerMock.expects( new InvokeAtLeastOnceMatcher() ).method( "makeScmRepository" ).with(
@@ -120,7 +120,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -131,7 +131,7 @@
 
         try
         {
-            phase.simulate( releaseConfiguration );
+            phase.simulate( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -144,9 +144,9 @@
     public void testScmExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm-url" );
-        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm-url" );
+        releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
 
         Mock scmProviderMock = new Mock( ScmProvider.class );
         scmProviderMock.expects( new InvokeAtLeastOnceMatcher() ).method( "status" ).will(
@@ -157,7 +157,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -168,7 +168,7 @@
 
         try
         {
-            phase.simulate( releaseConfiguration );
+            phase.simulate( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -181,16 +181,17 @@
     public void testScmResultFailure()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
 
         ScmManager scmManager = (ScmManager) lookup( ScmManager.ROLE );
-        ScmProviderStub providerStub = (ScmProviderStub) scmManager.getProviderByUrl( releaseConfiguration.getUrl() );
+        ScmProviderStub providerStub =
+            (ScmProviderStub) scmManager.getProviderByUrl( releaseDescriptor.getScmSourceUrl() );
 
         providerStub.setStatusScmResult( new StatusScmResult( "", "", "", false ) );
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -201,7 +202,7 @@
 
         try
         {
-            phase.simulate( releaseConfiguration );
+            phase.simulate( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -214,13 +215,13 @@
     public void testNoModifications()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
 
-        setChangedFiles( releaseConfiguration, Collections.EMPTY_LIST );
+        setChangedFiles( releaseDescriptor, Collections.EMPTY_LIST );
 
-        phase.execute( releaseConfiguration );
+        phase.execute( releaseDescriptor, null, null );
 
-        phase.simulate( releaseConfiguration );
+        phase.simulate( releaseDescriptor, null, null );
 
         // successful execution is verification enough
         assertTrue( true );
@@ -229,14 +230,14 @@
     public void testModificationsToExcludedFilesOnly()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
 
-        setChangedFiles( releaseConfiguration, Arrays.asList( new String[]{"release.properties", "pom.xml",
+        setChangedFiles( releaseDescriptor, Arrays.asList( new String[]{"release.properties", "pom.xml",
             "pom.xml.backup", "module/pom.xml", "pom.xml.tag", "pom.xml.next"} ) );
 
-        phase.execute( releaseConfiguration );
+        phase.execute( releaseDescriptor, null, null );
 
-        phase.simulate( releaseConfiguration );
+        phase.simulate( releaseDescriptor, null, null );
 
         // successful execution is verification enough
         assertTrue( true );
@@ -245,13 +246,13 @@
     public void testModificationsToIncludedFilesOnly()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
 
-        setChangedFiles( releaseConfiguration, Collections.singletonList( "something.txt" ) );
+        setChangedFiles( releaseDescriptor, Collections.singletonList( "something.txt" ) );
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -262,7 +263,7 @@
 
         try
         {
-            phase.simulate( releaseConfiguration );
+            phase.simulate( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -275,14 +276,14 @@
     public void testModificationsToIncludedAndExcludedFiles()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
 
-        setChangedFiles( releaseConfiguration, Arrays.asList( new String[]{"release.properties", "pom.xml",
+        setChangedFiles( releaseDescriptor, Arrays.asList( new String[]{"release.properties", "pom.xml",
             "pom.xml.backup", "module/pom.xml", "pom.xml.tag", "pom.xml.release", "something.txt"} ) );
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -293,7 +294,7 @@
 
         try
         {
-            phase.simulate( releaseConfiguration );
+            phase.simulate( releaseDescriptor, null, null );
 
             fail( "Status check should have failed" );
         }
@@ -303,11 +304,12 @@
         }
     }
 
-    private void setChangedFiles( ReleaseConfiguration releaseConfiguration, List changedFiles )
+    private void setChangedFiles( ReleaseDescriptor releaseDescriptor, List changedFiles )
         throws Exception
     {
         ScmManager scmManager = (ScmManager) lookup( ScmManager.ROLE );
-        ScmProviderStub providerStub = (ScmProviderStub) scmManager.getProviderByUrl( releaseConfiguration.getUrl() );
+        ScmProviderStub providerStub =
+            (ScmProviderStub) scmManager.getProviderByUrl( releaseDescriptor.getScmSourceUrl() );
 
         providerStub.setStatusScmResult( new StatusScmResult( "", createScmFiles( changedFiles ) ) );
     }
@@ -323,11 +325,11 @@
         return files;
     }
 
-    private static ReleaseConfiguration createReleaseConfiguration()
+    private static ReleaseDescriptor createReleaseDescriptor()
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm:svn:file://localhost/tmp/scm-repo" );
-        releaseConfiguration.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
-        return releaseConfiguration;
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm:svn:file://localhost/tmp/scm-repo" );
+        releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
+        return releaseDescriptor;
     }
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCommitPhaseTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCommitPhaseTest.java?rev=438341&r1=438340&r2=438341&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCommitPhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCommitPhaseTest.java Tue Aug 29 21:03:46 2006
@@ -18,7 +18,7 @@
 
 import org.apache.maven.plugins.release.ReleaseExecutionException;
 import org.apache.maven.plugins.release.ReleaseFailureException;
-import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.plugins.release.scm.DefaultScmRepositoryConfigurator;
 import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
 import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
@@ -72,11 +72,11 @@
     public void testCommit()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
-        config.setUrl( "scm-url" );
-        MavenProject rootProject = (MavenProject) config.getReactorProjects().get( 0 );
-        config.setWorkingDirectory( rootProject.getFile().getParentFile() );
-        config.setReleaseLabel( "release-label" );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
+        config.setScmSourceUrl( "scm-url" );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
+        config.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
+        config.setScmReleaseLabel( "release-label" );
 
         ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), rootProject.getFile() );
 
@@ -89,7 +89,7 @@
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
         assertTrue( true );
     }
@@ -97,14 +97,14 @@
     public void testCommitMultiModule()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "multiple-poms", false );
-        config.setUrl( "scm-url" );
-        MavenProject rootProject = (MavenProject) config.getReactorProjects().get( 0 );
-        config.setWorkingDirectory( rootProject.getFile().getParentFile() );
-        config.setReleaseLabel( "release-label" );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "multiple-poms", false );
+        config.setScmSourceUrl( "scm-url" );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
+        config.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
+        config.setScmReleaseLabel( "release-label" );
 
         List poms = new ArrayList();
-        for ( Iterator i = config.getReactorProjects().iterator(); i.hasNext(); )
+        for ( Iterator i = getReactorProjects().iterator(); i.hasNext(); )
         {
             MavenProject project = (MavenProject) i.next();
             poms.add( project.getFile() );
@@ -121,7 +121,7 @@
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
         assertTrue( true );
     }
@@ -131,11 +131,11 @@
     {
         phase = (ReleasePhase) lookup( ReleasePhase.ROLE, "scm-commit-development" );
 
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
-        config.setUrl( "scm-url" );
-        MavenProject rootProject = (MavenProject) config.getReactorProjects().get( 0 );
-        config.setWorkingDirectory( rootProject.getFile().getParentFile() );
-        config.setReleaseLabel( "release-label" );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
+        config.setScmSourceUrl( "scm-url" );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
+        config.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
+        config.setScmReleaseLabel( "release-label" );
 
         ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), rootProject.getFile() );
 
@@ -148,7 +148,7 @@
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
         assertTrue( true );
     }
@@ -156,11 +156,11 @@
     public void testCommitNoReleaseLabel()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
 
         try
         {
-            phase.execute( config );
+            phase.execute( config, null, getReactorProjects() );
             fail( "Should have thrown an exception" );
         }
         catch ( ReleaseFailureException e )
@@ -172,11 +172,11 @@
     public void testSimulateCommit()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
-        config.setUrl( "scm-url" );
-        MavenProject rootProject = (MavenProject) config.getReactorProjects().get( 0 );
-        config.setWorkingDirectory( rootProject.getFile().getParentFile() );
-        config.setReleaseLabel( "release-label" );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
+        config.setScmSourceUrl( "scm-url" );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
+        config.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
+        config.setScmReleaseLabel( "release-label" );
 
         Mock scmProviderMock = new Mock( ScmProvider.class );
         scmProviderMock.expects( new TestFailureMatcher( "Shouldn't have called checkIn" ) ).method( "checkIn" );
@@ -184,7 +184,7 @@
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
 
-        phase.simulate( config );
+        phase.simulate( config, null, getReactorProjects() );
 
         assertTrue( true );
     }
@@ -192,11 +192,11 @@
     public void testSimulateCommitNoReleaseLabel()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
 
         try
         {
-            phase.simulate( config );
+            phase.simulate( config, null, getReactorProjects() );
             fail( "Should have thrown an exception" );
         }
         catch ( ReleaseFailureException e )
@@ -208,7 +208,7 @@
     public void testNoSuchScmProviderExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         Mock scmManagerMock = new Mock( ScmManager.class );
         scmManagerMock.expects( new InvokeOnceMatcher() ).method( "makeScmRepository" ).with(
@@ -221,7 +221,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Status check should have failed" );
         }
@@ -234,7 +234,7 @@
     public void testScmRepositoryExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         Mock scmManagerMock = new Mock( ScmManager.class );
         scmManagerMock.expects( new InvokeOnceMatcher() ).method( "makeScmRepository" ).with(
@@ -247,7 +247,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Status check should have failed" );
         }
@@ -260,7 +260,7 @@
     public void testScmExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         Mock scmProviderMock = new Mock( ScmProvider.class );
         scmProviderMock.expects( new InvokeOnceMatcher() ).method( "checkIn" ).will(
@@ -271,7 +271,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Status check should have failed" );
         }
@@ -284,16 +284,17 @@
     public void testScmResultFailure()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         ScmManager scmManager = (ScmManager) lookup( ScmManager.ROLE );
-        ScmProviderStub providerStub = (ScmProviderStub) scmManager.getProviderByUrl( releaseConfiguration.getUrl() );
+        ScmProviderStub providerStub =
+            (ScmProviderStub) scmManager.getProviderByUrl( releaseDescriptor.getScmSourceUrl() );
 
         providerStub.setCheckInScmResult( new CheckInScmResult( "", "", "", false ) );
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Commit should have failed" );
         }
@@ -303,13 +304,13 @@
         }
     }
 
-    private ReleaseConfiguration createReleaseConfiguration()
+    private ReleaseDescriptor createReleaseConfiguration()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
-        config.setUrl( "scm-url" );
-        config.setReleaseLabel( "release-label" );
-        config.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
+        config.setScmSourceUrl( "scm-url" );
+        config.setScmReleaseLabel( "release-label" );
+        config.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
         return config;
     }
 

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmTagPhaseTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmTagPhaseTest.java?rev=438341&r1=438340&r2=438341&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmTagPhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmTagPhaseTest.java Tue Aug 29 21:03:46 2006
@@ -18,7 +18,7 @@
 
 import org.apache.maven.plugins.release.ReleaseExecutionException;
 import org.apache.maven.plugins.release.ReleaseFailureException;
-import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.plugins.release.scm.DefaultScmRepositoryConfigurator;
 import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
 import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
@@ -63,11 +63,11 @@
     public void testTag()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
-        config.setUrl( "scm-url" );
-        MavenProject rootProject = (MavenProject) config.getReactorProjects().get( 0 );
-        config.setWorkingDirectory( rootProject.getFile().getParentFile() );
-        config.setReleaseLabel( "release-label" );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
+        config.setScmSourceUrl( "scm-url" );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
+        config.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
+        config.setScmReleaseLabel( "release-label" );
 
         ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile() );
 
@@ -80,7 +80,7 @@
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
         assertTrue( true );
     }
@@ -88,11 +88,11 @@
     public void testCommitMultiModule()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "multiple-poms", false );
-        config.setUrl( "scm-url" );
-        MavenProject rootProject = (MavenProject) config.getReactorProjects().get( 0 );
-        config.setWorkingDirectory( rootProject.getFile().getParentFile() );
-        config.setReleaseLabel( "release-label" );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "multiple-poms", false );
+        config.setScmSourceUrl( "scm-url" );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
+        config.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
+        config.setScmReleaseLabel( "release-label" );
 
         ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile() );
 
@@ -105,7 +105,7 @@
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
 
-        phase.execute( config );
+        phase.execute( config, null, getReactorProjects() );
 
         assertTrue( true );
     }
@@ -113,11 +113,11 @@
     public void testTagNoReleaseLabel()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
 
         try
         {
-            phase.execute( config );
+            phase.execute( config, null, getReactorProjects() );
             fail( "Should have thrown an exception" );
         }
         catch ( ReleaseFailureException e )
@@ -129,11 +129,11 @@
     public void testSimulateTag()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
-        config.setUrl( "scm-url" );
-        MavenProject rootProject = (MavenProject) config.getReactorProjects().get( 0 );
-        config.setWorkingDirectory( rootProject.getFile().getParentFile() );
-        config.setReleaseLabel( "release-label" );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
+        config.setScmSourceUrl( "scm-url" );
+        MavenProject rootProject = (MavenProject) getReactorProjects().get( 0 );
+        config.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
+        config.setScmReleaseLabel( "release-label" );
 
         Mock scmProviderMock = new Mock( ScmProvider.class );
         scmProviderMock.expects( new TestFailureMatcher( "Shouldn't have called tag" ) ).method( "tag" );
@@ -141,7 +141,7 @@
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
 
-        phase.simulate( config );
+        phase.simulate( config, null, getReactorProjects() );
 
         assertTrue( true );
     }
@@ -149,11 +149,11 @@
     public void testSimulateTagNoReleaseLabel()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
 
         try
         {
-            phase.simulate( config );
+            phase.simulate( config, null, getReactorProjects() );
             fail( "Should have thrown an exception" );
         }
         catch ( ReleaseFailureException e )
@@ -165,7 +165,7 @@
     public void testNoSuchScmProviderExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         Mock scmManagerMock = new Mock( ScmManager.class );
         scmManagerMock.expects( new InvokeOnceMatcher() ).method( "makeScmRepository" ).with(
@@ -178,7 +178,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Status check should have failed" );
         }
@@ -191,7 +191,7 @@
     public void testScmRepositoryExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         Mock scmManagerMock = new Mock( ScmManager.class );
         scmManagerMock.expects( new InvokeOnceMatcher() ).method( "makeScmRepository" ).with(
@@ -204,7 +204,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Status check should have failed" );
         }
@@ -217,7 +217,7 @@
     public void testScmExceptionThrown()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         Mock scmProviderMock = new Mock( ScmProvider.class );
         scmProviderMock.expects( new InvokeOnceMatcher() ).method( "tag" ).will(
@@ -228,7 +228,7 @@
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Status check should have failed" );
         }
@@ -241,16 +241,17 @@
     public void testScmResultFailure()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseConfiguration();
 
         ScmManager scmManager = (ScmManager) lookup( ScmManager.ROLE );
-        ScmProviderStub providerStub = (ScmProviderStub) scmManager.getProviderByUrl( releaseConfiguration.getUrl() );
+        ScmProviderStub providerStub =
+            (ScmProviderStub) scmManager.getProviderByUrl( releaseDescriptor.getScmSourceUrl() );
 
         providerStub.setTagScmResult( new TagScmResult( "", "", "", false ) );
 
         try
         {
-            phase.execute( releaseConfiguration );
+            phase.execute( releaseDescriptor, null, getReactorProjects() );
 
             fail( "Commit should have failed" );
         }
@@ -260,13 +261,13 @@
         }
     }
 
-    private ReleaseConfiguration createReleaseConfiguration()
+    private ReleaseDescriptor createReleaseConfiguration()
         throws Exception
     {
-        ReleaseConfiguration config = createConfigurationFromProjects( "scm-commit/", "single-pom", false );
-        config.setUrl( "scm-url" );
-        config.setReleaseLabel( "release-label" );
-        config.setWorkingDirectory( getTestFile( "target/test/checkout" ) );
+        ReleaseDescriptor config = createDescriptorFromProjects( "scm-commit/", "single-pom", false );
+        config.setScmSourceUrl( "scm-url" );
+        config.setScmReleaseLabel( "release-label" );
+        config.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
         return config;
     }
 

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/scm/DefaultScmRepositoryConfiguratorTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/scm/DefaultScmRepositoryConfiguratorTest.java?rev=438341&r1=438340&r2=438341&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/scm/DefaultScmRepositoryConfiguratorTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/scm/DefaultScmRepositoryConfiguratorTest.java Tue Aug 29 21:03:46 2006
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.scm.manager.NoSuchScmProviderException;
 import org.apache.maven.scm.provider.ScmProvider;
 import org.apache.maven.scm.provider.ScmProviderRepositoryWithHost;
@@ -50,9 +50,9 @@
     public void testGetConfiguredRepository()
         throws ScmRepositoryException, NoSuchScmProviderException
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
 
-        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, null );
 
         assertEquals( "check provider", "cvs", repository.getProvider() );
         assertEquals( "check username", "anoncvs", repository.getProviderRepository().getUser() );
@@ -62,9 +62,9 @@
     public void testGetConfiguredRepositoryWithUsernameAndPassword()
         throws ScmRepositoryException, NoSuchScmProviderException
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration( "username", "password" );
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor( "username", "password" );
 
-        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, null );
 
         assertEquals( "check username", "username", repository.getProviderRepository().getUser() );
         assertEquals( "check password", "password", repository.getProviderRepository().getPassword() );
@@ -73,11 +73,11 @@
     public void testGetConfiguredRepositoryWithTagBase()
         throws ScmRepositoryException, NoSuchScmProviderException
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm:svn:http://localhost/home/svn/module/trunk" );
-        releaseConfiguration.setTagBase( "http://localhost/home/svn/module/tags" );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm:svn:http://localhost/home/svn/module/trunk" );
+        releaseDescriptor.setScmTagBase( "http://localhost/home/svn/module/tags" );
 
-        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, null );
 
         SvnScmProviderRepository providerRepository = (SvnScmProviderRepository) repository.getProviderRepository();
         assertEquals( "check tag base", "http://localhost/home/svn/module/tags", providerRepository.getTagBase() );
@@ -95,11 +95,10 @@
         server.setPassphrase( "settings-passphrase" );
         settings.addServer( server );
 
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm:cvs:pserver:anoncvs@localhost:/home/cvs:module" );
-        releaseConfiguration.setSettings( settings );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm:cvs:pserver:anoncvs@localhost:/home/cvs:module" );
 
-        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, settings );
 
         ScmProviderRepositoryWithHost providerRepository =
             (ScmProviderRepositoryWithHost) repository.getProviderRepository();
@@ -114,12 +113,12 @@
     public void testGetConfiguredRepositoryInvalidScmUrl()
         throws NoSuchScmProviderException
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm-url" );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm-url" );
 
         try
         {
-            scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+            scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, null );
 
             fail( "Expected failure to get a repository with an invalid SCM URL" );
         }
@@ -132,12 +131,12 @@
     public void testGetConfiguredRepositoryInvalidScmProvider()
         throws ScmRepositoryException
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm:url:" );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm:url:" );
 
         try
         {
-            scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+            scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, null );
 
             fail( "Expected failure to get a repository with an invalid SCM URL" );
         }
@@ -150,12 +149,12 @@
     public void testGetConfiguredRepositoryInvalidScmUrlParameters()
         throws NoSuchScmProviderException
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm:cvs:" );
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm:cvs:" );
 
         try
         {
-            scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+            scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, null );
 
             fail( "Expected failure to get a repository with an invalid SCM URL" );
         }
@@ -168,26 +167,26 @@
     public void testGetRepositoryProvider()
         throws ScmRepositoryException, NoSuchScmProviderException
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
 
-        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseConfiguration );
+        ScmRepository repository = scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, null );
 
         ScmProvider provider = scmRepositoryConfigurator.getRepositoryProvider( repository );
         assertEquals( "Check SCM provider", "cvs", provider.getScmType() );
     }
 
-    private static ReleaseConfiguration createReleaseConfiguration()
+    private static ReleaseDescriptor createReleaseDescriptor()
     {
-        ReleaseConfiguration releaseConfiguration = new ReleaseConfiguration();
-        releaseConfiguration.setUrl( "scm:cvs:pserver:anoncvs@localhost:/home/cvs:module" );
-        return releaseConfiguration;
+        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
+        releaseDescriptor.setScmSourceUrl( "scm:cvs:pserver:anoncvs@localhost:/home/cvs:module" );
+        return releaseDescriptor;
     }
 
-    private static ReleaseConfiguration createReleaseConfiguration( String username, String password )
+    private static ReleaseDescriptor createReleaseDescriptor( String username, String password )
     {
-        ReleaseConfiguration releaseConfiguration = createReleaseConfiguration();
-        releaseConfiguration.setUsername( username );
-        releaseConfiguration.setPassword( password );
-        return releaseConfiguration;
+        ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
+        releaseDescriptor.setScmUsername( username );
+        releaseDescriptor.setScmPassword( password );
+        return releaseDescriptor;
     }
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/DefaultReleaseManagerTest.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/DefaultReleaseManagerTest.xml?rev=438341&r1=438340&r2=438341&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/DefaultReleaseManagerTest.xml (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/DefaultReleaseManagerTest.xml Tue Aug 29 21:03:46 2006
@@ -26,7 +26,7 @@
           <field-name>releasePhases</field-name>
         </requirement>
         <requirement>
-          <role>org.apache.maven.plugins.release.config.ReleaseConfigurationStore</role>
+          <role>org.apache.maven.plugins.release.config.ReleaseDescriptorStore</role>
           <role-hint>stub</role-hint>
           <field-name>configStore</field-name>
         </requirement>
@@ -55,7 +55,7 @@
           <field-name>releasePhases</field-name>
         </requirement>
         <requirement>
-          <role>org.apache.maven.plugins.release.config.ReleaseConfigurationStore</role>
+          <role>org.apache.maven.plugins.release.config.ReleaseDescriptorStore</role>
           <role-hint>stub</role-hint>
           <field-name>configStore</field-name>
         </requirement>
@@ -67,9 +67,9 @@
       </configuration>
     </component>
     <component>
-      <role>org.apache.maven.plugins.release.config.ReleaseConfigurationStore</role>
+      <role>org.apache.maven.plugins.release.config.ReleaseDescriptorStore</role>
       <role-hint>stub</role-hint>
-      <implementation>org.apache.maven.plugins.release.config.ReleaseConfigurationStoreStub</implementation>
+      <implementation>org.apache.maven.plugins.release.config.ReleaseDescriptorStoreStub</implementation>
     </component>
     <component>
       <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>