mirror of https://github.com/apache/maven.git
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
This commit is contained in:
parent
fa65152c43
commit
30856aef92
|
@ -112,12 +112,8 @@ public abstract class AbstractArtifactTask
|
||||||
{
|
{
|
||||||
repositoryFactory = (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE );
|
repositoryFactory = (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE );
|
||||||
|
|
||||||
ArtifactRepositoryPolicy snapshots = buildArtifactRepositoryPolicy( repository.getSnapshots(),
|
ArtifactRepositoryPolicy snapshots = buildArtifactRepositoryPolicy( repository.getSnapshots() );
|
||||||
repository.getSnapshotPolicy(),
|
ArtifactRepositoryPolicy releases = buildArtifactRepositoryPolicy( repository.getReleases() );
|
||||||
repository.getChecksumPolicy() );
|
|
||||||
ArtifactRepositoryPolicy releases = buildArtifactRepositoryPolicy( repository.getReleases(),
|
|
||||||
repository.getSnapshotPolicy(),
|
|
||||||
repository.getChecksumPolicy() );
|
|
||||||
|
|
||||||
artifactRepository = repositoryFactory.createArtifactRepository( "remote", repository.getUrl(),
|
artifactRepository = repositoryFactory.createArtifactRepository( "remote", repository.getUrl(),
|
||||||
repositoryLayout, snapshots, releases );
|
repositoryLayout, snapshots, releases );
|
||||||
|
@ -137,13 +133,11 @@ public abstract class AbstractArtifactTask
|
||||||
return artifactRepository;
|
return artifactRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy,
|
private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy )
|
||||||
String defaultUpdatePolicy,
|
|
||||||
String defaultChecksumPolicy )
|
|
||||||
{
|
{
|
||||||
boolean enabled = true;
|
boolean enabled = true;
|
||||||
String updatePolicy = defaultUpdatePolicy;
|
String updatePolicy = null;
|
||||||
String checksumPolicy = defaultChecksumPolicy;
|
String checksumPolicy = null;
|
||||||
|
|
||||||
if ( policy != null )
|
if ( policy != null )
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,16 +29,6 @@ public class RemoteRepository
|
||||||
|
|
||||||
private Authentication authentication;
|
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 Proxy proxy;
|
||||||
|
|
||||||
private RepositoryPolicy snapshots;
|
private RepositoryPolicy snapshots;
|
||||||
|
@ -65,16 +55,6 @@ public class RemoteRepository
|
||||||
this.authentication = authentication;
|
this.authentication = authentication;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSnapshotPolicy( String snapshotPolicy )
|
|
||||||
{
|
|
||||||
this.snapshotPolicy = snapshotPolicy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSnapshotPolicy()
|
|
||||||
{
|
|
||||||
return snapshotPolicy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addProxy( Proxy proxy )
|
public void addProxy( Proxy proxy )
|
||||||
{
|
{
|
||||||
this.proxy = proxy;
|
this.proxy = proxy;
|
||||||
|
@ -85,16 +65,6 @@ public class RemoteRepository
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getChecksumPolicy()
|
|
||||||
{
|
|
||||||
return checksumPolicy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChecksumPolicy( String checksumPolicy )
|
|
||||||
{
|
|
||||||
this.checksumPolicy = checksumPolicy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RepositoryPolicy getSnapshots()
|
public RepositoryPolicy getSnapshots()
|
||||||
{
|
{
|
||||||
return snapshots;
|
return snapshots;
|
||||||
|
|
Loading…
Reference in New Issue