org.apache.maven.plugin.assembly.model.GroupVersionAlignment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-assembly-plugin Show documentation
Show all versions of maven-assembly-plugin Show documentation
A Maven plugin to create archives of your project's sources, classes, dependencies etc. from flexible assembly descriptors.
/*
* $Id$
*/
package org.apache.maven.plugin.assembly.model;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import java.util.Date;
/**
* Defines a Maven repository to be included in the assembly.
*
* @version $Revision$ $Date$
*/
public class GroupVersionAlignment implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* The groupId for which you want to align the versions.
*/
private String id;
/**
* The version you want to align this group to.
*/
private String version;
/**
* Field excludes.
*/
private java.util.List excludes;
//-----------/
//- Methods -/
//-----------/
/**
* Method addExclude.
*
* @param string
*/
public void addExclude(String string)
{
if ( !(string instanceof String) )
{
throw new ClassCastException( "GroupVersionAlignment.addExcludes(string) parameter must be instanceof " + String.class.getName() );
}
getExcludes().add( string );
} //-- void addExclude(String)
/**
* Method getExcludes.
*
* @return java.util.List
*/
public java.util.List getExcludes()
{
if ( this.excludes == null )
{
this.excludes = new java.util.ArrayList();
}
return this.excludes;
} //-- java.util.List getExcludes()
/**
* Get the groupId for which you want to align the versions.
*
* @return String
*/
public String getId()
{
return this.id;
} //-- String getId()
/**
* Get the version you want to align this group to.
*
* @return String
*/
public String getVersion()
{
return this.version;
} //-- String getVersion()
/**
* Method removeExclude.
*
* @param string
*/
public void removeExclude(String string)
{
if ( !(string instanceof String) )
{
throw new ClassCastException( "GroupVersionAlignment.removeExcludes(string) parameter must be instanceof " + String.class.getName() );
}
getExcludes().remove( string );
} //-- void removeExclude(String)
/**
* Set artifact Ids of the artifacts you want excluded from
* version alignment.
*
* @param excludes
*/
public void setExcludes(java.util.List excludes)
{
this.excludes = excludes;
} //-- void setExcludes(java.util.List)
/**
* Set the groupId for which you want to align the versions.
*
* @param id
*/
public void setId(String id)
{
this.id = id;
} //-- void setId(String)
/**
* Set the version you want to align this group to.
*
* @param version
*/
public void setVersion(String version)
{
this.version = version;
} //-- void setVersion(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;
}
}