From ff867663b38a66c392a8314e76fdb082ce66ceb9 Mon Sep 17 00:00:00 2001 From: Leonardo Silveira Date: Sat, 4 May 2024 21:43:05 -0300 Subject: [PATCH] adding bootjar command and entrypoint --- .../sample/htmx/spring/SampleHtmxSpringBuild.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/bld/java/sample/htmx/spring/SampleHtmxSpringBuild.java b/src/bld/java/sample/htmx/spring/SampleHtmxSpringBuild.java index 1182484..d718513 100644 --- a/src/bld/java/sample/htmx/spring/SampleHtmxSpringBuild.java +++ b/src/bld/java/sample/htmx/spring/SampleHtmxSpringBuild.java @@ -38,4 +38,15 @@ public SampleHtmxSpringBuild() { .include(dependency("org.springframework.boot:spring-boot-loader:3.2.5")) .include(dependency("com.h2database:h2:2.2.224")); } + + @BuildCommand(summary = "Creates an executable JAR for the project") + public void bootjar() throws Exception { + new BootJarOperation() + .fromProject(this) + .execute(); + } + + public static void main(String[] args) { + new SampleHtmxSpringBuild().start(args); + } }