continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r782334 - /continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
Date Sun, 07 Jun 2009 07:32:00 GMT
Author: ctan
Date: Sun Jun  7 07:32:00 2009
New Revision: 782334

URL: http://svn.apache.org/viewvc?rev=782334&view=rev
Log:
[CONTINUUM-1728] [CONTINUUM-2256] fixed release when local repository has spaces in it
merge -r 781878:781879 from 1.3.x branch

Modified:
    continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java

Modified: continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java?rev=782334&r1=782333&r2=782334&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
(original)
+++ continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
Sun Jun  7 07:32:00 2009
@@ -205,49 +205,45 @@
         throws ContinuumReleaseException
     {
         String localRepository = null;
+        boolean found = false;
 
         if ( arguments != null )
         {
             String[] args = arguments.split( " " );
-
-            boolean shouldContinue = false;
- 
+    
             for ( String arg : args )
             {
                 if ( arg.contains( "-Dmaven.repo.local=" ) )
                 {
                     localRepository = arg.substring( arg.indexOf( "=" ) + 1 );
 
-                    if ( !localRepository.endsWith( "\"" ) )
-                    {
-                        shouldContinue = true;
-                        continue;
-                    }
-                    else
+                    if ( localRepository.endsWith( "\"" ) )
                     {
+                        localRepository = localRepository.substring( 0, localRepository.indexOf(
"\"" ) );
                         break;
                     }
+
+                    found = true;
+                    continue;
                 }
-                else if ( shouldContinue )
+
+                if ( found )
                 {
                     localRepository += " " + arg;
 
-                    if ( arg.endsWith( "\"" ) )
+                    if ( localRepository.endsWith( "\"" ) )
                     {
+                        localRepository = localRepository.substring( 0, localRepository.indexOf(
"\"" ) );
                         break;
                     }
                 }
             }
         }
-
+    
         if ( localRepository == null )
         {
             localRepository = getSettings().getLocalRepository();
         }
-        else if ( localRepository.endsWith( "\"" ) )
-        {
-            localRepository = localRepository.substring( 0, localRepository.indexOf( "\""
) );
-        }
 
         return new DefaultArtifactRepository( "local-repository", "file://" + localRepository,
                                               new DefaultRepositoryLayout() );



Mime
View raw message