Skip to content

Commit

Permalink
Set targetDirectory when launching from IDE
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand authored and cemnura committed Dec 21, 2020
1 parent 3be32c4 commit 841ee34
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public static Closeable launch(Path projectRoot, Map<String, Object> 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);
Expand All @@ -39,7 +40,8 @@ public static Closeable launch(Path projectRoot, Map<String, Object> 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(launchingModule.getBuildDir().toPath());

for (WorkspaceModule additionalModule : quarkusModel.getWorkspace().getAllModules()) {
if (!additionalModule.getArtifactCoords().equals(launchingModule.getArtifactCoords())) {
Expand Down

0 comments on commit 841ee34

Please sign in to comment.