org.apache.maven.profiles.Activation 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.
/*
* $Id$
*/
package org.apache.maven.profiles;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import java.util.Date;
/**
*
* The conditions within the build runtime environment
* which will trigger
* the automatic inclusion of the parent build profile.
*
*
* @version $Revision$ $Date$
*/
public class Activation implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Flag specifying whether this profile is active as a default.
*/
private boolean activeByDefault = false;
/**
*
* Specifies that this profile will be activated
* when a matching JDK is detected.
*
*/
private String jdk;
/**
*
* Specifies that this profile will be activated
* when matching OS attributes are detected.
*
*/
private ActivationOS os;
/**
*
* Specifies that this profile will be activated
* when this System property is specified.
*
*/
private ActivationProperty property;
/**
*
* Specifies that this profile will be activated
* based on existence of a file.
*
*/
private ActivationFile file;
//-----------/
//- Methods -/
//-----------/
/**
* Get
* Specifies that this profile will be activated
* based on existence of a file.
*
*
* @return ActivationFile
*/
public ActivationFile getFile()
{
return this.file;
} //-- ActivationFile getFile()
/**
* Get
* Specifies that this profile will be activated
* when a matching JDK is detected.
*
*
* @return String
*/
public String getJdk()
{
return this.jdk;
} //-- String getJdk()
/**
* Get
* Specifies that this profile will be activated
* when matching OS attributes are detected.
*
*
* @return ActivationOS
*/
public ActivationOS getOs()
{
return this.os;
} //-- ActivationOS getOs()
/**
* Get
* Specifies that this profile will be activated
* when this System property is specified.
*
*
* @return ActivationProperty
*/
public ActivationProperty getProperty()
{
return this.property;
} //-- ActivationProperty getProperty()
/**
* Get flag specifying whether this profile is active as a
* default.
*
* @return boolean
*/
public boolean isActiveByDefault()
{
return this.activeByDefault;
} //-- boolean isActiveByDefault()
/**
* Set flag specifying whether this profile is active as a
* default.
*
* @param activeByDefault
*/
public void setActiveByDefault( boolean activeByDefault )
{
this.activeByDefault = activeByDefault;
} //-- void setActiveByDefault( boolean )
/**
* Set
* Specifies that this profile will be activated
* based on existence of a file.
*
*
* @param file
*/
public void setFile( ActivationFile file )
{
this.file = file;
} //-- void setFile( ActivationFile )
/**
* Set
* Specifies that this profile will be activated
* when a matching JDK is detected.
*
*
* @param jdk
*/
public void setJdk( String jdk )
{
this.jdk = jdk;
} //-- void setJdk( String )
/**
* Set
* Specifies that this profile will be activated
* when matching OS attributes are detected.
*
*
* @param os
*/
public void setOs( ActivationOS os )
{
this.os = os;
} //-- void setOs( ActivationOS )
/**
* Set
* Specifies that this profile will be activated
* when this System property is specified.
*
*
* @param property
*/
public void setProperty( ActivationProperty property )
{
this.property = property;
} //-- void setProperty( ActivationProperty )
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;
}
}