Plugins
Spring Boot
Plugin for Spring Boot and Maven projects
@bjb-forge/nx-spring-boot-project
Installation
npx forge add @bjb-forge/nx-spring-boot-projectIn DevCloud, the following configuration must be in your .mvn/settings.xml
<servers>
<server>
<id>csa</id>
<username>${env.CODEAK_REPOSITORY_USERNAME}</username>
<password>${env.CODEAK_REPOSITORY_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>forge-extension-repo</id>
<repositories>
<repository>
<id>csa</id>
<url>https://csa.maven.pkg.sehlat.io</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>csa</id>
<url>https://csa.maven.pkg.sehlat.io</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>forge-extension-repo</activeProfile>
</activeProfiles>Plugin Options
{
"plugin": "@bjb-forge/nx-spring-boot-project/nx-plugin",
"options": {}
}| Option | Type | Description |
|---|---|---|
useDaemon | boolean | Use Maven Daemon (mvnd) instead of mvn for faster builds |
deployStrategy | string | Deploy strategy to use for release publishing. 'default' uses standard mvn deploy. 'forge' uses the forge maven-deploy-plugin. |
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 |
verify.targetName | string | The name of the verify target |
Inferred Targets
build
Installs the Maven project using mvn install (skipping tests).
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)
verify
Runs integration tests using mvn verify.
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 an Nx Plugin for JB.
nx g @bjb-forge/nx-spring-boot-project:service-project [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory where the plugin is placed. |