AntInstallation () { AntInstallation bundledAnt = new AntInstallation() { @Override public AntReference getReference() { return AntReference.BUNDLED_ANT; } }; AntInstallation.NAME.set(bundledAnt.getProperties(), getBundledAntName()); final File antHome = PathManager.findFileInLibDirectory(ANT_FILE); AntInstallation.HOME_DIR.set(bundledAnt.getProperties(), antHome.getAbsolutePath()); ArrayList<AntClasspathEntry> classpath = AntInstallation.CLASS_PATH.getModifiableList(bundledAnt.getProperties()); File antLibDir = new File(antHome, LIB_DIR); classpath.add(new AllJarsUnderDirEntry(antLibDir)); bundledAnt.updateVersion(new File(antLibDir, ANT_JAR_FILE_NAME)); return bundledAnt; }