Class MavenArchiveConfiguration
- java.lang.Object
-
- org.apache.maven.archiver.MavenArchiveConfiguration
-
public class MavenArchiveConfiguration extends java.lang.Object
Capture common archive configuration.- Author:
- Brett Porter
-
-
Constructor Summary
Constructors Constructor Description MavenArchiveConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addManifestEntries(java.util.Map<java.lang.String,java.lang.String> map)
addManifestEntries.void
addManifestEntry(java.lang.String key, java.lang.String value)
addManifestEntry.void
addManifestSection(ManifestSection section)
addManifestSection.void
addManifestSections(java.util.List<ManifestSection> list)
addManifestSections.ManifestConfiguration
getManifest()
Getter for the fieldmanifest
.java.util.Map<java.lang.String,java.lang.String>
getManifestEntries()
Getter for the fieldmanifestEntries
.java.io.File
getManifestFile()
Getter for the fieldmanifestFile
.java.util.List<ManifestSection>
getManifestSections()
Getter for the fieldmanifestSections
.java.io.File
getPomPropertiesFile()
Returns the location of the "pom.properties" file.boolean
isAddMavenDescriptor()
isAddMavenDescriptor.boolean
isCompress()
isCompress.boolean
isForced()
Returns, whether recreating the archive is forced (default).boolean
isIndex()
Deprecated.See JDK-8305597boolean
isManifestEntriesEmpty()
isManifestEntriesEmpty.boolean
isManifestSectionsEmpty()
isManifestSectionsEmpty.boolean
isRecompressAddedZips()
isRecompressAddedZips.void
setAddMavenDescriptor(boolean addMavenDescriptor)
Setter for the fieldaddMavenDescriptor
.void
setCompress(boolean compress)
Setter for the fieldcompress
.void
setForced(boolean forced)
Sets, whether recreating the archive is forced (default).void
setIndex(boolean index)
Deprecated.See JDK-8305597void
setManifest(ManifestConfiguration manifest)
Setter for the fieldmanifest
.void
setManifestEntries(java.util.Map<java.lang.String,java.lang.String> manifestEntries)
Setter for the fieldmanifestEntries
.void
setManifestFile(java.io.File manifestFile)
Setter for the fieldmanifestFile
.void
setManifestSections(java.util.List<ManifestSection> manifestSections)
Setter for the fieldmanifestSections
.void
setPomPropertiesFile(java.io.File pomPropertiesFile)
Sets the location of the "pom.properties" file.void
setRecompressAddedZips(boolean recompressAddedZips)
Setter for the fieldrecompressAddedZips
.
-
-
-
Method Detail
-
isCompress
public boolean isCompress()
isCompress.
- Returns:
compress
-
isRecompressAddedZips
public boolean isRecompressAddedZips()
isRecompressAddedZips.
- Returns:
recompressAddedZips
-
setRecompressAddedZips
public void setRecompressAddedZips(boolean recompressAddedZips)
Setter for the field
recompressAddedZips
.- Parameters:
recompressAddedZips
-recompressAddedZips
-
isIndex
@Deprecated public boolean isIndex()
Deprecated.See JDK-8305597isIndex.
- Returns:
index
-
isAddMavenDescriptor
public boolean isAddMavenDescriptor()
isAddMavenDescriptor.
- Returns:
addMavenDescriptor
-
getManifestFile
public java.io.File getManifestFile()
Getter for the field
manifestFile
.- Returns:
manifestFile
-
getManifest
public ManifestConfiguration getManifest()
Getter for the field
manifest
.- Returns:
manifest
-
setCompress
public void setCompress(boolean compress)
Setter for the field
compress
.- Parameters:
compress
- set compress to true/false.
-
setIndex
@Deprecated public void setIndex(boolean index)
Deprecated.See JDK-8305597Setter for the field
index
.- Parameters:
index
- set index to true/false.
-
setAddMavenDescriptor
public void setAddMavenDescriptor(boolean addMavenDescriptor)
Setter for the field
addMavenDescriptor
.- Parameters:
addMavenDescriptor
- activate to add maven descriptor or not.
-
setManifestFile
public void setManifestFile(java.io.File manifestFile)
Setter for the field
manifestFile
.- Parameters:
manifestFile
- The manifest file.
-
setManifest
public void setManifest(ManifestConfiguration manifest)
Setter for the field
manifest
.- Parameters:
manifest
-ManifestConfiguration
-
addManifestEntry
public void addManifestEntry(java.lang.String key, java.lang.String value)
addManifestEntry.
- Parameters:
key
- The key of the entry.value
- The value of the entry.
-
addManifestEntries
public void addManifestEntries(java.util.Map<java.lang.String,java.lang.String> map)
addManifestEntries.
- Parameters:
map
- The whole map which should be added.
-
isManifestEntriesEmpty
public boolean isManifestEntriesEmpty()
isManifestEntriesEmpty.
- Returns:
- are there entries true yes false otherwise.
-
getManifestEntries
public java.util.Map<java.lang.String,java.lang.String> getManifestEntries()
Getter for the field
manifestEntries
.- Returns:
manifestEntries
-
setManifestEntries
public void setManifestEntries(java.util.Map<java.lang.String,java.lang.String> manifestEntries)
Setter for the field
manifestEntries
.- Parameters:
manifestEntries
-manifestEntries
-
addManifestSection
public void addManifestSection(ManifestSection section)
addManifestSection.
- Parameters:
section
-ManifestSection
-
addManifestSections
public void addManifestSections(java.util.List<ManifestSection> list)
addManifestSections.
- Parameters:
list
- Added list ofManifestSection
.
-
isManifestSectionsEmpty
public boolean isManifestSectionsEmpty()
isManifestSectionsEmpty.
- Returns:
- if manifestSections is empty or not.
-
getManifestSections
public java.util.List<ManifestSection> getManifestSections()
Getter for the field
manifestSections
.- Returns:
manifestSections
-
setManifestSections
public void setManifestSections(java.util.List<ManifestSection> manifestSections)
Setter for the field
manifestSections
.- Parameters:
manifestSections
- set The list ofManifestSection
.
-
isForced
public boolean isForced()
Returns, whether recreating the archive is forced (default). Setting this option to false means, that the archiver should compare the timestamps of included files with the timestamp of the target archive and rebuild the archive only, if the latter timestamp precedes the former timestamps. Checking for timestamps will typically offer a performance gain (in particular, if the following steps in a build can be suppressed, if an archive isn't recrated) on the cost that you get inaccurate results from time to time. In particular, removal of source files won't be detected.
An archiver doesn't necessarily support checks for uptodate. If so, setting this option to true will simply be ignored.
- Returns:
- True, if the target archive should always be created; false otherwise
- See Also:
setForced(boolean)
-
setForced
public void setForced(boolean forced)
Sets, whether recreating the archive is forced (default). Setting this option to false means, that the archiver should compare the timestamps of included files with the timestamp of the target archive and rebuild the archive only, if the latter timestamp precedes the former timestamps. Checking for timestamps will typically offer a performance gain (in particular, if the following steps in a build can be suppressed, if an archive isn't recrated) on the cost that you get inaccurate results from time to time. In particular, removal of source files won't be detected.
An archiver doesn't necessarily support checks for uptodate. If so, setting this option to true will simply be ignored.
- Parameters:
forced
- True, if the target archive should always be created; false otherwise- See Also:
isForced()
-
getPomPropertiesFile
public java.io.File getPomPropertiesFile()
Returns the location of the "pom.properties" file. May be null, in which case a default value is choosen.- Returns:
- "pom.properties" location or null.
-
setPomPropertiesFile
public void setPomPropertiesFile(java.io.File pomPropertiesFile)
Sets the location of the "pom.properties" file. May be null, in which case a default value is choosen.- Parameters:
pomPropertiesFile
- "pom.properties" location or null.
-
-