Copy the ArtifactMetadataSource to use the 'default' hint as well as the, deprecated, 'maven' one. This will mean that with the new plexus components don't have to hint to get the default impl

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@514652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Williams 2007-03-05 11:48:15 +00:00
parent a0c01c0223
commit 94ba392461
4 changed files with 26 additions and 5 deletions

View File

@ -74,7 +74,7 @@ under the License.
</requirement> </requirement>
<requirement> <requirement>
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role> <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
<role-hint>maven</role-hint> <role-hint>default</role-hint>
</requirement> </requirement>
<requirement> <requirement>
<role>org.apache.maven.plugin.PluginMappingManager</role> <role>org.apache.maven.plugin.PluginMappingManager</role>
@ -104,7 +104,7 @@ under the License.
</requirement> </requirement>
<requirement> <requirement>
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role> <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
<role-hint>maven</role-hint> <role-hint>default</role-hint>
</requirement> </requirement>
<requirement> <requirement>
<role>org.apache.maven.wagon.manager.WagonManager</role> <role>org.apache.maven.wagon.manager.WagonManager</role>
@ -608,7 +608,7 @@ under the License.
<requirements> <requirements>
<requirement> <requirement>
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role> <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
<role-hint>maven</role-hint> <role-hint>default</role-hint>
</requirement> </requirement>
<requirement> <requirement>
<role>org.apache.maven.plugin.registry.MavenPluginRegistryBuilder</role> <role>org.apache.maven.plugin.registry.MavenPluginRegistryBuilder</role>

View File

@ -407,7 +407,7 @@ public class DefaultMavenProjectBuilder
{ {
try try
{ {
artifactMetadataSource = (ArtifactMetadataSource) container.lookup( ArtifactMetadataSource.ROLE, "maven" ); artifactMetadataSource = (ArtifactMetadataSource) container.lookup( ArtifactMetadataSource.ROLE );
} }
catch ( ComponentLookupException e ) catch ( ComponentLookupException e )
{ {

View File

@ -67,7 +67,7 @@ public class MavenMetadataSource
extends AbstractLogEnabled extends AbstractLogEnabled
implements ArtifactMetadataSource implements ArtifactMetadataSource
{ {
public static final String ROLE_HINT = "maven"; public static final String ROLE_HINT = "default";
private MavenProjectBuilder mavenProjectBuilder; private MavenProjectBuilder mavenProjectBuilder;

View File

@ -330,6 +330,27 @@ under the License.
</requirements> </requirements>
</component> </component>
<component>
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
<role-hint>default</role-hint>
<implementation>org.apache.maven.project.artifact.MavenMetadataSource</implementation>
<requirements>
<requirement>
<role>org.apache.maven.project.MavenProjectBuilder</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager</role>
</requirement>
<requirement>
<role>org.apache.maven.context.BuildContextManager</role>
<role-hint>default</role-hint>
</requirement>
</requirements>
</component>
<component> <component>
<role>org.apache.maven.MavenTools</role> <role>org.apache.maven.MavenTools</role>
<implementation>org.apache.maven.DefaultMavenTools</implementation> <implementation>org.apache.maven.DefaultMavenTools</implementation>