Save This Page
Home » quartz-1.6.0 » org » quartz » jobs » [javadoc | source]
org.quartz.jobs
public class: AntJob [javadoc | source]
java.lang.Object
   org.quartz.jobs.AntJob

All Implemented Interfaces:
    Job

A Job executing ANT scripts.
Brief usage example:

...

JobDetail job = new JobDetail();
job.setGroup("ANT");
job.setName("Example");
job.setJobClass(AntJob.class);

Map dataMap = job.getJobDataMap();
dataMap.put("execdir", "pathToYourAntScripts");
dataMap.put("buildfile", "yourAntScript.xml"); //default is build.xml
dataMap.put("target", "targetToExecute"); //default is script's dafault target

//set the 'lib.dir' ant property to './lib'
dataMap.put("$P_lib.dir", "./lib");

//set the 'debug' ant (user) property to 'true'
dataMap.put("$U_debug", "true");

...

Constructor:
 public AntJob() 
Method from org.quartz.jobs.AntJob Summary:
execute
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.jobs.AntJob Detail:
 public  void execute(JobExecutionContext context) throws JobExecutionException