You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/10/10 10:51:16 UTC

svn commit: r1396515 - /maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java

Author: olamy
Date: Wed Oct 10 08:51:15 2012
New Revision: 1396515

URL: http://svn.apache.org/viewvc?rev=1396515&view=rev
Log:
parameters are set tru cli so need to ask with interactive mode

Modified:
    maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java

Modified: maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java?rev=1396515&r1=1396514&r2=1396515&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java (original)
+++ maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java Wed Oct 10 08:51:15 2012
@@ -197,7 +197,7 @@ public abstract class AbstractPatchMojo
         // cli must win !
         if ( StringUtils.isNotEmpty( serverUrl ) )
         {
-            value = serverUrl;
+            return serverUrl;
         }
 
         return getValue( value, "path tracker url ? (http://jira.codehaus.org/browse/MNG)", null, true,
@@ -209,6 +209,11 @@ public abstract class AbstractPatchMojo
     {
         String value = summary;
 
+        if ( StringUtils.isNotEmpty( summary ) )
+        {
+            return summary;
+        }
+
         return getValue( value, "patch summary ? (wonderfull patch to fix ....) ", Collections.<String>emptyList(),
                          true, "you must configure a patch summary or at least use interactive mode", null, false );
     }
@@ -218,6 +223,11 @@ public abstract class AbstractPatchMojo
     {
         String value = description;
 
+        if ( StringUtils.isNotEmpty( description ) )
+        {
+            return description;
+        }
+
         return getValue( value, "patch description ?(this patch fix this very annoying issue ....) ", null, false,
                          "you must configure a patch summary or at least use interactive mode", null, false );
     }
@@ -254,7 +264,7 @@ public abstract class AbstractPatchMojo
         // cli must win !
         if ( StringUtils.isNotEmpty( user ) )
         {
-            value = user;
+            return user;
         }
 
         return getValue( value, "patch tracker username ?", null, true,
@@ -284,7 +294,7 @@ public abstract class AbstractPatchMojo
         // cli must win !
         if ( StringUtils.isNotEmpty( password ) )
         {
-            value = password;
+            return password;
         }
 
         return getValue( value, "patch tracker password ?", null, true,
@@ -300,7 +310,7 @@ public abstract class AbstractPatchMojo
         // cli must win !
         if ( StringUtils.isNotEmpty( issueSystem ) )
         {
-            value = issueSystem;
+            return issueSystem;
         }
 
         try
@@ -323,7 +333,7 @@ public abstract class AbstractPatchMojo
         // cli must win !
         if ( StringUtils.isNotEmpty( patchSystem ) )
         {
-            value = patchSystem;
+            return patchSystem;
         }
 
         try