1490 Commits

Author SHA1 Message Date
Andy Wilkinson
bbad377ecc Merge branch '2.3.x'
Closes gh-24017
2020-11-03 18:00:22 +00:00
Andy Wilkinson
f3d4b3e5ac Allow entries to be streamed from JarURLConnections' jar file
Fixes gh-23821
2020-11-03 17:59:38 +00:00
izeye
9c35cd41ad Polish
See gh-23986
2020-11-01 17:07:50 +01:00
Scott Frederick
f080bb6c25 Fix test that depended on snapshot version
A test case would fail to accurately capture the contents
of the layers.idx file unless the test project contained
at least one non-project snapshot dependency, which was only
true when the Spring Boot version was a snapshot.

See gh-23463
2020-10-29 19:40:13 -05:00
Phillip Webb
a41ff4dfab Merge branch '2.3.x' 2020-10-29 09:07:57 -07:00
Phillip Webb
b0c2687aa9 Update copyright year of changed files 2020-10-29 09:07:42 -07:00
Andy Wilkinson
5642dc6d13 Merge branch '2.3.x'
Closes gh-23970
2020-10-29 15:31:59 +00:00
Andy Wilkinson
70d9602b3f Merge branch '2.2.x' into 2.3.x
Closes gh-23969
2020-10-29 15:31:12 +00:00
Andy Wilkinson
e7eb7739dc Use overriding rather than overridden getter methods in config prop AP
Fixes gh-23966
2020-10-29 15:30:46 +00:00
Phillip Webb
74e06e8e6a Refine MetadataCollector logic
Update `MetadataCollector` merge logic so that previous items are no
longer added if the current round contains a property of the same name.

Fixes gh-23916
2020-10-28 21:59:06 -07:00
Phillip Webb
23e5fd798c Merge branch '2.3.x'
Closes gh-23960
2020-10-28 21:18:42 -07:00
Phillip Webb
b86dcbec72 Merge branch '2.2.x' into 2.3.x
Closes gh-23959
2020-10-28 21:18:17 -07:00
Phillip Webb
cf09451ffb Retain inner-class data on incremental compile
Ensure that metadata sourced from inner-types is not deleted when
performing an incremental compile. Prior to this commit, the source
type was searched using the `Outer$Inner` format. This is not supported
`Elements.getTypeElement` so we now convert the names to `Outer.Inner`.

Closes gh-10886
2020-10-28 21:13:08 -07:00
Scott Frederick
04a40a4c68 Provide content-length header to Docker API calls
Docker daemon authorization plugins reject POST or PUT requests that have a
content type `application/json` header but no content length header. This
commit ensures that a content length header is provided in these cases.

This is a cherry-pick of the changes in d5b2836ec90c5a94b2201c074db5e3fcc99a9204
which were lost in a forward-merge.

Fixes gh-23957
2020-10-28 17:31:27 -05:00
Phillip Webb
b39d1910bc Fix test failure caused by MavenBuild upgrades
See gh-23937
2020-10-28 14:07:27 -07:00
Scott Frederick
d5b2836ec9 Provide content-length header to Docker API calls
Docker daemon authorization plugins reject POST or PUT requests that have a
content type `application/json` header but no content length header. This
commit ensures that a content length header is provided in these cases.

Fixes gh-22840
2020-10-28 15:15:32 -05:00
Phillip Webb
d43760ba5a Merge branch '2.3.x'
Closes gh-23938
2020-10-28 12:39:08 -07:00
Phillip Webb
d79c23ef89 Upgrade MavenBuild versions
Align versions with those in the main build.

Closes gh-23937
2020-10-28 12:37:30 -07:00
Sebastian Nohn
b3c4d5fe5c Upgrade to Log4j 2.13.3 in Maven tests
See gh-23935
2020-10-28 12:15:33 -07:00
Stephane Nicoll
472c563451 Merge branch '2.3.x'
Closes gh-23931
2020-10-28 16:20:22 +01:00
Stephane Nicoll
0424689aee Merge branch '2.2.x' into 2.3.x
Closes gh-23930
2020-10-28 16:18:00 +01:00
Stephane Nicoll
93e36a97ab Remove version elements from Maven plugin documentation
This commit removes `<version>` from the Maven Plugin documentation
where it makes sense so that versions aren't hardcoded unnecessarily.

Rather, a plugin or dependency management should be in place so those
are not needed.

Closes gh-23909
2020-10-28 13:39:03 +01:00
Stephane Nicoll
a3818d690e Fix custom layout example so that tokens are replaced 2020-10-28 13:37:59 +01:00
Stephane Nicoll
59bcbd4885 Polish "Allow overriding image.cleanCache from the command-line"
See gh-32719
2020-10-26 10:44:57 +01:00
Kedar Joshi
c2a483a78f Allow overriding image.cleanCache from the command-line
See gh-32719
2020-10-26 10:44:57 +01:00
Andy Wilkinson
c85cc33ca9 Fix main class resolution failure when loaded from config cache
See gh-22922
2020-10-25 08:05:59 +00:00
Andy Wilkinson
7cbcd42eba Adapt test to cope with increased Instant precision on Java 11
See gh-22922
2020-10-23 14:38:36 +01:00
Andy Wilkinson
4a4fec6310 Avoid calling getProject() during BootBuildImage's execution
See gh-22922
2020-10-23 13:23:52 +01:00
Andy Wilkinson
c409d50c14 Document support for Gradle's configuration cache
See gh-22922
2020-10-23 12:34:27 +01:00
Andy Wilkinson
806464edd1 Update BootBuildImage to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:24 +01:00
Andy Wilkinson
b1c4af4081 Update bootJar and bootWar to use new main class resolution mechanism
See gh-22922
2020-10-23 12:34:21 +01:00
Andy Wilkinson
c078a48064 Update BootRun to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:15 +01:00
Andy Wilkinson
d1f543fc1d Update BuildInfo to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:12 +01:00
Andy Wilkinson
83cfd3b2e6 Update BootWar to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:07 +01:00
Andy Wilkinson
081ef2d905 Update BootJar to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:04 +01:00
Andy Wilkinson
c828521912 Allow tests to provide properties that modify the build.gradle script
See gh-22922
2020-10-23 12:34:01 +01:00
Andy Wilkinson
d136324b99 Add support for testing the Gradle plugin with --configuration-cache
See gh-22922
2020-10-23 12:33:51 +01:00
Phillip Webb
da753300a1 Merge branch '2.3.x'
Closes gh-23819
2020-10-22 21:03:22 -07:00
Phillip Webb
f84323fe3e Prevent duplicate jar entries from being written
Update the `AbstractJarWriter` so that it can directly build the layer
index as entries are written. Prior to this commit, a layer tracking
was handled by a decorator class which was broken because it didn't
override enough methods. Since `AbstractJarWriter` has quite a complex
API, it seems sensible to have it handle the layer index directly,
removing the need for a decorator entirely.

Fixes gh-23801
2020-10-22 20:55:09 -07:00
Andy Wilkinson
2d8528d5bd Adapt to deprecation of StringUtils.isEmpty(Object)
See gh-23774
2020-10-22 17:09:33 +01:00
Andy Wilkinson
3bfe1b00b5 Put module deps in app layer and make customization easier
Previously, when building a layered jar with Maven, dependencies
on modules in the same build were treated the same as any other
dependency, being included in the dependencies or snapshot dependencies
layer based on their version.

This commit updates the default layering when using Maven to include
dependencies on modules in the same build in the application layer by
default. The XML schema has also been updated to allow the layer to be
customized using new <includeModuleDependencies/> and
<excludeModuleDependencies/> elements rather than relying on including
and excluding them via a group:artifact:version pattern.

Closes gh-23463
2020-10-22 16:05:15 +01:00
Andy Wilkinson
0aa0cba3f7 Fix content filters when excludeProjectDependencies() is used
Fixes gh-23763
2020-10-20 13:09:59 +01:00
olivier.antoine
ded2a8006a Expose BootBuildImage's cleanCache property as a command-line option
See gh-23753
2020-10-20 10:28:00 +02:00
Scott Frederick
38984985d4 Add support for CNB platform API 0.4
This commit adds support for platform API 0.4 when invoking a CNB
builder in the Maven and Gradle plugins. If the builder advertises
that it supports platform API 0.4 then that version will be
requested when invoking lifecycle phases. Otherwise the plugins
will fall back to requesting platform API 0.3.

Requesting platform API 0.4 when invoking builder lifecycle phases
has the primary benefit of making it easier to pass command-line
arguments to the default process in the generated image.

Fixes gh-23692
2020-10-19 17:33:40 -05:00
Scott Frederick
38b1954ab1 Polish Maven plugin javadoc
This commit polishes the javadoc for Maven plugin classes now that
the plugin reference docs link to the javadoc. Visibility of some
MOJO parameter class getters and setters were also changed for
consistency.

See gh-21555
2020-10-19 15:38:02 -05:00
Andy Wilkinson
0f069ee9c6 Merge branch '2.3.x'
Closes gh-23756
2020-10-19 19:28:32 +01:00
Andy Wilkinson
633027b1cd Upgrade to Gradle 6.7
Closes gh-23754
2020-10-19 17:52:01 +01:00
Andy Wilkinson
6898a97102 Merge branch '2.3.x'
Closes gh-23732
2020-10-17 07:55:43 +01:00
Andy Wilkinson
11b5e86ffd Deprecate BootJar#getConfigurations
Fixes gh-23527
2020-10-17 07:54:38 +01:00
Scott Frederick
d44ecf5086 Merge branch '2.3.x'
Closes gh-23731
2020-10-16 18:00:09 -05:00