maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r398963 - in /maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release: ./ phase/ scm/
Date Tue, 02 May 2006 15:30:50 GMT
Author: brett
Date: Tue May  2 08:29:16 2006
New Revision: 398963

URL: http://svn.apache.org/viewcvs?rev=398963&view=rev
Log:
[MRELEASE-98] split exception into failure and exception

Added:
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseFailureException.java
  (with props)
Modified:
    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/PerformReleaseMojo.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/phase/AbstractRewritePomsPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckPomPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ReleasePhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCommitPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmTagPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmCommandException.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmRepositoryException.java

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=398963&r1=398962&r2=398963&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 08:29:16 2006
@@ -85,7 +85,7 @@
     private MavenExecutor mavenExecutor;
 
     public void prepare( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         ReleaseConfiguration config;
         if ( resume )
@@ -145,7 +145,7 @@
     }
 
     public void perform( ReleaseConfiguration releaseConfiguration, File checkoutDirectory,
String goals )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         getLogger().info( "Checking out the project to perform the release ..." );
 

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java
Tue May  2 08:29:16 2006
@@ -17,6 +17,7 @@
  */
 
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.release.config.ReleaseConfiguration;
 
 import java.io.File;
@@ -56,7 +57,7 @@
     private String scmUrl;
 
     public void execute()
-        throws MojoExecutionException
+        throws MojoExecutionException, MojoFailureException
     {
         try
         {
@@ -67,12 +68,15 @@
                 releaseConfiguration.setUrl( scmUrl );
             }
 
-            // TODO [!]: differentiate failures from exceptions
             releaseManager.perform( releaseConfiguration, workingDirectory, goals );
         }
         catch ( ReleaseExecutionException e )
         {
             throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ReleaseFailureException e )
+        {
+            throw new MojoFailureException( e.getMessage() );
         }
     }
 

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=398963&r1=398962&r2=398963&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 08:29:16 2006
@@ -76,11 +76,6 @@
     private boolean dryRun;
 
     /**
-     * @component
-     */
-    private ReleaseManager releaseManager;
-
-    /**
      * Whether to add a schema to the POM if it was previously missing on release.
      *
      * @parameter expression="${addSchema}" default-value="true"
@@ -92,10 +87,9 @@
     {
         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" +
-                    "*****" );
+            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();
@@ -108,12 +102,15 @@
 
         try
         {
-            // TODO [!]: differentiate failures from exceptions
             releaseManager.prepare( config );
         }
         catch ( ReleaseExecutionException e )
         {
             throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ReleaseFailureException e )
+        {
+            throw new MojoFailureException( e.getMessage() );
         }
     }
 

Added: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseFailureException.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseFailureException.java?rev=398963&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseFailureException.java
(added)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseFailureException.java
Tue May  2 08:29:16 2006
@@ -0,0 +1,31 @@
+package org.apache.maven.plugins.release;
+
+/*
+ * 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.
+ */
+
+/**
+ * A failure during the release process.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public class ReleaseFailureException
+    extends Exception
+{
+    public ReleaseFailureException( String message )
+    {
+        super( message );
+    }
+}

Propchange: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/ReleaseFailureException.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

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=398963&r1=398962&r2=398963&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 08:29:16 2006
@@ -35,10 +35,12 @@
     /**
      * Prepare a release.
      *
-     * @param releaseConfiguration
+     * @param releaseConfiguration the configuration to pass to the preparation steps
+     * @throws ReleaseExecutionException if there is a problem performing the release
+     * @throws ReleaseFailureException   if there is a problem performing the release
      */
     void prepare( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException;
+        throws ReleaseExecutionException, ReleaseFailureException;
 
     /**
      * Perform a release.
@@ -47,9 +49,10 @@
      * @param checkoutDirectory    the location to checkout to and build from
      * @param goals                the goals to execute
      * @throws ReleaseExecutionException if there is a problem performing the release
+     * @throws ReleaseFailureException   if there is a problem performing the release
      */
     void perform( ReleaseConfiguration releaseConfiguration, File checkoutDirectory, String
goals )
-        throws ReleaseExecutionException;
+        throws ReleaseExecutionException, ReleaseFailureException;
 
     /**
      * Clean a release.

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java
Tue May  2 08:29:16 2006
@@ -22,6 +22,7 @@
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.ReportPlugin;
 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.ReleaseScmCommandException;
 import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
@@ -83,13 +84,13 @@
     private String pomSuffix;
 
     public void execute( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         transform( releaseConfiguration, false );
     }
 
     private void transform( ReleaseConfiguration releaseConfiguration, boolean simulate )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         for ( Iterator it = releaseConfiguration.getReactorProjects().iterator(); it.hasNext();
)
         {
@@ -102,7 +103,7 @@
     }
 
     private void transformProject( MavenProject project, ReleaseConfiguration releaseConfiguration,
boolean simulate )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         Document document;
         String intro = null;
@@ -171,7 +172,7 @@
 
     private void transformDocument( MavenProject project, Element rootElement,
                                     ReleaseConfiguration releaseConfiguration, ScmRepository
scmRepository )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         Namespace namespace = rootElement.getNamespace();
         Map mappedVersions = getNextVersionMap( releaseConfiguration );
@@ -228,13 +229,13 @@
 
     private void rewriteVersion( Element rootElement, Namespace namespace, Map mappedVersions,
String projectId,
                                  MavenProject project, String parentVersion )
-        throws ReleaseExecutionException
+        throws ReleaseFailureException
     {
         Element versionElement = rootElement.getChild( "version", namespace );
         String version = (String) mappedVersions.get( projectId );
         if ( version == null )
         {
-            throw new ReleaseExecutionException( "Version for '" + project.getName() + "'
was not mapped" );
+            throw new ReleaseFailureException( "Version for '" + project.getName() + "' was
not mapped" );
         }
         else
         {
@@ -262,7 +263,7 @@
 
     private String rewriteParent( MavenProject project, Element rootElement, Namespace namespace,
Map mappedVersions,
                                   Map originalVersions )
-        throws ReleaseExecutionException
+        throws ReleaseFailureException
     {
         String parentVersion = null;
         if ( project.hasParent() )
@@ -276,8 +277,7 @@
             {
                 if ( parent.getVersion().equals( originalVersions.get( key ) ) )
                 {
-                    throw new ReleaseExecutionException(
-                        "Version for parent '" + parent.getName() + "' was not mapped" );
+                    throw new ReleaseFailureException( "Version for parent '" + parent.getName()
+ "' was not mapped" );
                 }
             }
             else
@@ -290,7 +290,7 @@
 
     private void rewriteDependencies( List dependencies, Element dependencyRoot, Map mappedVersions,
                                       Map originalVersions )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         if ( dependencies != null )
         {
@@ -305,7 +305,7 @@
     }
 
     private void rewritePlugins( List plugins, Element pluginRoot, Map mappedVersions, Map
originalVersions )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         if ( plugins != null )
         {
@@ -324,7 +324,7 @@
     }
 
     private void rewriteExtensions( List extensions, Element extensionRoot, Map mappedVersions,
Map originalVersions )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         if ( extensions != null )
         {
@@ -339,7 +339,7 @@
     }
 
     private void rewriteReportPlugins( List plugins, Element pluginRoot, Map mappedVersions,
Map originalVersions )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         if ( plugins != null )
         {
@@ -359,7 +359,7 @@
 
     private void updateDomVersion( String groupId, String artifactId, Map mappedVersions,
String version,
                                    Map originalVersions, String groupTagName, String tagName,
Element dependencyRoot )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         String key = ArtifactUtils.versionlessKey( groupId, artifactId );
         String mappedVersion = (String) mappedVersions.get( key );
@@ -391,7 +391,7 @@
             }
             else
             {
-                throw new ReleaseExecutionException(
+                throw new ReleaseFailureException(
                     "Version '" + version + "' for " + tagName + " '" + key + "' was not
mapped" );
             }
         }
@@ -400,7 +400,7 @@
     private void writePom( File pomFile, Document document, ReleaseConfiguration releaseConfiguration,
                            String modelVersion, String intro, String outtro, ScmRepository
repository,
                            ScmProvider provider )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseScmCommandException
     {
         try
         {
@@ -484,7 +484,7 @@
     }
 
     public void simulate( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         transform( releaseConfiguration, true );
     }

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhase.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckDependencySnapshotsPhase.java
Tue May  2 08:29:16 2006
@@ -19,6 +19,7 @@
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 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.logging.AbstractLogEnabled;
@@ -43,7 +44,7 @@
     implements ReleasePhase
 {
     public void execute( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         getLogger().info( "Checking dependencies and plugins for snapshots ..." );
 
@@ -59,7 +60,7 @@
     }
 
     private void checkProject( MavenProject project, Map originalVersions )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         Set snapshotDependencies = new HashSet();
 
@@ -130,8 +131,7 @@
                 message.append( "\n" );
             }
 
-            throw new ReleaseExecutionException(
-                "Can't release project due to non released dependencies :\n" + message );
+            throw new ReleaseFailureException( "Can't release project due to non released
dependencies :\n" + message );
         }
     }
 
@@ -146,7 +146,7 @@
     }
 
     public void simulate( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         // It makes no modifications, so simulate is the same as execute
         execute( releaseConfiguration );

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckPomPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckPomPhase.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckPomPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/CheckPomPhase.java
Tue May  2 08:29:16 2006
@@ -18,6 +18,7 @@
 
 import org.apache.maven.artifact.ArtifactUtils;
 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.util.StringUtils;
@@ -34,7 +35,7 @@
     implements ReleasePhase
 {
     public void execute( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         // Currently, we don't deal with multiple SCM locations in a multiproject
         if ( StringUtils.isEmpty( releaseConfiguration.getUrl() ) )
@@ -54,7 +55,7 @@
 
             if ( StringUtils.isEmpty( releaseConfiguration.getUrl() ) )
             {
-                throw new ReleaseExecutionException(
+                throw new ReleaseFailureException(
                     "Missing required setting: scm connection or developerConnection must
be specified." );
             }
         }
@@ -68,14 +69,14 @@
 
             if ( !ArtifactUtils.isSnapshot( project.getVersion() ) )
             {
-                throw new ReleaseExecutionException(
+                throw new ReleaseFailureException(
                     "The project " + projectId + " isn't a snapshot (" + project.getVersion()
+ ")." );
             }
         }
     }
 
     public void simulate( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         // It makes no modifications, so simulate is the same as execute
         execute( releaseConfiguration );

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ReleasePhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ReleasePhase.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ReleasePhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ReleasePhase.java
Tue May  2 08:29:16 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;
 
 /**
@@ -36,16 +37,18 @@
      *
      * @param releaseConfiguration the configuration to use
      * @throws ReleaseExecutionException an exception during the execution of the phase
+     * @throws ReleaseFailureException   a failure during the execution of the phase
      */
     void execute( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException;
+        throws ReleaseExecutionException, ReleaseFailureException;
 
     /**
      * Simulate the phase, but don't make any changes to the project.
      *
      * @param releaseConfiguration the configuration to use
      * @throws ReleaseExecutionException an exception during the execution of the phase
+     * @throws ReleaseFailureException   a failure during the execution of the phase
      */
     void simulate( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException;
+        throws ReleaseExecutionException, ReleaseFailureException;
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhase.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCheckModificationsPhase.java
Tue May  2 08:29:16 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.ReleaseScmCommandException;
 import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
@@ -60,7 +61,7 @@
         new String[]{"pom.xml", "pom.xml.backup", "pom.xml.tag", "pom.xml.next", "release.properties"}
) );
 
     public void execute( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         getLogger().info( "Verifying that there are no local modifications..." );
 
@@ -126,13 +127,13 @@
                 message.append( "\n" );
             }
 
-            throw new ReleaseExecutionException(
+            throw new ReleaseFailureException(
                 "Cannot prepare the release because you have local modifications : \n" +
message );
         }
     }
 
     public void simulate( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         // It makes no modifications, so simulate is the same as execute
         execute( releaseConfiguration );

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCommitPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCommitPhase.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCommitPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmCommitPhase.java
Tue May  2 08:29:16 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.ReleaseScmCommandException;
 import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
@@ -58,7 +59,7 @@
     private String messageFormat;
 
     public void execute( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         validateConfiguration( releaseConfiguration );
 
@@ -101,7 +102,7 @@
     }
 
     public void simulate( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         validateConfiguration( releaseConfiguration );
 
@@ -111,11 +112,11 @@
     }
 
     private static void validateConfiguration( ReleaseConfiguration releaseConfiguration
)
-        throws ReleaseExecutionException
+        throws ReleaseFailureException
     {
         if ( releaseConfiguration.getReleaseLabel() == null )
         {
-            throw new ReleaseExecutionException( "A release label is required for committing"
);
+            throw new ReleaseFailureException( "A release label is required for committing"
);
         }
     }
 

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmTagPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmTagPhase.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmTagPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/ScmTagPhase.java
Tue May  2 08:29:16 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.ReleaseScmCommandException;
 import org.apache.maven.plugins.release.scm.ReleaseScmRepositoryException;
@@ -45,7 +46,7 @@
     private ScmRepositoryConfigurator scmRepositoryConfigurator;
 
     public void execute( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         validateConfiguration( releaseConfiguration );
 
@@ -87,7 +88,7 @@
     }
 
     public void simulate( ReleaseConfiguration releaseConfiguration )
-        throws ReleaseExecutionException
+        throws ReleaseExecutionException, ReleaseFailureException
     {
         validateConfiguration( releaseConfiguration );
 
@@ -96,11 +97,11 @@
     }
 
     private static void validateConfiguration( ReleaseConfiguration releaseConfiguration
)
-        throws ReleaseExecutionException
+        throws ReleaseFailureException
     {
         if ( releaseConfiguration.getReleaseLabel() == null )
         {
-            throw new ReleaseExecutionException( "A release label is required for committing"
);
+            throw new ReleaseFailureException( "A release label is required for committing"
);
         }
     }
 }

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmCommandException.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmCommandException.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmCommandException.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmCommandException.java
Tue May  2 08:29:16 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.scm.ScmResult;
 
 /**
@@ -25,7 +25,7 @@
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  */
 public class ReleaseScmCommandException
-    extends ReleaseExecutionException
+    extends ReleaseFailureException
 {
     public ReleaseScmCommandException( String message, ScmResult result )
     {

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmRepositoryException.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmRepositoryException.java?rev=398963&r1=398962&r2=398963&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmRepositoryException.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/scm/ReleaseScmRepositoryException.java
Tue May  2 08:29:16 2006
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.plugins.release.ReleaseExecutionException;
+import org.apache.maven.plugins.release.ReleaseFailureException;
 
 import java.util.Iterator;
 import java.util.List;
@@ -27,7 +27,7 @@
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  */
 public class ReleaseScmRepositoryException
-    extends ReleaseExecutionException
+    extends ReleaseFailureException
 {
     public ReleaseScmRepositoryException( String message, List validationMessages )
     {



Mime
View raw message