Forge
Plugins

Spring Boot

Plugin for Spring Boot and Maven projects

@bjb-forge/nx-spring-boot-project

Installation

npx @bjb-forge/cli add @bjb-forge/nx-spring-boot-project

Plugin Options

{
  "plugin": "@bjb-forge/nx-spring-boot-project/nx-plugin",
  "options": {}
}
OptionTypeDescription
build.targetNamestringThe name of the build target
serve.targetNamestringThe name of the serve target
test.targetNamestringThe name of the test target

Inferred Targets

build

Compiles the Maven project using mvn compile.

Condition: All Maven projects (excluding pure-aggregators and orphaned modules)

test

Runs unit tests using mvn test.

Condition: Library and service projects only (not aggregator/parent projects)

serve

Runs the Spring Boot application with mvn spring-boot:run.

Condition: Projects with spring-boot-maven-plugin configured in pom.xml

nx-release-publish

Publishes the project artifact to a registry.

VariantCondition
JIB (Container Image)When jib.yml exists in project root
Maven DeployWhen distributionManagement is configured in pom.xml hierarchy

Generators

service-project

Create a Spring Boot service project.

nx g @bjb-forge/nx-spring-boot-project:service-project [options]
OptionTypeRequiredDefaultDescription
directorystringYes-A directory where the project is placed

On this page