continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r781879 - /continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
Date Fri, 05 Jun 2009 00:27:39 GMT
Author: ctan
Date: Fri Jun  5 00:27:39 2009
New Revision: 781879

URL: http://svn.apache.org/viewvc?rev=781879&view=rev
Log:
[CONTINUUM-2256] fixed release when local repository has spaces in it

Modified:
    continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java

Modified: continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java?rev=781879&r1=781878&r2=781879&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
Fri Jun  5 00:27:39 2009
@@ -189,29 +189,45 @@
         throws ContinuumReleaseException
     {
         String localRepository = null;
+        boolean found = false;
 
         if ( arguments != null )
         {
             String[] args = arguments.split( " " );
-
+    
             for ( String arg : args )
             {
                 if ( arg.contains( "-Dmaven.repo.local=" ) )
                 {
                     localRepository = arg.substring( arg.indexOf( "=" ) + 1 );
-                    break;
+
+                    if ( localRepository.endsWith( "\"" ) )
+                    {
+                        localRepository = localRepository.substring( 0, localRepository.indexOf(
"\"" ) );
+                        break;
+                    }
+
+                    found = true;
+                    continue;
+                }
+
+                if ( found )
+                {
+                    localRepository += " " + arg;
+                    
+                    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