Class MavenArchiveConfiguration
- java.lang.Object
-
- org.apache.maven.archiver.MavenArchiveConfiguration
-
public class MavenArchiveConfiguration extends Object
Capture common archive configuration.- Author:
- Brett Porter
-
-
Constructor Summary
Constructors Constructor Description MavenArchiveConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addManifestEntries(Map<String,String> map)
void
addManifestEntry(String key, String value)
void
addManifestSection(ManifestSection section)
void
addManifestSections(List<ManifestSection> list)
ManifestConfiguration
getManifest()
Map<String,String>
getManifestEntries()
File
getManifestFile()
List<ManifestSection>
getManifestSections()
File
getPomPropertiesFile()
Returns the location of the "pom.properties" file.boolean
isAddMavenDescriptor()
boolean
isCompress()
boolean
isForced()
Returns, whether recreating the archive is forced (default).boolean
isIndex()
boolean
isManifestEntriesEmpty()
boolean
isManifestSectionsEmpty()
boolean
isRecompressAddedZips()
void
setAddMavenDescriptor(boolean addMavenDescriptor)
void
setCompress(boolean compress)
void
setForced(boolean forced)
Sets, whether recreating the archive is forced (default).void
setIndex(boolean index)
void
setManifest(ManifestConfiguration manifest)
void
setManifestEntries(Map<String,String> manifestEntries)
void
setManifestFile(File manifestFile)
void
setManifestSections(List<ManifestSection> manifestSections)
void
setPomPropertiesFile(File pomPropertiesFile)
Sets the location of the "pom.properties" file.void
setRecompressAddedZips(boolean recompressAddedZips)
-
-
-
Method Detail
-
isCompress
public boolean isCompress()
- Returns:
compress
-
isRecompressAddedZips
public boolean isRecompressAddedZips()
- Returns:
recompressAddedZips
-
setRecompressAddedZips
public void setRecompressAddedZips(boolean recompressAddedZips)
- Parameters:
recompressAddedZips
-recompressAddedZips
-
isIndex
public boolean isIndex()
- Returns:
index
-
isAddMavenDescriptor
public boolean isAddMavenDescriptor()
- Returns:
addMavenDescriptor
-
getManifestFile
public File getManifestFile()
- Returns:
manifestFile
-
getManifest
public ManifestConfiguration getManifest()
- Returns:
manifest
-
setCompress
public void setCompress(boolean compress)
- Parameters:
compress
- set compress to true/false.
-
setIndex
public void setIndex(boolean index)
- Parameters:
index
- set index to true/false.
-
setAddMavenDescriptor
public void setAddMavenDescriptor(boolean addMavenDescriptor)
- Parameters:
addMavenDescriptor
- activate to add maven descriptor or not.
-
setManifestFile
public void setManifestFile(File manifestFile)
- Parameters:
manifestFile
- The manifest file.
-
setManifest
public void setManifest(ManifestConfiguration manifest)
- Parameters:
manifest
-ManifestConfiguration
-
addManifestEntry
public void addManifestEntry(String key, String value)
- Parameters:
key
- The key of the entry.value
- The value of the entry.
-
addManifestEntries
public void addManifestEntries(Map<String,String> map)
- Parameters:
map
- The whole map which should be added.
-
isManifestEntriesEmpty
public boolean isManifestEntriesEmpty()
- Returns:
- are there entries true yes false otherwise.
-
getManifestEntries
public Map<String,String> getManifestEntries()
- Returns:
manifestEntries
-
setManifestEntries
public void setManifestEntries(Map<String,String> manifestEntries)
- Parameters:
manifestEntries
-manifestEntries
-
addManifestSection
public void addManifestSection(ManifestSection section)
- Parameters:
section
-ManifestSection
-
addManifestSections
public void addManifestSections(List<ManifestSection> list)
- Parameters:
list
- Added list ofManifestSection
.
-
isManifestSectionsEmpty
public boolean isManifestSectionsEmpty()
- Returns:
- if manifestSections is empty or not.
-
getManifestSections
public List<ManifestSection> getManifestSections()
- Returns:
manifestSections
-
setManifestSections
public void setManifestSections(List<ManifestSection> 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 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(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.
-
-