Mill plugin to support packing of Spring Boot Applications.
Mill version 0.10.0 or newer is required.
import $ivy.`de.tototec::de.tobiasroeser.mill.spring.boot::0.0.1`
import mill._
import mill.scalalib._
import de.tobiasroeser.mill.spring.boot.SpringBootModule
object app extends JavaModule with SpringBootModule {
override def springBootToolsVersion = "2.7.14"
}
# Run the Spring-Boot Application
$ mill app.run
# Package as executable Spring-Boot Application
$ mill app.springBootAssembly
Your module needs to extend the de.tobiasroeser.mill.spring.boot.SpringBootModule
trait. The following targets are available:
def springBootToolsVersion: T[String]
-
Required. Override it to specify the version of the Spring Boot tools.
def springBootAssembly: T[PathRef]
-
Package an (executable) JAR.
You can run the application with
java -jar out/app/springBootAssembly.dest/out.jar
. def springBootPrependScript: T[String]
-
A script prepended to the resulting
springBootAssembly
to make it executable. This uses the same prepend script logic as MillJavaModule#prependScript
does, so it supports most Linux/Unix shells (probably notfish
) as well as Windows cmd shell (the file needs a.bat
or.cmd
extension in that case). Set it to""
if you don’t want an executable JAR. def springBootMainClass: T[String]
-
The main class holding the Spring Boot Application entrypoint. By default, the value of
JavaModule.mainClass
is used, when defined, otherwise Spring Boot will try to auto-detect it.
You can download binary releases from Maven Central.
Please make sure to use the correct mill platform suffix matching your used mill version.
This project is published under the terms of the Apache License, version 2
- Mill
-
Mill is a Scala-based open source build tool. In my opinion the best build tool for the JVM. It is fast, reliable and easy to understand.
- Me
-
I am Tobias Roeser, a professional software developer who loves to create and use open source tools. I’m actively developing and maintaining mill as well as several mill plugins.
If you like my work, please star it on GitHub. You can also support me via GitHub Sponsors.
- Contributing
-
If you found a bug or have a feature request, please open a new issue on GitHub. I also accept pull requests on GitHub.