]> source.dussan.org Git - archiva.git/commitdiff
upgrade to wagon 3.0.0
authorolivier lamy <olamy@apache.org>
Mon, 21 Aug 2017 11:52:14 +0000 (21:52 +1000)
committerolivier lamy <olamy@apache.org>
Mon, 21 Aug 2017 11:52:14 +0000 (21:52 +1000)
Signed-off-by: olivier lamy <olamy@apache.org>
archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java
pom.xml

index 436e7bb0bf9e10dc1e0ba64934b961df2d5eec97..62e95a530c46a2c8c9be29a6b4ae353d3b97f3b2 100644 (file)
@@ -18,12 +18,10 @@ package org.apache.archiva.scheduler.indexing;
  * under the License.
  */
 
-import org.apache.archiva.admin.model.RepositoryAdminException;
 import org.apache.archiva.admin.model.beans.NetworkProxy;
 import org.apache.archiva.admin.model.beans.RemoteRepository;
 import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin;
 import org.apache.archiva.proxy.common.WagonFactory;
-import org.apache.archiva.proxy.common.WagonFactoryException;
 import org.apache.archiva.proxy.common.WagonFactoryRequest;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.time.StopWatch;
@@ -31,21 +29,19 @@ import org.apache.maven.index.context.IndexingContext;
 import org.apache.maven.index.updater.IndexUpdateRequest;
 import org.apache.maven.index.updater.IndexUpdater;
 import org.apache.maven.index.updater.ResourceFetcher;
-import org.apache.maven.wagon.ConnectionException;
 import org.apache.maven.wagon.ResourceDoesNotExistException;
 import org.apache.maven.wagon.StreamWagon;
 import org.apache.maven.wagon.TransferFailedException;
 import org.apache.maven.wagon.Wagon;
-import org.apache.maven.wagon.authentication.AuthenticationException;
 import org.apache.maven.wagon.authentication.AuthenticationInfo;
 import org.apache.maven.wagon.authorization.AuthorizationException;
 import org.apache.maven.wagon.events.TransferEvent;
 import org.apache.maven.wagon.events.TransferListener;
-import org.apache.maven.wagon.providers.http.AbstractHttpClientWagon;
-import org.apache.maven.wagon.providers.http.HttpConfiguration;
-import org.apache.maven.wagon.providers.http.HttpMethodConfiguration;
 import org.apache.maven.wagon.proxy.ProxyInfo;
 import org.apache.maven.wagon.repository.Repository;
+import org.apache.maven.wagon.shared.http.AbstractHttpClientWagon;
+import org.apache.maven.wagon.shared.http.HttpConfiguration;
+import org.apache.maven.wagon.shared.http.HttpMethodConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -53,7 +49,6 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.nio.file.Files;
 import java.util.List;
index 59358dddf704d020a086256d31a1d3d3afe3bddd..144f5c1cd07d63c3d7d01a56bf4edf6f170edb2e 100644 (file)
@@ -31,11 +31,11 @@ import org.apache.archiva.rest.api.services.RemoteRepositoriesService;
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.wagon.TransferFailedException;
 import org.apache.maven.wagon.Wagon;
-import org.apache.maven.wagon.providers.http.AbstractHttpClientWagon;
-import org.apache.maven.wagon.providers.http.HttpConfiguration;
-import org.apache.maven.wagon.providers.http.HttpMethodConfiguration;
 import org.apache.maven.wagon.proxy.ProxyInfo;
 import org.apache.maven.wagon.repository.Repository;
+import org.apache.maven.wagon.shared.http.AbstractHttpClientWagon;
+import org.apache.maven.wagon.shared.http.HttpConfiguration;
+import org.apache.maven.wagon.shared.http.HttpMethodConfiguration;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
@@ -157,11 +157,11 @@ public class DefaultRemoteRepositoriesService
             wagon.setReadTimeout(checkReadTimeout);
             wagon.setTimeout(checkTimeout);
 
-            if (wagon instanceof AbstractHttpClientWagon) {
+            if (wagon instanceof AbstractHttpClientWagon ) {
                 HttpMethodConfiguration httpMethodConfiguration = new HttpMethodConfiguration() //
                         .setUsePreemptive(true) //
                         .setReadTimeout(checkReadTimeout);
-                HttpConfiguration httpConfiguration = new HttpConfiguration().setGet(httpMethodConfiguration);
+                HttpConfiguration httpConfiguration = new HttpConfiguration().setGet( httpMethodConfiguration);
                 AbstractHttpClientWagon.class.cast(wagon).setHttpConfiguration(httpConfiguration);
             }
 
diff --git a/pom.xml b/pom.xml
index 429e51c1476d15a7caa7421d3001747c2384f00e..490c0f15d785280e95369b96193896b2c7cfe9ba 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,7 @@
     <maven-model-converter.version>2.1</maven-model-converter.version>
     <!-- TODO: Before Release 3.0 check, if stable version will be released -->
     <maven.indexer.version>6.0-SNAPSHOT</maven.indexer.version>
-    <wagon.version>2.9</wagon.version>
+    <wagon.version>3.0.0</wagon.version>
     <redback.version>3.0.0-SNAPSHOT</redback.version>
     <redback.cache.version>2.2</redback.cache.version>
     <redback.quartz.version>2.1</redback.quartz.version>