Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lefou/mill-spring-boot
Support packaging Spring Boot Applications with Mill
https://github.com/lefou/mill-spring-boot
build-tool mill mill-plugin scala spring-boot
Last synced: 24 days ago
JSON representation
Support packaging Spring Boot Applications with Mill
- Host: GitHub
- URL: https://github.com/lefou/mill-spring-boot
- Owner: lefou
- License: apache-2.0
- Created: 2023-07-07T06:39:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-08T21:11:54.000Z (2 months ago)
- Last Synced: 2024-09-08T22:27:10.611Z (2 months ago)
- Topics: build-tool, mill, mill-plugin, scala, spring-boot
- Language: Scala
- Homepage:
- Size: 72.3 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
= mill-spring-boot - Packaging Spring Boot Applications with Mill
:version: 0.0.1
:mill-platform: 0.11
:artifact-name: de.tobiasroeser.mill.spring.boot
:project-name: mill-spring-boot
:project-home: https://github.com/lefou/{project-name}
:min-mill-version: 0.10.0
:example-spring-boot-version: 2.7.14
:toc:
:toc-placement: preambleifdef::env-github[]
image:{project-home}/workflows/.github/workflows/build.yml/badge.svg["Build Status (GitHub Actions)",link="{project-home}/actions"]
image:https://codecov.io/gh/lefou/{project-name}/branch/main/graph/badge.svg[Test Coverage (Codecov.io),link="https://codecov.io/gh/lefou/{project-name}"]
endif::[]https://mill-build.com[Mill] plugin to support packing of https://spring.io/projects/spring-boot[Spring Boot] Applications.
== Quickstart
Mill version {min-mill-version} or newer is required.
[source,scala,subs="attributes,verbatim"]
----
import $ivy.`de.tototec::de.tobiasroeser.mill.spring.boot::{version}`import mill._
import mill.scalalib._
import de.tobiasroeser.mill.spring.boot.SpringBootModuleobject app extends JavaModule with SpringBootModule {
override def springBootToolsVersion = "{example-spring-boot-version}"
}
----[source,shell]
----
# Run the Spring-Boot Application
$ mill app.run# Package as executable Spring-Boot Application
$ mill app.springBootAssembly
----== Targets and Configuration
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 Mill `JavaModule#prependScript` does, so it supports most Linux/Unix shells (probably not `fish`) 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.== Download
You can download binary releases from https://search.maven.org/artifact/de.tototec/{artifact-name}_mill{mill-platform}_2.13[Maven Central].
Please make sure to use the correct _mill platform suffix_ matching your used mill version.
== License
This project is published under the terms of the https://www.apache.org/licenses/LICENSE-2.0[Apache License, version 2]
== About
Mill::
https://github.com/lihaoyi/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 https://github.com/lefou/[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 https://github.com/lefou?utf8=%E2%9C%93&tab=repositories&q=topic%3Amill&type=&language=[several mill plugins].If you like my work, please star it on GitHub.
You can also support me via https://github.com/sponsors/lefou[GitHub Sponsors].
--Contributing::
If you found a bug or have a feature request, please open a {project-home}/issues[new issue on GitHub].
I also accept {project-home}/pulls[pull requests on GitHub].== Changelog
=== 0.0.1 - 2023-07-21
* Initial public release