com.xmlmill.connector.ant
Class XMLMillTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--com.xmlmill.connector.ant.XMLMillTask

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

This class represents the <mill> element in an Ant build file.

By default the generation and comparing of PDF documents are performed in a separate (forked) JVM, in order not to jeopardize the build process itself in case a severe error occures during the generation or comparing process.

Since:
2.70

Constructor Summary
XMLMillTask()
          Create a XMLMillTask instance representing a <mill> element.
 
Method Summary
 org.apache.tools.ant.types.Path createClasspath()
          Adds path to classpath used for tests.
 Compare createCompare()
          Create a Compare instance.
 Generate createGenerate()
          Create a Generate instance.
 org.apache.tools.ant.types.Commandline.Argument createJvmarg()
          Adds a JVM argument.
 void execute()
           
 void init()
          Adds the classesg Ant, this task and JUnit to the classpath - this should make the forked JVM work without having to specify them directly.
 void setAppend(boolean b)
           
 void setClasspathRef(org.apache.tools.ant.types.Reference reference)
           
 void setConfig(java.lang.String s)
           
 void setDir(java.io.File dir)
          The directory to invoke the VM in.
 void setHaltonerror(boolean b)
           
 void setHaltonwarning(boolean b)
           
 void setIncludeantruntime(boolean b)
          If true, include ant.jar, optional.jar and junit.jar in the forked VM.
 void setJaxp(java.lang.String s)
           
 void setJvm(java.lang.String value)
          The command used to invoke the Java Virtual Machine, default is 'java'.
 void setLoglevel(java.lang.String s)
           
 void setMaxmemory(java.lang.String max)
          Set the maximum memory to be used by the forked JVM.
 void setOutputfolder(java.lang.String s)
           
 void setPrintsummary(boolean b)
           
 void setSize(java.lang.String s)
           
 void setTempdir(java.io.File f)
           
 void setTodir(java.lang.String s)
           
 void setValidate(boolean b)
           
 void setVerbose(boolean b)
           
 void setXslt(boolean b)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLMillTask

public XMLMillTask()
Create a XMLMillTask instance representing a <mill> element.

Since:
2.70
Method Detail

init

public void init()
          throws org.apache.tools.ant.BuildException
Adds the classesg Ant, this task and JUnit to the classpath - this should make the forked JVM work without having to specify them directly.
Overrides:
init in class org.apache.tools.ant.Task
Since:
Ant 1.4

setAppend

public void setAppend(boolean b)

setXslt

public void setXslt(boolean b)

setVerbose

public void setVerbose(boolean b)

setValidate

public void setValidate(boolean b)

setLoglevel

public void setLoglevel(java.lang.String s)

setTodir

public void setTodir(java.lang.String s)

setTempdir

public void setTempdir(java.io.File f)

setOutputfolder

public void setOutputfolder(java.lang.String s)

setSize

public void setSize(java.lang.String s)

setJaxp

public void setJaxp(java.lang.String s)

setConfig

public void setConfig(java.lang.String s)

setHaltonerror

public void setHaltonerror(boolean b)

setHaltonwarning

public void setHaltonwarning(boolean b)

setPrintsummary

public void setPrintsummary(boolean b)

setJvm

public void setJvm(java.lang.String value)
The command used to invoke the Java Virtual Machine, default is 'java'.

The command is resolved by java.lang.Runtime.exec().

Parameters:
value - the new VM to use instead of java
Since:
2.70

setDir

public void setDir(java.io.File dir)
The directory to invoke the VM in.

Use this method in case you want to use another JVM than java.exe.

Parameters:
dir - File representing the directory to invoke the JVM from.
Since:
2.70

setIncludeantruntime

public void setIncludeantruntime(boolean b)
If true, include ant.jar, optional.jar and junit.jar in the forked VM.
Parameters:
b - include ant run time yes or no
Since:
2.70

setMaxmemory

public void setMaxmemory(java.lang.String max)
Set the maximum memory to be used by the forked JVM.
Parameters:
max - the value as defined by -mx or -Xmx in the java command line options.
Since:
2.70

setClasspathRef

public void setClasspathRef(org.apache.tools.ant.types.Reference reference)

createClasspath

public org.apache.tools.ant.types.Path createClasspath()
Adds path to classpath used for tests.
Returns:
reference to the classpath in the embedded java command line
Since:
Ant 1.2

createGenerate

public Generate createGenerate()
Create a Generate instance.

A XMLMillTask instance can contain multiple Generateinstances..

Since:
2.70

createCompare

public Compare createCompare()
Create a Compare instance.

A XMLMillTask instance can contain multiple Compareinstances..

Since:
2.70

createJvmarg

public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
Adds a JVM argument.
Returns:
create a new JVM argument so that any argument can be passed to the JVM. TO DO
Since:
Ant 1.2
See Also:
#setFork(boolean)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task