View Javadoc
1   package eu.simuline.m2latex.antTask;
2   
3   import org.apache.tools.ant.BuildException;
4   
5   import eu.simuline.m2latex.core.BuildFailureException;
6   
7   public class LatexClrTask extends AbstractLatexTask {
8   
9     /**
10     * Invoked by ant executing the task. 
11     * <p>
12     * Logging: 
13     * <ul>
14     * <li> WPP02: tex file may be latex main file 
15     * <li> WFU01: Cannot read directory...
16     * <li> WFU03: cannot close tex file 
17     * <li> EFU05: Failed to delete file 
18     * </ul>
19     *
20     * @throws BuildException 
21     *    TSS02 if the tex source processing directory does either not exist 
22     *    or is not a directory. 
23     */
24    public void execute() throws BuildException {
25      initialize();
26      try {
27        // may throw BuildFailureException TSS02 
28        // may log warnings WPP02, WFU01, WFU03, EFU05 
29        this.latexProcessor.clearAll();
30      } catch (BuildFailureException e) {
31        throw new BuildException(e.getMessage(), e.getCause());
32      }
33    }
34  }