org.apache.maven.archiver
Class MavenArchiveConfiguration

java.lang.Object
  extended by org.apache.maven.archiver.MavenArchiveConfiguration

public class MavenArchiveConfiguration
extends java.lang.Object

Capture common archive configuration.

Version:
$Id: MavenArchiveConfiguration.java 538309 2007-05-15 20:22:50Z carlos $
Author:
Brett Porter

Field Summary
private  boolean addMavenDescriptor
           
private  boolean compress
           
private  boolean forced
           
private  boolean index
           
private  ManifestConfiguration manifest
           
private  java.util.Map manifestEntries
           
private  java.io.File manifestFile
           
private  java.util.List manifestSections
           
private  java.io.File pomPropertiesFile
           
 
Constructor Summary
MavenArchiveConfiguration()
           
 
Method Summary
 void addManifestEntries(java.util.Map map)
           
 void addManifestEntry(java.lang.Object key, java.lang.Object value)
           
 void addManifestSection(ManifestSection section)
           
 void addManifestSections(java.util.List list)
           
 ManifestConfiguration getManifest()
           
 java.util.Map getManifestEntries()
           
 java.io.File getManifestFile()
           
 java.util.List getManifestSections()
           
 java.io.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()
           
 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 setManifestFile(java.io.File manifestFile)
           
 void setPomPropertiesFile(java.io.File pomPropertiesFile)
          Sets the location of the "pom.properties" file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compress

private boolean compress

index

private boolean index

addMavenDescriptor

private boolean addMavenDescriptor

manifestFile

private java.io.File manifestFile

manifest

private ManifestConfiguration manifest

manifestEntries

private java.util.Map manifestEntries

manifestSections

private java.util.List manifestSections

forced

private boolean forced

pomPropertiesFile

private java.io.File pomPropertiesFile
Constructor Detail

MavenArchiveConfiguration

public MavenArchiveConfiguration()
Method Detail

isCompress

public boolean isCompress()

isIndex

public boolean isIndex()

isAddMavenDescriptor

public boolean isAddMavenDescriptor()

getManifestFile

public java.io.File getManifestFile()

getManifest

public ManifestConfiguration getManifest()

setCompress

public void setCompress(boolean compress)

setIndex

public void setIndex(boolean index)

setAddMavenDescriptor

public void setAddMavenDescriptor(boolean addMavenDescriptor)

setManifestFile

public void setManifestFile(java.io.File manifestFile)

setManifest

public void setManifest(ManifestConfiguration manifest)

addManifestEntry

public void addManifestEntry(java.lang.Object key,
                             java.lang.Object value)

addManifestEntries

public void addManifestEntries(java.util.Map map)

isManifestEntriesEmpty

public boolean isManifestEntriesEmpty()

getManifestEntries

public java.util.Map getManifestEntries()

addManifestSection

public void addManifestSection(ManifestSection section)

addManifestSections

public void addManifestSections(java.util.List list)

isManifestSectionsEmpty

public boolean isManifestSectionsEmpty()

getManifestSections

public java.util.List getManifestSections()

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.