public static AntInstallation createBundledAnt() {
    AntInstallation bundledAnt = new AntInstallation() {
      @Override
      public AntReference getReference() {
        return AntReference.BUNDLED_ANT;
      }
    };
    AntInstallation.NAME.set(bundledAnt.getProperties(), getBundledAntName());

    File antHome = getBundledAntHome();

    AntInstallation.HOME_DIR.set(bundledAnt.getProperties(), antHome.getAbsolutePath());
    ArrayList<AntClasspathEntry> classpath = AntInstallation.CLASS_PATH.getModifiableList(bundledAnt.getProperties());
    File antLibDir = new File(antHome, LIB_DIR);

    File compiledJar = new File(antHome, ANT_JAR_FILE_NAME);
    if (compiledJar.exists()) {
      classpath.add(new SinglePathEntry(compiledJar));
      bundledAnt.updateVersion(compiledJar);
    }
    else {
      classpath.add(new AllJarsUnderDirEntry(antLibDir));
      bundledAnt.updateVersion(new File(antLibDir, ANT_JAR_FILE_NAME));
    }

    return bundledAnt;
  }
public static AntInstallation createBundledAnt()