From 396da6679e5136e55d9d0774be606e6909568844 Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Mon, 23 Dec 2024 14:32:53 +1100 Subject: [PATCH] fix: show JVM log messages --- Justfile | 10 ++++++---- jvm-runtime/plugin/common/java_plugin_test.go | 4 ++-- jvm-runtime/plugin/common/jvmcommon.go | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Justfile b/Justfile index 235df0b019..a0af1069cf 100644 --- a/Justfile +++ b/Justfile @@ -35,10 +35,12 @@ PROTOS_OUT := "backend/protos/xyz/block/ftl/console/v1/console.pb.go " + \ JVM_RUNTIME_IN := "jvm-runtime/ftl-runtime/pom.xml " + \ "jvm-runtime/ftl-runtime/java/runtime/src " + \ "jvm-runtime/ftl-runtime/kotlin/runtime/src " + \ - "jvm-runtime/ftl-runtime/common/deployment/src" -JVM_RUNTIME_OUT := "jvm-runtime/ftl-runtime//java/runtime/target/ftl-java-runtime-1.0-SNAPSHOT.jar " + \ - "jvm-runtime/ftl-runtime//kotlin/runtime/target/ftl-kotlin-runtime-1.0-SNAPSHOT.jar " + \ - "jvm-runtime/ftl-runtime//common/runtime/target/ftl-jvm-runtime-1.0-SNAPSHOT.jar" + "jvm-runtime/ftl-runtime/common/deployment/src " + \ + "jvm-runtime/ftl-runtime/common/runtime/src" +JVM_RUNTIME_OUT := "jvm-runtime/ftl-runtime/java/runtime/target/ftl-java-runtime-1.0-SNAPSHOT.jar " + \ + "jvm-runtime/ftl-runtime/kotlin/runtime/target/ftl-kotlin-runtime-1.0-SNAPSHOT.jar " + \ + "jvm-runtime/ftl-runtime/common/deployment/target/ftl-jvm-runtime-deployment-1.0-SNAPSHOT.jar " + \ + "jvm-runtime/ftl-runtime/common/runtime/target/ftl-jvm-runtime-1.0-SNAPSHOT.jar" # Configuration for building Docker images DOCKER_IMAGES := ''' diff --git a/jvm-runtime/plugin/common/java_plugin_test.go b/jvm-runtime/plugin/common/java_plugin_test.go index 99beaf3f88..dd12a1eecc 100644 --- a/jvm-runtime/plugin/common/java_plugin_test.go +++ b/jvm-runtime/plugin/common/java_plugin_test.go @@ -31,7 +31,7 @@ func TestJavaConfigDefaults(t *testing.T) { dir: "testdata/kotlin/echo", expected: moduleconfig.CustomDefaults{ Build: optional.Some("mvn -B clean package"), - DevModeBuild: optional.Some("mvn clean quarkus:dev"), + DevModeBuild: optional.Some("mvn -Dquarkus.console.enabled=false -q clean quarkus:dev"), DeployDir: "target", LanguageConfig: map[string]any{ "build-tool": "maven", @@ -50,7 +50,7 @@ func TestJavaConfigDefaults(t *testing.T) { dir: "testdata/kotlin/external", expected: moduleconfig.CustomDefaults{ Build: optional.Some("mvn -B clean package"), - DevModeBuild: optional.Some("mvn clean quarkus:dev"), + DevModeBuild: optional.Some("mvn -Dquarkus.console.enabled=false -q clean quarkus:dev"), DeployDir: "target", LanguageConfig: map[string]any{ "build-tool": "maven", diff --git a/jvm-runtime/plugin/common/jvmcommon.go b/jvm-runtime/plugin/common/jvmcommon.go index b931bbf127..4b90513a5d 100644 --- a/jvm-runtime/plugin/common/jvmcommon.go +++ b/jvm-runtime/plugin/common/jvmcommon.go @@ -328,7 +328,7 @@ func (s *Service) runQuarkusDev(ctx context.Context, req *connect.Request[langpb command.Env = append(command.Env, fmt.Sprintf("FTL_RUNNER_INFO=%s", runnerInfoFile)) command.Stdout = os.Stdout command.Stderr = os.Stderr - err = command.RunBuffered(ctx) + err = command.Run() if err != nil { logger.Errorf(err, "Dev mode process exited with error") } else { @@ -610,7 +610,7 @@ func (s *Service) ModuleConfigDefaults(ctx context.Context, req *connect.Request buildGradleKts := filepath.Join(dir, "build.gradle.kts") if fileExists(pom) { defaults.LanguageConfig.Fields["build-tool"] = structpb.NewStringValue(JavaBuildToolMaven) - defaults.DevModeBuild = ptr("mvn clean quarkus:dev") + defaults.DevModeBuild = ptr("mvn -Dquarkus.console.enabled=false -q clean quarkus:dev") defaults.Build = ptr("mvn -B clean package") defaults.DeployDir = "target" } else if fileExists(buildGradle) || fileExists(buildGradleKts) {