continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r678936 - in /continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven: MavenOneContinuumProjectBuilder.java MavenTwoContinuumProjectBuilder.java
Date Tue, 22 Jul 2008 22:42:14 GMT
Author: olamy
Date: Tue Jul 22 15:42:14 2008
New Revision: 678936

URL: http://svn.apache.org/viewvc?rev=678936&view=rev
Log:
[CONTINUUM-1828]  Downloaded maven files (pom and project.xml) are not deleted


Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java?rev=678936&r1=678935&r2=678936&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
Tue Jul 22 15:42:14 2008
@@ -125,6 +125,13 @@
 
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );
         }
+        finally
+        {
+            if ( pomFile != null && pomFile.exists() )
+            {
+                pomFile.delete();
+            }
+        }        
 
         ProjectGroup projectGroup = new ProjectGroup();
 

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=678936&r1=678935&r2=678936&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Tue Jul 22 15:42:14 2008
@@ -36,8 +36,10 @@
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.ConnectException;
@@ -137,9 +139,12 @@
 
         MavenProject mavenProject;
 
+        File pomFile = null;
+        
         try
         {
-            mavenProject = builderHelper.getMavenProject( result, createMetadataFile( url,
username, password ) );
+            pomFile = createMetadataFile( url, username, password );
+            mavenProject = builderHelper.getMavenProject( result, pomFile );
 
             if ( result.hasErrors() )
             {
@@ -179,6 +184,13 @@
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );
             return;
         }
+        finally
+        {
+            if ( pomFile != null && pomFile.exists() )
+            {
+                pomFile.delete();
+            }
+        }
         getLogger().debug( "groupPom " + groupPom );
         if ( groupPom )
         {



Mime
View raw message