org.apache.maven.profiles.RepositoryPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-project Show documentation
Show all versions of maven-project Show documentation
This library is used to not only read Maven project object model files, but to assemble inheritence
and to retrieve remote models as required.
The newest version!
/*
* $Id$
*/
package org.apache.maven.profiles;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import java.util.Date;
/**
* Download policy.
*
* @version $Revision$ $Date$
*/
public class RepositoryPolicy implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Whether to use this repository for downloading this type of
* artifact.
*/
private boolean enabled = true;
/**
*
* The frequency for downloading updates - can be
* "always", "daily" (default), "interval:XXX" (in minutes) or
* "never" (only if it doesn't exist locally).
*
*/
private String updatePolicy;
/**
* What to do when verification of an artifact checksum fails -
* warn, fail, etc. Valid values are
* "fail" or "warn".
*/
private String checksumPolicy;
//-----------/
//- Methods -/
//-----------/
/**
* Get what to do when verification of an artifact checksum
* fails - warn, fail, etc. Valid values are
* "fail" or "warn".
*
* @return String
*/
public String getChecksumPolicy()
{
return this.checksumPolicy;
} //-- String getChecksumPolicy()
/**
* Get
* The frequency for downloading updates - can be
* "always", "daily" (default), "interval:XXX" (in minutes) or
* "never" (only if it doesn't exist locally).
*
*
* @return String
*/
public String getUpdatePolicy()
{
return this.updatePolicy;
} //-- String getUpdatePolicy()
/**
* Get whether to use this repository for downloading this type
* of artifact.
*
* @return boolean
*/
public boolean isEnabled()
{
return this.enabled;
} //-- boolean isEnabled()
/**
* Set what to do when verification of an artifact checksum
* fails - warn, fail, etc. Valid values are
* "fail" or "warn".
*
* @param checksumPolicy
*/
public void setChecksumPolicy( String checksumPolicy )
{
this.checksumPolicy = checksumPolicy;
} //-- void setChecksumPolicy( String )
/**
* Set whether to use this repository for downloading this type
* of artifact.
*
* @param enabled
*/
public void setEnabled( boolean enabled )
{
this.enabled = enabled;
} //-- void setEnabled( boolean )
/**
* Set
* The frequency for downloading updates - can be
* "always", "daily" (default), "interval:XXX" (in minutes) or
* "never" (only if it doesn't exist locally).
*
*
* @param updatePolicy
*/
public void setUpdatePolicy( String updatePolicy )
{
this.updatePolicy = updatePolicy;
} //-- void setUpdatePolicy( String )
private String modelEncoding = "UTF-8";
/**
* Set an encoding used for reading/writing the model.
*
* @param modelEncoding the encoding used when reading/writing the model.
*/
public void setModelEncoding( String modelEncoding )
{
this.modelEncoding = modelEncoding;
}
/**
* @return the current encoding used when reading/writing this model.
*/
public String getModelEncoding()
{
return modelEncoding;
}
}