mirror of https://github.com/apache/maven.git
PR: MNG-642
add getters/setters for all fields so they can be programmatically manipulated. convert to native types rather than using strings. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@225504 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5d46a03299
commit
ee4e4bc629
|
@ -16,6 +16,8 @@ package org.apache.maven.archiver;
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Capture common archive configuration.
|
* Capture common archive configuration.
|
||||||
*
|
*
|
||||||
|
@ -25,34 +27,25 @@ package org.apache.maven.archiver;
|
||||||
*/
|
*/
|
||||||
public class MavenArchiveConfiguration
|
public class MavenArchiveConfiguration
|
||||||
{
|
{
|
||||||
/**
|
private boolean compress = true;
|
||||||
* @todo boolean instead
|
|
||||||
*/
|
|
||||||
private String compress;
|
|
||||||
|
|
||||||
/**
|
private boolean index;
|
||||||
* @todo boolean instead
|
|
||||||
*/
|
|
||||||
private String index;
|
|
||||||
|
|
||||||
/**
|
private File manifestFile;
|
||||||
* @todo File instead
|
|
||||||
*/
|
|
||||||
private String manifestFile;
|
|
||||||
|
|
||||||
private ManifestConfiguration manifest;
|
private ManifestConfiguration manifest;
|
||||||
|
|
||||||
public boolean isCompress()
|
public boolean isCompress()
|
||||||
{
|
{
|
||||||
return compress != null ? Boolean.valueOf( compress ).booleanValue() : true;
|
return compress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isIndex()
|
public boolean isIndex()
|
||||||
{
|
{
|
||||||
return index != null ? Boolean.valueOf( index ).booleanValue() : false;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getManifestFile()
|
public File getManifestFile()
|
||||||
{
|
{
|
||||||
return manifestFile;
|
return manifestFile;
|
||||||
}
|
}
|
||||||
|
@ -65,4 +58,24 @@ public class MavenArchiveConfiguration
|
||||||
}
|
}
|
||||||
return manifest;
|
return manifest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCompress( boolean compress )
|
||||||
|
{
|
||||||
|
this.compress = compress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndex( boolean index )
|
||||||
|
{
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManifestFile( File manifestFile )
|
||||||
|
{
|
||||||
|
this.manifestFile = manifestFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManifest( ManifestConfiguration manifest )
|
||||||
|
{
|
||||||
|
this.manifest = manifest;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,11 +249,11 @@ public class MavenArchiver
|
||||||
// Create the manifest
|
// Create the manifest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
String manifestFile = archiveConfiguration.getManifestFile();
|
File manifestFile = archiveConfiguration.getManifestFile();
|
||||||
|
|
||||||
if ( manifestFile != null && !"".equals( manifestFile ) )
|
if ( manifestFile != null )
|
||||||
{
|
{
|
||||||
archiver.setManifest( new File( manifestFile ) );
|
archiver.setManifest( manifestFile );
|
||||||
}
|
}
|
||||||
|
|
||||||
Manifest manifest = getManifest( project, archiveConfiguration.getManifest() );
|
Manifest manifest = getManifest( project, archiveConfiguration.getManifest() );
|
||||||
|
|
Loading…
Reference in New Issue