maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r399055 - 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/exec/ main/java/org/apache/maven/plugins/r...
Date Tue, 02 May 2006 21:33:39 GMT
Author: brett
Date: Tue May  2 14:33:36 2006
New Revision: 399055

URL: http://svn.apache.org/viewcvs?rev=399055&view=rev
Log:
[MRELEASE-98] fix tests, unify preparation goals and configure, cean up some other items

Added:
    maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/exec/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/exec/ForkedMavenExecutorTest.xml   (with props)
Modified:
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/DefaultReleaseManager.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseManager.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStore.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/ReleaseConfiguration.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/exec/ForkedMavenExecutor.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RunGoalsPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/DefaultReleaseManagerTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStoreTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhaseTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckPomPhaseTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RunGoalsPhaseTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhaseTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCommitPhaseTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmTagPhaseTest.java
    maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/DefaultReleaseManagerTest.xml
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-parent/pom.xml
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-snapshot-parent/pom.xml
    maven/plugins/trunk/maven-release-plugin/src/test/resources/release.properties

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java Tue May  2 14:33:36 2006
@@ -18,9 +18,12 @@
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugins.release.config.ReleaseConfiguration;
+import org.apache.maven.profiles.Profile;
 import org.apache.maven.settings.Settings;
 
 import java.io.File;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * Base class with shared configuration.
@@ -75,6 +78,13 @@
     private Settings settings;
 
     /**
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    private Settings project;
+
+    /**
      * @component
      */
     protected ReleaseManager releaseManager;
@@ -96,7 +106,6 @@
     protected ReleaseConfiguration createReleaseConfiguration()
     {
         ReleaseConfiguration config = new ReleaseConfiguration();
-        config.setAdditionalArguments( arguments );
         config.setInteractive( settings.isInteractiveMode() );
         config.setPassword( password );
         config.setReleaseLabel( tag );
@@ -105,6 +114,27 @@
         config.setUsername( username );
         config.setWorkingDirectory( basedir );
         config.setPomFileName( pomFileName );
+
+        List profiles = project.getActiveProfiles();
+
+        String arguments = this.arguments;
+        if ( profiles != null && !profiles.isEmpty() )
+        {
+            arguments += "-P ";
+
+            for ( Iterator it = profiles.iterator(); it.hasNext(); )
+            {
+                Profile profile = (Profile) it.next();
+
+                arguments += profile.getId();
+                if ( it.hasNext() )
+                {
+                    arguments += ",";
+                }
+            }
+        }
+        config.setAdditionalArguments( arguments );
+
         return config;
     }
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/DefaultReleaseManager.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/DefaultReleaseManager.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/DefaultReleaseManager.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/DefaultReleaseManager.java Tue May  2 14:33:36 2006
@@ -50,16 +50,6 @@
     implements ReleaseManager
 {
     /**
-     * Whether to only step through and state the tasks, or to execute them.
-     */
-    private boolean dryRun;
-
-    /**
-     * Whether to resume a previous release, if it was in progress. Defaults to true.
-     */
-    private boolean resume = true;
-
-    /**
      * The phases of release to run, and in what order.
      */
     private List phases;
@@ -85,6 +75,12 @@
     private MavenExecutor mavenExecutor;
 
     public void prepare( ReleaseConfiguration releaseConfiguration )
+        throws ReleaseExecutionException, ReleaseFailureException
+    {
+        prepare( releaseConfiguration, true, false );
+    }
+
+    public void prepare( ReleaseConfiguration releaseConfiguration, boolean resume, boolean dryRun )
         throws ReleaseExecutionException, ReleaseFailureException
     {
         ReleaseConfiguration config;

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java Tue May  2 14:33:36 2006
@@ -82,27 +82,27 @@
      */
     private boolean addSchema;
 
+    /**
+     * Goals to run as part of the preparation step, after transformation but before committing.
+     * Space delimited.
+     *
+     * @parameter expression="${preparationGoals}" default-value="clean integration-test"
+     */
+    private String preparationGoals;
+
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
-        if ( dryRun )
-        {
-            getLog().info( "\n*****\n" + "Warning, release:perform is run in TEST MODE.\n" +
-                "Nothing will be committed or tagged in the repository, but you pom files will be updated!\n" +
-                "*****" );
-        }
-
         ReleaseConfiguration config = createReleaseConfiguration();
         config.setAddSchema( addSchema );
         config.setGenerateReleasePoms( generateReleasePoms );
         config.setReactorProjects( reactorProjects );
         config.setUseEditMode( useEditMode );
-        // TODO [!]: prep goals not configurable
-        // TODO [!]: resume not configured
+        config.setPreparationGoals( preparationGoals );
 
         try
         {
-            releaseManager.prepare( config );
+            releaseManager.prepare( config, resume, dryRun );
         }
         catch ( ReleaseExecutionException e )
         {

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseManager.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseManager.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseManager.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseManager.java Tue May  2 14:33:36 2006
@@ -43,6 +43,18 @@
         throws ReleaseExecutionException, ReleaseFailureException;
 
     /**
+     * Prepare a release.
+     *
+     * @param releaseConfiguration the configuration to pass to the preparation steps
+     * @param resume               resume a previous release, if the properties file exists
+     * @param dryRun               do not commit any changes to the file system or SCM
+     * @throws ReleaseExecutionException if there is a problem performing the release
+     * @throws ReleaseFailureException   if there is a problem performing the release
+     */
+    void prepare( ReleaseConfiguration releaseConfiguration, boolean resume, boolean dryRun )
+        throws ReleaseExecutionException, ReleaseFailureException;
+
+    /**
      * Perform a release.
      *
      * @param releaseConfiguration the configuration to use for release

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStore.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStore.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStore.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStore.java Tue May  2 14:33:36 2006
@@ -88,6 +88,7 @@
         releaseConfiguration.setReleaseLabel( properties.getProperty( "scm.tag" ) );
         releaseConfiguration.setAdditionalArguments( properties.getProperty( "exec.additionalArguments" ) );
         releaseConfiguration.setPomFileName( properties.getProperty( "exec.pomFileName" ) );
+        releaseConfiguration.setPreparationGoals( properties.getProperty( "preparationGoals" ) );
 
         // boolean properties are not written to the properties file because the value from the caller is always used
 
@@ -171,6 +172,10 @@
         if ( config.getPomFileName() != null )
         {
             properties.setProperty( "exec.pomFileName", config.getPomFileName() );
+        }
+        if ( config.getPreparationGoals() != null )
+        {
+            properties.setProperty( "preparationGoals", config.getPreparationGoals() );
         }
 
         // boolean properties are not written to the properties file because the value from the caller is always used

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/ReleaseConfiguration.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/ReleaseConfiguration.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/ReleaseConfiguration.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/config/ReleaseConfiguration.java Tue May  2 14:33:36 2006
@@ -143,6 +143,21 @@
      */
     private String pomFileName;
 
+    /**
+     * The goals to execute in preparation for the release.
+     */
+    private String preparationGoals;
+
+    public String getPreparationGoals()
+    {
+        return preparationGoals;
+    }
+
+    public void setPreparationGoals( String preparationGoals )
+    {
+        this.preparationGoals = preparationGoals;
+    }
+
     public void setPomFileName( String pomFileName )
     {
         this.pomFileName = pomFileName;
@@ -347,6 +362,7 @@
         this.privateKey = mergeOverride( this.privateKey, mergeConfiguration.privateKey );
         this.passphrase = mergeOverride( this.passphrase, mergeConfiguration.passphrase );
         this.additionalArguments = mergeOverride( this.additionalArguments, mergeConfiguration.additionalArguments );
+        this.preparationGoals = mergeOverride( this.preparationGoals, mergeConfiguration.preparationGoals );
         this.pomFileName = mergeOverride( this.pomFileName, mergeConfiguration.pomFileName );
         this.useEditMode = mergeConfiguration.useEditMode;
         this.addSchema = mergeConfiguration.addSchema;
@@ -436,6 +452,11 @@
         {
             return false;
         }
+        if ( preparationGoals != null ? !preparationGoals.equals( that.preparationGoals )
+            : that.preparationGoals != null )
+        {
+            return false;
+        }
         if ( pomFileName != null ? !pomFileName.equals( that.pomFileName ) : that.pomFileName != null )
         {
             return false;
@@ -539,6 +560,7 @@
         result = 29 * result + ( settings != null ? settings.hashCode() : 0 );
         result = 29 * result + ( releaseLabel != null ? releaseLabel.hashCode() : 0 );
         result = 29 * result + ( additionalArguments != null ? additionalArguments.hashCode() : 0 );
+        result = 29 * result + ( preparationGoals != null ? preparationGoals.hashCode() : 0 );
         result = 29 * result + ( pomFileName != null ? pomFileName.hashCode() : 0 );
         result = 29 * result + ( tagBase != null ? tagBase.hashCode() : 0 );
         result = 29 * result + ( username != null ? username.hashCode() : 0 );

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/exec/ForkedMavenExecutor.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/exec/ForkedMavenExecutor.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/exec/ForkedMavenExecutor.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/exec/ForkedMavenExecutor.java Tue May  2 14:33:36 2006
@@ -80,28 +80,6 @@
             cl.createArgument().setLine( additionalArguments );
         }
 
-        /* TODO [!]
-        List profiles = project.getActiveProfiles();
-
-        if ( profiles != null && !profiles.isEmpty() )
-        {
-            StringBuffer buffer = new StringBuffer();
-
-            buffer.append( "-P " );
-
-            for ( Iterator it = profiles.iterator(); it.hasNext(); )
-            {
-                Profile profile = (Profile) it.next();
-
-                buffer.append( profile.getId() ).append( "," );
-            }
-
-            buffer.setLength( buffer.length() - 1 );
-
-            cl.createArgument().setLine( buffer.toString() );
-        }
-*/
-
         StreamConsumer stdOut = new TeeConsumer( System.out );
 
         StreamConsumer stdErr = new TeeConsumer( System.err );

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RunGoalsPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RunGoalsPhase.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RunGoalsPhase.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RunGoalsPhase.java Tue May  2 14:33:36 2006
@@ -37,20 +37,15 @@
      */
     private MavenExecutor mavenExecutor;
 
-    /**
-     * The goals to run.
-     */
-    private String goals;
-
     public void execute( ReleaseConfiguration releaseConfiguration )
         throws ReleaseExecutionException
     {
         try
         {
+            String goals = releaseConfiguration.getPreparationGoals();
             if ( !StringUtils.isEmpty( goals ) )
             {
-                // TODO [!]: fix logging
-                getLogger().info( "Executing goals '" + goals + "'..." );
+                getLogger().info( "Executing preparation goals '" + goals + "'..." );
 
                 mavenExecutor.executeGoals( releaseConfiguration.getWorkingDirectory(), goals,
                                             releaseConfiguration.isInteractive() );
@@ -65,9 +60,8 @@
     public void simulate( ReleaseConfiguration releaseConfiguration )
         throws ReleaseExecutionException
     {
-        // TODO [!]: fix logging
         getLogger().info(
-            "Executing tests - since this is simulation mode it is testing the original project, not the rewritten ones" );
+            "Executing preparation goals - since this is simulation mode it is running against the original project, not the rewritten ones" );
 
         execute( releaseConfiguration );
     }

Modified: maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml Tue May  2 14:33:36 2006
@@ -47,7 +47,6 @@
           <phase>check-dependency-snapshots</phase>
           <phase>rewrite-poms-for-release</phase>
           <phase>generate-release-poms</phase>
-          <phase>run-tests</phase>
           <phase>run-preparation-goals</phase>
           <phase>scm-commit-release</phase>
           <phase>scm-tag</phase>
@@ -139,19 +138,6 @@
       <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>
       <role-hint>remove-release-poms</role-hint>
       <implementation>org.apache.maven.plugins.release.phase.RemoveReleasePomsPhase</implementation>
-    </component>
-    <component>
-      <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>
-      <role-hint>run-tests</role-hint>
-      <implementation>org.apache.maven.plugins.release.phase.RunGoalsPhase</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.plugins.release.exec.MavenExecutor</role>
-        </requirement>
-      </requirements>
-      <configuration>
-        <goals>clean integration-test</goals>
-      </configuration>
     </component>
     <component>
       <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/DefaultReleaseManagerTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/DefaultReleaseManagerTest.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/DefaultReleaseManagerTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/DefaultReleaseManagerTest.java Tue May  2 14:33:36 2006
@@ -98,12 +98,12 @@
     public void testPrepareCompletedPhaseNoResume()
         throws Exception
     {
-        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test-no-resume" );
+        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test" );
 
         ReleaseConfiguration releaseConfiguration = configStore.read();
         releaseConfiguration.setCompletedPhase( "step1" );
 
-        releaseManager.prepare( new ReleaseConfiguration() );
+        releaseManager.prepare( new ReleaseConfiguration(), false, false );
 
         Map phases = container.lookupMap( ReleasePhase.ROLE );
 
@@ -167,12 +167,12 @@
     public void testPrepareSimulateNoCompletedPhase()
         throws Exception
     {
-        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test-dryRun" );
+        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test" );
 
         ReleaseConfiguration releaseConfiguration = configStore.read();
         releaseConfiguration.setCompletedPhase( null );
 
-        releaseManager.prepare( new ReleaseConfiguration() );
+        releaseManager.prepare( new ReleaseConfiguration(), true, true );
 
         Map phases = container.lookupMap( ReleasePhase.ROLE );
 
@@ -190,12 +190,12 @@
     public void testPrepareSimulateCompletedPhase()
         throws Exception
     {
-        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test-dryRun" );
+        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test" );
 
         ReleaseConfiguration releaseConfiguration = configStore.read();
         releaseConfiguration.setCompletedPhase( "step1" );
 
-        releaseManager.prepare( new ReleaseConfiguration() );
+        releaseManager.prepare( new ReleaseConfiguration(), true, true );
 
         Map phases = container.lookupMap( ReleasePhase.ROLE );
 
@@ -213,12 +213,12 @@
     public void testPrepareSimulateCompletedAllPhases()
         throws Exception
     {
-        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test-dryRun" );
+        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test" );
 
         ReleaseConfiguration releaseConfiguration = configStore.read();
         releaseConfiguration.setCompletedPhase( "step3" );
 
-        releaseManager.prepare( new ReleaseConfiguration() );
+        releaseManager.prepare( new ReleaseConfiguration(), true, true );
 
         Map phases = container.lookupMap( ReleasePhase.ROLE );
 
@@ -236,12 +236,12 @@
     public void testPrepareSimulateInvalidCompletedPhase()
         throws Exception
     {
-        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test-dryRun" );
+        ReleaseManager releaseManager = (ReleaseManager) lookup( ReleaseManager.ROLE, "test" );
 
         ReleaseConfiguration releaseConfiguration = configStore.read();
         releaseConfiguration.setCompletedPhase( "foo" );
 
-        releaseManager.prepare( new ReleaseConfiguration() );
+        releaseManager.prepare( new ReleaseConfiguration(), true, true );
 
         Map phases = container.lookupMap( ReleasePhase.ROLE );
 

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStoreTest.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStoreTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/config/PropertiesReleaseConfigurationStoreTest.java Tue May  2 14:33:36 2006
@@ -56,6 +56,8 @@
         assertEquals( "Expected tag 'tag'", "tag", config.getReleaseLabel() );
         assertEquals( "Expected additional arguments 'additional-arguments'", "additional-arguments",
                       config.getAdditionalArguments() );
+        assertEquals( "Expected preparation goals 'preparation-goals'", "preparation-goals",
+                      config.getPreparationGoals() );
         assertEquals( "Expected POM file name 'my-pom.xml'", "pom-file-name", config.getPomFileName() );
         assertNull( "Expected no workingDirectory", config.getWorkingDirectory() );
         assertNull( "Expected no settings", config.getSettings() );
@@ -204,6 +206,7 @@
         config.setTagBase( "tag-base-write" );
         config.setReleaseLabel( "tag-write" );
         config.setAdditionalArguments( "additional-args-write" );
+        config.setPreparationGoals( "preparation-goals-write" );
         config.setPomFileName( "pom-file-name-write" );
 
         config.mapReleaseVersion( "groupId:artifactId", "1.0" );
@@ -235,6 +238,7 @@
         assertNull( "Expected no tagBase", config.getTagBase() );
         assertNull( "Expected no tag", config.getReleaseLabel() );
         assertNull( "Expected no additional arguments", config.getAdditionalArguments() );
+        assertNull( "Expected no preparation goals", config.getPreparationGoals() );
         assertNull( "Expected no pom file name", config.getPomFileName() );
 
         assertNull( "Expected no workingDirectory", config.getWorkingDirectory() );

Modified: 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=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/AbstractRewritingReleasePhaseTestCase.java Tue May  2 14:33:36 2006
@@ -17,6 +17,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.scm.DefaultScmRepositoryConfigurator;
 import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
@@ -83,9 +84,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -156,9 +157,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -193,9 +194,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -220,9 +221,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -257,9 +258,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -284,9 +285,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -322,9 +323,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -461,9 +462,9 @@
 
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 

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=399055&r1=399054&r2=399055&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 Tue May  2 14:33:36 2006
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.plugins.release.ReleaseExecutionException;
+import org.apache.maven.plugins.release.ReleaseFailureException;
 import org.apache.maven.plugins.release.config.ReleaseConfiguration;
 
 /**
@@ -64,7 +64,8 @@
     public void testSnapshotDependenciesInProjectOnlyMismatchedVersion()
         throws Exception
     {
-        ReleaseConfiguration releaseConfiguration = createConfigurationFromProjects( "internal-differing-snapshot-dependencies" );
+        ReleaseConfiguration releaseConfiguration =
+            createConfigurationFromProjects( "internal-differing-snapshot-dependencies" );
 
         try
         {
@@ -72,9 +73,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -83,9 +84,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -143,9 +144,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -154,9 +155,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -171,9 +172,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -182,9 +183,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -200,9 +201,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -211,9 +212,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -256,9 +257,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -267,9 +268,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -285,9 +286,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -296,9 +297,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -382,9 +383,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -393,9 +394,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -410,9 +411,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -421,9 +422,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -439,9 +440,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -450,9 +451,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -467,9 +468,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -478,9 +479,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -508,9 +509,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -519,9 +520,9 @@
 
             fail( "Should have failed execution" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckPomPhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckPomPhaseTest.java?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckPomPhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/CheckPomPhaseTest.java Tue May  2 14:33:36 2006
@@ -17,7 +17,7 @@
  */
 
 import org.apache.maven.model.Model;
-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.project.MavenProject;
 import org.codehaus.plexus.PlexusTestCase;
@@ -69,19 +69,20 @@
 
             fail( "Should have failed to execute" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
+
         try
         {
             phase.simulate( releaseConfiguration );
 
             fail( "Should have failed to simulate" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -98,19 +99,20 @@
 
             fail( "Should have failed to execute" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
+
         try
         {
             phase.simulate( releaseConfiguration );
 
             fail( "Should have failed to simulate" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 

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=399055&r1=399054&r2=399055&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 May  2 14:33:36 2006
@@ -117,46 +117,4 @@
     {
         // nothing to do
     }
-
-    /**
-     * Test for writePom with special characters in the pom
-     * Currently breaking under Linux Continuum box
-     *
-     * @throws Exception
-     */
-//    public void testWritePom()
-//        throws Exception
-//    {
-//        System.out.println( Charset.defaultCharset().name() );
-//        System.out.println( System.getProperty("file.encoding") );
-//
-//        Model model = new Model();
-//        Contributor contributor = new Contributor();
-//        /* hack to avoid problems with sources encoding, this string contains accentuated "aeiou" in UTF-8 */
-//        String s = new String( new byte[] { -61, -95, -61, -87, -61, -83, -61, -77, -61, -70 }, "UTF-8" );
-//
-//        contributor.setName( s );
-//        model.addContributor( contributor );
-//        File file = new File( mojo.basedir, "testWritePom.xml" );
-//
-//        scmHelperMock.expects( new MethodNameMatcher( new IsAnything() ) );
-//        scmHelperMock.expects( new MethodNameMatcher( "getScmManager" ) ).will( new ReturnStub( scmManager ) );
-//
-//        mojo.writePom( file, model, "version" );
-//
-//        MavenXpp3Reader pomReader = new MavenXpp3Reader();
-//
-//        Model readModel = pomReader.read( new BufferedReader( new FileReader( file ) ) );
-//        Contributor readContributor = (Contributor) readModel.getContributors().get( 0 );
-//
-//        String msg = "POM is written in a wrong encoding: \n"
-//            + "Expected bytes: " + Arrays.toString( contributor.getName().getBytes() ) + "\n"
-//            + "Returned bytes: " + Arrays.toString( readContributor.getName().getBytes() ) + "\n"
-//            + "JVM default charset: " + Charset.defaultCharset() + "\n"
-//            + "System property file.encoding: " + System.getProperty("file.encoding") + "\n";
-//        assertEquals( msg, contributor.getName(), readContributor.getName() );
-//
-//        scmHelperMock.verify();
-//    }
-// TODO [!]
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RunGoalsPhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RunGoalsPhaseTest.java?rev=399055&r1=399054&r2=399055&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 May  2 14:33:36 2006
@@ -45,7 +45,7 @@
     {
         super.setUp();
 
-        phase = (RunGoalsPhase) lookup( ReleasePhase.ROLE, "run-tests" );
+        phase = (RunGoalsPhase) lookup( ReleasePhase.ROLE, "run-preparation-goals" );
     }
 
     public void testExecute()
@@ -95,6 +95,7 @@
         File testFile = getTestFile( "target/working-directory" );
 
         ReleaseConfiguration config = new ReleaseConfiguration();
+        config.setPreparationGoals( "clean integration-test" );
         config.setWorkingDirectory( testFile );
 
         Mock mock = new Mock( MavenExecutor.class );
@@ -122,6 +123,7 @@
         File testFile = getTestFile( "target/working-directory" );
 
         ReleaseConfiguration config = new ReleaseConfiguration();
+        config.setPreparationGoals( "clean integration-test" );
         config.setWorkingDirectory( testFile );
 
         Mock mock = new Mock( MavenExecutor.class );
@@ -144,12 +146,9 @@
         }
     }
 
-    public void testPreparationGoals()
+    public void testEmptyGoals()
         throws Exception
     {
-        // this has no goals by default
-        phase = (RunGoalsPhase) lookup( ReleasePhase.ROLE, "run-preparation-goals" );
-
         File testFile = getTestFile( "target/working-directory" );
 
         ReleaseConfiguration config = new ReleaseConfiguration();

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhaseTest.java?rev=399055&r1=399054&r2=399055&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 May  2 14:33:36 2006
@@ -17,6 +17,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.scm.DefaultScmRepositoryConfigurator;
 import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
@@ -254,10 +255,9 @@
 
             fail( "Status check should have failed" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            // verify no cause as an extra check that it is the right exception
-            assertNull( "check no cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -266,10 +266,9 @@
 
             fail( "Status check should have failed" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            // verify no cause as an extra check that it is the right exception
-            assertNull( "check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -287,10 +286,9 @@
 
             fail( "Status check should have failed" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            // verify no cause as an extra check that it is the right exception
-            assertNull( "check no cause", e.getCause() );
+            assertTrue( true );
         }
 
         try
@@ -299,10 +297,9 @@
 
             fail( "Status check should have failed" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            // verify no cause as an extra check that it is the right exception
-            assertNull( "check no cause", e.getCause() );
+            assertTrue( true );
         }
     }
 

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCommitPhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmCommitPhaseTest.java?rev=399055&r1=399054&r2=399055&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 May  2 14:33:36 2006
@@ -17,6 +17,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.scm.DefaultScmRepositoryConfigurator;
 import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
@@ -162,9 +163,9 @@
             phase.execute( config );
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -198,9 +199,9 @@
             phase.simulate( config );
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmTagPhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/ScmTagPhaseTest.java?rev=399055&r1=399054&r2=399055&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 May  2 14:33:36 2006
@@ -17,6 +17,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.scm.DefaultScmRepositoryConfigurator;
 import org.apache.maven.plugins.release.scm.ReleaseScmCommandException;
@@ -119,9 +120,9 @@
             phase.execute( config );
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 
@@ -155,9 +156,9 @@
             phase.simulate( config );
             fail( "Should have thrown an exception" );
         }
-        catch ( ReleaseExecutionException e )
+        catch ( ReleaseFailureException e )
         {
-            assertNull( "Check no other cause", e.getCause() );
+            assertTrue( true );
         }
     }
 

Modified: maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/DefaultReleaseManagerTest.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/DefaultReleaseManagerTest.xml?rev=399055&r1=399054&r2=399055&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 May  2 14:33:36 2006
@@ -41,54 +41,6 @@
     </component>
     <component>
       <role>org.apache.maven.plugins.release.ReleaseManager</role>
-      <role-hint>test-dryRun</role-hint>
-      <implementation>org.apache.maven.plugins.release.DefaultReleaseManager</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>
-          <field-name>releasePhases</field-name>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.plugins.release.config.ReleaseConfigurationStore</role>
-          <role-hint>stub</role-hint>
-          <field-name>configStore</field-name>
-        </requirement>
-      </requirements>
-      <configuration>
-        <phases>
-          <phase>step1</phase>
-          <phase>step2</phase>
-          <phase>step3</phase>
-        </phases>
-        <dryRun>true</dryRun>
-      </configuration>
-    </component>
-    <component>
-      <role>org.apache.maven.plugins.release.ReleaseManager</role>
-      <role-hint>test-no-resume</role-hint>
-      <implementation>org.apache.maven.plugins.release.DefaultReleaseManager</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>
-          <field-name>releasePhases</field-name>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.plugins.release.config.ReleaseConfigurationStore</role>
-          <role-hint>stub</role-hint>
-          <field-name>configStore</field-name>
-        </requirement>
-      </requirements>
-      <configuration>
-        <phases>
-          <phase>step1</phase>
-          <phase>step2</phase>
-          <phase>step3</phase>
-        </phases>
-        <resume>false</resume>
-      </configuration>
-    </component>
-    <component>
-      <role>org.apache.maven.plugins.release.ReleaseManager</role>
       <role-hint>bad-phase-configured</role-hint>
       <implementation>org.apache.maven.plugins.release.DefaultReleaseManager</implementation>
       <requirements>

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/exec/ForkedMavenExecutorTest.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/exec/ForkedMavenExecutorTest.xml?rev=399055&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/exec/ForkedMavenExecutorTest.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/org/apache/maven/plugins/release/exec/ForkedMavenExecutorTest.xml Tue May  2 14:33:36 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/exec/ForkedMavenExecutorTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Modified: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-parent/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-parent/pom.xml?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-parent/pom.xml (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-parent/pom.xml Tue May  2 14:33:36 2006
@@ -19,4 +19,5 @@
   <groupId>groupId</groupId>
   <artifactId>parent-external</artifactId>
   <version>1.0</version>
+  <packaging>pom</packaging>
 </project>

Modified: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-snapshot-parent/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-snapshot-parent/pom.xml?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-snapshot-parent/pom.xml (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/check-dependencies/external-snapshot-parent/pom.xml Tue May  2 14:33:36 2006
@@ -19,4 +19,5 @@
   <groupId>groupId</groupId>
   <artifactId>parent-external</artifactId>
   <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
 </project>

Modified: maven/plugins/trunk/maven-release-plugin/src/test/resources/release.properties
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/release.properties?rev=399055&r1=399054&r2=399055&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/release.properties (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/release.properties Tue May  2 14:33:36 2006
@@ -26,6 +26,8 @@
 exec.additionalArguments=additional-arguments
 exec.pomFileName=pom-file-name
 
+preparationGoals=preparation-goals
+
 project.rel.groupId\:artifactId1=2.0
 project.rel.groupId\:artifactId2=3.0
 project.dev.groupId\:artifactId1=2.1-SNAPSHOT



Mime
View raw message