log(force+" "+newFiles.length);
    public void execute() throws BuildException {		// Tests if all mandatory attributes are set and valid.	if (origin == null) error("Attribute 'srcdir' is not set.");	if (origin.size() == 0) error("Attribute 'srcdir' is not set.");	if (destination != null && !destination.isDirectory())	    error("Attribute 'destdir' does not refer to an existing directory.");		Vector sourceFilesList = new Vector();		// Scans source directories to build up a compile lists.	// If force is false, only files were the .class file in destination is newer than	// the .suffix file will be used.	String[] originList = origin.list();	for (int i = 0; i < originList.length; i++) {	    File originDir = getProject().resolveFile(originList[i]);	    if (!originDir.exists()) {		log("Element '" + originDir.getPath() + "' in attribute 'srcdir' does not refer to an existing directory.", Project.MSG_WARN);		break;	    }	    DirectoryScanner originDirScanner = this.getDirectoryScanner(originDir);	    String[] files = originDirScanner.getIncludedFiles();	    	    if (force.compareToIgnoreCase("always") == 0) {		addFilesToSourceList(files, originDir, sourceFilesList);	    } else {		GlobPatternMapper mapper = new GlobPatternMapper();		mapper.setTo("*.class");		mapper.setFrom("*.scala");		SourceFileScanner scanner = new SourceFileScanner(this);		String[] newFiles = scanner.restrict(files, originDir, destination, mapper);		log(force+" "+newFiles.length);		if (force.compareToIgnoreCase("changed") == 0 && (newFiles.length > 0)) {		    addFilesToSourceList(files, originDir, sourceFilesList);		} else if (force.compareToIgnoreCase("never") == 0) {		    addFilesToSourceList(newFiles, originDir, sourceFilesList);		}	    }			    	}		log("Compiling " + sourceFilesList.size() + " source file" + (sourceFilesList.size() == 1 ? "" : "s") + (destination != null ? " to " + destination.toString() : ""));		// Builds-up the compilation settings for Scalac with the existing Ant parameters.	Reporter reporter = new ConsoleReporter();	CompilerCommand command = new CompilerCommand(SCALA_PRODUCT, SCALA_VERSION, reporter, new CompilerPhases$class());	if (destination != null) command.outpath.value = destination.getAbsolutePath();	if (classpath != null) command.classpath.value = makeAbsolutePath(classpath, "classpath");	if (sourcepath != null) {	    command.sourcepath.value = makeAbsolutePath(sourcepath, "sourcepath");	} else {	    command.sourcepath.value = destination.getAbsolutePath();	}	// The bootclasspath needs to be treated specially.	// When no bootclasspath is provided, the classpath of the current classloader is used:	// This is where the scala classes should be.	// Furthermore, the source files for the library must be available in the bootclasspath too.	// To do that, an element ending in 'lib/scala.jar' or 'scala/classes' is looked-up in the bootclasspath.	// From there, the sources should be in '../src' or '../sources' respectively.	// This means any other configuration will fail at runtime. In this case, the bootclasspath should be set explicitly.	// Notice also how the bootclasspath must finish with a ":" for it to work.	String[] baseBootclasspath;	if (bootclasspath != null) {	    baseBootclasspath = bootclasspath.list();	} else {	    baseBootclasspath = getClassLoaderClasspath(this.getClass().getClassLoader()).list();	}	bootclasspath = new Path(getProject());	for (int i = 0; i < baseBootclasspath.length; i++) {	    bootclasspath.append(new Path(getProject(), baseBootclasspath[i]));	    int scalaJarIndex = baseBootclasspath[i].lastIndexOf("lib" + File.separator + "scala.jar");	    int scalaClassesIndex = baseBootclasspath[i].lastIndexOf("scala" + File.separator + "classes");	    if (scalaJarIndex > -1) {		String libPath = baseBootclasspath[i].substring(0, scalaJarIndex) + "src";		bootclasspath.append(new Path(getProject(), libPath));		System.setProperty("scala.library.class.path", baseBootclasspath[i]);		System.setProperty("scala.library.source.path", libPath);	    } else if (scalaClassesIndex > -1) {		String libPath = baseBootclasspath[i].substring(0, scalaClassesIndex + 6) + "sources";		bootclasspath.append(new Path(getProject(), libPath));		System.setProperty("scala.library.class.path", baseBootclasspath[i]);		System.setProperty("scala.library.source.path", libPath);	    }	}	command.bootclasspath.value = makeAbsolutePath(bootclasspath, "bootclasspath") + ":";	if (extpath != null) command.extdirs.value = makeAbsolutePath(extpath, "extpath");	if (encoding != null) command.encoding.value = encoding;	command.verbose.value = verbose;	command.debug.value = debug;	command.noimports.value = !useimports;	command.nopredefs.value = !usepredefs;	Timer timer = scalac.Global.getTimer(reporter);		// Compiles the actual code	Global$class compiler = new Global$class(command, timer, false);		String[] stringArray = new String[sourceFilesList.size()];	try {	    timer.start();	    CompilationUnit[] classes = compiler.compile((String[])sourceFilesList.toArray(stringArray), false);	    if (reporter.errors() > 0) {		error("Compile failed with " + reporter.errors() + " error" + (reporter.errors() == 1 ? "" : "s") + "; see the compiler error output for details.");	    }	    compiler.dump(classes);	} catch (AbortError exception) {	    if (debug) exception.printStackTrace();	    error("Compile failed because of an internal compiler error; see the error output for details.");	} finally {	    timer.stop("Compile time");	}	if (reporter.warnings() > 0) {	    log("Compile suceeded with " + reporter.errors() + " warning" + (reporter.warnings() == 1 ? "" : "s") + "; see the compiler output for details.");	}	    }