mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
[ant] IDEA-346188 Cannot build artifact using bundled Ant
GitOrigin-RevId: 5b7661bbcb82a6631b7695c7f0be9af90a41f62d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4f43d23d60
commit
7280acaebe
@@ -8,6 +8,7 @@ import com.intellij.lang.ant.config.AntBuildTarget;
|
||||
import com.intellij.lang.ant.config.AntConfiguration;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.application.PluginPathManager;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
@@ -19,7 +20,6 @@ import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.config.*;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jdom.Element;
|
||||
@@ -93,17 +93,18 @@ public final class GlobalAntConfiguration implements PersistentStateComponent<El
|
||||
}
|
||||
|
||||
private static @NotNull File getBundledAntHome() {
|
||||
File distDir = PluginPathManager.getPluginResource(AntInstallation.class, "dist");
|
||||
if (distDir != null && distDir.exists()) {
|
||||
return distDir;
|
||||
}
|
||||
|
||||
// probably running from source
|
||||
File antFile = PathManager.findFileInLibDirectory(ANT_FILE);
|
||||
if (antFile.exists()) {
|
||||
// probably running from source
|
||||
return antFile;
|
||||
}
|
||||
|
||||
String pluginJarPath = PathUtil.getJarPathForClass(AntInstallation.class);
|
||||
File pluginLibRoot = new File(pluginJarPath).getParentFile();
|
||||
File pluginRoot = pluginLibRoot.getParentFile();
|
||||
|
||||
return new File(pluginRoot, "dist");
|
||||
throw new IllegalStateException("Unable to find bundled Ant");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user