From ecace4710c67216c2297b56cba71c9088324a42b Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Thu, 10 Dec 2020 19:23:56 +0200 Subject: [PATCH] Set targetDirectory when launching from IDE Fixes: #13814 --- .../src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java index 0b22fca86a096e..940d212d01ca51 100644 --- a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java +++ b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java @@ -28,7 +28,8 @@ public static Closeable launch(Path projectRoot, Map context) { .setBaseClassLoader(IDELauncherImpl.class.getClassLoader()) .setProjectRoot(projectRoot) .setIsolateDeployment(true) - .setMode(QuarkusBootstrap.Mode.DEV); + .setMode(QuarkusBootstrap.Mode.DEV) + .setTargetDirectory(projectRoot.getParent()); if (BuildToolHelper.isGradleProject(projectRoot)) { final QuarkusModel quarkusModel = BuildToolHelper.enableGradleAppModelForDevMode(projectRoot); @@ -39,7 +40,8 @@ public static Closeable launch(Path projectRoot, Map context) { Path launchingModulePath = QuarkusModelHelper.getClassPath(launchingModule); // Gradle uses a different output directory for classes, we override the one used by the IDE builder.setProjectRoot(launchingModulePath) - .setApplicationRoot(launchingModulePath); + .setApplicationRoot(launchingModulePath) + .setTargetDirectory(launchingModulePath.getBuildDir()); for (WorkspaceModule additionalModule : quarkusModel.getWorkspace().getAllModules()) { if (!additionalModule.getArtifactCoords().equals(launchingModule.getArtifactCoords())) {