org.apache.cactus.integration.ant
Class WebXmlMergeTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.cactus.integration.ant.WebXmlMergeTask

public class WebXmlMergeTask
extends org.apache.tools.ant.Task

Ant task that can merge the definitions from two web deployment descriptors into one descriptor.

Since:
Cactus 1.5
Version:
$Id: WebXmlMergeTask.java 394252 2006-04-15 04:20:17Z felipeal $

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
WebXmlMergeTask()
           
 
Method Summary
 void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog theXmlCatalog)
          Adds an XML catalog to the internal catalog.
 void execute()
          
 void setDestFile(java.io.File theDestFile)
          The destination file where the result of the merge are stored.
 void setEncoding(java.lang.String theEncoding)
          Sets the encoding of the resulting XML file.
 void setForce(boolean isForce)
          Sets whether the merge should be performed even when the destination file is up to date.
 void setIndent(boolean isIndent)
          Whether the result XML file should be indented for better readability.
 void setMergeFile(java.io.File theMergeFile)
          The descriptor to merge into the original file.
 void setSrcFile(java.io.File theSrcFile)
          The original web deployment descriptor into which the new elements will be merged.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebXmlMergeTask

public WebXmlMergeTask()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException
See Also:
Task.execute()

addConfiguredXMLCatalog

public final void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog theXmlCatalog)
Adds an XML catalog to the internal catalog.

Parameters:
theXmlCatalog - the XMLCatalog instance to use to look up DTDs

setSrcFile

public final void setSrcFile(java.io.File theSrcFile)
The original web deployment descriptor into which the new elements will be merged.

Parameters:
theSrcFile - the original web.xml

setMergeFile

public final void setMergeFile(java.io.File theMergeFile)
The descriptor to merge into the original file.

Parameters:
theMergeFile - the web.xml to merge

setDestFile

public final void setDestFile(java.io.File theDestFile)
The destination file where the result of the merge are stored.

Parameters:
theDestFile - the resulting web.xml

setForce

public final void setForce(boolean isForce)
Sets whether the merge should be performed even when the destination file is up to date.

Parameters:
isForce - Whether the merge should be forced

setEncoding

public final void setEncoding(java.lang.String theEncoding)
Sets the encoding of the resulting XML file. Default is 'UTF-8'.

Parameters:
theEncoding - The encoding to set

setIndent

public final void setIndent(boolean isIndent)
Whether the result XML file should be indented for better readability. Default is 'false'.

Parameters:
isIndent - Whether the result should be indented


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.