Polish asciidoc formatting
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
@import url("spring.css");
|
||||
|
||||
div .switch {
|
||||
margin-left: 8px;
|
||||
border-color: #406A2A;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
div .switch--item {
|
||||
color: #406A2A;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
div .switch--item.selected {
|
||||
background-color: #406A2A;
|
||||
}
|
||||
|
||||
div .switch--item:not(:first-child) {
|
||||
border-color: #406A2A;
|
||||
}
|
||||
@@ -85,7 +85,6 @@ For example, when the `java` plugin is applied a task for building an executable
|
||||
A typical Spring Boot project will apply the {groovy-plugin}[`groovy`], {java-plugin}[`java`], or {kotlin-plugin}[`org.jetbrains.kotlin.jvm`] plugin as a minimum and also use the {dependency-management-plugin}[`io.spring.dependency-management`] plugin or Gradle's native bom support for dependency management.
|
||||
For example:
|
||||
|
||||
|
||||
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
||||
.Groovy
|
||||
----
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
[[spring-boot-gradle-plugin-documentation]]
|
||||
= Spring Boot Gradle Plugin Reference Guide
|
||||
Andy Wilkinson, Scott Frederick
|
||||
:doctype: book
|
||||
@@ -9,7 +10,6 @@ Andy Wilkinson, Scott Frederick
|
||||
:hide-uri-scheme:
|
||||
:docinfo: shared,private
|
||||
:attribute-missing: warn
|
||||
|
||||
:dependency-management-plugin: https://github.com/spring-gradle-plugins/dependency-management-plugin
|
||||
:dependency-management-plugin-documentation: https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/
|
||||
:gradle-userguide: https://docs.gradle.org/current/userguide
|
||||
@@ -39,6 +39,7 @@ Andy Wilkinson, Scott Frederick
|
||||
:paketo-java-reference: {paketo-reference}/buildpacks/language-family-buildpacks/java
|
||||
|
||||
|
||||
|
||||
[[introduction]]
|
||||
== Introduction
|
||||
The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle].
|
||||
@@ -48,10 +49,17 @@ Spring Boot's Gradle plugin requires Gradle 6.8, 6.9, or 7.x and can be used wit
|
||||
In addition to this user guide, {api-documentation}[API documentation] is also available.
|
||||
|
||||
include::getting-started.adoc[]
|
||||
|
||||
include::managing-dependencies.adoc[]
|
||||
|
||||
include::packaging.adoc[]
|
||||
|
||||
include::packaging-oci-image.adoc[]
|
||||
|
||||
include::publishing.adoc[]
|
||||
|
||||
include::running.adoc[]
|
||||
|
||||
include::integrating-with-actuator.adoc[]
|
||||
|
||||
include::reacting.adoc[]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
== Integrating with Actuator
|
||||
|
||||
|
||||
|
||||
[[integrating-with-actuator-build-info]]
|
||||
=== Generating Build Information
|
||||
Spring Boot Actuator's `info` endpoint automatically publishes information about your build in the presence of a `META-INF/build-info.properties` file.
|
||||
@@ -20,7 +21,6 @@ include::../gradle/integrating-with-actuator/build-info-basic.gradle[tags=build-
|
||||
include::../gradle/integrating-with-actuator/build-info-basic.gradle.kts[tags=build-info]
|
||||
----
|
||||
|
||||
|
||||
This will configure a {build-info-javadoc}[`BuildInfo`] task named `bootBuildInfo` and, if it exists, make the Java plugin's `classes` task depend upon it.
|
||||
The task's destination directory will be `META-INF` in the output directory of the main source set's resources (typically `build/resources/main`).
|
||||
|
||||
@@ -61,7 +61,6 @@ include::../gradle/integrating-with-actuator/build-info-custom-values.gradle[tag
|
||||
include::../gradle/integrating-with-actuator/build-info-custom-values.gradle.kts[tags=custom-values]
|
||||
----
|
||||
|
||||
|
||||
The default value for `build.time` is the instant at which the project is being built.
|
||||
A side-effect of this is that the task will never be up-to-date.
|
||||
As a result, builds will take longer as more tasks, including the project's tests, will have to be executed.
|
||||
|
||||
@@ -53,7 +53,6 @@ Overriding versions may cause compatibility issues and should be done with care.
|
||||
|
||||
[[managing-dependencies-dependency-management-plugin-using-in-isolation]]
|
||||
==== Using Spring Boot's Dependency Management in Isolation
|
||||
|
||||
Spring Boot's dependency management can be used in a project without applying Spring Boot's plugin to that project.
|
||||
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.
|
||||
|
||||
@@ -114,7 +113,6 @@ include::../gradle/managing-dependencies/configure-bom.gradle[tags=configure-bom
|
||||
include::../gradle/managing-dependencies/configure-bom.gradle.kts[tags=configure-bom]
|
||||
----
|
||||
|
||||
|
||||
The Kotlin code above is a bit awkward.
|
||||
That's because we're using the imperative way of applying the dependency management plugin.
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ The task is automatically created when the `java` or `war` plugin is applied and
|
||||
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.
|
||||
Disable launch script configuration in the `bootJar` task when building a jar file that is intended to be used with `bootBuildImage`.
|
||||
|
||||
|
||||
|
||||
[[build-image-docker-daemon]]
|
||||
=== Docker Daemon
|
||||
The `bootBuildImage` task requires access to a Docker daemon.
|
||||
|
||||
@@ -37,7 +37,6 @@ include::../gradle/packaging/war-container-dependency.gradle[tags=dependencies]
|
||||
include::../gradle/packaging/war-container-dependency.gradle.kts[tags=dependencies]
|
||||
----
|
||||
|
||||
|
||||
This ensures that they are package in the war file's `WEB-INF/lib-provided` directory from where they will not conflict with the external container's own classes.
|
||||
|
||||
NOTE: `providedRuntime` is preferred to Gradle's `compileOnly` configuration as, among other limitations, `compileOnly` dependencies are not on the test classpath so any web-based integration tests will fail.
|
||||
@@ -153,6 +152,7 @@ For example, `ExampleApplication` becomes `ExampleApplicationKt`.
|
||||
If another name is defined using `@JvmName` then that name should be used.
|
||||
|
||||
|
||||
|
||||
[[packaging-executable-configuring-including-development-only-dependencies]]
|
||||
==== Including Development-only Dependencies
|
||||
By default all dependencies declared in the `developmentOnly` configuration will be excluded from an executable jar or war.
|
||||
@@ -193,7 +193,6 @@ include::../gradle/packaging/boot-jar-requires-unpack.gradle[tags=requires-unpac
|
||||
include::../gradle/packaging/boot-jar-requires-unpack.gradle.kts[tags=requires-unpack]
|
||||
----
|
||||
|
||||
|
||||
For more control a closure can also be used.
|
||||
The closure is passed a `FileTreeElement` and should return a `boolean` indicating whether or not unpacking is required.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user