public void execute() throws BuildException { // set defaults for attributes: genaj if (genajdir == null) genajdir = new File("generated-aj"); if (verbose) log("sourceroots: " + sourceroots, Project.MSG_INFO); if (verbose && inpath != null) log("inpath: " + inpath, Project.MSG_INFO); if (verbose && injars != null) log("injars: " + injars, Project.MSG_INFO); if (verbose) log("classpath: " + classpath, Project.MSG_INFO); if (verbose) log("destdir: " + destdir, Project.MSG_INFO); if (verbose) log("genajdir: " + genajdir, Project.MSG_INFO); try { if (injars != null) analyzer = new Analyzer(injars.list(), classpath.list(), genajdir, verbose); else if (inpath != null) analyzer = new Analyzer(inpath.list(), classpath.list(), genajdir, verbose); else throw new BuildException("One of injars or inpath must be specified."); analyzer.analyze(); } catch (AnalysisException ex) { throw new BuildException(ex); } ajcTask = new AjcTask(); ajcTask.setTaskName(getTaskName() + "-ajc"); ajcTask.setClasspath(classpath); ajcTask.setFailonerror(failonerror); // append genajdir to passed-in sourceroots if (sourceroots == null) { sourceroots = new Path(getProject(), genajdir.toString()); } else { sourceroots.append(new Path(getProject(), genajdir.toString())); } if (verbose) log("sourceroots mod: " + sourceroots); ajcTask.setSourceRoots(sourceroots); ajcTask.setInpath(inpath); ajcTask.setInjars(injars); ajcTask.setDestdir(destdir); ajcTask.execute(); }