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   import eu.simuline.m2latex.core.ParameterAdapter;
7   import eu.simuline.m2latex.core.Target;
8   
9   import java.util.SortedSet;
10  
11  public class LatexClrTask extends AbstractLatexTask {
12  
13      // api-docs inherited from ParameterAdapter
14      public SortedSet<Target> getTargetSet() {
15  	throw new IllegalStateException();
16      }
17  
18      /**
19       * Invoked by ant executing the task. 
20       * <p>
21       * Logging: 
22       * <ul>
23       * <li> WPP02: tex file may be latex main file 
24       * <li> WFU01: Cannot read directory...
25       * <li> WFU03: cannot close tex file 
26       * <li> EFU05: Failed to delete file 
27       * </ul>
28       *
29       * @throws BuildException 
30       *    TSS02 if the tex source processing directory does either not exist 
31       *    or is not a directory. 
32       */
33      public void execute() throws BuildException {
34   	initialize();
35  	try {
36  	    // may throw BuildFailureException TSS02 
37  	    // may log warnings WPP02, WFU01, WFU03, EFU05 
38  	    this.latexProcessor.clearAll();
39  	} catch (BuildFailureException e) {
40  	    throw new BuildException(e.getMessage(), e.getCause());
41  	}
42       }
43   }