public static AntInstallation fromHome(String homePath) throws ConfigurationException {
    File antHome = new File(homePath);
    String antPath = "'" + antHome.getAbsolutePath() + "'";
    checkExists(antHome, AntBundle.message("path.to.ant.does.not.exist.error.message", antPath));
    File lib = new File(antHome, LIB_DIR);
    checkExists(lib, AntBundle.message("lib.directory.not.found.in.ant.path.error.message", antPath));
    File antJar = new File(lib, ANT_JAR_FILE);
    checkExists(antJar, AntBundle.message("ant.jar.not.found.in.directory.error.message", lib.getAbsolutePath()));
    if (antJar.isDirectory()) {
      throw new ConfigurationException(AntBundle.message("ant.jar.is.directory.error.message", antJar.getAbsolutePath()));
    }
    Properties properties = loadProperties(antJar);
    AntInstallation antInstallation = new AntInstallation();
    HOME_DIR.set(antInstallation.getProperties(), antHome.getAbsolutePath());
    final String versionProp = extractVersion(properties);
    NAME.set(antInstallation.getProperties(), AntBundle.message("apache.ant.with.version.string.presentation", versionProp));
    VERSION.set(antInstallation.getProperties(), versionProp);
    antInstallation.addClasspathEntry(new AllJarsUnderDirEntry(lib));
    return antInstallation;
  }
public static AntInstallation fromHome(String homePath)