mirror of https://github.com/apache/maven.git
remove custom wagon manager, no longer necessary
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@327758 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4fb568ab4c
commit
9c9e7e1968
|
@ -78,9 +78,6 @@ public abstract class AbstractArtifactTask
|
||||||
ArtifactRepositoryLayout repositoryLayout =
|
ArtifactRepositoryLayout repositoryLayout =
|
||||||
(ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, localRepository.getLayout() );
|
(ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, localRepository.getLayout() );
|
||||||
|
|
||||||
CustomWagonManager manager = (CustomWagonManager) lookup( WagonManager.ROLE );
|
|
||||||
manager.setLocalRepository( localRepository.getLocation() );
|
|
||||||
|
|
||||||
return new DefaultArtifactRepository( "local", "file://" + localRepository.getLocation(), repositoryLayout );
|
return new DefaultArtifactRepository( "local", "file://" + localRepository.getLocation(), repositoryLayout );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
package org.apache.maven.artifact.ant;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright 2001-2005 The Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* Licensed 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.manager.DefaultWagonManager;
|
|
||||||
import org.apache.maven.wagon.UnsupportedProtocolException;
|
|
||||||
import org.apache.maven.wagon.Wagon;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom wagon manager for the ant tasks - used to set the SCM checkout directory to the local repository.
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
|
||||||
* @version $Id$
|
|
||||||
* @todo find a better way and share with m2
|
|
||||||
*/
|
|
||||||
public class CustomWagonManager
|
|
||||||
extends DefaultWagonManager
|
|
||||||
{
|
|
||||||
private File localRepository;
|
|
||||||
|
|
||||||
public Wagon getWagon( String protocol )
|
|
||||||
throws UnsupportedProtocolException
|
|
||||||
{
|
|
||||||
Wagon wagon = super.getWagon( protocol );
|
|
||||||
|
|
||||||
if ( protocol.equals( "scm" ) )
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
// ((ScmWagon)wagon).setCheckoutDirectory( localRepository );
|
|
||||||
}
|
|
||||||
|
|
||||||
return wagon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocalRepository( File localRepository )
|
|
||||||
{
|
|
||||||
this.localRepository = localRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -119,7 +119,7 @@ public class DependenciesTask
|
||||||
Set artifacts;
|
Set artifacts;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
artifacts = metadataSource.createArtifacts( artifactFactory, dependencies, null, null, null );
|
artifacts = MavenMetadataSource.createArtifacts( artifactFactory, dependencies, null, null, null );
|
||||||
|
|
||||||
Artifact pomArtifact = artifactFactory.createBuildArtifact( pom.getGroupId(), pom.getArtifactId(), pom
|
Artifact pomArtifact = artifactFactory.createBuildArtifact( pom.getGroupId(), pom.getArtifactId(), pom
|
||||||
.getVersion(), pom.getPackaging() );
|
.getVersion(), pom.getPackaging() );
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<component-set>
|
|
||||||
<components>
|
|
||||||
<component>
|
|
||||||
<role>org.apache.maven.artifact.manager.WagonManager</role>
|
|
||||||
<implementation>org.apache.maven.artifact.ant.CustomWagonManager</implementation>
|
|
||||||
<requirements>
|
|
||||||
<requirement>
|
|
||||||
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
|
|
||||||
</requirement>
|
|
||||||
</requirements>
|
|
||||||
</component>
|
|
||||||
</components>
|
|
||||||
</component-set>
|
|
Loading…
Reference in New Issue