JpsAntInstallation () { String antPath = System.getProperty(BUNDLED_ANT_PATH_PROPERTY); File antHome; if (antPath != null) { antHome = new File(antPath); } else { final String appHome = PathManager.getHomePath(false); if (appHome == null) { LOG.debug("idea.home.path and " + BUNDLED_ANT_PATH_PROPERTY + " aren't specified, bundled Ant won't be configured"); return null; } antHome = new File(appHome, "lib" + File.separator + "ant"); if (!antHome.exists()) { File communityAntHome = new File(appHome, "community" + File.separator + "lib" + File.separator + "ant"); if (communityAntHome.exists()) { antHome = communityAntHome; } } } if (!antHome.exists()) { LOG.debug("Bundled Ant not found at " + antHome.getAbsolutePath()); return null; } String antLib = new File(antHome, "lib").getAbsolutePath(); return new JpsAntInstallationImpl(antHome, "Bundled Ant", Collections.emptyList(), Collections.singletonList(antLib)); }