281 Commits

Author SHA1 Message Date
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
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
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
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
accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
2020-07-20 13:58:19 +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
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
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
07d842b51d Polish maven build image command line example 2020-05-20 16:06:48 -05: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
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
Scott Frederick
28749e7fbb Update CNB buildpack Java version env variable
Prior to this commit, the build tool plugins set the environment
variable BP_JAVA_VERSION when invoking the CNB builder to set the
version of the JDK/JRE that the builder should use in the created
image.

With CNB API 0.3, the convention changed the name of this environment
variable to BP_JVM_VERSION. This commit updates the build tool
plugins to match the newer convention.

See gh-21273
2020-05-08 17:07:51 -05:00
Scott Frederick
35bc82a693 Use CNB creator all-in-one lifecycle
This commit modifies the buildpack platform invocation logic used by
the build plugins to invoke the single creator lifecycle introduced in
the CNB API 0.3, instead of invoking discrete lifecycle phases
separately. It also removes support for CNB API 0.2.

Fixes gh-21273
2020-05-08 17:03:47 -05:00
Kyle Hoehns
fd46002666 Fix typo for includeLayerTools
See gh-21310
2020-05-04 17:29:28 -07:00
Scott Frederick
1c11e163c7 Fix Maven plugin command-line examples
Fixes gh-21078
2020-04-30 12:19:14 -05:00
Scott Frederick
f3d717e97a Use paketo-buildpacks/builder as default builder
This commit changes the default builder image from
`cloudfoundry/cnb:bionic-platform-api-0.2` to
`gcr.io/paketo-buildpacks/builder:base-platform-api-0.3`. It also
uses a `paketo-buildpacks/builder` image instead of a
`cloudfoundry/cnb` image to test compatibility with lifecycle v2
and uses paketo naming instead of cloudfoundry when mocking builder
interactions.

Some adjustments to lifecycle phases were also made to align more
closely with the pack CLI.

Fixes gh-21066
2020-04-29 14:28:25 -05:00
Phillip Webb
ad1248e4ec Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder"

Closes gh-21218
2020-04-28 19:20:24 -07:00
dreis2211
5eb5bf0a2d Polish
See gh-21009
2020-04-25 08:54:47 +02:00
Stephane Nicoll
1c70b6735a Remove plugin management for exec-maven-plugin
Closes gh-20883
2020-04-08 17:51:22 +02:00
Phillip Webb
3ca896e63f Polish 2020-04-07 12:10:49 -07:00
Scott Frederick
a64e26fc44 Polish plugin documentation headings 2020-04-07 08:53:37 -05:00
Phillip Webb
6e7b473fef Polish asciidoc formatting and use sentence case 2020-04-06 19:18:22 -07:00
Phillip Webb
65672a1150 Use a more compact layers.idx format
Update the `layers.idx` format so that it is more compact and can be
parsed by third-parties as YAML.

Closes gh-20860
2020-04-06 19:18:22 -07:00
Scott Frederick
35ff711dfe Document builder configuration for HTTP proxy
This commit adds examples for configuring the default builder to use
an HTTP/HTTPS proxy when building OCI images using the Maven or Gradle
plugin.

Fixes gh-19984
2020-04-06 18:20:34 -05:00
Scott Frederick
bb568c5bff Consolidate Maven plugin documentation in plugin reference
This commit moves Maven plugin content from several sections in the
main Spring Boot reference documentation to the plugin-specific
documentation.

Fixes gh-19165
2020-04-03 16:41:12 -05:00