Commit Graph

1127 Commits

Author SHA1 Message Date
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
Andy Wilkinson f0bc8ee73c Fix version placeholder replacement in Gradle plugin docs
Closes gh-21640
2020-06-02 08:59:14 +01:00
Phillip Webb 502e2a4c64 Polish 2020-06-01 14:27:39 -07:00
Andy Wilkinson 3d143e59e7 Fix inclusion of version-specific content in Gradle plugin's docs
Fixes gh-21610
2020-06-01 17:47:42 +01:00
Andy Wilkinson b1777b9dee Use stable file repository for testing snapshot layers
Closes gh-21629
2020-06-01 16:28:33 +01:00
Scott Frederick 7722394e19 Provide better error message if Docker is not running
Previously, if the Spring Boot build plugins got a connection error
when attempting to communicate with a Docker daemon (for example,
when the daemon isn't running), the error message made it appear that
the daemon returned an HTTP error code. This commit makes a connection
error distinct from an HTTP error response code to make it easier for
the user to diagnose the root cause of the problem.

Fixes gh-21554
2020-05-29 12:37:06 -05:00
Andy Wilkinson ba23368440 Configure attributes on productionRuntimeClasspath
Previously, the productionRuntimeClasspath configuration was created
without any attributes. This caused problems with multi-project
dependency resolution as there was insufficient information for Gradle
to determine which variant of a dependency should be used by the
productionRuntimeClasspath configuration.

This commit updates the configuration to have three attributes, each
configured with the same values as those of Gradle's own
runtimeClasspathConfiguration.

Fixes gh-21549
2020-05-26 15:12:21 +01:00
Scott Frederick ed4a7d4ba0 Use default tag when pulling run image
Prior to this commit, a default tag of 'latest' was used when no tag
was included in the builder image name used when building an image in
the Maven and Gradle plugins, but the tag for the run image was left
empty if it was not provided. This resulted in errors when pulling
the run image from an image repository. This commit applies the
same tag defaulting logic to the run image name.

Fixes gh-21532
2020-05-21 17:28:59 -05:00
Scott Frederick 07d842b51d Polish maven build image command line example 2020-05-20 16:06:48 -05:00
Scott Frederick a5c42ce4c4 Polish `Add gradle build image command line example`
See gh-21490
2020-05-20 15:53:03 -05:00
Dave Syer 88a32d2fb9 Add gradle build image command line example
See gh-21490
2020-05-20 15:52:52 -05:00
Andy Wilkinson 14ba7442d9 Ensure that spring-boot-parent is imported into generated pom
Fixes gh-21518
2020-05-20 16:55:41 +01:00
Andy Wilkinson ee758fa670 Use HTTPS for license links
This commit updates the MavenPublishingConventions to use HTTPS to
link to the Apache license. The configuration of NoHTTP has also
been reworked so that it will correctly find usch uses of http://
URLs.

Closes gh-21459
2020-05-15 16:33:11 +01:00
Brian Clozel 42d07a7acd Fix published Maven POMs
Prior to this commit, the published Maven POMs would not pass the Maven
Central mandatory checks.

This commit adds the missing project name and description metadata for
most artifacts. The Spring Boot Gradle plugin artifact was also missing
this information and this is now added in the plugin metadata itself.
This is also updating the project page URL which is now hosted directly
on spring.io.

Fixes gh-21457
2020-05-14 23:59:11 +02:00
Phillip Webb 038ae93406 Update copyright year of changed files 2020-05-13 16:48:51 -07:00
Phillip Webb 12381467da Polish 2020-05-13 16:48:51 -07:00
Andy Wilkinson a03426af57 Configure the Asciidoctor revnumber in a central location
See gh-20934
2020-05-13 08:16:59 +01:00
Madhura Bhave 376098d080 Set asciidoctor revnumber to null
Closes gh-20934
2020-05-12 14:58:38 -07:00