Skip to content

Commit

Permalink
fix: show JVM log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Dec 23, 2024
1 parent 81a4a13 commit 396da66
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 := '''
Expand Down
4 changes: 2 additions & 2 deletions jvm-runtime/plugin/common/java_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions jvm-runtime/plugin/common/jvmcommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 396da66

Please sign in to comment.