mirror of https://github.com/apache/maven.git
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:
parent
319f1f20ca
commit
ded92e5e2a
|
@ -29,11 +29,11 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="test-no-deps" depends="initTaskDefs">
|
<target name="test-no-deps" depends="initTaskDefs">
|
||||||
<artifact:dependencies filesetId="runtime.fileset">
|
<artifact:dependencies filesetId="runtime.fileset">
|
||||||
</artifact:dependencies>
|
</artifact:dependencies>
|
||||||
<copy todir="target/test-no-deps" verbose="true">
|
<copy todir="target/test-no-deps" verbose="true">
|
||||||
<fileset refid="runtime.fileset" />
|
<fileset refid="runtime.fileset"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="test-bad-dep" depends="initTaskDefs">
|
<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">
|
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2">
|
||||||
<exclusion groupId="junit" artifactId="junit"/>
|
<exclusion groupId="junit" artifactId="junit"/>
|
||||||
</dependency>
|
</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"/>
|
<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">
|
<remoteRepository url="http://snapshots.maven.codehaus.org/maven2">
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
<artifact:dependencies pathId="dependency.classpath">
|
<artifact:dependencies pathId="dependency.classpath">
|
||||||
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/>
|
<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"/>
|
<localRepository refid="local.repository"/>
|
||||||
</artifact:dependencies>
|
</artifact:dependencies>
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
|
|
||||||
<artifact:dependencies pathId="dependency.classpath.scm">
|
<artifact:dependencies pathId="dependency.classpath.scm">
|
||||||
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/>
|
<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"/>
|
<localRepository refid="local.repository.scm"/>
|
||||||
<remoteRepository refid="deploy.repository"/>
|
<remoteRepository refid="deploy.repository"/>
|
||||||
</artifact:dependencies>
|
</artifact:dependencies>
|
||||||
|
|
|
@ -294,6 +294,9 @@ public abstract class AbstractArtifactTask
|
||||||
// TODO: could we utilise the super POM for this?
|
// TODO: could we utilise the super POM for this?
|
||||||
RemoteRepository remoteRepository = new RemoteRepository();
|
RemoteRepository remoteRepository = new RemoteRepository();
|
||||||
remoteRepository.setUrl( "http://repo1.maven.org/maven2" );
|
remoteRepository.setUrl( "http://repo1.maven.org/maven2" );
|
||||||
|
RepositoryPolicy snapshots = new RepositoryPolicy();
|
||||||
|
snapshots.setEnabled( false );
|
||||||
|
remoteRepository.addSnapshots( snapshots );
|
||||||
return remoteRepository;
|
return remoteRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue