402 Commits

Author SHA1 Message Date
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
Johnny Lim
4a26e11268 Polish
See gh-23634

Closes gh-23634
2020-10-13 12:44:00 -07:00
Scott Frederick
0e7ab88491 Polish "Update default builder image"
See gh-23628
2020-10-12 17:07:33 -05:00
Emily Casey
461dc23c0c Update default builder image
This commit updates the default builder image used by the Maven
and Gradle plugins image-building goal and task to use the latest
Paketo builder image. The builder image is pulled from Docker Hub
instead of Google Container Registry by default.

See gh-23628
2020-10-12 17:06:42 -05:00
dreis2211
36812bf199 Fix XML tag in image publishing example
See gh-23632
2020-10-11 15:52:46 +02:00
Scott Frederick
f2721abf31 Merge branch '2.3.x'
Closes gh-23626
2020-10-09 13:22:00 -05:00
Scott Frederick
de685bdca4 Document buildpack configuration of JVM options
Fixes gh-21582
2020-10-09 13:21:37 -05:00
Scott Frederick
a099cd9420 Merge branch '2.3.x'
Closes gh-23623
2020-10-08 17:03:24 -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
Scott Frederick
91acd957b2 Disable docker registry integration tests
A docker registry running in testcontainers behaves
differently in CI vs running locally. Disabling the tests for
now while working on getting them running reliably in CI.

See gh-21001
2020-10-07 18:18:21 -05:00
Scott Frederick
09b627d232 Add support for publishing docker images to a registry
This commit adds options to the Maven and Gradle plugins to publish
to a Docker registry the image generated by the image-building goal
and task.

The Docker registry auth configuration added in an earlier commit
was modified to accept separate auth configs for the builder/run
image and the generated image, since it is likely these images will
be stored in separate registries or repositories with distinct
auth required for each.

Fixes gh-21001
2020-10-07 16:51:33 -05:00
Stephane Nicoll
9ff946bafa Remove unnecessary stubbing 2020-09-30 16:13:43 +02:00
Andy Wilkinson
f4ce77fcae Merge branch '2.3.x'
Closes gh-23541
2020-09-30 14:58:26 +01: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
Scott Frederick
54288678d1 Configure Docker host in build plugins
This commit adds the ability to configure the Maven and Gradle
plugins to use a remote Docker daemon using build file
configuration, as an alternative to setting environment variables
to specify remote host connection details.

Fixes gh-23400
2020-09-18 13:51:20 -05:00
Andy Wilkinson
d2fae6e19e Merge branch '2.3.x'
Closes gh-23407
2020-09-18 09:09:53 +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
Phillip Webb
c284edde67 Update copyright year of changed files 2020-09-17 00:31:01 -07:00
Scott Frederick
86fa8144f5 Polish "Support authentication to private Docker registry"
See gh-22972
2020-09-16 16:04:21 -05:00
姜为
e8f555e13d Support authentication to private docker registry
This commit adds the ability to configure Docker image registry
authentication credentials in the Maven and Gradle plugins. The
authentication credentials are passed to the Docker daemon with
all daemon API calls, and the daemon forwards the credentials to the
image registry when necessary. This makes it possible to use
builder and run images stored in a private Docker registry.

See gh-22972
2020-09-16 16:03:40 -05:00
Stephane Nicoll
f03ed3b2a7 Publish single page doc to /htmlsingle consistently
Closes gh-21585
2020-09-11 16:05:57 +02:00
Andy Wilkinson
e743d5fe66 Exclude by jar type when running and packaging with Maven
This commit updates the Maven Plugin to filter dependencies based on
the Spring-Boot-Jar-Type entry in their manifest. Jars with a
Spring-Boot-Jar-Type of dependencies-starter or annotation-processor
are excluded.

See gh-22036
2020-09-10 14:38:19 +01:00
Stephane Nicoll
defa7c47cd Merge branch '2.3.x'
Closes gh-23201
2020-09-07 12:42:48 +02:00
Stephane Nicoll
648789ef84 Document that buildpacks use non-root users
Closes gh-21122
2020-09-07 12:41:51 +02:00
Stephane Nicoll
cc5f2537b1 Merge branch '2.3.x'
Closes gh-23148
2020-08-31 16:16:16 +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
e0b41f8192 Merge branch '2.3.x'
Closes gh-23143
2020-08-31 10:53:10 +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
c302b72083 Merge branch '2.3.x'
Closes gh-23015
2020-08-19 13:24:10 -07: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
092bbd198e Merge branch '2.3.x'
Closes gh-22923
2020-08-12 17:04:54 -05:00
Scott Frederick
005ed8b8db Use Java version wildcard in image building docs
Fixes gh-22916
2020-08-12 17:04:17 -05:00
Scott Frederick
6b15822cb1 Polish "Add pullPolicy option for image building"
See gh-22736
2020-08-12 15:16:38 -05:00
anshlykov
c7449b57ce Add pullPolicy option for image building
This commit adds a pullPolicy option to the configuration of the Maven
plugin spring-boot:build-image goal and the Gradle plugin bootBuildImage
task. The new option gives users control over pulling the builder image
and run image from a remote image registry to the local Docker daemon.

See gh-22736
2020-08-12 15:16:38 -05:00
Andy Wilkinson
969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
2020-08-10 15:22:03 +01:00
Andy Wilkinson
e240c180f3 Merge branch '2.3.x'
Closes gh-22831
2020-08-07 17:19:03 +01:00
Andy Wilkinson
181e3b34ba Isolate Maven Plugin's integration tests from repo.spring.io
Previously, the Maven plugin integration tests used a settings.xml file
that defined https://repo.spring.io/snapshot as a repository. This
allowed them to resolve snapshots of the plugin's Spring Framework
dependencies but it had the unfortunate side-effect of also allowing
them to resolve snapshots of other Spring Boot modules from Artifactory
rather than using those currently being built.

This commit replaces the repositories in settings.xml with a Gradle
task that resolves the necessary dependencies and populates a local
repository with the dependencies' jars and pom files. This is achieved
using a ComponentMetadataRule that creates a custom variant of each
dependency that includes its pom file, inspired by the example in
gradle/gradle/#11449. A configuration that extends the
runtimeClasspath configuration and select the custom variant via its
attribute is then used to resolve the jars and pom files of the runtime
classpath such that they can then be used to populate the local
repository.

Closes gh-22828
2020-08-07 17:18:47 +01:00
Scott Frederick
f247fec310 Merge branch '2.3.x'
Closes gh-22735
2020-08-04 15:30:17 -05:00
Scott Frederick
21b2dd2740 Allow empty env entries when building an image
Prior to this commit, an entry in the environment map provided to the
build plugin image building goal or task that had a null value would
result in a failure with a message that was difficult to diagnose.

This commit treats env map entries with a null value as an empty
entry to prevent the failure and also make it easier to provide an
explicit empty entry in the Maven XML.

Fixes gh-22703
2020-08-04 15:29:29 -05:00
Madhura Bhave
41f5ba9077 Switch layering on by default
Closes gh-20983
2020-08-03 17:04:20 -07:00
Andy Wilkinson
1a43cd1c8e Merge branch '2.1.x' into 2.2.x
Closes gh-22551
2020-07-24 14:28:11 +01:00
Nelson Osacky
0494007893 Disable extra scans for full profile.
The extra scans were not disabled for the full profile, only the
regular profile.

See gh-22550
2020-07-24 14:27:32 +01:00
Andy Wilkinson
f4508b4059 Merge branch '2.1.x' into 2.2.x
Closes gh-22547
2020-07-24 11:54:12 +01:00
Nelson Osacky
e41a53cf85 Add Gradle Enterprise Extension
This adds build caching and build scans.

The changes required disabling scans when using the maven invoker
plugin in order to not cause duplicate build scans when invoking other
maven builds. There is also an empty `.mvn` folder in the
spring-boot-starters project to prevent duplicate build scans as well
since there is no way to pass properties to the maven-javadoc-plugin.

The checkstyle plugin was causing a cache miss with the
`propertyExpansion` because it contains an absolute path. The absolute
path is now ignored and instead the files are added as inputs to the
checkstyle plugin. This only enables the local build cache. The remote
cache is not yet enabled.

On my local machine:

./mvnw clean install build times go from about 30 minutes to about 10 minutes.
./mvnw clean install -Pfull build times go from about 60 minutes to about 13 minutes.

See gh-22089
2020-07-24 11:47:24 +01:00
Andy Wilkinson
19ad163486 Merge branch '2.3.x'
Closes gh-22411
2020-07-20 13:58:40 +01:00
Andy Wilkinson
accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
2020-07-20 13:58:19 +01:00
Andy Wilkinson
5e7917e33a Upgrade to Maven Shade Plugin 3.2.4
Closes gh-22074
2020-06-23 12:20:53 +01:00
Andy Wilkinson
9e08490522 Merge branch 'gh-21271'
Closes gh-21271
2020-06-16 12:52:17 +01:00
Andy Wilkinson
c64649a6d9 Enable unchecked compilation warnings
See gh-21271
2020-06-16 12:50:44 +01:00