<!-- (you don't need this if you are using a release version) -->
<repositories>
<repository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
endif::[]
</project>
----
ifeval::["{build-type}" == "opensource"]
The preceding listing should give you a working build.
endif::[]
ifeval::["{build-type}" == "commercial"]
You will also have to configure your build to access the Spring Commercial repository.
This is usual done through a local artifact repository that mirrors the content of the Spring Commercial repository.
Alternatively, while it is not recommended, the Spring Commercial repository can also be accessed directly.
In either case, see https://docs.vmware.com/en/Tanzu-Spring-Runtime/Commercial/Tanzu-Spring-Runtime/spring-enterprise-subscription.html[the Tanzu Spring Runtime documentation] for further details.
With the addition of the necessary repository configuration, the preceding listing should give you a working build.
endif::[]
You can test it by running `mvn package` (for now, you can ignore the "`jar will be empty - no content was marked for inclusion!`" warning).
NOTE: At this point, you could import the project into an IDE (most modern Java IDEs include built-in support for Maven).
To get started with the plugin it needs to be applied to your project.
ifeval::["{artifact-release-type}" == "release"]
ifeval::["{build-type}" == "commercial"]
The plugin is published to the Spring Commercial repository.
You will have to configure your build to access this repository.
This is usual done through a local artifact repository that mirrors the content of the Spring Commercial repository.
Alternatively, while it is not recommended, the Spring Commercial repository can also be accessed directly.
In either case, see https://docs.vmware.com/en/Tanzu-Spring-Runtime/Commercial/Tanzu-Spring-Runtime/spring-enterprise-subscription.html[the Tanzu Spring Runtime documentation] for further details.
With access to the Spring Commercial repository configured in `settings.gradle` or `settings.gradle.kts`, the plugin can be applied using the `plugins` block:
The plugin is https://plugins.gradle.org/plugin/org.springframework.boot[published to Gradle's plugin portal] and can be applied using the `plugins` block:
@ -70,7 +70,25 @@ The `SpringBootPlugin` class provides a `BOM_COORDINATES` constant that can be u
@@ -70,7 +70,25 @@ The `SpringBootPlugin` class provides a `BOM_COORDINATES` constant that can be u
First, configure the project to depend on the Spring Boot plugin but do not apply it:
@ -8,9 +8,19 @@ To use the Spring Boot Maven Plugin, include the appropriate XML in the `plugins
@@ -8,9 +8,19 @@ To use the Spring Boot Maven Plugin, include the appropriate XML in the `plugins
The plugin is published to the Spring Commercial repository.
You will have to configure your build to access this repository.
This is usually done through a local artifact repository that mirrors the content of the Spring Commercial repository.
Alternatively, while it is not recommended, the Spring Commercial repository can also be accessed directly.
In either case, see https://docs.vmware.com/en/Tanzu-Spring-Runtime/Commercial/Tanzu-Spring-Runtime/spring-enterprise-subscription.html[the Tanzu Spring Runtime documentation] for further details.
endif::[]
ifeval::["{build-type}" == "opensource"]
If you use a milestone or snapshot release, you also need to add the appropriate `pluginRepository` elements, as shown in the following listing: