Class MavenArchiveConfiguration
- Author:
- Brett Porter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddManifestEntries(Map<String, String> map) Adds all entries from the given map as manifest attributes.voidaddManifestEntry(String key, String value) Adds a single manifest entry.voidaddManifestSection(ManifestSection section) addManifestSection.voidaddManifestSections.Getter for the fieldmanifest.Returns the manifest entries map.Getter for the fieldmanifestFile.Getter for the fieldmanifestSections.Returns the location of the "pom.properties" file.booleanisAddMavenDescriptor.booleanisCompress.booleanisForced()Returns, whether recreating the archive is forced (default).booleanisManifestEntriesEmpty.booleanisManifestSectionsEmpty.booleanisRecompressAddedZips.voidsetAddMavenDescriptor(boolean addMavenDescriptor) Setter for the fieldaddMavenDescriptor.voidsetCompress(boolean compress) Setter for the fieldcompress.voidsetForced(boolean forced) Sets, whether recreating the archive is forced (default).voidsetManifest(ManifestConfiguration manifest) Setter for the fieldmanifest.voidsetManifestEntries(Map<String, String> manifestEntries) Sets the manifest entries map, replacing any previously configured entries.voidsetManifestFile(Path manifestFile) Setter for the fieldmanifestFile.voidsetManifestSections(List<ManifestSection> manifestSections) Setter for the fieldmanifestSections.voidsetPomPropertiesFile(Path pomPropertiesFile) Sets the location of the "pom.properties" file.voidsetRecompressAddedZips(boolean recompressAddedZips) Setter for the fieldrecompressAddedZips.
-
Constructor Details
-
MavenArchiveConfiguration
public MavenArchiveConfiguration()
-
-
Method Details
-
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
-
isAddMavenDescriptor
public boolean isAddMavenDescriptor()isAddMavenDescriptor.
- Returns:
addMavenDescriptor
-
getManifestFile
-
getManifest
-
setCompress
public void setCompress(boolean compress) Setter for the field
compress.- Parameters:
compress- set compress to true/false
-
setAddMavenDescriptor
public void setAddMavenDescriptor(boolean addMavenDescriptor) Setter for the field
addMavenDescriptor.- Parameters:
addMavenDescriptor- activate to add maven descriptor or not
-
setManifestFile
Setter for the field
manifestFile.- Parameters:
manifestFile- the manifest file
-
addManifestEntry
Adds a single manifest entry.A
nullvalue is accepted and produces an empty-string attribute in the manifest. This is intentional: it allows callers to explicitly request an empty manifest entry. Be careful not to passnullunintentionally (e.g., from an unguarded map lookup), as the resulting empty attribute will not indicate any error.- Parameters:
key- the manifest attribute namevalue- the manifest attribute value;nullis treated as an empty string
-
addManifestEntries
Adds all entries from the given map as manifest attributes.A
nullvalue in the map is accepted and produces an empty-string attribute in the manifest. This is intentional: it allows callers to explicitly request an empty manifest entry. Be careful not to passnullvalues unintentionally, as they will not indicate any error.- Parameters:
map- the manifest entries to add. Map values may benull, which are treated as empty strings
-
isManifestEntriesEmpty
public boolean isManifestEntriesEmpty()isManifestEntriesEmpty.
- Returns:
- are there entries true yes false otherwise
-
getManifestEntries
-
setManifestEntries
Sets the manifest entries map, replacing any previously configured entries.The map may contain
nullvalues. Anullvalue is treated as an empty string when the manifest is written, producing an empty attribute for that key. This is intentional behaviour — but be careful not to passnullvalues unintentionally (e.g., from an unguarded map lookup), as they will be silently accepted and produce an empty manifest entry with no error.- Parameters:
manifestEntries- the manifest entries. Map values may benull
-
addManifestSections
addManifestSections.
- Parameters:
list- added list ofManifestSection
-
isManifestSectionsEmpty
public boolean isManifestSectionsEmpty()isManifestSectionsEmpty.
- Returns:
- if manifestSections is empty or not
-
getManifestSections
Getter for the field
manifestSections.- Returns:
manifestSections
-
setManifestSections
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
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:
-
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
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
-