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-projectPlugin Options
{
"plugin": "@bjb-forge/nx-spring-boot-project/nx-plugin",
"options": {}
}| Option | Type | Description |
|---|---|---|
build.targetName | string | The name of the build target |
serve.targetName | string | The name of the serve target |
test.targetName | string | The 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.
| Variant | Condition |
|---|---|
| JIB (Container Image) | When jib.yml exists in project root |
| Maven Deploy | When 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]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory where the project is placed |