Adding back the extension manager support for injected containers into the WagonManager.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@507294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joakim Erdfelt 2007-02-13 23:14:14 +00:00
parent fa2051759e
commit 36eced2a73
5 changed files with 37 additions and 1 deletions

View File

@ -94,6 +94,8 @@ public class DefaultBuildExtensionScanner
}
getLogger().debug( "Finished pre-scanning: " + pom + " for build extensions." );
extensionManager.registerWagons();
}
catch ( ModelInterpolationException e )
{

View File

@ -31,9 +31,11 @@ import org.apache.maven.model.Extension;
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
import org.apache.maven.project.MavenProject;
import org.apache.maven.wagon.manager.WagonManager;
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.PlexusContainerException;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.codehaus.plexus.context.Context;
import org.codehaus.plexus.context.ContextException;
import org.codehaus.plexus.logging.AbstractLogEnabled;
@ -65,6 +67,8 @@ public class DefaultExtensionManager
private ArtifactFilterManager artifactFilterManager;
private WagonManager wagonManager;
public void addExtension( Extension extension,
Model originatingModel,
List remoteRepositories,
@ -147,6 +151,18 @@ public class DefaultExtensionManager
}
}
public void registerWagons()
{
try
{
wagonManager.registerExtensionContainer( container );
}
catch ( ComponentLookupException e )
{
// no wagons found in the extension
}
}
public void contextualize( Context context )
throws ContextException
{

View File

@ -37,6 +37,8 @@ public interface ExtensionManager
void addExtension( Extension extension, MavenProject project, ArtifactRepository localRepository )
throws ArtifactResolutionException, PlexusContainerException, ArtifactNotFoundException;
void registerWagons();
void addExtension( Extension extension, Model originatingModel, List remoteRepositories,
ArtifactRepository localRepository )
throws ArtifactResolutionException, PlexusContainerException, ArtifactNotFoundException;

View File

@ -82,6 +82,10 @@
<requirement>
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
</requirement>
<requirement>
<role>org.apache.maven.wagon.manager.WagonManager</role>
<role-hint>default</role-hint>
</requirement>
</requirements>
</component>

14
pom.xml
View File

@ -40,6 +40,12 @@
<pluginRepository>
<id>apache.snapshots</id>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
@ -47,7 +53,13 @@
<repositories>
<repository>
<id>codehaus.snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
<url>http://snapshots.repository.codehaus.org</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>