Commit Graph

309 Commits

Author SHA1 Message Date
Phillip Webb 9e1c78da99 Update copyright year of changed files 2021-06-08 18:03:46 -07:00
Scott Frederick 32d378a348 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
2021-05-12 14:51:45 -05:00
Scott Frederick c37b9b8a8e Use layout configuration in Maven build-image goal
This commit changes the Maven build-image goal to honor the `layout` and
`layoutFactory` parameters to ensure that the archive content sent to the
builder is the same as is used by the `repackage` goal to build the
archive file.

Fixes gh-26216
2021-04-29 15:03:08 -05:00
Phillip Webb fcb2210a87 Include optional shade plugin in published pom
Update `MavenPublishingConventions` to add a new `mavenOptional` feature
that allows us to declare optional dependencies that are also published
in the generated POM.

This change allows us to include the maven-shade-plugin in the
spring-boot-maven-plugin POM which fixes an issue with Eclipse m2e.

Fixes gh-21992
2021-04-14 15:02:42 -07:00
Scott Frederick e19443093d Document runtime JVM configuration when building an image
Fixes gh-21478
2021-04-09 14:06:24 -05:00
Andy Wilkinson b35d1ec6e8 Revert "Use test harness for image building integration tests"
This reverts commit da9d8d6055.

See gh-25838
2021-04-07 09:30:51 +01:00
Scott Frederick da9d8d6055 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
2021-03-30 16:48:28 -05:00
Andy Wilkinson 5a086321c6 Polish "Document Failsafe configuration when not using starter parent"
See gh-25621
2021-03-30 18:16:21 +01:00
robert-smith-911 0d79fd3e01 Document Failsafe configuration when not using starter parent
See gh-25621
2021-03-30 18:02:12 +01:00
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
2021-03-30 09:20:30 -07:00
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
2021-03-29 15:44:58 -07:00
Scott Frederick 3ad5f1013a Fix Maven image building with classifiers
Fixes gh-25736
2021-03-26 11:36:38 -05:00
Phillip Webb 82127fdaa3 Update copyright year of changed files 2021-03-23 12:50:49 -07:00
Scott Frederick e4fa39df01 Fail fast when finalName is misconfigured
When the `finalName` parameter is incorrectly set in the Spring Boot
Maven plugin configuration instead of in the `build` configuration, the
repackaged and original archive files are not named as expected. Prior
to this commit, the image building goal would detect this error
condition and throw an exception late in the process of creating the
build container, leaving the container in an unstable state. This
commit changes the image building goal to detect this condition early,
before attempting to create the container.

Fixes gh-25590
2021-03-17 15:19:21 -05:00
Andy Wilkinson 0e0418546b Test spring-boot:build-image when repackage is also invoked
Closes gh-25714
2021-03-17 11:19:29 +00:00
Andy Wilkinson ae2ff7849b Revert "Fail fast when finalName is misconfigured"
This reverts commit 263b7c20e4.

See gh-25590
2021-03-17 11:11:24 +00:00
Scott Frederick 263b7c20e4 Fail fast when finalName is misconfigured
When the `finalName` parameter is incorrectly set in the Spring Boot
Maven plugin configuration instead of in the `build` configuration, the
repackaged and original archive files are not named as expected. Prior
to this commit, the image building goal would detect this error
condition and throw an exception late in the process of creating the
build container, leaving the container in an unstable state. This
commit changes the image building goal to detect this condition early,
before attempting to create the container.

Fixes gh-25590
2021-03-16 17:22:48 -05:00
Stephane Nicoll 8e67ae7113 Fix fallback fork value for spring-boot:stop
This commit harmonizes the fallback value that spring-boot:stop goal
should use if no information is available in the current context.

Closes gh-25472
2021-03-03 15:15:04 +01:00
Stephane Nicoll 77daae1480 Update copyright year of changed file
See gh-25382
2021-02-22 10:41:49 +01:00
Mustafa Ulu abc90db32f Fix wording error in build-info goal description
See gh-25382
2021-02-22 10:26:53 +01:00
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
2021-02-02 13:03:21 +00:00
Phillip Webb 630d216430 Update copyright year of changed files 2021-02-01 22:10:24 -08:00
Phillip Webb c404a50a2e Allow test to use snapshot/milestone repo
Update `spring-boot-maven-plugin` `settings.xml` so that milestone and
snapshot dependencies can be resolved.

See gh-23936
2021-02-01 19:45:11 -08:00
Phillip Webb faaa5e4186 Fix BOM attached sourceSet
See gh-23936
2021-02-01 16:51:53 -08:00
Phillip Webb 40c1748e3c Remove hardcoded versions from MavenBuild
Use the dependencies BOM to ensure versions used in the `MavenBuild`
test class are always aligned.

Closes gh-23936
2021-02-01 16:20:55 -08:00
Phillip Webb 939b5dfc26 Add junit-platform-launcher dependency
Update `build.gradle` files to ensure that `junit-platform-launcher` is
a `testRuntimeOnly` dependency. This ensures that tests can be run from
Eclipse.

Closes gh-25074
2021-02-01 15:31:28 -08:00
Scott Frederick a302238e21 Remove layout parameters from build-image Maven goal
This commit removes the `layout` and `layoutFactory` parameters
from the `build-image` goal in the Maven plugin while retaining
them for the `repackage` goal. The `build-image` goal currently
only supports jar archives, so allowing other layout types to be
configured for the goal could cause confusion.

Fixes gh-24105
2021-01-07 15:59:02 -06:00
Scott Frederick e4d124dc45 Improve error message with Maven build-image and war packaging
Fixes gh-24522
2020-12-16 15:58:53 -06:00
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
2020-12-04 18:21:57 -08:00
Scott Frederick da2276e7d4 Use stable builder and run images in integration tests
Fixes gh-24183
2020-11-17 13:54:10 -06:00
Andy Wilkinson e6ab20b029 Merge branch '2.2.x' into 2.3.x
Closes gh-24111
2020-11-10 17:37:41 +00:00
Andy Wilkinson 31042bfc49 Test inclusion of system scope dependencies in repackaged war
Closes gh-22503
2020-11-10 17:35:04 +00:00
Stephane Nicoll 6aca0275ad Polish 2020-11-09 14:40:44 +01:00
Phillip Webb b0c2687aa9 Update copyright year of changed files 2020-10-29 09:07:42 -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
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
Scott Frederick 9c672deb2d Add javadoc links in Maven plugin parameter docs
This commit modifies the documentation generated for the
Maven plugin to include links to javadoc when Spring
Boot types are mentioned. Some javadoc was also polished
to improve the generated docs.

Fixes gh-21555
2020-10-16 17:45:46 -05:00
Stephane Nicoll 6beb0c939f Document how to override plugin configuration on the command line
Closes gh-21536
2020-10-16 10:57:30 +02:00
Stephane Nicoll b210d0680a Polish 2020-10-16 10:34:58 +02:00
Scott Frederick de685bdca4 Document buildpack configuration of JVM options
Fixes gh-21582
2020-10-09 13:21:37 -05:00
Scott Frederick 49b0707f1a Clarify image builder configuration documentation
This commit qualifies examples of configuring the CNB builder to clarify
that the examples apply to use of the default Paketo builder, and adds links
to the official Paketo docs for more details.

Fixes gh-19967
2020-10-08 17:02:17 -05:00
Andy Wilkinson bd4934b0fd Fix matching of SNAPSHOT artifacts when customizing layers
Previously the artifact's version was used. In an artifact's version,
SNAPSHOT is replaced with the timestamped version number of a specific
snapshot. As a result, it no longer matches the *:*:*SNAPSHOT pattern.

This commit replaces switches to using the artifact's base version.
This preserves the SNAPSHOT in the version number. For non-snapshot
artifacts, the version and base version are identical.

Fixes gh-23533
2020-09-30 14:48:04 +01:00
Andy Wilkinson 3861ef13fb Merge branch '2.2.x' into 2.3.x
Closes gh-23406
2020-09-18 09:09:41 +01:00
Stephane Nicoll 648789ef84 Document that buildpacks use non-root users
Closes gh-21122
2020-09-07 12:41:51 +02:00
Stephane Nicoll ee914624e6 Document buildpacks are configured with target Java version
Closes gh-21796
2020-08-31 16:15:30 +02:00
Stephane Nicoll b80314b44b Document how to customize the jmxPort for Maven integration tests
Closes gh-22401
2020-08-31 10:52:47 +02:00
Phillip Webb 8fd9c685a2 Reduce HTTP debug logging when building image
Update `BuildImageMojo` so that commons HTTP wire logging is configured
to ERROR. Without this update, running `mvn -X` will produce a great
deal of logging since by default HTTP Client logs all bytes transfered
at DEBUG and Maven will enable DEBUG for all logs.

Closes gh-22674
2020-08-19 13:20:06 -07:00
Scott Frederick 005ed8b8db Use Java version wildcard in image building docs
Fixes gh-22916
2020-08-12 17:04:17 -05:00