PR: MNG-586

o update ant tasks to latest artifact library changes
o allow addition of extra wagons
o remove wagon-ssh and wagon-scm from depoloyed jar

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@239660 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-08-24 13:34:50 +00:00
parent 7f9ca76326
commit 4935502fdf
10 changed files with 436 additions and 367 deletions

View File

@ -38,6 +38,12 @@
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId> <artifactId>maven-project</artifactId>
<version>2.0-beta-1-SNAPSHOT</version> <version>2.0-beta-1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>plexus</groupId> <groupId>plexus</groupId>
@ -61,18 +67,6 @@
<version>1.0-alpha-4</version> <version>1.0-alpha-4</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>1.0-alpha-4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-scm</artifactId>
<version>1.0-alpha-4</version>
<!-- temporarily compile time scope>runtime</scope -->
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -56,6 +56,10 @@
<dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-2-SNAPSHOT"/> <dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-2-SNAPSHOT"/>
<dependency groupId="org.apache.maven" artifactId="maven-core-it-support-old-location" version="1.1"/> <dependency groupId="org.apache.maven" artifactId="maven-core-it-support-old-location" version="1.1"/>
<localRepository refid="local.repository"/> <localRepository refid="local.repository"/>
<remoteRepository url="http://snapshots.maven.codehaus.org/maven2">
<snapshots enabled="true"/>
<releases enabled="false"/>
</remoteRepository>
</artifact:dependencies> </artifact:dependencies>
<copy todir="target/files"> <copy todir="target/files">
@ -77,10 +81,12 @@
</artifact:install> </artifact:install>
<artifact:deploy file="${outJar}"> <artifact:deploy file="${outJar}">
<remoteRepository refid="deploy.repository"/> <remoteSnapshotRepository refid="deploy.repository"/>
<pom refid="maven.project"/> <pom refid="maven.project"/>
</artifact:deploy> </artifact:deploy>
<artifact:install-provider artifactId="wagon-ssh" version="1.0-alpha-4"/>
<artifact:deploy file="${outJar}"> <artifact:deploy file="${outJar}">
<remoteRepository url="scp://localhost/tmp/deployment-repo"> <remoteRepository url="scp://localhost/tmp/deployment-repo">
<authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/> <authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/>

View File

@ -25,7 +25,6 @@ import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.DefaultArtifactRepository; import org.apache.maven.artifact.repository.DefaultArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.model.Model; import org.apache.maven.model.Model;
import org.apache.maven.profiles.activation.ProfileActivationUtils;
import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.project.MavenProjectBuilder;
import org.apache.maven.settings.Mirror; import org.apache.maven.settings.Mirror;
@ -138,8 +137,9 @@ public abstract class AbstractArtifactTask
return artifactRepository; return artifactRepository;
} }
private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy,
RepositoryPolicy policy, String defaultUpdatePolicy, String defaultChecksumPolicy ) String defaultUpdatePolicy,
String defaultChecksumPolicy )
{ {
boolean enabled = true; boolean enabled = true;
String updatePolicy = defaultUpdatePolicy; String updatePolicy = defaultUpdatePolicy;
@ -225,11 +225,11 @@ public abstract class AbstractArtifactTask
if ( pomRepository.getSnapshots() != null ) if ( pomRepository.getSnapshots() != null )
{ {
r.setSnapshots( convertRepositoryPolicy( pomRepository.getSnapshots() ) ); r.addSnapshots( convertRepositoryPolicy( pomRepository.getSnapshots() ) );
} }
if ( pomRepository.getReleases() != null ) if ( pomRepository.getReleases() != null )
{ {
r.setReleases( convertRepositoryPolicy( pomRepository.getReleases() ) ); r.addReleases( convertRepositoryPolicy( pomRepository.getReleases() ) );
} }
return r; return r;
@ -289,7 +289,15 @@ public abstract class AbstractArtifactTask
} }
} }
private synchronized Embedder getEmbedder() protected static RemoteRepository getDefaultRemoteRepository()
{
// TODO: could we utilise the super POM for this?
RemoteRepository remoteRepository = new RemoteRepository();
remoteRepository.setUrl( "http://repo1.maven.org/maven2" );
return remoteRepository;
}
protected synchronized Embedder getEmbedder()
{ {
if ( embedder == null ) if ( embedder == null )
{ {
@ -394,7 +402,7 @@ public abstract class AbstractArtifactTask
if ( profiles != null ) if ( profiles != null )
{ {
// TODO: not sure this is the best way to do this... // TODO: not sure this is the best way to do this...
System.setProperty( ProfileActivationUtils.ACTIVE_PROFILE_IDS, profiles ); // System.setProperty( ProfileActivationUtils.ACTIVE_PROFILE_IDS, profiles );
} }
} }

View File

@ -17,19 +17,17 @@ package org.apache.maven.artifact.ant;
*/ */
import org.apache.maven.artifact.manager.DefaultWagonManager; import org.apache.maven.artifact.manager.DefaultWagonManager;
import org.apache.maven.wagon.Wagon;
import org.apache.maven.wagon.UnsupportedProtocolException; import org.apache.maven.wagon.UnsupportedProtocolException;
import org.apache.maven.wagon.providers.scm.ScmWagon; import org.apache.maven.wagon.Wagon;
import java.io.File; import java.io.File;
/** /**
* Custom wagon manager for the ant tasks - used to set the SCM checkout directory to the local repository. * Custom wagon manager for the ant tasks - used to set the SCM checkout directory to the local repository.
* *
* @todo find a better way and share with m2
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a> * @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @version $Id$ * @version $Id$
* @todo find a better way and share with m2
*/ */
public class CustomWagonManager public class CustomWagonManager
extends DefaultWagonManager extends DefaultWagonManager
@ -43,7 +41,8 @@ public class CustomWagonManager
if ( protocol.equals( "scm" ) ) if ( protocol.equals( "scm" ) )
{ {
((ScmWagon)wagon).setCheckoutDirectory( localRepository ); // TODO
// ((ScmWagon)wagon).setCheckoutDirectory( localRepository );
} }
return wagon; return wagon;

View File

@ -124,7 +124,12 @@ public class DependenciesTask
listeners = Collections.singletonList( new AntResolutionListener( getProject() ) ); listeners = Collections.singletonList( new AntResolutionListener( getProject() ) );
} }
List remoteArtifactRepositories = createRemoteArtifactRepositories( getRemoteRepositories() ); List remoteRepositories = getRemoteRepositories();
RemoteRepository remoteRepository = getDefaultRemoteRepository();
remoteRepositories.add( remoteRepository );
List remoteArtifactRepositories = createRemoteArtifactRepositories( remoteRepositories );
// TODO: managed dependencies // TODO: managed dependencies
result = resolver.resolveTransitively( artifacts, pomArtifact, remoteArtifactRepositories, localRepo, result = resolver.resolveTransitively( artifacts, pomArtifact, remoteArtifactRepositories, localRepo,
metadataSource, listeners ); metadataSource, listeners );
@ -188,13 +193,6 @@ public class DependenciesTask
public List getRemoteRepositories() public List getRemoteRepositories()
{ {
if ( remoteRepositories.isEmpty() )
{
// TODO: could we utilise the super POM for this?
RemoteRepository remoteRepository = new RemoteRepository();
remoteRepository.setUrl( "http://repo1.maven.org/maven2" );
remoteRepositories.add( remoteRepository );
}
return remoteRepositories; return remoteRepositories;
} }

View File

@ -73,17 +73,16 @@ public class DeployTask
} }
} }
ArtifactRepository deploymentRepository = createRemoteArtifactRepository( remoteRepository );
ArtifactRepository snapshotRepository = null;
if ( remoteSnapshotRepository != null )
{
snapshotRepository = createRemoteArtifactRepository( remoteSnapshotRepository );
}
// Deploy the POM // Deploy the POM
Artifact artifact = createArtifact( pom ); Artifact artifact = createArtifact( pom );
ArtifactRepository deploymentRepository = createRemoteArtifactRepository( remoteRepository );
if ( remoteSnapshotRepository != null && artifact.isSnapshot() )
{
deploymentRepository = createRemoteArtifactRepository( remoteSnapshotRepository );
}
boolean isPomArtifact = "pom".equals( pom.getPackaging() ); boolean isPomArtifact = "pom".equals( pom.getPackaging() );
if ( !isPomArtifact ) if ( !isPomArtifact )
{ {
@ -91,7 +90,7 @@ public class DeployTask
artifact.addMetadata( metadata ); artifact.addMetadata( metadata );
} }
log( "Deploying to " + remoteRepository.getUrl() ); log( "Deploying to " + deploymentRepository.getUrl() );
ArtifactDeployer deployer = (ArtifactDeployer) lookup( ArtifactDeployer.ROLE ); ArtifactDeployer deployer = (ArtifactDeployer) lookup( ArtifactDeployer.ROLE );
try try
{ {

View File

@ -0,0 +1,110 @@
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.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.project.artifact.MavenMetadataSource;
import org.apache.tools.ant.BuildException;
import org.codehaus.plexus.PlexusContainerException;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* Ant Wrapper for wagon provider installation.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @version $Id$
*/
public class InstallWagonProviderTask
extends AbstractArtifactTask
{
private String artifactId;
private String version;
public String getArtifactId()
{
return artifactId;
}
public void setArtifactId( String artifactId )
{
this.artifactId = artifactId;
}
public String getVersion()
{
return version;
}
public void setVersion( String version )
{
this.version = version;
}
public void execute()
throws BuildException
{
MavenMetadataSource metadataSource = (MavenMetadataSource) lookup( ArtifactMetadataSource.ROLE );
ArtifactResolver resolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE );
ArtifactRepository artifactRepository = createRemoteArtifactRepository( getDefaultRemoteRepository() );
List remoteRepositories = Collections.singletonList( artifactRepository );
try
{
ArtifactFactory factory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
VersionRange versionRange = VersionRange.createFromVersionSpec( version );
Artifact providerArtifact = factory.createExtensionArtifact( "org.apache.maven.wagon", artifactId,
versionRange );
ArtifactResolutionResult result = resolver.resolveTransitively( Collections.singleton( providerArtifact ),
createArtifact( createDummyPom() ),
createLocalArtifactRepository(),
remoteRepositories, metadataSource, null );
log( "Installing provider: " + providerArtifact );
for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
getEmbedder().getContainer().addJarResource( a.getFile() );
}
}
catch ( ArtifactResolutionException e )
{
throw new BuildException( "Unable to locate wagon provider in remote repository", e );
}
catch ( PlexusContainerException e )
{
throw new BuildException( "Unable to locate wagon provider in remote repository", e );
}
catch ( InvalidVersionSpecificationException e )
{
throw new BuildException( "Unable to locate wagon provider in remote repository", e );
}
}
}

View File

@ -29,10 +29,14 @@ public class RemoteRepository
private Authentication authentication; private Authentication authentication;
/** @deprecated use &lt;snapshots/&gt; and &lt;updatePolicy&gt; instead. */ /**
* @deprecated use &lt;snapshots/&gt; and &lt;updatePolicy&gt; instead.
*/
private String snapshotPolicy; private String snapshotPolicy;
/** @deprecated use &lt;snapshots/&gt; and &lt;checksumPolicy&gt; instead. */ /**
* @deprecated use &lt;snapshots/&gt; and &lt;checksumPolicy&gt; instead.
*/
private String checksumPolicy; private String checksumPolicy;
private Proxy proxy; private Proxy proxy;
@ -96,7 +100,7 @@ public class RemoteRepository
return snapshots; return snapshots;
} }
public void setSnapshots( RepositoryPolicy snapshots ) public void addSnapshots( RepositoryPolicy snapshots )
{ {
this.snapshots = snapshots; this.snapshots = snapshots;
} }
@ -106,8 +110,9 @@ public class RemoteRepository
return releases; return releases;
} }
public void setReleases( RepositoryPolicy releases ) public void addReleases( RepositoryPolicy releases )
{ {
this.releases = releases; this.releases = releases;
} }
} }

View File

@ -1,92 +1,5 @@
<!-- Merger of component descriptors from maven-artifact and maven-core because extracted jars overwrite each other -->
<component-set> <component-set>
<components> <components>
<!--
|
| WagonManager
|
-->
<component>
<role>org.apache.maven.artifact.manager.WagonManager</role>
<implementation>org.apache.maven.artifact.ant.CustomWagonManager</implementation>
</component>
<!--
|
| Transformations
|
-->
<component>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<implementation>org.apache.maven.artifact.transform.SnapshotTransformation</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
</requirements>
</component>
<!--
|
| Resolver
|
-->
<component>
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
<implementation>org.apache.maven.artifact.resolver.DefaultArtifactResolver</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<field-name>artifactTransformations</field-name>
</requirement>
<requirement>
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.resolver.ArtifactCollector</role>
</requirement>
</requirements>
</component>
<!--
|
| ArtifactInstaller
|
-->
<component>
<role>org.apache.maven.artifact.installer.ArtifactInstaller</role>
<implementation>org.apache.maven.artifact.installer.DefaultArtifactInstaller</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<field-name>artifactTransformations</field-name>
</requirement>
</requirements>
</component>
<!--
|
| ArtifactDeployer
|
-->
<component>
<role>org.apache.maven.artifact.deployer.ArtifactDeployer</role>
<implementation>org.apache.maven.artifact.deployer.DefaultArtifactDeployer</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<field-name>artifactTransformations</field-name>
</requirement>
</requirements>
</component>
<component> <component>
<role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role> <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
<role-hint>default</role-hint> <role-hint>default</role-hint>
@ -185,23 +98,194 @@
</component> </component>
<component> <component>
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role> <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
<implementation>org.apache.maven.project.artifact.MavenMetadataSource</implementation> <implementation>org.apache.maven.artifact.factory.DefaultArtifactFactory</implementation>
<requirements> <requirements>
<requirement> <requirement>
<role>org.apache.maven.project.MavenProjectBuilder</role> <role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
</requirement> </requirement>
</requirements> </requirements>
</component> </component>
<component>
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
<implementation>org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory</implementation>
</component>
<component> <component>
<role>org.apache.maven.artifact.resolver.ArtifactCollector</role> <role>org.apache.maven.artifact.resolver.ArtifactCollector</role>
<implementation>org.apache.maven.artifact.resolver.DefaultArtifactCollector</implementation> <implementation>org.apache.maven.artifact.resolver.DefaultArtifactCollector</implementation>
</component> </component>
<component>
<role>org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager</role>
<role-hint>default</role-hint>
<implementation>org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
</requirements>
</component>
<!--
|
| WagonManager
|
-->
<component>
<role>org.apache.maven.artifact.manager.WagonManager</role>
<implementation>org.apache.maven.artifact.ant.CustomWagonManager</implementation>
<!--
<implementation>org.apache.maven.artifact.manager.DefaultWagonManager</implementation>
-->
</component>
<!--
|
| Transformations
|
-->
<component>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<role-hint>snapshot</role-hint>
<implementation>org.apache.maven.artifact.transform.SnapshotTransformation</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<role-hint>release</role-hint>
<implementation>org.apache.maven.artifact.transform.ReleaseArtifactTransformation</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<role-hint>latest</role-hint>
<implementation>org.apache.maven.artifact.transform.LatestArtifactTransformation</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
</requirements>
</component>
<!--
|
| ArtifactTransformationManager
|
-->
<component>
<role>org.apache.maven.artifact.transform.ArtifactTransformationManager</role>
<implementation>org.apache.maven.artifact.transform.DefaultArtifactTransformationManager</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<field-name>artifactTransformations</field-name>
</requirement>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformation</role>
<role-hint>snapshot</role-hint>
<field-name>snapshotTransformation</field-name>
</requirement>
</requirements>
</component>
<!--
|
| Resolver
|
-->
<component>
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
<implementation>org.apache.maven.artifact.resolver.DefaultArtifactResolver</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformationManager</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.resolver.ArtifactCollector</role>
</requirement>
</requirements>
</component>
<!--
|
| ArtifactInstaller
|
-->
<component>
<role>org.apache.maven.artifact.installer.ArtifactInstaller</role>
<implementation>org.apache.maven.artifact.installer.DefaultArtifactInstaller</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformationManager</role>
</requirement>
</requirements>
</component>
<!--
|
| ArtifactDeployer
|
-->
<component>
<role>org.apache.maven.artifact.deployer.ArtifactDeployer</role>
<implementation>org.apache.maven.artifact.deployer.DefaultArtifactDeployer</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.manager.WagonManager</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformationManager</role>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
<implementation>org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory</implementation>
</component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.profiles.MavenProfilesBuilder</role>
<implementation>org.apache.maven.profiles.DefaultMavenProfilesBuilder</implementation>
</component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.project.MavenProjectHelper</role>
<implementation>org.apache.maven.project.DefaultMavenProjectHelper</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
</requirement>
</requirements>
</component>
<!-- <!--
| |
| |
@ -220,11 +304,33 @@
<role>org.apache.maven.project.injection.ModelDefaultsInjector</role> <role>org.apache.maven.project.injection.ModelDefaultsInjector</role>
<implementation>org.apache.maven.project.injection.DefaultModelDefaultsInjector</implementation> <implementation>org.apache.maven.project.injection.DefaultModelDefaultsInjector</implementation>
</component> </component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.project.injection.ProfileInjector</role>
<implementation>org.apache.maven.project.injection.DefaultProfileInjector</implementation>
</component>
<!--
|
|
|
-->
<component> <component>
<role>org.apache.maven.project.MavenProjectBuilder</role> <role>org.apache.maven.project.MavenProjectBuilder</role>
<implementation>org.apache.maven.project.DefaultMavenProjectBuilder</implementation> <implementation>org.apache.maven.project.DefaultMavenProjectBuilder</implementation>
<requirements> <requirements>
<requirement>
<role>org.apache.maven.artifact.transform.ArtifactTransformationManager</role>
</requirement>
<requirement>
<role>org.apache.maven.profiles.MavenProfilesBuilder</role>
</requirement>
<requirement>
<role>org.apache.maven.project.injection.ProfileInjector</role>
</requirement>
<requirement> <requirement>
<role>org.apache.maven.project.injection.ModelDefaultsInjector</role> <role>org.apache.maven.project.injection.ModelDefaultsInjector</role>
</requirement> </requirement>
@ -249,20 +355,8 @@
<requirement> <requirement>
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role> <role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
</requirement> </requirement>
<requirement>
<role>org.apache.maven.profiles.activation.ProfileActivationCalculator</role>
</requirement>
</requirements> </requirements>
</component> </component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.profiles.activation.ProfileActivationCalculator</role>
<implementation>org.apache.maven.profiles.activation.ProfileActivationCalculator</implementation>
</component>
<!-- <!--
| |
| |
@ -293,16 +387,6 @@
<role-hint>system-property</role-hint> <role-hint>system-property</role-hint>
<implementation>org.apache.maven.profiles.activation.SystemPropertyProfileActivator</implementation> <implementation>org.apache.maven.profiles.activation.SystemPropertyProfileActivator</implementation>
</component> </component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.profiles.activation.ProfileActivator</role>
<role-hint>explicit-listing</role-hint>
<implementation>org.apache.maven.profiles.activation.ExplicitListingProfileActivator</implementation>
</component>
<!-- <!--
| |
| |
@ -312,6 +396,7 @@
<role>org.apache.maven.project.inheritance.ModelInheritanceAssembler</role> <role>org.apache.maven.project.inheritance.ModelInheritanceAssembler</role>
<implementation>org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler</implementation> <implementation>org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler</implementation>
</component> </component>
<!-- <!--
| |
| |
@ -321,36 +406,47 @@
<role>org.apache.maven.project.validation.ModelValidator</role> <role>org.apache.maven.project.validation.ModelValidator</role>
<implementation>org.apache.maven.project.validation.DefaultModelValidator</implementation> <implementation>org.apache.maven.project.validation.DefaultModelValidator</implementation>
</component> </component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
<implementation>org.apache.maven.artifact.factory.DefaultArtifactFactory</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>
</requirement>
</requirements>
</component>
<!-- ********************* FIXME *******************************************
| I realize this is duplicated but allows the project builder to work by itself
-->
<component> <component>
<role>org.apache.maven.project.path.PathTranslator</role> <role>org.apache.maven.project.path.PathTranslator</role>
<implementation>org.apache.maven.project.path.DefaultPathTranslator</implementation> <implementation>org.apache.maven.project.path.DefaultPathTranslator</implementation>
</component> </component>
<component> <component>
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role> <role>org.apache.maven.project.ModelResolver</role>
<implementation>org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory</implementation> <role-hint>default</role-hint>
<implementation>org.apache.maven.project.ModelResolver</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
</requirement>
</requirements>
</component> </component>
<component> <component>
<role>org.apache.maven.wagon.Wagon</role> <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
<role-hint>http</role-hint> <role-hint>maven</role-hint>
<implementation>org.apache.maven.wagon.providers.http.LightweightHttpWagon</implementation> <implementation>org.apache.maven.project.artifact.MavenMetadataSource</implementation>
<instantiation-strategy>per-lookup</instantiation-strategy> <requirements>
<requirement>
<role>org.apache.maven.project.MavenProjectBuilder</role>
</requirement>
<requirement>
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.settings.MavenSettingsBuilder</role>
<implementation>org.apache.maven.settings.DefaultMavenSettingsBuilder</implementation>
<configuration>
<globalSettingsPath>${maven.home}/conf/settings.xml</globalSettingsPath>
<userSettingsPath>${user.home}/.m2/settings.xml</userSettingsPath>
</configuration>
</component> </component>
<component> <component>
@ -362,156 +458,9 @@
<component> <component>
<role>org.apache.maven.wagon.Wagon</role> <role>org.apache.maven.wagon.Wagon</role>
<role-hint>scm</role-hint> <role-hint>http</role-hint>
<implementation>org.apache.maven.wagon.providers.scm.ScmWagon</implementation> <implementation>org.apache.maven.wagon.providers.http.LightweightHttpWagon</implementation>
<instantiation-strategy>per-lookup</instantiation-strategy> <instantiation-strategy>per-lookup</instantiation-strategy>
<requirements>
<requirement>
<role>org.apache.maven.scm.manager.ScmManager</role>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.wagon.Wagon</role>
<role-hint>scp</role-hint>
<implementation>org.apache.maven.wagon.providers.ssh.ScpWagon</implementation>
<instantiation-strategy>per-lookup</instantiation-strategy>
</component>
<component>
<role>org.apache.maven.wagon.Wagon</role>
<role-hint>sftp</role-hint>
<implementation>org.apache.maven.wagon.providers.ssh.SftpWagon</implementation>
<instantiation-strategy>per-lookup</instantiation-strategy>
</component>
<component>
<role>org.apache.maven.wagon.providers.ssh.SshCommandExecutor</role>
<implementation>org.apache.maven.wagon.providers.ssh.ScpWagon</implementation>
<instantiation-strategy>per-lookup</instantiation-strategy>
</component>
<component>
<role>org.apache.maven.scm.manager.ScmManager</role>
<implementation>org.apache.maven.scm.manager.DefaultScmManager</implementation>
<requirements>
<requirement>
<role>org.apache.maven.scm.provider.ScmProvider</role>
<field-name>scmProviders</field-name>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.scm.provider.ScmProvider</role>
<role-hint>cvs</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.CvsScmProvider</implementation>
<requirements>
<requirement>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<field-name>commands</field-name>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>add</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.add.CvsAddCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>change-log</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.changelog.CvsChangeLogCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>check-in</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.checkin.CvsCheckInCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>check-out</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.checkout.CvsCheckOutCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>diff</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.diff.CvsDiffCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>status</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.status.CvsStatusCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>tag</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.tag.CvsTagCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.cvslib.command.CvsCommand</role>
<role-hint>update</role-hint>
<implementation>org.apache.maven.scm.provider.cvslib.command.update.CvsUpdateCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.ScmProvider</role>
<role-hint>svn</role-hint>
<implementation>org.apache.maven.scm.provider.svn.SvnScmProvider</implementation>
<requirements>
<requirement>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<field-name>commands</field-name>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<role-hint>add</role-hint>
<implementation>org.apache.maven.scm.provider.svn.command.add.SvnAddCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<role-hint>check-in</role-hint>
<implementation>org.apache.maven.scm.provider.svn.command.checkin.SvnCheckInCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<role-hint>check-out</role-hint>
<implementation>org.apache.maven.scm.provider.svn.command.checkout.SvnCheckOutCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<role-hint>diff</role-hint>
<implementation>org.apache.maven.scm.provider.svn.command.diff.SvnDiffCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<role-hint>status</role-hint>
<implementation>org.apache.maven.scm.provider.svn.command.status.SvnStatusCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<role-hint>tag</role-hint>
<implementation>org.apache.maven.scm.provider.svn.command.tag.SvnTagCommand</implementation>
</component>
<component>
<role>org.apache.maven.scm.provider.svn.command.SvnCommand</role>
<role-hint>update</role-hint>
<implementation>org.apache.maven.scm.provider.svn.command.update.SvnUpdateCommand</implementation>
</component> </component>
</components> </components>
</component-set> </component-set>

View File

@ -4,6 +4,7 @@
<taskdef name="dependencies" classname="org.apache.maven.artifact.ant.DependenciesTask"/> <taskdef name="dependencies" classname="org.apache.maven.artifact.ant.DependenciesTask"/>
<taskdef name="install" classname="org.apache.maven.artifact.ant.InstallTask"/> <taskdef name="install" classname="org.apache.maven.artifact.ant.InstallTask"/>
<taskdef name="deploy" classname="org.apache.maven.artifact.ant.DeployTask"/> <taskdef name="deploy" classname="org.apache.maven.artifact.ant.DeployTask"/>
<taskdef name="install-provider" classname="org.apache.maven.artifact.ant.InstallWagonProviderTask"/>
<!-- Types --> <!-- Types -->
<typedef name="localRepository" classname="org.apache.maven.artifact.ant.LocalRepository"/> <typedef name="localRepository" classname="org.apache.maven.artifact.ant.LocalRepository"/>