|
||||||||||
| 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(java.io.File directory,
java.lang.String name)
|
|
JarMaker(java.lang.String fullFileName)
|
|
| Method Summary | |
|---|---|
protected void |
addDirectory(java.io.File baseDir)
Add all files in the specified directory to the archive. |
void |
addDirectory(java.lang.String prefix,
java.io.File baseDir)
Add all files in the specified directory to the archive. |
void |
addDirectory(java.lang.String includesPattern,
java.lang.String excludesPattern,
java.lang.String prefix,
java.io.File baseDir)
Add all files in the specified directory to the archive. |
protected void |
addEntries(java.util.jar.JarOutputStream jos,
java.util.Map includes)
Add all entries in the supplied Map to the jar |
protected void |
addEntry(java.util.jar.JarOutputStream jos,
java.lang.String name,
java.io.File source)
Add a single entry to the jar |
void |
addManifestEntries(java.util.Map entries)
|
void |
addManifestEntry(java.lang.String key,
java.lang.String value)
|
void |
create()
Create the jar file specified and include the listed files. |
protected java.util.jar.JarOutputStream |
createJar(java.io.File jarFile,
java.util.jar.Manifest mf)
Create the specified jar file and return a JarOutputStream to it |
protected java.util.jar.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(java.lang.String fullFileName)
public JarMaker(java.io.File directory,
java.lang.String name)
| Method Detail |
|---|
public void addManifestEntries(java.util.Map entries)
public void addManifestEntry(java.lang.String key,
java.lang.String value)
protected void addDirectory(java.io.File baseDir)
throws java.io.IOException
baseDir - the directory to add
java.io.IOException
public void addDirectory(java.lang.String prefix,
java.io.File baseDir)
throws java.io.IOException
prefix - value to be added to the front of jar entry namesbaseDir - the directory to add
java.io.IOException
public void addDirectory(java.lang.String includesPattern,
java.lang.String excludesPattern,
java.lang.String prefix,
java.io.File baseDir)
throws java.io.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
java.io.IOException
public void create()
throws java.io.IOException
java.io.IOException - if there is a problem writing the archive or reading the sources
protected java.util.jar.JarOutputStream createJar(java.io.File jarFile,
java.util.jar.Manifest mf)
throws java.io.IOException
jarFile - the jar file to createmf - the manifest to use
java.io.IOException - if there was a problem opening the fileprotected java.util.jar.Manifest createManifest()
protected void addEntries(java.util.jar.JarOutputStream jos,
java.util.Map includes)
throws java.io.IOException
jos - a JarOutputStream that can be used to write to the jarincludes - a Mapjava.io.IOException - if there is a problem writing the archive or reading the sources
protected void addEntry(java.util.jar.JarOutputStream jos,
java.lang.String name,
java.io.File source)
throws java.io.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
java.io.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 | |||||||||