From 30856aef92239a7660baa143fd4393ae692a9765 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Mon, 3 Oct 2005 13:22:55 +0000 Subject: [PATCH] PR: MNG-644 remove deprecated ant task properties git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@293336 13f79535-47bb-0310-9956-ffa450edef68 --- .../artifact/ant/AbstractArtifactTask.java | 16 ++++------ .../maven/artifact/ant/RemoteRepository.java | 30 ------------------- 2 files changed, 5 insertions(+), 41 deletions(-) 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 d6bf5a6b3c..c23f845eda 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 @@ -112,12 +112,8 @@ public abstract class AbstractArtifactTask { repositoryFactory = (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE ); - ArtifactRepositoryPolicy snapshots = buildArtifactRepositoryPolicy( repository.getSnapshots(), - repository.getSnapshotPolicy(), - repository.getChecksumPolicy() ); - ArtifactRepositoryPolicy releases = buildArtifactRepositoryPolicy( repository.getReleases(), - repository.getSnapshotPolicy(), - repository.getChecksumPolicy() ); + ArtifactRepositoryPolicy snapshots = buildArtifactRepositoryPolicy( repository.getSnapshots() ); + ArtifactRepositoryPolicy releases = buildArtifactRepositoryPolicy( repository.getReleases() ); artifactRepository = repositoryFactory.createArtifactRepository( "remote", repository.getUrl(), repositoryLayout, snapshots, releases ); @@ -137,13 +133,11 @@ public abstract class AbstractArtifactTask return artifactRepository; } - private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy, - String defaultUpdatePolicy, - String defaultChecksumPolicy ) + private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy ) { boolean enabled = true; - String updatePolicy = defaultUpdatePolicy; - String checksumPolicy = defaultChecksumPolicy; + String updatePolicy = null; + String checksumPolicy = null; if ( policy != null ) { diff --git a/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java b/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java index 7c43fd2d54..db3974cd1e 100755 --- a/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java +++ b/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java @@ -29,16 +29,6 @@ public class RemoteRepository private Authentication authentication; - /** - * @deprecated use <snapshots/> and <updatePolicy> instead. - */ - private String snapshotPolicy; - - /** - * @deprecated use <snapshots/> and <checksumPolicy> instead. - */ - private String checksumPolicy; - private Proxy proxy; private RepositoryPolicy snapshots; @@ -65,16 +55,6 @@ public class RemoteRepository this.authentication = authentication; } - public void setSnapshotPolicy( String snapshotPolicy ) - { - this.snapshotPolicy = snapshotPolicy; - } - - public String getSnapshotPolicy() - { - return snapshotPolicy; - } - public void addProxy( Proxy proxy ) { this.proxy = proxy; @@ -85,16 +65,6 @@ public class RemoteRepository return proxy; } - public String getChecksumPolicy() - { - return checksumPolicy; - } - - public void setChecksumPolicy( String checksumPolicy ) - { - this.checksumPolicy = checksumPolicy; - } - public RepositoryPolicy getSnapshots() { return snapshots;