Commit Graph

1144 Commits

Author SHA1 Message Date
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
Madhura Bhave d30c0e8aec Merge branch '2.2.x' into 2.3.x
Closes gh-21798
2020-06-09 18:21:31 -07:00
Madhura Bhave 36faa1d42a Document using system properties in gradle plugin docs
Closes gh-21317
2020-06-09 16:07:54 -07:00
Phillip Webb ad6a0d473a Merge branch '2.3.x'
Closes gh-21768
2020-06-08 12:09:26 -07:00
Phillip Webb b71bab2817 Document deprecations of Archive.iterator()
Closes gh-21695
2020-06-08 12:08:33 -07:00
Phillip Webb 5f79bd2a09 Merge branch '2.3.x'
Closes gh-21734
2020-06-06 11:08:30 -07:00
dreis2211 2b5569f054 Polish
See gh-21732
2020-06-06 11:07:21 -07:00
Phillip Webb d791d18231 Merge branch '2.3.x'
Closes gh-21727
2020-06-05 19:34:16 -07:00
Phillip Webb 2f973ebc33 Fix default Launcher.isExploded() result
Fix the default implementation of `Launcher.isExploded` which should
have returned `true`.

Fixes gh-21575
2020-06-05 19:32:06 -07:00
Phillip Webb 0a05b4c9fd Update copyright year of changed files 2020-06-05 15:36:09 -07:00
Phillip Webb 3107d2de51 Merge branch '2.3.x'
Fixes gh-21705 in master
2020-06-05 15:33:46 -07:00
Phillip Webb 9a235197dc Propagate manifest to exploded jars
Update `LaunchedURLClassLoader` so that packages defined from exploded
archive folders have manifest attributes applied to them. Prior to this
calling `package.getImplementationTitle()` would only return the a
manifiest attribute when running non-exploded.

The root cause of this issue is the way that `URLClassLoader` handles
the different URL types. For URLs that reference a jar the manifest is
available. For URLs that reference a folder it isn't. When running
exploded we use a URL that references to the `BOOT-INF/classes` folder
directly. To fix the issue we now attempt to detect when `definePackage`
is being called directly, and replace `null` entries with actual
manifest values.

Fixes gh-21705
2020-06-05 15:28:16 -07:00
dreis2211 54f93e9b0f Fix multi-release JAR test on JDK 15
See gh-21605
2020-06-05 11:56:50 +02:00
Andy Wilkinson c4faeac4d7 Merge branch '2.3.x'
Closes gh-21703
2020-06-04 20:27:18 +01:00
Andy Wilkinson 24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
2020-06-04 20:25:29 +01:00
Scott Frederick 87f5894a9a Merge branch '2.3.x'
Closes gh-21685
2020-06-03 16:54:37 -05:00
Scott Frederick 29253264b4 Improve Docker API 5xx error messages
This commit improves the error messages returned by the Spring Boot
build plugins when a 5xx status code is returned from the Docker
API while attempting to build an image. If the error response has
contents containing a JSON structure with a "message" key, the value
associated with that key will be included in the exception message
and in the build plugin output error.

Fixes gh-21515
2020-06-03 16:53:44 -05:00
Madhura Bhave e0f548fdd3 Merge branch '2.3.x'
Closes gh-21657
2020-06-02 17:24:20 -07:00
Madhura Bhave 2dc8048d08 Add missing since tags
Closes gh-21576
2020-06-02 17:22:46 -07:00
Andy Wilkinson 399d0f7b95 Merge branch '2.3.x'
Closes gh-21651
2020-06-02 09:42:34 +01:00