Package org.apache.maven.archiver
Class ManifestConfiguration
- java.lang.Object
-
- org.apache.maven.archiver.ManifestConfiguration
-
public class ManifestConfiguration extends java.lang.ObjectCapture common manifest configuration.- Author:
- Brett Porter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLASSPATH_LAYOUT_TYPE_CUSTOMcustom layout type.static java.lang.StringCLASSPATH_LAYOUT_TYPE_REPOSITORYThe layout typestatic java.lang.StringCLASSPATH_LAYOUT_TYPE_SIMPLEThe simple layout.
-
Constructor Summary
Constructors Constructor Description ManifestConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetClasspathLayoutType()Return the type of layout to use when formatting classpath entries.java.lang.StringgetClasspathPrefix()Getter for the fieldclasspathPrefix.java.lang.StringgetCustomClasspathLayout()Retrieve the layout expression for use when the layout type set insetClasspathLayoutType(String)has the value 'custom'.java.lang.StringgetMainClass()Getter for the fieldmainClass.java.lang.StringgetPackageName()Getter for the fieldpackageName.booleanisAddBuildEnvironmentEntries()isAddBuildEnvironmentEntries.booleanisAddClasspath()isAddClasspath.booleanisAddDefaultEntries()isAddDefaultEntries.booleanisAddDefaultImplementationEntries()isAddDefaultImplementationEntries.booleanisAddDefaultSpecificationEntries()isAddDefaultSpecificationEntries.booleanisAddExtensions()isAddExtensions.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).voidsetAddBuildEnvironmentEntries(boolean addBuildEnvironmentEntries)Setter for the fieldaddBuildEnvironmentEntries.voidsetAddClasspath(boolean addClasspath)Setter for the fieldaddClasspath.voidsetAddDefaultEntries(boolean addDefaultEntries)Setter for the fieldaddDefaultEntries.voidsetAddDefaultImplementationEntries(boolean addDefaultImplementationEntries)Setter for the fieldaddDefaultImplementationEntries.voidsetAddDefaultSpecificationEntries(boolean addDefaultSpecificationEntries)Setter for the fieldaddDefaultSpecificationEntries.voidsetAddExtensions(boolean addExtensions)Setter for the fieldaddExtensions.voidsetClasspathLayoutType(java.lang.String classpathLayoutType)Set the type of layout to use when formatting classpath entries.voidsetClasspathPrefix(java.lang.String classpathPrefix)Setter for the fieldclasspathPrefix.voidsetCustomClasspathLayout(java.lang.String customClasspathLayout)Set the layout expression for use when the layout type set insetClasspathLayoutType(String)has the value 'custom'.voidsetMainClass(java.lang.String mainClass)Setter for the fieldmainClass.voidsetPackageName(java.lang.String packageName)Setter for the fieldpackageName.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_SIMPLE
public static final java.lang.String CLASSPATH_LAYOUT_TYPE_SIMPLE
The simple layout.- See Also:
- Constant Field Values
-
CLASSPATH_LAYOUT_TYPE_REPOSITORY
public static final java.lang.String CLASSPATH_LAYOUT_TYPE_REPOSITORY
The layout type- See Also:
- Constant Field Values
-
CLASSPATH_LAYOUT_TYPE_CUSTOM
public static final java.lang.String CLASSPATH_LAYOUT_TYPE_CUSTOM
custom layout type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getMainClass
public java.lang.String getMainClass()
Getter for the field
mainClass.- Returns:
- mainClass
-
getPackageName
public java.lang.String getPackageName()
Getter for the field
packageName.- Returns:
- the package name.
-
isAddClasspath
public boolean isAddClasspath()
isAddClasspath.
- Returns:
- if addClasspath true or false.
-
isAddDefaultEntries
public boolean isAddDefaultEntries()
isAddDefaultEntries.
- Returns:
addDefaultEntries
-
isAddBuildEnvironmentEntries
public boolean isAddBuildEnvironmentEntries()
isAddBuildEnvironmentEntries.
- Returns:
addBuildEnvironmentEntries
-
isAddDefaultImplementationEntries
public boolean isAddDefaultImplementationEntries()
isAddDefaultImplementationEntries.
- Returns:
addDefaultImplementationEntries
-
isAddDefaultSpecificationEntries
public boolean isAddDefaultSpecificationEntries()
isAddDefaultSpecificationEntries.
- Returns:
addDefaultSpecificationEntries
-
isAddExtensions
public boolean isAddExtensions()
isAddExtensions.
- Returns:
addExtensions
-
setAddClasspath
public void setAddClasspath(boolean addClasspath)
Setter for the field
addClasspath.- Parameters:
addClasspath- turn on addClasspath or off.
-
setAddDefaultEntries
public void setAddDefaultEntries(boolean addDefaultEntries)
Setter for the field
addDefaultEntries.- Parameters:
addDefaultEntries- add default entries true/false.
-
setAddBuildEnvironmentEntries
public void setAddBuildEnvironmentEntries(boolean addBuildEnvironmentEntries)
Setter for the field
addBuildEnvironmentEntries.- Parameters:
addBuildEnvironmentEntries- add build environment information true/false.
-
setAddDefaultImplementationEntries
public void setAddDefaultImplementationEntries(boolean addDefaultImplementationEntries)
Setter for the field
addDefaultImplementationEntries.- Parameters:
addDefaultImplementationEntries- true to add default implementations false otherwise.
-
setAddDefaultSpecificationEntries
public void setAddDefaultSpecificationEntries(boolean addDefaultSpecificationEntries)
Setter for the field
addDefaultSpecificationEntries.- Parameters:
addDefaultSpecificationEntries- add default specifications true/false.
-
setAddExtensions
public void setAddExtensions(boolean addExtensions)
Setter for the field
addExtensions.- Parameters:
addExtensions- true to add extensions false otherwise.
-
setClasspathPrefix
public void setClasspathPrefix(java.lang.String classpathPrefix)
Setter for the field
classpathPrefix.- Parameters:
classpathPrefix- The prefix.
-
setMainClass
public void setMainClass(java.lang.String mainClass)
Setter for the field
mainClass.- Parameters:
mainClass- The main class.
-
setPackageName
public void setPackageName(java.lang.String packageName)
Setter for the field
packageName.- Parameters:
packageName- The package name.
-
getClasspathPrefix
public java.lang.String getClasspathPrefix()
Getter for the field
classpathPrefix.- Returns:
- The classpath prefix.
-
getClasspathLayoutType
public java.lang.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 setsetCustomClasspathLayout(String).- Returns:
- The classpath layout type.
-
setClasspathLayoutType
public void setClasspathLayoutType(java.lang.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 theManifestConfigurationclass.
NOTE: If you specify a type of 'custom' you MUST setsetCustomClasspathLayout(String).- Parameters:
classpathLayoutType- The classpath layout type.
-
getCustomClasspathLayout
public java.lang.String getCustomClasspathLayout()
Retrieve the layout expression for use when the layout type set insetClasspathLayoutType(String)has the value 'custom'. The default value is null. Expressions will be evaluated against the following ordered list of classpath-related objects:- The current
Artifactinstance, if one exists. - The current
ArtifactHandlerinstance from the artifact above.
NOTE: If you specify a layout type of 'custom' you MUST set this layout expression.- Returns:
- The custom classpath layout.
- The current
-
setCustomClasspathLayout
public void setCustomClasspathLayout(java.lang.String customClasspathLayout)
Set the layout expression for use when the layout type set insetClasspathLayoutType(String)has the value 'custom'. Expressions will be evaluated against the following ordered list of classpath-related objects:- The current
Artifactinstance, if one exists. - The current
ArtifactHandlerinstance from the artifact above.
NOTE: If you specify a layout type of 'custom' you MUST set this layout expression. You can take a look at how such an expression looks like.- Parameters:
customClasspathLayout- The custom classpath layout.
- The current
-
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).- Returns:
- The state of
useUniqueVersions
-
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).- Parameters:
useUniqueVersions- true to use unique versions or not.
-
-