diff --git a/examples/echo-kotlin/pom.xml b/examples/echo-kotlin/pom.xml index 284a914d0f..5092fb5e95 100644 --- a/examples/echo-kotlin/pom.xml +++ b/examples/echo-kotlin/pom.xml @@ -97,6 +97,17 @@ runtime + + build-classpath + compile + + build-classpath + + + ${project.build.directory}/classpath.txt + dependency + + diff --git a/kotlin-runtime/ftl-generator/src/main/kotlin/xyz/block/ftl/generator/ModuleGenerator.kt b/kotlin-runtime/ftl-generator/src/main/kotlin/xyz/block/ftl/generator/ModuleGenerator.kt index 42385911e2..8072e603b4 100644 --- a/kotlin-runtime/ftl-generator/src/main/kotlin/xyz/block/ftl/generator/ModuleGenerator.kt +++ b/kotlin-runtime/ftl-generator/src/main/kotlin/xyz/block/ftl/generator/ModuleGenerator.kt @@ -175,7 +175,7 @@ class ModuleGenerator() { """ module = "${module}" language = "kotlin" - deploy = ["main", "classes", "dependency"] + deploy = ["main", "classes", "dependency", "classpath.txt"] """.trimIndent() ) @@ -183,7 +183,7 @@ class ModuleGenerator() { mainFile.writeText( """ #!/bin/bash - exec java -cp "classes:$(printf %s: dependency/*.jar)" xyz.block.ftl.main.MainKt + exec java -cp "classes:$(cat classpath.txt)" xyz.block.ftl.main.MainKt """.trimIndent(), ) mainFile.setPosixFilePermissions( diff --git a/pom.xml b/pom.xml index d47161e4e4..2ec88f96c0 100644 --- a/pom.xml +++ b/pom.xml @@ -192,7 +192,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.2.0 + 3.6.0 initialize