|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.mojo.runtime.util.JarMaker
public class JarMaker
adapted from the JarMojo from maven-jar-plugin
Constructor Summary | |
---|---|
JarMaker(File directory,
String name)
|
|
JarMaker(String fullFileName)
|
Method Summary | |
---|---|
protected void |
addDirectory(File baseDir)
Add all files in the specified directory to the archive. |
void |
addDirectory(String prefix,
File baseDir)
Add all files in the specified directory to the archive. |
void |
addDirectory(String includesPattern,
String excludesPattern,
String prefix,
File baseDir)
Add all files in the specified directory to the archive. |
protected void |
addEntries(JarOutputStream jos,
Map includes)
Add all entries in the supplied Map to the jar |
protected void |
addEntry(JarOutputStream jos,
String name,
File source)
Add a single entry to the jar |
void |
addManifestEntries(Map entries)
|
void |
addManifestEntry(String key,
String value)
|
void |
create()
Create the jar file specified and include the listed files. |
protected JarOutputStream |
createJar(File jarFile,
Manifest mf)
Create the specified jar file and return a JarOutputStream to it |
protected Manifest |
createManifest()
Create a manifest for the jar file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JarMaker(String fullFileName)
public JarMaker(File directory, String name)
Method Detail |
---|
public void addManifestEntries(Map entries)
public void addManifestEntry(String key, String value)
protected void addDirectory(File baseDir) throws IOException
baseDir
- the directory to add
IOException
public void addDirectory(String prefix, File baseDir) throws IOException
prefix
- value to be added to the front of jar entry namesbaseDir
- the directory to add
IOException
public void addDirectory(String includesPattern, String excludesPattern, String prefix, File baseDir) throws IOException
includesPattern
- Sets the list of include patterns to useexcludesPattern
- Sets the list of exclude patterns to useprefix
- value to be added to the front of jar entry namesbaseDir
- the directory to add
IOException
public void create() throws IOException
IOException
- if there is a problem writing the archive or reading the sourcesprotected JarOutputStream createJar(File jarFile, Manifest mf) throws IOException
jarFile
- the jar file to createmf
- the manifest to use
IOException
- if there was a problem opening the fileprotected Manifest createManifest()
protected void addEntries(JarOutputStream jos, Map includes) throws IOException
jos
- a JarOutputStream that can be used to write to the jarincludes
- a MapIOException
- if there is a problem writing the archive or reading the sourcesprotected void addEntry(JarOutputStream jos, String name, File source) throws IOException
jos
- a JarOutputStream that can be used to write to the jarname
- the entry name to use; must be '/' delimitedsource
- the file to add
IOException
- if there is a problem writing the archive or reading the sources
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |