From f74539ec7f7e95dec435b950441e38d4a2ba106a Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Wed, 1 Jul 2009 22:16:29 +0000 Subject: [PATCH] o restored the WagonManager, the archetype system and the nexus indexer both use this directly. doesn't matter we can now support them forever. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@790408 13f79535-47bb-0310-9956-ffa450edef68 --- .../artifact/manager/DefaultWagonManager.java | 11 ++++ .../maven/artifact/manager/WagonManager.java | 52 +++++++++++++++++++ .../legacy/DefaultWagonManager.java | 7 +++ .../maven/repository/legacy/WagonManager.java | 11 ++++ 4 files changed, 81 insertions(+) create mode 100644 maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java create mode 100644 maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java new file mode 100644 index 0000000000..df50981fb0 --- /dev/null +++ b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java @@ -0,0 +1,11 @@ +package org.apache.maven.artifact.manager; + +import org.apache.maven.artifact.handler.ArtifactHandler; +import org.codehaus.plexus.component.annotations.Component; + +@Component(role=WagonManager.class) +public class DefaultWagonManager + extends org.apache.maven.repository.legacy.DefaultWagonManager + implements WagonManager +{ +} diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java new file mode 100644 index 0000000000..e33b23677c --- /dev/null +++ b/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java @@ -0,0 +1,52 @@ +package org.apache.maven.artifact.manager; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.metadata.ArtifactMetadata; +import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.repository.legacy.WagonConfigurationException; +import org.apache.maven.wagon.ResourceDoesNotExistException; +import org.apache.maven.wagon.TransferFailedException; +import org.apache.maven.wagon.UnsupportedProtocolException; +import org.apache.maven.wagon.Wagon; +import org.apache.maven.wagon.authentication.AuthenticationInfo; +import org.apache.maven.wagon.events.TransferListener; +import org.apache.maven.wagon.proxy.ProxyInfo; +import org.apache.maven.wagon.repository.Repository; +import org.apache.maven.wagon.repository.RepositoryPermissions; +import org.codehaus.plexus.PlexusContainer; +import org.codehaus.plexus.util.xml.Xpp3Dom; + +import java.io.File; +import java.util.Collection; +import java.util.List; + +/** + * Manages Wagon related operations in Maven. + * + * @author Michal Maczka + * @version $Id$ + */ +@Deprecated +public interface WagonManager + extends org.apache.maven.repository.legacy.WagonManager +{ +} diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java index 138354beef..f68ffbcdc5 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java @@ -644,6 +644,13 @@ public class DefaultWagonManager } } + @Deprecated + public Wagon getWagon( Repository repository ) + throws UnsupportedProtocolException + { + return getWagon( repository.getProtocol() ); + } + @Deprecated public Wagon getWagon( String protocol ) throws UnsupportedProtocolException diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java index 355909f6dc..8a4f64f26a 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java @@ -23,10 +23,21 @@ import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.TransferFailedException; +import org.apache.maven.wagon.UnsupportedProtocolException; +import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.events.TransferListener; +import org.apache.maven.wagon.repository.Repository; public interface WagonManager { + @Deprecated + Wagon getWagon( String protocol ) + throws UnsupportedProtocolException; + + @Deprecated + Wagon getWagon( Repository repository ) + throws UnsupportedProtocolException, WagonConfigurationException; + // // Retriever //