continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r700273 - in /continuum/branches/continuum-1.2.x/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java resources/xwork.xml
Date Mon, 29 Sep 2008 21:50:56 GMT
Author: olamy
Date: Mon Sep 29 14:50:55 2008
New Revision: 700273

URL: http://svn.apache.org/viewvc?rev=700273&view=rev
Log:
[CONTINUUM-1897]  Error uploading maven 2 pom file
copied the uploaded file to a tmp
add a small sleepdelay interval in the execWaitInterceptor the action must have a small time
to copying the file.


Modified:
    continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
    continuum/branches/continuum-1.2.x/continuum-webapp/src/main/resources/xwork.xml

Modified: continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java?rev=700273&r1=700272&r2=700273&view=diff
==============================================================================
--- continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
(original)
+++ continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
Mon Sep 29 14:50:55 2008
@@ -20,6 +20,7 @@
  */
 
 import java.io.File;
+import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
@@ -138,16 +139,23 @@
             {
                 try
                 {
-                    pom = pomFile.toURL().toString();
+                    //pom = pomFile.toURL().toString();
                     checkProtocol = false;
                     // CONTINUUM-1897
                     // File.c copyFile to tmp one
+                    File tmpPom = File.createTempFile( "continuum_tmp", "tmp" );
+                    FileUtils.copyFile( pomFile, tmpPom );
+                    pom = tmpPom.toURL().toString();
                 }
                 catch ( MalformedURLException e )
                 {
                     // if local file can't be converted to url it's an internal error
                     throw new RuntimeException( e );
                 }
+                catch ( IOException e )
+                {
+                    throw new RuntimeException( e );
+                }
             }
             else
             {

Modified: continuum/branches/continuum-1.2.x/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/continuum-webapp/src/main/resources/xwork.xml?rev=700273&r1=700272&r2=700273&view=diff
==============================================================================
--- continuum/branches/continuum-1.2.x/continuum-webapp/src/main/resources/xwork.xml (original)
+++ continuum/branches/continuum-1.2.x/continuum-webapp/src/main/resources/xwork.xml Mon Sep
29 14:50:55 2008
@@ -178,7 +178,11 @@
     
     <action name="addMavenTwoProject" class="addMavenTwoProject">
       <interceptor-ref name="configuredContinuumStack"/>
-      <interceptor-ref name="execAndWait"/> 
+      <interceptor-ref name="fileUpload"/>
+      <interceptor-ref name="execAndWait">
+        <param name="delay">200</param>
+        <param name="delaySleepInterval">50</param>
+      </interceptor-ref> 
       <result name="wait">/WEB-INF/jsp/navigations/wait.jsp</result>     
       <result name="input">/WEB-INF/jsp/addMavenTwoProject.jsp</result>
       <result name="success" type="chain">groupSummary</result>



Mime
View raw message