mirror of https://github.com/apache/maven.git
updates to versions, and make sure it is valid not to have a <localRepository/> element
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
44e1bed14f
commit
bfd3f284e2
|
@ -28,16 +28,22 @@
|
|||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-http-lightweight</artifactId>
|
||||
<version>1.0-alpha-3-SNAPSHOT</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-file</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<version>1.0-alpha-3-SNAPSHOT</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-ssh</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<version>1.0-alpha-3-SNAPSHOT</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -30,18 +30,18 @@
|
|||
<localRepository refid="local.repository"/>
|
||||
</artifact:dependencies>
|
||||
|
||||
<artifact:install file="target/maven-artifact-ant-1.0-alpha-2-SNAPSHOT.jar">
|
||||
<artifact:install file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
||||
<localRepository refid="local.repository"/>
|
||||
<pom refid="maven.project"/>
|
||||
</artifact:install>
|
||||
|
||||
<artifact:deploy file="target/maven-artifact-ant-1.0-alpha-2-SNAPSHOT.jar">
|
||||
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
||||
<localRepository refid="local.repository"/>
|
||||
<remoteRepository refid="deploy.repository"/>
|
||||
<pom refid="maven.project"/>
|
||||
</artifact:deploy>
|
||||
|
||||
<artifact:deploy file="target/maven-artifact-ant-1.0-alpha-2-SNAPSHOT.jar">
|
||||
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
||||
<localRepository refid="local.repository"/>
|
||||
<remoteRepository url="scp://localhost/tmp/deployment-repo">
|
||||
<authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/>
|
||||
|
|
|
@ -25,6 +25,8 @@ import org.codehaus.plexus.PlexusContainerException;
|
|||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
||||
import org.codehaus.plexus.embed.Embedder;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Base class for artifact tasks.
|
||||
*
|
||||
|
@ -105,4 +107,11 @@ public abstract class AbstractArtifactTask
|
|||
}
|
||||
return embedder;
|
||||
}
|
||||
|
||||
protected LocalRepository getDefaultLocalRepository()
|
||||
{
|
||||
LocalRepository localRepository = new LocalRepository();
|
||||
localRepository.setLocation( new File( System.getProperty( "user.home" ), ".m2/repository" ) );
|
||||
return localRepository;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,11 @@ public class DependenciesTask
|
|||
|
||||
public void execute()
|
||||
{
|
||||
if ( localRepository == null )
|
||||
{
|
||||
localRepository = getDefaultLocalRepository();
|
||||
}
|
||||
|
||||
ArtifactRepository localRepo = createArtifactRepository( localRepository );
|
||||
|
||||
ArtifactFactory factory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
|
||||
|
|
|
@ -47,6 +47,11 @@ public class DeployTask
|
|||
|
||||
public void execute()
|
||||
{
|
||||
if ( localRepository == null )
|
||||
{
|
||||
localRepository = getDefaultLocalRepository();
|
||||
}
|
||||
|
||||
ArtifactRepository localRepo = createArtifactRepository( localRepository );
|
||||
pom.initialise( (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE ), localRepo );
|
||||
|
||||
|
|
|
@ -46,6 +46,11 @@ public class InstallTask
|
|||
|
||||
public void execute()
|
||||
{
|
||||
if ( localRepository == null )
|
||||
{
|
||||
localRepository = getDefaultLocalRepository();
|
||||
}
|
||||
|
||||
ArtifactRepository localRepo = createArtifactRepository( localRepository );
|
||||
pom.initialise( (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE ), localRepo );
|
||||
|
||||
|
|
|
@ -222,9 +222,6 @@
|
|||
<requirement>
|
||||
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.apache.maven.settings.MavenSettingsBuilder</role>
|
||||
</requirement>
|
||||
</requirements>
|
||||
</component>
|
||||
<!--
|
||||
|
@ -265,14 +262,6 @@
|
|||
<implementation>org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory</implementation>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<role>org.apache.maven.settings.MavenSettingsBuilder</role>
|
||||
<implementation>org.apache.maven.settings.DefaultMavenSettingsBuilder</implementation>
|
||||
<configuration>
|
||||
<settingsPath>${user.home}/.m2/settings.xml</settingsPath>
|
||||
</configuration>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<role>org.apache.maven.wagon.Wagon</role>
|
||||
<role-hint>http</role-hint>
|
||||
|
|
Loading…
Reference in New Issue