You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/06/21 03:02:37 UTC

svn commit: r1495263 - /commons/sandbox/commons-staging-plugin/trunk/src/main/java/org/apache/commons/plugins/staging/AbstractExecMojo.java

Author: sebb
Date: Fri Jun 21 01:02:37 2013
New Revision: 1495263

URL: http://svn.apache.org/r1495263
Log:
Insist that caller provides a commit message

Modified:
    commons/sandbox/commons-staging-plugin/trunk/src/main/java/org/apache/commons/plugins/staging/AbstractExecMojo.java

Modified: commons/sandbox/commons-staging-plugin/trunk/src/main/java/org/apache/commons/plugins/staging/AbstractExecMojo.java
URL: http://svn.apache.org/viewvc/commons/sandbox/commons-staging-plugin/trunk/src/main/java/org/apache/commons/plugins/staging/AbstractExecMojo.java?rev=1495263&r1=1495262&r2=1495263&view=diff
==============================================================================
--- commons/sandbox/commons-staging-plugin/trunk/src/main/java/org/apache/commons/plugins/staging/AbstractExecMojo.java (original)
+++ commons/sandbox/commons-staging-plugin/trunk/src/main/java/org/apache/commons/plugins/staging/AbstractExecMojo.java Fri Jun 21 01:02:37 2013
@@ -44,17 +44,34 @@ public abstract class AbstractExecMojo  
     @Component
     private Settings settings;
 
+    /**
+     * The root URL for svnmucc to use.
+     */
     @Parameter (property="staging.rootUrl", defaultValue="https://dist.apache.org/repos/dist/", required=true)
     private String rootUrl;
-    
+
+    /**
+     * The (optional) server name in settings.xml which can be used to provide SVN login
+     * credentials if these have not been cached by SVN. 
+     */
     @Parameter (property="staging.serverName", required=false)
     private String serverName;
 
+    /**
+     * The commit message to be used.
+     */
+    @Parameter (property="staging.message", required=true)
+    private String message;
+
+    /**
+     * Whether to actually perform the svnmucc operation.
+     * Currently defaults to false.
+     */
     @Parameter (property="staging.performExec", defaultValue="false", required=false)
     private boolean performExec;
 
     /**
-     * Where to find the packages for upload
+     * Where to find the packages for upload.
      */
     @Parameter( defaultValue = "${project.build.directory}/packages", property="staging.packageDirectory", required=true )
     private File packageDirectory;
@@ -77,8 +94,8 @@ public abstract class AbstractExecMojo  
         if (!script.isFile()) {
             throw new MojoExecutionException("Cannot find script file "+script);
         }
-        final String message = (scriptName.equals(CreateScriptMojo.SVMNUCC_RELEASE) ? "Releasing " : "Uploading ");
-        log.info(message + " using " + script.toString());
+        final String type = (scriptName.equals(CreateScriptMojo.SVMNUCC_RELEASE) ? "Releasing" : "Uploading");
+        log.info(type + " using " + script.toString());
         Commandline cmd = new Commandline();
         cmd.setExecutable( "svnmucc" );
         
@@ -117,6 +134,7 @@ public abstract class AbstractExecMojo  
             log.warn("Command execution has been skipped; no action taken");
             return;
         }
+        log.info("About to commit: '" + message + "' to " + rootUrl);
         try
         {
             final InputStream in = null; // svnmucc does not currently accept password from stdin