From: olivier lamy Date: Mon, 21 Aug 2017 11:52:14 +0000 (+1000) Subject: upgrade to wagon 3.0.0 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9964f9d5ea5a17d9c0ba914023d52f5a0272e853;p=archiva.git upgrade to wagon 3.0.0 Signed-off-by: olivier lamy --- diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java index 436e7bb0b..62e95a530 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java @@ -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; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java index 59358dddf..144f5c1cd 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java @@ -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 429e51c14..490c0f15d 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ 2.1 6.0-SNAPSHOT - 2.9 + 3.0.0 3.0.0-SNAPSHOT 2.2 2.1