wimdeblauwe / ttcli

CLI to create a Spring Boot with Thymeleaf project
Apache License 2.0
67 stars 5 forks source link
spring-boot thymeleaf

= Taming Thymeleaf CLI

The goal of this project is to provide a command line tool to helps to setup a Spring Boot with Thymeleaf project.

== Usage

. Download the release from https://github.com/wimdeblauwe/ttcli/releases . Unzip the release . Run ./ttcli help (macOS/Linux) or ttcli.exe help (Windows) to see the options of the tool.

The application is also available via the following package managers:

=== Initialize

Run ttcli init to have the tool create a new Spring Boot project with an NPM based live-reload setup.

The tool will ask the following questions:

. GroupId: the Maven groupId that should be used for the project. . ArtifactId: the Maven artifactId that should be used for the project. . Name: the project name . Live reload setup: Select how you want to have your live reload setup . Web dependencies: Select from various CSS and/or JavaScript libraries to be added to your project.

The tool will create a new project in a sub-directory of the current directory with the name of the artifactId and apply the following changes:

NOTE: You can choose a different base directory that the tool should use via ttcli --baseDir <otherdir>

== Building

=== Regular JVM build

[source]

mvn verify

=== Native build

Use GraalVM JDK:

[source]

sdk use java 22.3.r17-grl

Run native compilation:

[source]

mvn -Pnative native:compile

=== Releasing

==== Github

An official release is done via a https://github.com/wimdeblauwe/ttcli/actions/workflows/release.yml[manual action on Github Actions].

==== Local

[NOTE]

You need to configure a https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token[GitHub access token]. Put it in ~/.jreleaser/config.properties with for example:

[source,properties]

JRELEASER_GITHUB_TOKEN=

====

Check JReleaser configuration:

[source]

mvn -Djreleaser.dry.run -Prelease jreleaser:config

Posting a release from a local environment only when binaries for the current platform are available:

[source]

mvn -Prelease jreleaser:release -Djreleaser.select.current.platform