Skip to content

Commit 234c503

Browse files
committed
Polish whitespace
1 parent 653cabe commit 234c503

File tree

11 files changed

+26
-37
lines changed

11 files changed

+26
-37
lines changed

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Lifecycle.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ private void run(Phase phase) throws IOException {
203203
try {
204204
this.docker.container().start(reference);
205205
this.docker.container().logs(reference, logConsumer::accept);
206-
207206
ContainerStatus status = this.docker.container().wait(reference);
208207
if (status.getStatusCode() != 0) {
209208
throw new BuilderException(phase.getName(), status.getStatusCode());

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[[build-image]]
22
== Packaging OCI images
3-
43
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] from executable jars using https://buildpacks.io[Cloud Native Buildpacks].
54
Images can be built using the `bootBuildImage` task and a local Docker installation.
65
The task is automatically created when the `java` plugin is applied and is an instance of {boot-build-image-javadoc}[`BootBuildImage`].
76

7+
8+
89
[[build-image-customization]]
910
=== Image Customizations
1011
The plugin invokes a {buildpacks-reference}/concepts/components/builder/[builder] to orchestrate the generation of an image.
@@ -37,12 +38,15 @@ The following table summarizes the available properties and their default values
3738
| `verboseLogging`
3839
| Enables verbose logging of builder operations.
3940
| `false`
40-
4141
|===
4242

43+
44+
4345
[[build-image-examples]]
4446
=== Examples
4547

48+
49+
4650
[[build-image-example-custom-image-builder]]
4751
==== Custom Image Builder
4852
If you need to customize the builder used to create the image, configure the task as shown in the following example:
@@ -78,6 +82,7 @@ include::../gradle/packaging/boot-build-image-env.gradle.kts[tags=env]
7882
The example above assumes that the builder defines a `BP_JAVA_VERSION` property (typically used to customize the JDK version the image should use).
7983

8084

85+
8186
[[build-image-example-custom-image-name]]
8287
==== Custom Image Name
8388
By default, the image name is inferred from the `artifactId` and the `version` of the project, something like `docker.io/library/${project.artifactId}:${project.version}`.

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging.adoc

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[[packaging-executable]]
22
== Packaging executable archives
3-
43
The plugin can create executable archives (jar files and war files) that contain all of an application's dependencies and can then be run with `java -jar`.
54

65

76

87
[[packaging-executable-jars]]
98
=== Packaging executable jars
10-
119
Executable jars can be built using the `bootJar` task.
1210
The task is automatically created when the `java` plugin is applied and is an instance of {boot-jar-javadoc}[`BootJar`].
1311
The `assemble` task is automatically configured to depend upon the `bootJar` task so running `assemble` (or `build`) will also run the `bootJar` task.
@@ -16,7 +14,6 @@ The `assemble` task is automatically configured to depend upon the `bootJar` tas
1614

1715
[[packaging-executable-wars]]
1816
=== Packaging executable wars
19-
2017
Executable wars can be built using the `bootWar` task.
2118
The task is automatically created when the `war` plugin is applied and is an instance of {boot-war-javadoc}[`BootWar`].
2219
The `assemble` task is automatically configured to depend upon the `bootWar` task so running `assemble` (or `build`) will also run the `bootWar` task.
@@ -25,7 +22,6 @@ The `assemble` task is automatically configured to depend upon the `bootWar` tas
2522

2623
[[packaging-executable-wars-deployable]]
2724
==== Packaging executable and deployable wars
28-
2925
A war file can be packaged such that it can be executed using `java -jar` and deployed to an external container.
3026
To do so, the embedded servlet container dependencies should be added to the `providedRuntime` configuration, for example:
3127

@@ -50,7 +46,6 @@ NOTE: `providedRuntime` is preferred to Gradle's `compileOnly` configuration as,
5046

5147
[[packaging-executable-and-normal]]
5248
=== Packaging executable and normal archives
53-
5449
By default, when the `bootJar` or `bootWar` tasks are configured, the `jar` or `war` tasks are disabled.
5550
A project can be configured to build both an executable archive and a normal archive at the same time by enabling the `jar` or `war` task:
5651

@@ -85,15 +80,13 @@ include::../gradle/packaging/boot-jar-and-jar.gradle.kts[tags=classifier]
8580

8681
[[packaging-executable-configuring]]
8782
=== Configuring executable archive packaging
88-
8983
The {boot-jar-javadoc}[`BootJar`] and {boot-war-javadoc}[`BootWar`] tasks are subclasses of Gradle's `Jar` and `War` tasks respectively.
9084
As a result, all of the standard configuration options that are available when packaging a jar or war are also available when packaging an executable jar or war.
9185
A number of configuration options that are specific to executable jars and wars are also provided.
9286

9387

9488
[[packaging-executable-configuring-main-class]]
9589
==== Configuring the main class
96-
9790
By default, the executable archive's main class will be configured automatically by looking for a class with a `public static void main(String[])` method in directories on the task's classpath.
9891

9992
The main class can also be configured explicitly using the task's `mainClassName` property:
@@ -110,7 +103,6 @@ include::../gradle/packaging/boot-jar-main-class.gradle[tags=main-class]
110103
include::../gradle/packaging/boot-jar-main-class.gradle.kts[tags=main-class]
111104
----
112105

113-
114106
Alternatively, the main class name can be configured project-wide using the `mainClassName` property of the Spring Boot DSL:
115107

116108
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
@@ -125,7 +117,6 @@ include::../gradle/packaging/spring-boot-dsl-main-class.gradle[tags=main-class]
125117
include::../gradle/packaging/spring-boot-dsl-main-class.gradle.kts[tags=main-class]
126118
----
127119

128-
129120
If the {application-plugin}[`application` plugin] has been applied its `mainClassName` project property must be configured and can be used for the same purpose:
130121

131122
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
@@ -155,9 +146,9 @@ include::../gradle/packaging/boot-jar-manifest-main-class.gradle.kts[tags=main-c
155146
----
156147

157148

149+
158150
[[packaging-executable-configuring-excluding-devtools]]
159151
==== Excluding Devtools
160-
161152
By default, Spring Boot's Devtools module, `org.springframework.boot:spring-boot-devtools`, will be excluded from an executable jar or war.
162153
If you want to include Devtools in your archive set the `excludeDevtools` property to `false`:
163154

@@ -174,9 +165,9 @@ include::../gradle/packaging/boot-war-include-devtools.gradle.kts[tags=include-d
174165
----
175166

176167

168+
177169
[[packaging-executable-configuring-unpacking]]
178170
==== Configuring libraries that require unpacking
179-
180171
Most libraries can be used directly when nested in an executable archive, however certain libraries can have problems.
181172
For example, JRuby includes its own nested jar support which assumes that `jruby-complete.jar` is always directly available on the file system.
182173

@@ -203,7 +194,6 @@ The closure is passed a `FileTreeElement` and should return a `boolean` indicati
203194

204195
[[packaging-executable-configuring-launch-script]]
205196
==== Making an archive fully executable
206-
207197
Spring Boot provides support for fully executable archives.
208198
An archive is made fully executable by prepending a shell script that knows how to launch the application.
209199
On Unix-like platforms, this launch script allows the archive to be run directly like any other executable or to be installed as a service.
@@ -222,7 +212,6 @@ include::../gradle/packaging/boot-jar-include-launch-script.gradle[tags=include-
222212
include::../gradle/packaging/boot-jar-include-launch-script.gradle.kts[tags=include-launch-script]
223213
----
224214

225-
226215
This will add Spring Boot's default launch script to the archive.
227216
The default launch script includes several properties with sensible default values.
228217
The values can be customized using the `properties` property:
@@ -239,7 +228,6 @@ include::../gradle/packaging/boot-jar-launch-script-properties.gradle[tags=launc
239228
include::../gradle/packaging/boot-jar-launch-script-properties.gradle.kts[tags=launch-script-properties]
240229
----
241230

242-
243231
If the default launch script does not meet your needs, the `script` property can be used to provide a custom launch script:
244232

245233
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
@@ -255,9 +243,9 @@ include::../gradle/packaging/boot-jar-custom-launch-script.gradle.kts[tags=custo
255243
----
256244

257245

246+
258247
[[packaging-executable-configuring-properties-launcher]]
259248
==== Using the `PropertiesLauncher`
260-
261249
To use the `PropertiesLauncher` to launch an executable jar or war, configure the task's manifest to set the `Main-Class` attribute:
262250

263251
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
@@ -273,9 +261,9 @@ include::../gradle/packaging/boot-war-properties-launcher.gradle.kts[tags=proper
273261
----
274262

275263

264+
276265
[[packaging-layered-jars]]
277266
==== Packaging layered jars
278-
279267
By default, the `bootJar` tasks builds an archive that contains the application's classes and dependencies in `BOOT-INF/classes` and `BOOT-INF/lib` respectively.
280268
For cases where a docker image needs to be built from the contents of the jar, the jar format can be enhanced to support layer folders.
281269
To use this feature, the layering feature must be enabled:

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/publishing.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
[[publishing-your-application-maven]]
77
=== Publishing with the `maven` plugin
8-
98
When the {maven-plugin}[`maven` plugin] is applied, an `Upload` task for the `bootArchives` configuration named `uploadBootArchives` is automatically created.
109
By default, the `bootArchives` configuration contains the archive produced by the `bootJar` or `bootWar` task.
1110
The `uploadBootArchives` task can be configured to publish the archive to a Maven repository:
@@ -23,9 +22,9 @@ include::../gradle/publishing/maven.gradle.kts[tags=upload]
2322
----
2423

2524

25+
2626
[[publishing-your-application-maven-publish]]
2727
=== Publishing with the `maven-publish` plugin
28-
2928
To publish your Spring Boot jar or war, add it to the publication using the `artifact` method on `MavenPublication`.
3029
Pass the task that produces that artifact that you wish to publish to the `artifact` method.
3130
For example, to publish the artifact produced by the default `bootJar` task:
@@ -43,9 +42,9 @@ include::../gradle/publishing/maven-publish.gradle.kts[tags=publishing]
4342
----
4443

4544

45+
4646
[[publishing-your-application-distribution]]
4747
=== Distributing with the `application` plugin
48-
4948
When the {application-plugin}[`application` plugin] is applied a distribution named `boot` is created.
5049
This distribution contains the archive produced by the `bootJar` or `bootWar` task and scripts to launch it on Unix-like platforms and Windows.
5150
Zip and tar distributions can be built by the `bootDistZip` and `bootDistTar` tasks respectively.

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/reacting.adoc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
[[reacting-to-other-plugins]]
22
== Reacting to other plugins
3-
43
When another plugin is applied the Spring Boot plugin reacts by making various changes to the project's configuration.
54
This section describes those changes.
65

76

87

98
[[reacting-to-other-plugins-java]]
109
=== Reacting to the Java plugin
11-
1210
When Gradle's {java-plugin}[`java` plugin] is applied to a project, the Spring Boot plugin:
1311

1412
1. Creates a {boot-jar-javadoc}[`BootJar`] task named `bootJar` that will create an executable, fat jar for the project.
@@ -25,7 +23,6 @@ When Gradle's {java-plugin}[`java` plugin] is applied to a project, the Spring B
2523

2624
[[reacting-to-other-plugins-kotlin]]
2725
=== Reacting to the Kotlin plugin
28-
2926
When {kotlin-plugin}[Kotlin's Gradle plugin] is applied to a project, the Spring Boot plugin:
3027

3128
1. Aligns the Kotlin version used in Spring Boot's dependency management with the version of the plugin.
@@ -36,7 +33,6 @@ When {kotlin-plugin}[Kotlin's Gradle plugin] is applied to a project, the Spring
3633

3734
[[reacting-to-other-plugins-war]]
3835
=== Reacting to the war plugin
39-
4036
When Gradle's {war-plugin}[`war` plugin] is applied to a project, the Spring Boot plugin:
4137

4238
1. Creates a {boot-war-javadoc}[`BootWar`] task named `bootWar` that will create an executable, fat war for the project.
@@ -49,14 +45,12 @@ When Gradle's {war-plugin}[`war` plugin] is applied to a project, the Spring Boo
4945

5046
[[reacting-to-other-plugins-dependency-management]]
5147
=== Reacting to the dependency management plugin
52-
5348
When the {dependency-management-plugin}[`io.spring.dependency-management` plugin] is applied to a project, the Spring Boot plugin will automatically import the `spring-boot-dependencies` bom.
5449

5550

5651

5752
[[reacting-to-other-plugins-application]]
5853
=== Reacting to the application plugin
59-
6054
When Gradle's {application-plugin}[`application` plugin] is applied to a project, the Spring Boot plugin:
6155

6256
1. Creates a `CreateStartScripts` task named `bootStartScripts` that will create scripts that launch the artifact in the `bootArchives` configuration using `java -jar`.
@@ -71,5 +65,4 @@ When Gradle's {application-plugin}[`application` plugin] is applied to a project
7165

7266
[[reacting-to-other-plugins-maven]]
7367
=== Reacting to the Maven plugin
74-
7568
When Gradle's {maven-plugin}[`maven` plugin] is applied to a project, the Spring Boot plugin will configure the `uploadBootArchives` `Upload` task to ensure that no dependencies are declared in the pom that it generates.

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/running.adoc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[[running-your-application]]
22
== Running your application with Gradle
3-
43
To run your application without first building an archive use the `bootRun` task:
54

65
[source,bash,indent=0,subs="verbatim"]
@@ -28,7 +27,6 @@ include::../gradle/running/boot-run-main.gradle[tags=main]
2827
include::../gradle/running/boot-run-main.gradle.kts[tags=main]
2928
----
3029

31-
3230
Alternatively, the main class name can be configured project-wide using the `mainClassName` property of the Spring Boot DSL:
3331

3432
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
@@ -43,7 +41,6 @@ include::../gradle/running/spring-boot-dsl-main-class-name.gradle[tags=main-clas
4341
include::../gradle/running/spring-boot-dsl-main-class-name.gradle.kts[tags=main-class]
4442
----
4543

46-
4744
By default, `bootRun` will configure the JVM to optimize its launch for faster startup during development.
4845
This behavior can be disabled by using the `optimizedLaunch` property, as shown in the following example:
4946

@@ -59,7 +56,6 @@ include::../gradle/running/boot-run-disable-optimized-launch.gradle[tags=launch]
5956
include::../gradle/running/boot-run-disable-optimized-launch.gradle.kts[tags=launch]
6057
----
6158

62-
6359
If the {application-plugin}[`application` plugin] has been applied, its `mainClassName` property must be configured and can be used for the same purpose:
6460

6561
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
@@ -75,6 +71,7 @@ include::../gradle/running/application-plugin-main-class-name.gradle.kts[tags=ma
7571
----
7672

7773

74+
7875
[[running-your-application-passing-arguments]]
7976
=== Passing arguments to your application
8077
Like all `JavaExec` tasks, arguments can be passed into `bootRun` from the command line using `--args='<arguments>'` when using Gradle 4.9 or later.
@@ -106,5 +103,4 @@ include::../gradle/running/boot-run-source-resources.gradle[tags=source-resource
106103
include::../gradle/running/boot-run-source-resources.gradle.kts[tags=source-resources]
107104
----
108105

109-
110106
This makes them reloadable in the live application which can be helpful at development time.

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/getting-started.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[[getting-started]]
22
== Getting started
3-
43
The Spring Boot Plugin has the following goals:
54

65
include::goals/overview.adoc[]

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[[integration-tests]]
22
== Running Integration tests
3-
43
While you may start your Spring Boot application very easily from your test (or test suite) itself, it may be desirable to handle that in the build itself.
54
To make sure that the lifecycle of your Spring Boot application is properly managed around your integration tests, you can use the `start` and `stop` goals, as shown in the following example:
65

@@ -40,6 +39,7 @@ include::goals/start.adoc[leveloffset=+1]
4039
include::goals/stop.adoc[leveloffset=+1]
4140

4241

42+
4343
[[integration-tests-example]]
4444
=== Examples
4545

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ It is possible to automate the creation of an image whenever the `package` phase
3030
TIP: While the buildpack runs from an <<repackage,executable archive>>, it is not necessary to execute the `repackage` goal first as the executable archive is created automatically if necessary.
3131
When the `build-image` repackages the application, it applies the same settings as the `repackage` goal would, i.e. dependencies can be excluded using one of the exclude options, and Devtools is automatically excluded by default (you can control that using the `excludeDevtools` property).
3232

33+
34+
3335
[[build-image-customization]]
3436
=== Image Customizations
3537
The plugin invokes a {buildpacks-reference}/concepts/components/builder/[builder] to orchestrate the generation of an image.
@@ -62,17 +64,19 @@ The following table summarizes the available properties and their default values
6264
| `verboseLogging`
6365
| Enables verbose logging of builder operations.
6466
| `false`
65-
6667
|===
6768

6869
For more details, see <<build-image-example-custom-image-builder,custom image builder>> and <<build-image-example-custom-image-name,custom image name>>.
6970

7071
include::goals/build-image.adoc[leveloffset=+1]
7172

7273

74+
7375
[[build-image-examples]]
7476
=== Examples
7577

78+
79+
7680
[[build-image-example-custom-image-builder]]
7781
==== Custom Image Builder
7882
If you need to customize the builder used to create the image, configure yours as shown in the following example:

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ The `layout` property defaults to a guess based on the archive type (`jar` or `w
7373

7474
include::goals/repackage.adoc[leveloffset=+1]
7575

76+
77+
7678
[[repackage-examples]]
7779
=== Examples
7880

81+
82+
7983
[[repackage-example-custom-classifier]]
8084
==== Custom Classifier
8185
By default, the `repackage` goal replaces the original artifact with the repackaged one.

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Note that this is only applied when you run an application: the `repackage` goal
8080

8181
include::goals/run.adoc[leveloffset=+1]
8282

83+
84+
8385
[[run-examples]]
8486
=== Examples
8587

0 commit comments

Comments
 (0)