archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nico...@apache.org
Subject svn commit: r615848 - in /maven/archiva/trunk: ./ archiva-base/archiva-configuration/src/main/mdo/ archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/ archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ archiva...
Date Mon, 28 Jan 2008 10:39:49 GMT
Author: nicolas
Date: Mon Jan 28 02:39:48 2008
New Revision: 615848

URL: http://svn.apache.org/viewvc?rev=615848&view=rev
Log:
fix MRM-667 thanks to James William Dumay pacth

Modified:
    maven/archiva/trunk/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
    maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
    maven/archiva/trunk/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java
    maven/archiva/trunk/archiva-web/archiva-webapp/pom.xml
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/remoteRepositoryForm.jspf
    maven/archiva/trunk/pom.xml

Modified: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo?rev=615848&r1=615847&r2=615848&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
(original)
+++ maven/archiva/trunk/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
Mon Jan 28 02:39:48 2008
@@ -334,6 +334,15 @@
             The Password for this repository.
           </description>
         </field>
+        <field>
+          <name>timeout</name>
+          <version>1.0.1+</version>
+          <type>int</type>
+          <description>
+            Timeout in seconds for connections to this repository
+          </description>
+          <defaultValue>60</defaultValue>
+        </field>		
       </fields>
     </class>
     <class>

Modified: maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java?rev=615848&r1=615847&r2=615848&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
(original)
+++ maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
Mon Jan 28 02:39:48 2008
@@ -21,6 +21,7 @@
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.ConfigurationNames;
@@ -64,6 +65,8 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URLClassLoader;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -828,6 +831,12 @@
             {
                 getLogger().debug( "No authentication for remote repository needed" );
             }
+
+            //Convert seconds to milliseconds
+            int timeoutInMilliseconds = remoteRepository.getRepository().getTimeout() * 1000;
+            
+            //Set timeout
+            wagon.setTimeout(timeoutInMilliseconds);
 
             Repository wagonRepository = new Repository( remoteRepository.getId(), remoteRepository.getURL().toString()
);
             if ( networkProxy != null )

Modified: maven/archiva/trunk/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java?rev=615848&r1=615847&r2=615848&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java
(original)
+++ maven/archiva/trunk/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java
Mon Jan 28 02:39:48 2008
@@ -96,6 +96,16 @@
     {
         return delegate.supportsDirectoryCopy();
     }
+	
+     public void setTimeout(int val)
+     {
+	     // ignore
+     }
+ 
+     public int getTimeout()
+     {
+         return 0;
+     }	
 
     public Repository getRepository()
     {

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/pom.xml?rev=615848&r1=615847&r2=615848&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/pom.xml (original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/pom.xml Mon Jan 28 02:39:48 2008
@@ -125,7 +125,7 @@
     </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
-      <artifactId>wagon-http-lightweight</artifactId>
+      <artifactId>wagon-http</artifactId>
       <scope>runtime</scope>
     </dependency>
     <dependency>

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/remoteRepositoryForm.jspf
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/remoteRepositoryForm.jspf?rev=615848&r1=615847&r2=615848&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/remoteRepositoryForm.jspf
(original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/remoteRepositoryForm.jspf
Mon Jan 28 02:39:48 2008
@@ -23,5 +23,6 @@
 <ww:textfield name="repository.url" label="URL" size="50" required="true"/>
 <ww:textfield name="repository.username" label="Username" size="25" required="false"/>
 <ww:password name="repository.password" label="Password" size="25" required="false"/>
+<ww:textfield name="repository.timeout" label="Timeout in seconds" size="3" required="false"/>
 <ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy'
: 'Maven 1.x Repository'}"
            name="repository.layout" label="Type"/>

Modified: maven/archiva/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/pom.xml?rev=615848&r1=615847&r2=615848&view=diff
==============================================================================
--- maven/archiva/trunk/pom.xml (original)
+++ maven/archiva/trunk/pom.xml Mon Jan 28 02:39:48 2008
@@ -436,6 +436,12 @@
         <groupId>org.apache.maven.shared</groupId>
         <artifactId>maven-app-configuration-web</artifactId>
         <version>1.0</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.maven.wagon</groupId>
+            <artifactId>wagon-http-lightweight</artifactId>
+          </exclusion>
+        </exclusions>		
       </dependency>
       <dependency>
         <groupId>org.apache.maven.shared</groupId>
@@ -671,7 +677,7 @@
       </dependency>
       <dependency>
         <groupId>org.apache.maven.wagon</groupId>
-        <artifactId>wagon-http-lightweight</artifactId>
+        <artifactId>wagon-http</artifactId>
         <version>${wagon.version}</version>
       </dependency>
       <dependency>
@@ -873,7 +879,7 @@
   </profiles>
   <properties>
     <maven.version>2.0.5</maven.version>
-    <wagon.version>1.0-beta-2</wagon.version>
+    <wagon.version>1.0-rc1-SNAPSHOT</wagon.version>
     <redback.version>1.0-alpha-4</redback.version>
   </properties>
   <distributionManagement>



Mime
View raw message