diff --git a/maven-artifact-ant/sample.build.xml b/maven-artifact-ant/sample.build.xml index a3a833539a..6e6a1bf7d0 100644 --- a/maven-artifact-ant/sample.build.xml +++ b/maven-artifact-ant/sample.build.xml @@ -29,11 +29,11 @@ - - - - - + + + + + @@ -61,7 +61,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -154,7 +154,7 @@ - + diff --git a/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java b/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java index 63130b60b8..c51b3a8598 100755 --- a/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java +++ b/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java @@ -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; }