org.apache.maven.archiver

Class ManifestConfiguration

public class ManifestConfiguration extends Object

Capture common manifest configuration.

Version: $Id: ManifestConfiguration.java 697981 2008-09-22 20:44:40Z jdcasey $

Author: Brett Porter

UNKNOWN: is this general enough to be in Plexus Archiver?

Field Summary
static StringCLASSPATH_LAYOUT_TYPE_CUSTOM
static StringCLASSPATH_LAYOUT_TYPE_REPOSITORY
static StringCLASSPATH_LAYOUT_TYPE_SIMPLE
Method Summary
StringgetClasspathLayoutType()
Return the type of layout to use when formatting classpath entries.
StringgetClasspathPrefix()
StringgetCustomClasspathLayout()
Retrieve the layout expression for use when the layout type set in setClasspathLayoutType has the value 'custom'.
StringgetMainClass()
StringgetPackageName()
booleanisAddClasspath()
booleanisAddDefaultImplementationEntries()
booleanisAddDefaultSpecificationEntries()
booleanisAddExtensions()
booleanisClasspathMavenRepositoryLayout()
booleanisUseUniqueVersions()
Retrieve the flag for whether snapshot artifacts should be added to the classpath using the timestamp/buildnumber version (the default, when this flag is true), or using the generic -SNAPSHOT version (when the flag is false).
voidsetAddClasspath(boolean addClasspath)
voidsetAddDefaultImplementationEntries(boolean addDefaultImplementationEntries)
voidsetAddDefaultSpecificationEntries(boolean addDefaultSpecificationEntries)
voidsetAddExtensions(boolean addExtensions)
voidsetClasspathLayoutType(String classpathLayoutType)
Set the type of layout to use when formatting classpath entries.
voidsetClasspathMavenRepositoryLayout(boolean classpathMavenRepositoryLayout)
voidsetClasspathPrefix(String classpathPrefix)
voidsetCustomClasspathLayout(String customClasspathLayout)
Set the layout expression for use when the layout type set in setClasspathLayoutType has the value 'custom'.
voidsetMainClass(String mainClass)
voidsetPackageName(String packageName)
voidsetUseUniqueVersions(boolean useUniqueVersions)
Set the flag for whether snapshot artifacts should be added to the classpath using the timestamp/buildnumber version (the default, when this flag is true), or using the generic -SNAPSHOT version (when the flag is false).

Field Detail

CLASSPATH_LAYOUT_TYPE_CUSTOM

public static final String CLASSPATH_LAYOUT_TYPE_CUSTOM

CLASSPATH_LAYOUT_TYPE_REPOSITORY

public static final String CLASSPATH_LAYOUT_TYPE_REPOSITORY

CLASSPATH_LAYOUT_TYPE_SIMPLE

public static final String CLASSPATH_LAYOUT_TYPE_SIMPLE

Method Detail

getClasspathLayoutType

public String getClasspathLayoutType()
Return the type of layout to use when formatting classpath entries. Default is taken from the constant CLASSPATH_LAYOUT_TYPE_SIMPLE, declared in this class, which has a value of 'simple'. Other values are: 'repository' (CLASSPATH_LAYOUT_TYPE_REPOSITORY, or the same as a maven classpath layout), and 'custom' (CLASSPATH_LAYOUT_TYPE_CUSTOM).
NOTE: If you specify a type of 'custom' you MUST set setCustomClasspathLayout.

getClasspathPrefix

public String getClasspathPrefix()

getCustomClasspathLayout

public String getCustomClasspathLayout()
Retrieve the layout expression for use when the layout type set in setClasspathLayoutType has the value 'custom'. The default value is null. Expressions will be evaluated against the following ordered list of classpath-related objects:
  1. The current Artifact instance, if one exists.
  2. The current ArtifactHandler instance from the artifact above.

NOTE: If you specify a layout type of 'custom' you MUST set this layout expression.

getMainClass

public String getMainClass()

getPackageName

public String getPackageName()

isAddClasspath

public boolean isAddClasspath()

isAddDefaultImplementationEntries

public boolean isAddDefaultImplementationEntries()

isAddDefaultSpecificationEntries

public boolean isAddDefaultSpecificationEntries()

isAddExtensions

public boolean isAddExtensions()

isClasspathMavenRepositoryLayout

public boolean isClasspathMavenRepositoryLayout()

Deprecated: Use getClasspathLayoutType, and compare to CLASSPATH_LAYOUT_TYPE_SIMPLE or CLASSPATH_LAYOUT_TYPE_REPOSITORY, also declared in ManifestConfiguration.

isUseUniqueVersions

public boolean isUseUniqueVersions()
Retrieve the flag for whether snapshot artifacts should be added to the classpath using the timestamp/buildnumber version (the default, when this flag is true), or using the generic -SNAPSHOT version (when the flag is false).
NOTE: If the snapshot was installed locally, this flag will not have an effect on that artifact's inclusion, since it will have the same version either way (i.e. -SNAPSHOT naming).

setAddClasspath

public void setAddClasspath(boolean addClasspath)

setAddDefaultImplementationEntries

public void setAddDefaultImplementationEntries(boolean addDefaultImplementationEntries)

setAddDefaultSpecificationEntries

public void setAddDefaultSpecificationEntries(boolean addDefaultSpecificationEntries)

setAddExtensions

public void setAddExtensions(boolean addExtensions)

setClasspathLayoutType

public void setClasspathLayoutType(String classpathLayoutType)
Set the type of layout to use when formatting classpath entries. Should be one of: 'simple' (CLASSPATH_LAYOUT_TYPE_SIMPLE), 'repository' (CLASSPATH_LAYOUT_TYPE_REPOSITORY, or the same as a maven classpath layout), and 'custom' (CLASSPATH_LAYOUT_TYPE_CUSTOM). The constant names noted here are defined in the ManifestConfiguration class.
NOTE: If you specify a type of 'custom' you MUST set setCustomClasspathLayout.

setClasspathMavenRepositoryLayout

public void setClasspathMavenRepositoryLayout(boolean classpathMavenRepositoryLayout)

Deprecated: Use setClasspathLayoutType, and use CLASSPATH_LAYOUT_TYPE_SIMPLE, CLASSPATH_LAYOUT_TYPE_CUSTOM, or CLASSPATH_LAYOUT_TYPE_REPOSITORY, also declared in ManifestConfiguration.

setClasspathPrefix

public void setClasspathPrefix(String classpathPrefix)

setCustomClasspathLayout

public void setCustomClasspathLayout(String customClasspathLayout)
Set the layout expression for use when the layout type set in setClasspathLayoutType has the value 'custom'. Expressions will be evaluated against the following ordered list of classpath-related objects:
  1. The current Artifact instance, if one exists.
  2. The current ArtifactHandler instance from the artifact above.

NOTE: If you specify a layout type of 'custom' you MUST set this layout expression.

setMainClass

public void setMainClass(String mainClass)

setPackageName

public void setPackageName(String packageName)

setUseUniqueVersions

public void setUseUniqueVersions(boolean useUniqueVersions)
Set the flag for whether snapshot artifacts should be added to the classpath using the timestamp/buildnumber version (the default, when this flag is true), or using the generic -SNAPSHOT version (when the flag is false).
NOTE: If the snapshot was installed locally, this flag will not have an effect on that artifact's inclusion, since it will have the same version either way (i.e. -SNAPSHOT naming).
Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.