maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r399119 - /maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
Date Wed, 03 May 2006 03:40:49 GMT
Author: brett
Date: Tue May  2 20:40:47 2006
New Revision: 399119

URL: http://svn.apache.org/viewcvs?rev=399119&view=rev
Log:
[MRELEASE-98] fix bug with string concat

Modified:
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java

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=399119&r1=399118&r2=399119&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 20:40:47 2006
@@ -16,11 +16,12 @@
  * limitations under the License.
  */
 
+import org.apache.maven.model.Profile;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugins.release.config.ReleaseConfiguration;
-import org.apache.maven.profiles.Profile;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.settings.Settings;
+import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 import java.util.Iterator;
@@ -121,7 +122,14 @@
         String arguments = this.arguments;
         if ( profiles != null && !profiles.isEmpty() )
         {
-            arguments += "-P ";
+            if ( !StringUtils.isEmpty( arguments ) )
+            {
+                arguments += " -P ";
+            }
+            else
+            {
+                arguments = "-P ";
+            }
 
             for ( Iterator it = profiles.iterator(); it.hasNext(); )
             {



Mime
View raw message