You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/index.adoc
+9-15Lines changed: 9 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -40,26 +40,20 @@ Andy Wilkinson, Scott Frederick
40
40
41
41
42
42
43
-
[[introduction]]
44
-
== Introduction
45
-
The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle].
46
-
It allows you to package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by `spring-boot-dependencies`.
47
-
Spring Boot's Gradle plugin requires Gradle 6.8, 6.9, or 7.x and can be used with Gradle's {gradle-userguide}/configuration_cache.html[configuration cache].
43
+
include::introduction.adoc[leveloffset=+1]
48
44
49
-
In addition to this user guide, {api-documentation}[API documentation] is also available.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/integrating-with-actuator.adoc
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
[[integrating-with-actuator]]
2
-
==Integrating with Actuator
2
+
= Integrating with Actuator
3
3
4
4
5
5
6
-
[[integrating-with-actuator-build-info]]
7
-
=== Generating Build Information
6
+
[[integrating-with-actuator.build-info]]
7
+
== Generating Build Information
8
8
Spring Boot Actuator's `info` endpoint automatically publishes information about your build in the presence of a `META-INF/build-info.properties` file.
9
9
A {build-info-javadoc}[`BuildInfo`] task is provided to generate this file.
10
10
The easiest way to use the task is via the plugin's DSL:
The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle].
4
+
It allows you to package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by `spring-boot-dependencies`.
5
+
Spring Boot's Gradle plugin requires Gradle 6.8, 6.9, or 7.x and can be used with Gradle's {gradle-userguide}/configuration_cache.html[configuration cache].
6
+
7
+
In addition to this user guide, {api-documentation}[API documentation] is also available.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/managing-dependencies.adoc
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
[[managing-dependencies]]
2
-
==Managing Dependencies
2
+
= Managing Dependencies
3
3
To manage dependencies in your Spring Boot application, you can either apply the {dependency-management-plugin}[`io.spring.dependency-management`] plugin or use Gradle's native bom support.
4
4
The primary benefit of the former is that it offers property-based customization of managed versions, while using the latter will likely result in faster builds.
=== Managing Dependencies with the Dependency Management Plugin
10
-
When you apply the {dependency-management-plugin}[`io.spring.dependency-management`] plugin, Spring Boot's plugin will automatically <<reacting-to-other-plugins-dependency-management,import the `spring-boot-dependencies` bom>> from the version of Spring Boot that you are using.
== Managing Dependencies with the Dependency Management Plugin
10
+
When you apply the {dependency-management-plugin}[`io.spring.dependency-management`] plugin, Spring Boot's plugin will automatically <<reacting-to-other-plugins.dependency-management,import the `spring-boot-dependencies` bom>> from the version of Spring Boot that you are using.
11
11
This provides a similar dependency management experience to the one that's enjoyed by Maven users.
12
12
For example, it allows you to omit version numbers when declaring dependencies that are managed in the bom.
13
13
To make use of this functionality, declare dependencies in the usual way but omit the version number:
The `spring-boot-dependencies` bom that is automatically imported when the dependency management plugin is applied uses properties to control the versions of the dependencies that it manages.
32
32
Browse the {version-properties-appendix}[`Dependency versions Appendix`] in the Spring Boot reference for a complete list of these properties.
33
33
@@ -51,8 +51,8 @@ Overriding versions may cause compatibility issues and should be done with care.
=== Using Spring Boot's Dependency Management in Isolation
56
56
Spring Boot's dependency management can be used in a project without applying Spring Boot's plugin to that project.
57
57
The `SpringBootPlugin` class provides a `BOM_COORDINATES` constant that can be used to import the bom without having to know its group ID, artifact ID, or version.
To learn more about the capabilities of the dependency management plugin, please refer to its {dependency-management-plugin-documentation}[documentation].
132
132
133
133
134
134
135
-
[[managing-dependencies-gradle-bom-support]]
136
-
=== Managing Dependencies with Gradle's Bom Support
135
+
[[managing-dependencies.gradle-bom-support]]
136
+
== Managing Dependencies with Gradle's Bom Support
137
137
Gradle allows a bom to be used to manage a project's versions by declaring it as a `platform` or `enforcedPlatform` dependency.
138
138
A `platform` dependency treats the versions in the bom as recommendations and other versions and constraints in the dependency graph may cause a version of a dependency other than that declared in the bom to be used.
139
139
An `enforcedPlatform` dependency treats the versions in the bom as requirements and they will override any other version found in the dependency graph.
@@ -157,8 +157,8 @@ As a result, in may be necessary to declare the same dependency in more than one
When using Gradle's bom support, you cannot use the properties from `spring-boot-dependencies` to control the versions of the dependencies that it manages.
163
163
Instead, you must use one of the mechanisms that Gradle provides.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
[[build-image]]
2
-
==Packaging OCI Images
2
+
= Packaging OCI Images
3
3
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] from a jar or war file using https://buildpacks.io[Cloud Native Buildpacks] (CNB).
4
4
Images can be built using the `bootBuildImage` task.
5
5
@@ -8,13 +8,13 @@ See the {buildpacks-reference}/reference/spec/platform-api/#users[CNB specificat
8
8
9
9
The task is automatically created when the `java` or `war` plugin is applied and is an instance of {boot-build-image-javadoc}[`BootBuildImage`].
10
10
11
-
NOTE: The `bootBuildImage` task can not be used with a <<packaging-executable-configuring-launch-script, fully executable Spring Boot archive>> that includes a launch script.
11
+
NOTE: The `bootBuildImage` task can not be used with a <<packaging-executable.configuring.launch-script, fully executable Spring Boot archive>> that includes a launch script.
12
12
Disable launch script configuration in the `bootJar` task when building a jar file that is intended to be used with `bootBuildImage`.
13
13
14
14
15
15
16
-
[[build-image-docker-daemon]]
17
-
=== Docker Daemon
16
+
[[build-image.docker-daemon]]
17
+
== Docker Daemon
18
18
The `bootBuildImage` task requires access to a Docker daemon.
19
19
By default, it will communicate with a Docker daemon over a local connection.
20
20
This works with https://docs.docker.com/install/[Docker Engine] on all supported platforms without configuration.
@@ -53,12 +53,12 @@ The following table summarizes the available properties:
53
53
| Path to certificate and key files for HTTPS (required if `tlsVerify` is `true`, ignored otherwise)
54
54
|===
55
55
56
-
For more details, see also <<build-image-example-docker,examples>>.
56
+
For more details, see also <<build-image.examples.docker,examples>>.
57
57
58
58
59
59
60
-
[[build-image-docker-registry]]
61
-
=== Docker Registry
60
+
[[build-image.docker-registry]]
61
+
== Docker Registry
62
62
If the Docker images specified by the `builder` or `runImage` properties are stored in a private Docker image registry that requires authentication, the authentication credentials can be provided using `docker.builderRegistry` properties.
63
63
64
64
If the generated Docker image is to be published to a Docker image registry, the authentication credentials can be provided using `docker.publishRegistry` properties.
@@ -87,12 +87,12 @@ The following table summarizes the available properties for `docker.builderRegis
87
87
| Identity token for the Docker image registry user. Required for token authentication.
88
88
|===
89
89
90
-
For more details, see also <<build-image-example-docker,examples>>.
90
+
For more details, see also <<build-image.examples.docker,examples>>.
91
91
92
92
93
93
94
-
[[build-image-customization]]
95
-
=== Image Customizations
94
+
[[build-image.customization]]
95
+
== Image Customizations
96
96
The plugin invokes a {buildpacks-reference}/concepts/components/builder/[builder] to orchestrate the generation of an image.
97
97
The builder includes multiple {buildpacks-reference}/concepts/components/buildpack[buildpacks] that can inspect the application to influence the generated image.
98
98
By default, the plugin chooses a builder image.
@@ -176,17 +176,17 @@ Where `<options>` can contain:
176
176
177
177
NOTE: The plugin detects the target Java compatibility of the project using the JavaPlugin's `targetCompatibility` property.
178
178
When using the default Paketo builder and buildpacks, the plugin instructs the buildpacks to install the same Java version.
179
-
You can override this behaviour as shown in the <<build-image-example-builder-configuration,builder configuration>> examples.
179
+
You can override this behaviour as shown in the <<build-image.examples.builder-configuration,builder configuration>> examples.
180
180
181
181
182
182
183
-
[[build-image-examples]]
184
-
=== Examples
183
+
[[build-image.examples]]
184
+
== Examples
185
185
186
186
187
187
188
-
[[build-image-example-custom-image-builder]]
189
-
==== Custom Image Builder and Run Image
188
+
[[build-image.examples.custom-image-builder]]
189
+
=== Custom Image Builder and Run Image
190
190
If you need to customize the builder used to create the image or the run image used to launch the built image, configure the task as shown in the following example:
@@ -212,8 +212,8 @@ The builder and run image can be specified on the command line as well, as shown
212
212
213
213
214
214
215
-
[[build-image-example-builder-configuration]]
216
-
==== Builder Configuration
215
+
[[build-image.examples.builder-configuration]]
216
+
=== Builder Configuration
217
217
If the builder exposes configuration options, those can be set using the `environment` property.
218
218
219
219
The following is an example of {paketo-java-reference}/#configuring-the-jvm-version[configuring the JVM version] used by the Paketo Java buildpacks at build time:
Paketo Java buildpacks {paketo-java-reference}/#runtime-jvm-configuration[configure the JVM runtime environment] by setting the `JAVA_TOOL_OPTIONS` environment variable.
253
253
The buildpack-provided `JAVA_TOOL_OPTIONS` value can be modified to customize JVM runtime behavior when the application image is launched in a container.
By default, the image name is inferred from the `name` and the `version` of the project, something like `docker.io/library/${project.name}:${project.version}`.
274
274
You can take control over the name by setting task properties, as shown in the following example:
275
275
@@ -297,8 +297,8 @@ The image name can be specified on the command line as well, as shown in this ex
297
297
298
298
299
299
300
-
[[build-image-example-buildpacks]]
301
-
==== Buildpacks
300
+
[[build-image.examples.buildpacks]]
301
+
=== Buildpacks
302
302
By default, the builder will use buildpacks included in the builder image and apply them in a pre-defined order.
303
303
An alternative set of buildpacks can be provided to apply buildpacks that are not included in the builder, or to change the order of included buildpacks.
304
304
When one or more buildpacks are provided, only the specified buildpacks will be applied.
@@ -347,8 +347,8 @@ An OCI image containing a https://buildpacks.io/docs/buildpack-author-guide/pack
347
347
348
348
349
349
350
-
[[build-image-example-publish]]
351
-
==== Image Publishing
350
+
[[build-image.examples.publish]]
351
+
=== Image Publishing
352
352
The generated image can be published to a Docker registry by enabling a `publish` option and configuring authentication for the registry using `docker.publishRegistry` properties.
@@ -372,8 +372,8 @@ The publish option can be specified on the command line as well, as shown in thi
372
372
373
373
374
374
375
-
[[build-image-example-docker]]
376
-
==== Docker Configuration
375
+
[[build-image.examples.docker]]
376
+
=== Docker Configuration
377
377
If you need the plugin to communicate with the Docker daemon using a remote connection instead of the default local connection, the connection details can be provided using `docker` properties as shown in the following example:
0 commit comments