Allow image application directory to be configurable

An `applicationDirectory` option on the Maven
`spring-boot:build-image` goal and the Gradle `bootBuildImage` task
can be configured to set the location that will be used to upload
application contents to the builder image, and will contain the
application contents in the generated image.

Closes gh-34786
This commit is contained in:
Scott Frederick
2023-04-07 14:00:00 -05:00
parent df542849be
commit 56bc6d2fa0
16 changed files with 292 additions and 22 deletions

View File

@@ -199,6 +199,12 @@ The values provided to the `tags` option should be full image references in the
The value must be a string in the ISO 8601 instant format, or `now` to use the current date and time.
| A fixed date that enables https://buildpacks.io/docs/features/reproducibility/[build reproducibility].
| `applicationDirectory`
| `--applicationDirectory`
| The path to a directory that application contents will be uploaded to in the builder image.
Application contents will also be in this location in the generated image.
| `/workspace`
|===
NOTE: The plugin detects the target Java compatibility of the project using the JavaPlugin's `targetCompatibility` property.