1163 Commits

Author SHA1 Message Date
Scott Frederick
e6318f83b2 Merge branch '2.3.x'
Closes gh-22349
2020-07-15 15:17:16 -05:00
Scott Frederick
bc88af8e53 Restore accidentally deleted line 2020-07-15 15:14:23 -05:00
Scott Frederick
210282260e Fail on bootBuildImage with launch script
This commit adds a check to the support code for the Gradle plugin
bootBuildImage task to ensure that the jar file that will be passed
to a builder is readable and has a valid directory. This prevents a
situation where the jar file cannot be read because it is prepended
with a launch script, and the builder does not receive any files to
process.

Notes have also been added to the Gradle plugin documentation to warn
against using a bootJar launchScript configuration and bootBuildImage
together, as well as caveats about launchScript that match the Maven
plugin documentation.

Fixes gh-22223
2020-07-15 14:58:11 -05:00
Andy Wilkinson
972aab18f9 Merge branch '2.3.x'
Closes gh-22328
2020-07-14 15:08:42 +01:00
dreis2211
021d9b59cb Cleanup temporary files after Maven plugin execution
See gh-22112
2020-07-14 15:08:19 +01:00
Andy Wilkinson
3d2f67f0be Merge branch '2.3.x'
Closes gh-22304
2020-07-10 15:36:49 +01:00
Andy Wilkinson
f18b657ff9 Fix handling of DOCKER_HOST that begins with unix://
Fixes gh-22300
2020-07-10 15:31:55 +01:00
Andy Wilkinson
2d91a096db Merge branch '2.3.x'
Closes gh-22293
2020-07-09 16:02:42 +01:00
Andy Wilkinson
794ded5286 Test the Gradle plugin against Gradle 6.5.1
Closes gh-22292
2020-07-09 16:01:52 +01:00
dreis2211
507eb9498b Use Class.getDeclaredConstructor().newInstance()
See gh-21913
2020-07-07 11:12:35 +01:00
Andy Wilkinson
2a9193f6d9 Merge branch '2.3.x'
Closes gh-22244
2020-07-07 09:56:34 +01:00
Andy Wilkinson
96e6b74894 Merge branch '2.2.x' into 2.3.x
Closes gh-22243
2020-07-07 09:56:21 +01:00
Andy Wilkinson
a0f1424393 Polish "Fix unwrapping of captured PrintStream in test support's OutputCapture"
See gh-22214
2020-07-07 09:54:52 +01:00
XenoAmess
75a64bd901 Fix unwrapping of captured PrintStream in test support's OutputCapture
See gh-22214
2020-07-07 09:53:34 +01:00
Andy Wilkinson
ecbc8ea2df Merge branch '2.3.x'
Closes gh-22202
2020-07-02 15:17:04 +01:00
Andy Wilkinson
79770b9615 Use source sets to determine configurations deprecated for resolution
Fixes gh-22200
2020-07-02 15:14:00 +01:00
Andy Wilkinson
160d8e49e3 Merge branch '2.3.x'
Closes gh-22180
2020-07-01 11:44:00 +01:00
Andy Wilkinson
9317135690 Improve error handling when builder image isn't a builder
Fixes gh-22179
2020-07-01 11:42:36 +01:00
Andy Wilkinson
62aa8ce107 Support incremental annotation processing with Gradle
Closes gh-22150
2020-06-30 11:27:32 +01:00
Scott Frederick
a73af52496 Merge branch '2.3.x'
Closes gh-22121
2020-06-26 11:51:45 -05:00
Scott Frederick
9a083584b8 Improve validation of layertools input
This commit improves the validation performed on the user
input provided to the layertools jarmode to provide more
clear error messages when the input is not correct and
reduce the chance of ambiguity.

Fixes gh-22042
2020-06-26 11:51:07 -05:00
Andy Wilkinson
5e7917e33a Upgrade to Maven Shade Plugin 3.2.4
Closes gh-22074
2020-06-23 12:20:53 +01:00
Phillip Webb
301ec12a0c Merge branch '2.3.x' 2020-06-22 22:37:25 -07:00
Phillip Webb
f296f57401 Rename ImageReferenceParser to Regex
Rename `ImageReferenceParser` to `Regex` and remove state. The regular
expressions are now used directly by the `ImageName` and
`ImageReference` classes with the values accessed directly from the
`Matcher`.

See gh-21495
2020-06-22 22:36:46 -07:00
Phillip Webb
82ed255bb1 Merge branch '2.3.x'
Closes gh-22060
2020-06-22 12:14:58 -07:00
Phillip Webb
9843888714 Merge branch '2.2.x' into 2.3.x
Closes gh-22059
2020-06-22 12:14:35 -07:00
Phillip Webb
3b3a49db1f Polish 'Fix infinite loop in FieldValues'
See gh-22040
2020-06-22 12:01:04 -07:00
Konrado85
39a853c57b Fix infinite loop in FieldValues
Update `FieldValues` test object so that it doesn't cause an infinite
loop if it is actually created.

See gh-22040
2020-06-22 11:58:22 -07:00
Scott Frederick
39b2d01541 Merge branch '2.3.x'
Closes gh-22037
2020-06-19 15:43:59 -05:00
dreis2211
a6e8561391 Catch more generic FileSystemException in NamedPipeSocket
See gh-22035
2020-06-19 15:41:20 -05:00
Scott Frederick
73b737c7d8 Merge branch '2.3.x'
Closes gh-22017
2020-06-18 15:11:07 -05:00
Scott Frederick
28643e4d2d Validate image references before passing to CNB builder
Prior to this commit, an image name or run image name derived from
the project name or provided by the user would be passed to the CNB
builder without validation by the Maven plugin build-image goal or
Gradle plugin bootBuildImage task. This could lead to error messages
from the plugins that are difficult to understand and diagnose.

This commit makes parsing of the image names more strict, based on
the grammar implemented by the Docker go library. This provides
validation of the image names before passing them to the builder,
with a more descriptive error message when parsing and validation
fails.

Fixes gh-21495
2020-06-18 15:09:57 -05:00
Andy Wilkinson
9e08490522 Merge branch 'gh-21271'
Closes gh-21271
2020-06-16 12:52:17 +01:00
Andy Wilkinson
056d5f3120 Enable deprecation compilation warnings
See gh-21271
2020-06-16 12:50:47 +01:00
Andy Wilkinson
c64649a6d9 Enable unchecked compilation warnings
See gh-21271
2020-06-16 12:50:44 +01:00
Andy Wilkinson
47874d8c6a Treat warnings as errors when compiling
See gh-21271
2020-06-16 12:50:41 +01:00
Andy Wilkinson
07fb4b065d Merge branch '2.3.x'
Closes gh-21940
2020-06-16 10:10:38 +01:00
Andy Wilkinson
0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
2020-06-16 08:50:21 +01:00
Scott Frederick
838cfc529f Merge branch '2.3.x'
Closes gh-21933
2020-06-15 16:17:39 -05:00
Scott Frederick
6119d69679 Add runImage option for image building
This commit adds a runImage property to the Maven plugin build-image
goal and the Gradle bootBuildImage task. The property allows the user
to override the run image reference provided in the builder metadata
with an alternate run image. The runImage property can be specified
in the build file or on the command line.

Fixes gh-21534
2020-06-15 16:08:56 -05:00
dreis2211
3d27391d47 Allow StringSequence.isEmpty() to be compatible with JDK 15
JDK 15 introduces isEmpty() on CharSequence which clashes with the one
declared in StringSequence because it is not public.

See gh-21713
2020-06-15 16:46:16 +02:00
Phillip Webb
82abcd3043 Merge branch '2.3.x' 2020-06-11 13:26:44 -07:00
Phillip Webb
2a37b2e258 Refine PropertiesLauncher close logic
Further attempt to fix Windows file issues.

See gh-21575
2020-06-11 13:25:56 -07:00
Phillip Webb
3892f4402a Merge branch '2.3.x'
Closes gh-21895
2020-06-11 12:32:41 -07:00
Phillip Webb
1e7da4d3ca Allow digest builder references
Update `BuildRequest` to also allow digest based references.

Closes gh-21879
2020-06-11 12:31:29 -07:00
Phillip Webb
866ebf7c13 Merge branch '2.3.x' 2020-06-11 12:26:42 -07:00
Phillip Webb
8a249daf1a Refactor PropertiesLauncher so jars can be closed
Refactor the internals of `PropertiesLauncher` so that opened jar files
are tracked and can be closed after a test completes.

See gh-21575
2020-06-11 12:26:08 -07:00
Scott Frederick
9d9a501b17 Merge branch '2.3.x'
Closes gh-21892
2020-06-11 11:55:20 -05:00
Scott Frederick
7a2939f129 Use non-blocking I/O for Docker API
This commit changes the NamedPipeSocket used for communication with
a local Docker daemon to use a non-blocking AsynchronousByteChannel
instead of a blocking RandomAccessFile, modeled after a similar
change to the docker-java project. This eliminates the potential for
a blocking call to hang indefinitely.

Fixes gh-21672
2020-06-11 11:53:52 -05:00
Madhura Bhave
4161f0b983 Merge branch '2.3.x'
Closes gh-21799
2020-06-09 18:22:10 -07:00