Commit Graph

1127 Commits (9bbad6fb252bb02028e21ec5713b3e50dc00d3d8)

Author SHA1 Message Date
Konrado85 e0d1cf0e38 Polish JarFile to extra anonymous inner class
See gh-20882
5 years ago
Konrado85 9f4c39c985 Change PropertiesLauncher equals method to use URI
See gh-20872
5 years ago
dreis2211 4b9986d790 Remove unused fields in tests
See gh-20926
5 years ago
Cicio Flaviu 7f1655e5cb Add package-info to buildpack.platform.docker.ssl
See gh-20913
5 years ago
dreis2211 d4575bc122 Fix unused parameters
See gh-20911
5 years ago
Stephane Nicoll 1c70b6735a Remove plugin management for exec-maven-plugin
Closes gh-20883
5 years ago
dreis2211 ae15a3d162 Polish LayersIndex
See gh-20874
5 years ago
Madhura Bhave 62c09d607a Polish 5 years ago
Phillip Webb 3ca896e63f Polish 5 years ago
Phillip Webb 1640add8be Don't use Assert class from loader
Remove the use of `Assert` since it's unavailable that early.
5 years ago
Phillip Webb d9fb4dd477 Don't use monospacing in documentation headings
Closes gh-20875
5 years ago
Scott Frederick e17d4be484 Polish plugin documentation headings 5 years ago
Scott Frederick a64e26fc44 Polish plugin documentation headings 5 years ago
Phillip Webb 729fc9dd6d Ensure streams are always closed
Update `AbstractJarWriter` to ensure that streams are always closed,
even if entries are not written.
5 years ago
Phillip Webb 1abbfbbfcd Attempt to fix failing Windows test 5 years ago
Phillip Webb ffd499fdc7 Attempt to fix failing Windows test 5 years ago
Phillip Webb d3c06ee0cf Remove windows line endings when parsing index 5 years ago
Phillip Webb 4b1346f4bf Polish 5 years ago
Phillip Webb 5b374e833b Cleanup paths to fix tests running on Windows 5 years ago
Phillip Webb baa728c85e Cleanup paths to fix tests running on Windows 5 years ago
Phillip Webb b50e8eb3aa Fix package tangle in Gradle plugin
Relocate `VersionExtractor` to fix a package tangle.
5 years ago
Phillip Webb 6e7b473fef Polish asciidoc formatting and use sentence case 5 years ago
Phillip Webb 951a3e78f9 Test layer index can contain filenames with spaces
Add tests to ensure that the layer index can support filenames that
contain spaces.

Closes gh-20827
5 years ago
Phillip Webb 464c15e52c Ensure empty layers are written to the index file
Update the `LayersIndex` class to ensure that layers that do not contain
content are still written.

Closes gh-20858
5 years ago
Phillip Webb df58b9baa2 Use YAML compatible classpath.idx format
Update the `classpath.idx` format to align with `layers.idx` and allow
third-parties can parse it as YAML

Closes gh-20861
5 years ago
Phillip Webb 65672a1150 Use a more compact layers.idx format
Update the `layers.idx` format so that it is more compact and can be
parsed by third-parties as YAML.

Closes gh-20860
5 years ago
Scott Frederick 35ff711dfe Document builder configuration for HTTP proxy
This commit adds examples for configuring the default builder to use
an HTTP/HTTPS proxy when building OCI images using the Maven or Gradle
plugin.

Fixes gh-19984
5 years ago
Oleg Zhurakousky 9f75f30856 Change call to createClassLoader(URL) from 'super' to 'this'
ExecutableArchiveLauncher.createClassLoader(Iterator) calls
createClassLoader(URL) method with 'super'. This means overriding
createClassLoader(URL) is not possible without also overriding
createClassLoader(Iterator). The switch to 'this' enables that.

See gh-20851
5 years ago
Scott Frederick bb568c5bff Consolidate Maven plugin documentation in plugin reference
This commit moves Maven plugin content from several sections in the
main Spring Boot reference documentation to the plugin-specific
documentation.

Fixes gh-19165
5 years ago
Scott Frederick c119dd2450 Rename plugin PDF reference doc files
This commit renames the PDF documentation files generated for the
build plugins when the distribution archive is created.

See gh-20829
5 years ago
Madhura Bhave f40444e212 Fix typo 5 years ago
Andy Wilkinson 34e602652c Polish new layered jar support 5 years ago
Stephane Nicoll 3e936dd735 Polish 5 years ago
Stephane Nicoll c88ef6215f Polish 5 years ago
Phillip Webb 12bc890e75 Update Maven and Gradle layer customization docs
Update the Maven and Gradle documentation following the refined
layer customization changes.

See gh-20526
5 years ago
Madhura Bhave d61a79d90b Support flat jar layering with layertools
Update layertools to support the flat jar format. Layers are now
determined by reading the `layers.idx` file.

Closes gh-20813
5 years ago
Andy Wilkinson bfa04e6574 Support flat jar layering with Gradle
Update the Gralde plugin so that layered jars now use the regular "flat"
format. The layers.idx file now describes which layer each file should
be placed.

See gh-20813

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
5 years ago
Madhura Bhave 4e3cdf936f Support flat jar layering with Maven
Update the Maven plugin so that layered jars now use the regular "flat"
format. The layers.idx file now describes which layer each file should
be placed.

See gh-20813

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
5 years ago
Phillip Webb 3f806aa513 Create a new layer for loader classes
Create a dedicated layer that is used to hold the launcher support
classes. The layer sits between `dependencies` and
`snapshot-dependencies` so that the layer is sensible for both
SNAPSHOT and RELEASE versions of Spring Boot

Closes gh-20529
5 years ago
Phillip Webb 7bc7d86ad4 Refine layer customization for Maven and Gradle
Simplify layer customization logic for both Maven and Gradle and
refactor some internals of the Gradle plugin.

Both Maven and Gradle now use a simpler customization format that
consists of `application`, `dependencies` and `layer order` sections.
The `application`, `dependencies` configurations support one or more
`into` blocks that are used to select content for a specific layer.

Closes gh-20526
5 years ago
Andy Wilkinson 14718f3e8a Allow layertools to work without spring-boot jar
Update `spring-boot-jarmode-layertools` so that it no longer required
a `spring-boot` jar to run.

Closes gh-20815
5 years ago
Scott Frederick cc2852ce79 Polish 5 years ago
Scott Frederick a01c8452cb Support CNB builder platform API 0.3
This commit adds support for Cloud Native Buildpacks builder platform
API 0.3, which is the latest platform API available currently. Support
for platform API 0.1 has been removed, adopting the policy of the pack
CLI to support the current platform API version and one version prior.

Fixes gh-20757
5 years ago
Scott Frederick bb9e37e119 Use platform API builder image tags
CNB builder images are now being tagged in a manner that indicates
the version of the platform API implemented. This allows Spring Boot
to default to a builder tag that guarantees API compatibility while
allowing for updates to bundled buildpacks.

Fixes gh-20171
5 years ago
Phillip Webb 4dad56a491 Restructure and polish docker code
Restructure and polish docker code to fix a package tangle and
provide better separation of concerns.
5 years ago
Phillip Webb 9795262dc1 Polish 5 years ago
Andy Wilkinson 84e16d55ea Raise the minimum supported version of Gradle 6 to 6.3
Closes gh-20532
5 years ago
Scott Frederick ac949d7851 Document remote Docker configuration
This commit adds documentation for the configuration required to
use a remote Docker daemon with the `build-image` Maven goal or the
`bootBuildImage` Gradle task.

See gh-20538
5 years ago
Scott Frederick ed6e54218d Support remote Docker daemon for building images
Prior to this commit, the build plugin goal/task for building images
required a locally running Docker daemon that was accessed via a
non-networked socket or pipe.

This commit adds support for remote Docker daemons at a location
specified by the environment variable `DOCKER_HOST`. Additional
environment variables `DOCKER_TLS_VERIFY` and `DOCKER_CERT_PATH`
are recognized for configuring a secure TLS connection to the daemon.

Fixes gh-20538
5 years ago
dreis2211 674f1e77b5 Fix typos
See gh-20704
5 years ago
Madhura Bhave ad164269e9 Update classpath index to use jar name instead of full path
See gh-20564
5 years ago
Stephane Nicoll 089c0471fa Test the Gradle Plugin against Gradle 6.3
Closes gh-20669
5 years ago
Stephane Nicoll 6aa3461611 Version layers configuration xsd
This commit provides a versioned xsd for the layers configuration of the
Maven plugin. The version starts at `2.3` to match with the Spring Boot
feature release in which this was introduced.

Closes gh-20663
5 years ago
dreis2211 f95e9543dc Fix typos in packaging docs
See gh-20630
5 years ago
Phillip Webb 0717de723f Polish 5 years ago
Phillip Webb 9a33a723fe Update copyright year of changed files 5 years ago
Phillip Webb ce1ae11c26 Merge branch '2.2.x' 5 years ago
Phillip Webb 16b5ea3414 Update copyright year of changed files 5 years ago
Madhura Bhave 7444306d0b Polish docs 5 years ago
Madhura Bhave a06f4f21e3 Combine application and resources layers into a single layer
Closes gh-20562
5 years ago
Madhura Bhave 952e529787 Rename "classes" to "application" in custom layer configuration
Closes gh-20539
5 years ago
Scott Frederick 3f378e1276 Add command-line options for Gradle bootBuildImage parameters
This commit adds support for setting the image name and builder
parameters of the Gradle bootBuildImage task using command-line
options as an alternative to DSL configuration.

See gh-20520
5 years ago
Stephane Nicoll 579a6ac254 Adapt tests for support for Java 14
See gh-20576
5 years ago
Stephane Nicoll 0b7f198b54 Publish Maven plugin API
This commit enables javadoc generator for the Spring Boot Maven plugin.

This also harmonizes the structure of the documentation, with an `/api`
and a `/reference` root directories for the javadoc and the reference
guide respectively.

Closes gh-20127
5 years ago
Scott Frederick e607c6842f Polish Gradle layer configuration DSL
This commit modifies the DSL for custom layer configuration in the
Gradle plugin to avoid duplication of terms that could be confusing.

Fixes gh-20563
5 years ago
Stephane Nicoll 0f5ca030db Polish "Add Java 14 CI"
See gh-20413
5 years ago
Stephane Nicoll 2e2f839bc8 Upgrade to Gradle 6.3 RC2
Closes gh-20558
5 years ago
Andy Wilkinson 9b817caff3 Revert "Update extract to write files to their original, unlayered location"
This reverts commit 9f3bc78f36.
5 years ago
Andy Wilkinson 9f3bc78f36 Update extract to write files to their original, unlayered location 5 years ago
Scott Frederick 44f7508825 Fix BuildImageMojo javadoc. 5 years ago
Scott Frederick 08e96427de Add command-line properties for Maven build-image options
This commit adds support for setting the image name and builder
parameters of the Maven spring-boot:build-image goal using command-line
properties as an alternative to plugin configuration in pom.xml. Per
Maven conventions, a value in pom.xml configuration will override a
command-line property when both are provided.

Fixes gh-20520
5 years ago
Madhura Bhave fb8b531bfd Polish 5 years ago
Madhura Bhave 3e8ee2a296 Add missing package-info.json
Closes gh-20516
5 years ago
Madhura Bhave 84b2e8c308 Rename classes package to application
Closes gh-20526
5 years ago
Scott Frederick 3dea2201c4 Use Gradle's configuration avoidance API
Register Boot Gradle tasks instead of creating them so they can be
loaded lazily.

Closes gh-18881
5 years ago
Scott Frederick f2dadf5a87 Add support for customizing layers in Gradle
This commit adds configuration to the Spring Boot Gradle plugin that
allows the names and contents of layers to be customized in the build
configuration.

Fixes gh-20296
5 years ago
Andy Wilkinson c4a55a5fb4 Fail fast when attempting to repackage a reproducible war
Maven's war plugin does not support reproducible builds, resulting in
the entries in the war file not being written in a consistent order
from build to build.

Closes gh-20176
5 years ago
Andy Wilkinson ca202ad59f Support Maven's outputTimestamp when repackaging jars and wars
Closes gh-20176
5 years ago
Madhura Bhave e49e62df5c Add support for customizing layers in Maven
This commit adds an additional 'layers/configuration' property that can
be used to refer to a separate layers configuration file. This separate
file defines:

* The layers and their order of precedence,
* How libraries are handled using filters that match against the
coordinates of each library, and
* How classes are handled using filters that match against the location
of the entry

An XSD to validate the XML configuration file is available.

Closes gh-20295

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
5 years ago
Johnny Lim 8526e66939 Polish
See gh-20498
5 years ago
dreis2211 53e8e49552 Fix JarFileTests for multi-release JARs on JDK14
See gh-20180
5 years ago
dreis2211 daa3855fc8 Test the Gradle Plugin against Gradle 6.2.2
See gh-20385
5 years ago
dreis2211 9588188800 Use isEmpty() where possible
See gh-20370
5 years ago
Scott Frederick 296a13a479 Fix unit test case formatting 5 years ago
Scott Frederick b00ed5b143 Remove unused imports 5 years ago
Scott Frederick ce03f501c4 Merge pull request #20297 from mikesmithson 5 years ago
Scott Frederick ada0741e10 Polish Docker client exception handling 5 years ago
Mike Smithson 6f095d6fec Improve error message from image building
Translate IOException to DockerException for a more meaningful error
message when the Docker daemon is not available.

Fixes gh-20151
5 years ago
Scott Frederick e60a7ea8d6 Fix Maven plugins tests on Windows
This commit fixes problems with file path separators and command
line argument quoting in Maven plug integration tests when run on
Windows.

Fixes gh-20244
5 years ago
Scott Frederick 509a1f1d41 Configure buildpack to use target Java version
With this commit, the Maven `spring-boot:build-image` goal and the
Gradle `bootBuildImage` task will configure the OpenJDK buildpack
to use the same JRE version as the project's target version,
provided the buildpack Java version is not explicitly set in the
build configuration.

Fixes gh-20172
5 years ago
dreis2211 442733600e Test the Gradle plugin against Gradle 6.2.1
See gh-20310
5 years ago
Stephane Nicoll c0c097117a Polish
See gh-20244
5 years ago
Scott Frederick 23e781033c Merge branch '2.2.x'
Closes gh-20244
5 years ago
Scott Frederick 625b40aa90 Prefer arguments in POM over spring-boot.run.arguments
This commit changes the order of precedence for the `arguments` property
of the AbstractRunMojo so that values specified in the POM override
values provided on the command line using `spring-boot.run.arguments`.
This brings the `arguments` property in line with all other Mojo
parameters.

Fixes gh-20024
5 years ago
Madhura Bhave c5bce2b99d Fix gradle plugin validation error 5 years ago
Madhura Bhave 15cd590f7f Allow users to opt out of including the layer tools in a layered jar
For Maven, the layer configuration is now an additional configuration
option instead of a layout type.

Closes gh-19866
5 years ago
Johnny Lim 8be8a8421d Polish
See gh-20226
5 years ago
dreis2211 d55bc5f850 Test the Gradle Plugin against Gradle 6.2
See gh-20222
5 years ago
Madhura Bhave aa09058d8c Remove implicit layers support from the layer tools
Closes gh-20187
5 years ago
dreis2211 866c441d70 Upgrade to Gradle 6.2
See gh-20213
5 years ago
dreis2211 4f824bf9ad Fix duplicate words
See gh-20210
5 years ago
dreis2211 76d2bc27eb Explicitly set java home in Maven Plugin integration tests
See gh-20193
5 years ago
Stephane Nicoll 03bee83991 Update copyright date
See gh-20192
5 years ago
zhangt2333 e2d87a89d0 Polish
See gh-20192
5 years ago
Andy Wilkinson e065ee7be2 Merge branch '2.1.x' into 2.2.x
Closes gh-20183
5 years ago
Andy Wilkinson b9c2d775a9 Merge branch '2.2.x'
Closes gh-20185
5 years ago
Andy Wilkinson d61b035640 Merge branch '2.1.x' into 2.2.x
Closes gh-20183
5 years ago
Andy Wilkinson c8907d46b4 Fix up-to-date checking of build info properties
Closes gh-20135
5 years ago
Andy Wilkinson 8577a39a96 Upgrade to Spring Asciidoctor Extensions 0.4.1.RELEASE
Closes gh-20158
5 years ago
Scott Frederick e294d26458 Set ephemeral builder container creation to a fixed date
This commit fixes the `Created` date and time of the ephemeral builder
container image at the Windows epoch plus one second
(1980-01-01T00:00:01Z). This date matches the created date of the builder
image and influences the created date of the resulting image. Using
a fixed date for images ensures that the digest is consistent for all
images with the same version.

Fixes gh-20126
5 years ago
Scott Frederick 191dce3f5e Set Spring Boot version in ephemeral builder
This commit adds a `createdBy` structure to the metadata of the ephemeral
builder container image that identifies Spring Boot as the creator of the
image, along with the Spring Boot version.

See gh-20126
5 years ago
dreis2211 cfc16c2589 Remove redundant jar task configuration
See gh-20113
5 years ago
Stephane Nicoll 3229142188 Merge branch '2.2.x'
Closes gh-20121
5 years ago
Stephane Nicoll 765b2178d1 Document spring-boot.run.arguments behaviour with multiple arguments
Closes gh-19998
5 years ago
Madhura Bhave ec42dcd173 Fix typo 5 years ago
Scott Frederick 12c640e133 Upgrade default image builder version
This commit upgrades the default CNB builder image from
cloudfoundry/cnb:0.0.43-bionic to cloudfoundry/cnb:0.0.53-bionic.
It also adds integration tests for the Maven and Gradle plugins
to verify both versions are supported.
5 years ago
Scott Frederick d07062652e Add support for CNB platform API v0.2
Cloud Native Buildpacks platform API version 0.2 introduced
two breaking changes: the order of invoking the restore and analyze
phases was reversed, and the cache phase was removed in favor of
distributing caching across other phases.

This commit adds support for Cloud Native Buildpacks builders that
implement platform API version 0.2, while maintaining compatibility
with builders that implement Lifecycle version platform API
version 0.1.

Closes gh-19829
5 years ago
Johnny Lim 6818279751 Fix typo
See gh-20049
5 years ago
dreis2211 268f696d19 Add missing deployed plugin to modules
This commit registers 'org.springframework.boot.deployed' to
spring-boot-configuration-metadata and spring-boot-properties-migrator
to make sure they are deployed as expected.

See gh-20051
5 years ago
Andy Wilkinson 5c2b28cb57 Merge branch '2.2.x'
Closes gh-20043
5 years ago
Andy Wilkinson b6a408ae77 Upgrade to Spring Asciidoctor Extensions 0.4.0.RELEASE
Closes gh-20041
5 years ago
Stephane Nicoll b5e23e7405 Update copyright year of changed files
See gh-20020
5 years ago
Johnny Lim b67ece48e4 Polish
See gh-20020
5 years ago
dreis2211 e4a95a8047 Upgrade to Ivy 2.5.0
See gh-20022
5 years ago
dreis2211 326092b69e Upgrade to Ant 1.10.7
See gh-20002
5 years ago
Andy Wilkinson bca98c5126 Use a RegularFileProperty to configure BootBuildImage's input jar
Closes gh-20010
5 years ago
Johnny Lim e6d5f5a271 Polish
See gh-19995
5 years ago
Phillip Webb cbacab5e26 Polish 5 years ago
Phillip Webb 1eee83a07e Update copyright year of changed files 5 years ago
Phillip Webb 234c5033d4 Polish whitespace 5 years ago
Scott Frederick 653cabe2ce Add documentation for gradle bootBuildImage task 5 years ago
Madhura Bhave bceed1305f Jar files added after build time should be added to classpath
Fixes gh-19973
5 years ago
Scott Frederick b281af0b9b Remove adding of existing layers to EphemeralBuilder
Layers were being added to the EphemeralBuilder each time one was
created, but those layers already existed in the base builder image.

Closes gh-19832
5 years ago
Andy Wilkinson 7b0d1eaffc Test the Gradle Plugin against Gradle 6.1.1
Closes gh-19912
5 years ago
Andy Wilkinson 2725264be1 Polishing formatting of DockerApi 5 years ago
Andy Wilkinson 28442b5ca5 Lower the minimum required Docker API version to 1.24
Closes gh-19945
5 years ago
Andy Wilkinson 54b3f480b4 Use posix long names when creating tar archive for image building
Fixes gh-19964
5 years ago
Scott Frederick c6a6024062 Stop image building on error from builder
Previously, the image builder used by the build tool plugins ignored
errors from lifecycle phases and continued with subsequent phases.

This commit inspects the status of the builder container after each
lifecycle phase and aborts the image building process if the exit
status of the container after any phase is non-zero.

Fixes #19949
5 years ago
dreis2211 d8e2349e47 Use Supplier variants of Assert
See gh-19864
5 years ago
Stephane Nicoll 9fbaf7611b Merge branch '2.2.x'
Closes gh-19966
5 years ago
Stephane Nicoll b420bdb3ac Merge branch '2.1.x' into 2.2.x
Closes gh-19965
5 years ago
dreis2211 db2bacc62a Fix Gradle plugin documentation links
See gh-19961
5 years ago
dreis2211 741a4f4b2b Fix links in Maven Plugin documentation
See gh-19952
5 years ago
Stephane Nicoll 5410148f79 Improve documentation of 'image' parameter of Maven Plugin
Closes gh-19950
5 years ago
Stephane Nicoll 11c5fba355 Remove unnecessary execution-specific configuration in documentation
This documentation moves the specific `build-image` execution
configuration example of the Maven plugin documentation to the general
plugin configuration. This makes sure that it works in most cases and
an execution-specific configuration is not required here anyway.

Closes gh-19946
5 years ago
Stephane Nicoll 07a1783572 Polish "Introduce appendix section with version properties"
See gh-19898
5 years ago
dreis2211 65394582f6 Introduce appendix section with version properties
With the introduction of Gradle we lost the list of version properties
that were previously in the spring-boot-dependencies POM and were also
linked inside the documentation. This commit introduces an appendix
section in the docs and links the appropriate places to the new section
to restore discoverability.

See gh-19898
5 years ago
Andy Wilkinson 63b736d1f0 Fix NPE when waiting for named socket path to become available
Fixes gh-19941
5 years ago
Stephane Nicoll 3290313eb7 Fix Docker socket creation on Windows
Closes gh-19908
5 years ago
dreis2211 d75de39456 Upgrade to JUnit Jupiter 5.6.0
See gh-19907
5 years ago