badass-runtime-plugin icon indicating copy to clipboard operation
badass-runtime-plugin copied to clipboard

Spring boot: plain jar or boot jar ?

Open gotson opened this issue 3 years ago • 1 comments

Hi,

i am trying to make the plugin work with a Spring Boot fat jar.

I configure the plugin like this:

runtime {
  distDir.set(tasks.bootJar.get().destinationDirectory.get())
  options.set(listOf("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages"))
}

Note that i also have this, as suggested in the Spring Boot 2.5 documentation:

tasks.getByName<Jar>("jar") {
    enabled = false
  }

I get the following error:

Execution failed for task ':komga:jre'.
> File or directory not found: /.../komga/komga/build/libs/komga-0.146.0-plain.jar

It seems it's expecting the artifact from the jar task, while i would like to specify the output of the bootJar task. However, I can only configure the distDir, but it would make more sense to configure the distFile instead, no?

gotson avatar Jan 25 '22 09:01 gotson

Probably similar to #107

gotson avatar Jan 25 '22 09:01 gotson

similar issue. Any update?

Redhab avatar Dec 07 '22 19:12 Redhab