mirror of https://github.com/apache/maven.git
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:
parent
7f9ca76326
commit
4935502fdf
|
@ -1,5 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
|
@ -38,6 +38,12 @@
|
|||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-project</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>plexus</groupId>
|
||||
|
@ -61,18 +67,6 @@
|
|||
<version>1.0-alpha-4</version>
|
||||
<scope>runtime</scope>
|
||||
</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>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -56,6 +56,10 @@
|
|||
<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"/>
|
||||
<localRepository refid="local.repository"/>
|
||||
<remoteRepository url="http://snapshots.maven.codehaus.org/maven2">
|
||||
<snapshots enabled="true"/>
|
||||
<releases enabled="false"/>
|
||||
</remoteRepository>
|
||||
</artifact:dependencies>
|
||||
|
||||
<copy todir="target/files">
|
||||
|
@ -77,10 +81,12 @@
|
|||
</artifact:install>
|
||||
|
||||
<artifact:deploy file="${outJar}">
|
||||
<remoteRepository refid="deploy.repository"/>
|
||||
<remoteSnapshotRepository refid="deploy.repository"/>
|
||||
<pom refid="maven.project"/>
|
||||
</artifact:deploy>
|
||||
|
||||
<artifact:install-provider artifactId="wagon-ssh" version="1.0-alpha-4"/>
|
||||
|
||||
<artifact:deploy file="${outJar}">
|
||||
<remoteRepository url="scp://localhost/tmp/deployment-repo">
|
||||
<authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/>
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
|
|||
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
|
||||
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.profiles.activation.ProfileActivationUtils;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.project.MavenProjectBuilder;
|
||||
import org.apache.maven.settings.Mirror;
|
||||
|
@ -138,8 +137,9 @@ public abstract class AbstractArtifactTask
|
|||
return artifactRepository;
|
||||
}
|
||||
|
||||
private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy(
|
||||
RepositoryPolicy policy, String defaultUpdatePolicy, String defaultChecksumPolicy )
|
||||
private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy,
|
||||
String defaultUpdatePolicy,
|
||||
String defaultChecksumPolicy )
|
||||
{
|
||||
boolean enabled = true;
|
||||
String updatePolicy = defaultUpdatePolicy;
|
||||
|
@ -225,11 +225,11 @@ public abstract class AbstractArtifactTask
|
|||
|
||||
if ( pomRepository.getSnapshots() != null )
|
||||
{
|
||||
r.setSnapshots( convertRepositoryPolicy( pomRepository.getSnapshots() ) );
|
||||
r.addSnapshots( convertRepositoryPolicy( pomRepository.getSnapshots() ) );
|
||||
}
|
||||
if ( pomRepository.getReleases() != null )
|
||||
{
|
||||
r.setReleases( convertRepositoryPolicy( pomRepository.getReleases() ) );
|
||||
r.addReleases( convertRepositoryPolicy( pomRepository.getReleases() ) );
|
||||
}
|
||||
|
||||
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 )
|
||||
{
|
||||
|
@ -394,7 +402,7 @@ public abstract class AbstractArtifactTask
|
|||
if ( profiles != null )
|
||||
{
|
||||
// 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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,19 +17,17 @@ package org.apache.maven.artifact.ant;
|
|||
*/
|
||||
|
||||
import org.apache.maven.artifact.manager.DefaultWagonManager;
|
||||
import org.apache.maven.wagon.Wagon;
|
||||
import org.apache.maven.wagon.UnsupportedProtocolException;
|
||||
import org.apache.maven.wagon.providers.scm.ScmWagon;
|
||||
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.
|
||||
*
|
||||
* @todo find a better way and share with m2
|
||||
*
|
||||
* @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
|
||||
|
@ -43,7 +41,8 @@ public class CustomWagonManager
|
|||
|
||||
if ( protocol.equals( "scm" ) )
|
||||
{
|
||||
((ScmWagon)wagon).setCheckoutDirectory( localRepository );
|
||||
// TODO
|
||||
// ((ScmWagon)wagon).setCheckoutDirectory( localRepository );
|
||||
}
|
||||
|
||||
return wagon;
|
||||
|
|
|
@ -124,7 +124,12 @@ public class DependenciesTask
|
|||
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
|
||||
result = resolver.resolveTransitively( artifacts, pomArtifact, remoteArtifactRepositories, localRepo,
|
||||
metadataSource, listeners );
|
||||
|
@ -188,13 +193,6 @@ public class DependenciesTask
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,17 +73,16 @@ public class DeployTask
|
|||
}
|
||||
}
|
||||
|
||||
ArtifactRepository deploymentRepository = createRemoteArtifactRepository( remoteRepository );
|
||||
|
||||
ArtifactRepository snapshotRepository = null;
|
||||
if ( remoteSnapshotRepository != null )
|
||||
{
|
||||
snapshotRepository = createRemoteArtifactRepository( remoteSnapshotRepository );
|
||||
}
|
||||
|
||||
// Deploy the POM
|
||||
Artifact artifact = createArtifact( pom );
|
||||
|
||||
ArtifactRepository deploymentRepository = createRemoteArtifactRepository( remoteRepository );
|
||||
|
||||
if ( remoteSnapshotRepository != null && artifact.isSnapshot() )
|
||||
{
|
||||
deploymentRepository = createRemoteArtifactRepository( remoteSnapshotRepository );
|
||||
}
|
||||
|
||||
boolean isPomArtifact = "pom".equals( pom.getPackaging() );
|
||||
if ( !isPomArtifact )
|
||||
{
|
||||
|
@ -91,7 +90,7 @@ public class DeployTask
|
|||
artifact.addMetadata( metadata );
|
||||
}
|
||||
|
||||
log( "Deploying to " + remoteRepository.getUrl() );
|
||||
log( "Deploying to " + deploymentRepository.getUrl() );
|
||||
ArtifactDeployer deployer = (ArtifactDeployer) lookup( ArtifactDeployer.ROLE );
|
||||
try
|
||||
{
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -29,12 +29,16 @@ public class RemoteRepository
|
|||
|
||||
private Authentication authentication;
|
||||
|
||||
/** @deprecated use <snapshots/> and <updatePolicy> instead. */
|
||||
/**
|
||||
* @deprecated use <snapshots/> and <updatePolicy> instead.
|
||||
*/
|
||||
private String snapshotPolicy;
|
||||
|
||||
/** @deprecated use <snapshots/> and <checksumPolicy> instead. */
|
||||
|
||||
/**
|
||||
* @deprecated use <snapshots/> and <checksumPolicy> instead.
|
||||
*/
|
||||
private String checksumPolicy;
|
||||
|
||||
|
||||
private Proxy proxy;
|
||||
|
||||
private RepositoryPolicy snapshots;
|
||||
|
@ -96,7 +100,7 @@ public class RemoteRepository
|
|||
return snapshots;
|
||||
}
|
||||
|
||||
public void setSnapshots( RepositoryPolicy snapshots )
|
||||
public void addSnapshots( RepositoryPolicy snapshots )
|
||||
{
|
||||
this.snapshots = snapshots;
|
||||
}
|
||||
|
@ -106,8 +110,9 @@ public class RemoteRepository
|
|||
return releases;
|
||||
}
|
||||
|
||||
public void setReleases( RepositoryPolicy releases )
|
||||
public void addReleases( RepositoryPolicy releases )
|
||||
{
|
||||
this.releases = releases;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,92 +1,5 @@
|
|||
<!-- Merger of component descriptors from maven-artifact and maven-core because extracted jars overwrite each other -->
|
||||
|
||||
<component-set>
|
||||
<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>
|
||||
<role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
|
||||
<role-hint>default</role-hint>
|
||||
|
@ -99,7 +12,7 @@
|
|||
<implementation>org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout</implementation>
|
||||
</component>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
|
|
||||
| ArtifactHandlerManager
|
||||
|
|
||||
|
@ -185,46 +98,239 @@
|
|||
</component>
|
||||
|
||||
<component>
|
||||
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
|
||||
<implementation>org.apache.maven.project.artifact.MavenMetadataSource</implementation>
|
||||
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
|
||||
<implementation>org.apache.maven.artifact.factory.DefaultArtifactFactory</implementation>
|
||||
<requirements>
|
||||
<requirement>
|
||||
<role>org.apache.maven.project.MavenProjectBuilder</role>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
|
||||
<role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</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.artifact.resolver.ArtifactCollector</role>
|
||||
<implementation>org.apache.maven.artifact.resolver.DefaultArtifactCollector</implementation>
|
||||
</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>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.project.interpolation.ModelInterpolator</role>
|
||||
<implementation>org.apache.maven.project.interpolation.RegexBasedModelInterpolator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.project.injection.ModelDefaultsInjector</role>
|
||||
<implementation>org.apache.maven.project.injection.DefaultModelDefaultsInjector</implementation>
|
||||
</component>
|
||||
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.project.injection.ProfileInjector</role>
|
||||
<implementation>org.apache.maven.project.injection.DefaultProfileInjector</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.project.MavenProjectBuilder</role>
|
||||
<implementation>org.apache.maven.project.DefaultMavenProjectBuilder</implementation>
|
||||
<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>
|
||||
<role>org.apache.maven.project.injection.ModelDefaultsInjector</role>
|
||||
</requirement>
|
||||
|
@ -249,108 +355,98 @@
|
|||
<requirement>
|
||||
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.apache.maven.profiles.activation.ProfileActivationCalculator</role>
|
||||
</requirement>
|
||||
</requirements>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profiles.activation.ProfileActivationCalculator</role>
|
||||
<implementation>org.apache.maven.profiles.activation.ProfileActivationCalculator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profiles.activation.ProfileActivator</role>
|
||||
<role-hint>always-on</role-hint>
|
||||
<implementation>org.apache.maven.profiles.activation.AlwaysOnProfileActivator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profiles.activation.ProfileActivator</role>
|
||||
<role-hint>jdk-prefix</role-hint>
|
||||
<implementation>org.apache.maven.profiles.activation.JdkPrefixProfileActivator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profiles.activation.ProfileActivator</role>
|
||||
<role-hint>system-property</role-hint>
|
||||
<implementation>org.apache.maven.profiles.activation.SystemPropertyProfileActivator</implementation>
|
||||
</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>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.project.inheritance.ModelInheritanceAssembler</role>
|
||||
<implementation>org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.project.validation.ModelValidator</role>
|
||||
<implementation>org.apache.maven.project.validation.DefaultModelValidator</implementation>
|
||||
</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>
|
||||
<role>org.apache.maven.project.path.PathTranslator</role>
|
||||
<implementation>org.apache.maven.project.path.DefaultPathTranslator</implementation>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
|
||||
<implementation>org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory</implementation>
|
||||
<role>org.apache.maven.project.ModelResolver</role>
|
||||
<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>
|
||||
<role>org.apache.maven.wagon.Wagon</role>
|
||||
<role-hint>http</role-hint>
|
||||
<implementation>org.apache.maven.wagon.providers.http.LightweightHttpWagon</implementation>
|
||||
<instantiation-strategy>per-lookup</instantiation-strategy>
|
||||
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
|
||||
<role-hint>maven</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>
|
||||
</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>
|
||||
|
@ -362,156 +458,9 @@
|
|||
|
||||
<component>
|
||||
<role>org.apache.maven.wagon.Wagon</role>
|
||||
<role-hint>scm</role-hint>
|
||||
<implementation>org.apache.maven.wagon.providers.scm.ScmWagon</implementation>
|
||||
<role-hint>http</role-hint>
|
||||
<implementation>org.apache.maven.wagon.providers.http.LightweightHttpWagon</implementation>
|
||||
<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>
|
||||
</components>
|
||||
</component-set>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<taskdef name="dependencies" classname="org.apache.maven.artifact.ant.DependenciesTask"/>
|
||||
<taskdef name="install" classname="org.apache.maven.artifact.ant.InstallTask"/>
|
||||
<taskdef name="deploy" classname="org.apache.maven.artifact.ant.DeployTask"/>
|
||||
<taskdef name="install-provider" classname="org.apache.maven.artifact.ant.InstallWagonProviderTask"/>
|
||||
|
||||
<!-- Types -->
|
||||
<typedef name="localRepository" classname="org.apache.maven.artifact.ant.LocalRepository"/>
|
||||
|
|
Loading…
Reference in New Issue