public class MergedWarArchive extends Object implements WarArchive
Modifier and Type | Method and Description |
---|---|
void |
addProcessor(String path,
MergeProcessor merger) |
boolean |
containsClass(String theClassName)
Returns whether a class of the specified name is contained in the archive.
|
protected void |
executeMergeProcessors(File assembleDir) |
void |
expandToPath(String path)
Expand the archive to the specified directory.
|
void |
expandToPath(String path,
FileFilter filter)
Expand the archive to the specified directory, filtering out files.
|
String |
findResource(String theName)
Returns the full path of a named resource in the archive.
|
protected WarArchive |
firstWarFile() |
InputStream |
getResource(String thePath)
Returns a resource from the archive as input stream.
|
List |
getResources(String thePath)
Returns the list of resources in the specified directory in the archive.
|
WebXml |
getWebXml()
Returns the deployment descriptor of the web application.
|
WebXmlMerger |
getWebXmlMerger()
Get the web XML merger.
|
void |
mergeJarFiles(boolean mergeJarFiles)
Control whether to also merge the JAR files.
|
void |
store(File warFile)
The actual merging takes place on the store() method, which writes combined
archive out into the new location.
|
protected WarArchive firstWarFile()
public void addProcessor(String path, MergeProcessor merger)
path
- in the path to merge tomerger
- in the processor to addpublic WebXmlMerger getWebXmlMerger() throws IOException, org.jdom.JDOMException
IOException
- on an IO Exceptionorg.jdom.JDOMException
- on a XML Parse Exceptionpublic WebXml getWebXml() throws IOException, org.jdom.JDOMException
getWebXml
in interface WarArchive
org.jdom.JDOMException
IOException
- If there was a problem reading the deployment descriptor in the WARWarArchive.getWebXml()
protected void executeMergeProcessors(File assembleDir) throws MergeException, IOException
assembleDir
- in the directory to output the merge data toMergeException
- when there is a problemIOException
- if an IO exceptionpublic void store(File warFile) throws MergeException, IOException, org.jdom.JDOMException
store
in interface WarArchive
warFile
- file to store the war in.org.jdom.JDOMException
IOException
- If there was a problem reading the deployment descriptor in the WARMergeException
WarArchive.store(java.io.File)
public boolean containsClass(String theClassName) throws IOException
containsClass
in interface JarArchive
theClassName
- The name of the class to search forIOException
- If an I/O error occurred reading the archiveJarArchive.containsClass(java.lang.String)
public String findResource(String theName) throws IOException
findResource
in interface JarArchive
theName
- The name of the resourceIOException
- If an I/O error occurred reading the archiveJarArchive.findResource(java.lang.String)
public InputStream getResource(String thePath) throws IOException
getResource
in interface JarArchive
thePath
- The path to the resource in the archivenull
if the resource was not found in the JARIOException
- If an I/O error occursJarArchive.getResource(java.lang.String)
public List getResources(String thePath) throws IOException
getResources
in interface JarArchive
thePath
- The directoryIOException
- If an I/O error occursJarArchive.getResources(java.lang.String)
public void expandToPath(String path) throws IOException
expandToPath
in interface JarArchive
path
- The path to expand toIOException
- If an I/O error occursJarArchive.expandToPath(String)
public void expandToPath(String path, FileFilter filter) throws IOException
expandToPath
in interface JarArchive
path
- The path to expand tofilter
- The filter to useIOException
- If an I/O error occursJarArchive.expandToPath(java.lang.String, java.io.FileFilter)
public void mergeJarFiles(boolean mergeJarFiles)
mergeJarFiles
- true if we do (default)Copyright © 2004-2013 Codehaus. All Rights Reserved.