disallow snapshots from the default repository in the ant tasks

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280278 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-12 07:17:11 +00:00
parent 319f1f20ca
commit ded92e5e2a
2 changed files with 11 additions and 8 deletions

View File

@ -29,11 +29,11 @@
</target>
<target name="test-no-deps" depends="initTaskDefs">
<artifact:dependencies filesetId="runtime.fileset">
</artifact:dependencies>
<copy todir="target/test-no-deps" verbose="true">
<fileset refid="runtime.fileset" />
</copy>
<artifact:dependencies filesetId="runtime.fileset">
</artifact:dependencies>
<copy todir="target/test-no-deps" verbose="true">
<fileset refid="runtime.fileset"/>
</copy>
</target>
<target name="test-bad-dep" depends="initTaskDefs">
@ -61,7 +61,7 @@
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2">
<exclusion groupId="junit" artifactId="junit"/>
</dependency>
<dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-4-SNAPSHOT"/>
<dependency groupId="plexus" artifactId="plexus-container-default" version="1.0-alpha-6-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">
@ -135,7 +135,7 @@
<artifact:dependencies pathId="dependency.classpath">
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/>
<dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-4-SNAPSHOT"/>
<dependency groupId="plexus" artifactId="plexus-container-default" version="1.0-alpha-6-SNAPSHOT"/>
<localRepository refid="local.repository"/>
</artifact:dependencies>
@ -154,7 +154,7 @@
<artifact:dependencies pathId="dependency.classpath.scm">
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/>
<dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-4-SNAPSHOT"/>
<dependency groupId="plexus" artifactId="plexus-container-default" version="1.0-alpha-6-SNAPSHOT"/>
<localRepository refid="local.repository.scm"/>
<remoteRepository refid="deploy.repository"/>
</artifact:dependencies>

View File

@ -294,6 +294,9 @@ public abstract class AbstractArtifactTask
// TODO: could we utilise the super POM for this?
RemoteRepository remoteRepository = new RemoteRepository();
remoteRepository.setUrl( "http://repo1.maven.org/maven2" );
RepositoryPolicy snapshots = new RepositoryPolicy();
snapshots.setEnabled( false );
remoteRepository.addSnapshots( snapshots );
return remoteRepository;
}