1490 Commits

Author SHA1 Message Date
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
2916bb4c10 Merge branch '2.3.x'
Closes gh-23718
2020-10-16 11:00:31 +02: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
Andy Wilkinson
84f96033c5 Put project deps in app layer and make customization easier
Previously, when building a layered jar with Gradle, project
dependencies were treated the same as any other dependency, being
included in the dependencies or snapshot dependencies layer based
on their version.

This commit updates the default layering when using Gradle to include
project dependencies in the application layer by default. The DSL has
also been updated to allow their layer to be customized using new
includeProjectDependencies() and excludeProjectDependencies() methods
rather than relying on including and excluding them via a
group:artifact:version pattern.

Closes gh-23431
2020-10-15 16:04:02 +01:00
Scott Frederick
5b1b03c56c Set platform API version when invoking image builder
The CNB specifications allow builders to support multiple platform
API versions. The supported versions are published in the builder
image metadata as an array of version numbers, while a single
supported version number was published in earlier builder metadata.

These changes read the supported versions from the builder metadata
and fall back to the single version if the array is not present.
A CNB_PLATFORM_API environment variable is set on each lifecycle
phase invocation to request a specific version as recommended in
the CNB platform spec.

Fixes gh-23682
2020-10-14 11:49:34 -05: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
Andy Wilkinson
70ed7784a6 Use Property<String>s for main class configuration in the Gradle plugin
Closes gh-23608
2020-10-08 14:23:01 +01: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
1296b4dfe6 Revert "Support constructor binding on 3rd party classes"
This commit reverts the support of constructor binding on 3rd party
classes using @ImportConfigurationPropertiesBean

See gh-23172

Closes gh-23593
2020-10-07 10:53:01 +02:00
Andy Wilkinson
c82581171d Trigger configuration properties annotation processsor on @Endpoint
We generate metadata for `@Endpoint` annotated types so the annotation
processor need to indicate that it supports the endpoint annotation.

See gh-23580
2020-10-06 16:13:19 +01:00
Andy Wilkinson
b7d020d3c2 Merge branch '2.3.x' 2020-10-06 15:58:01 +01:00
Andy Wilkinson
543763462c Update tests to look for snippets in correct location
See gh-23598
2020-10-06 15:57:25 +01:00
Andy Wilkinson
1924aad07c Limit supported annotations to @ConfigurationProperties and @Configuration
Previously, the configuration property annotation processor declared
that it supported all annotation types. This hurt performance and
prevented incremental builds with Gradle when compiling source code
containing source-retention annotations.

This commit updates its supported annotation types to be only
`@ConfigurationProperties` and `@Configuration`. The latter is declared
to allow binding third-party classes returned from a `@Bean` method.

Fixes gh-23580
2020-10-06 14:54:24 +01:00
Andy Wilkinson
f44889b992 Merge branch '2.3.x'
See gh-23599
2020-10-06 14:44:50 +01:00
Andy Wilkinson
7eb92cc71a More Gradle snippets to correct location
See gh-23598
2020-10-06 14:44:26 +01:00
Andy Wilkinson
94884f201c Merge branch '2.3.x'
Closes gh-23599
2020-10-06 14:36:09 +01:00
Andy Wilkinson
2d3291fb83 Merge branch '2.2.x' into 2.3.x
Closes gh-23598
2020-10-06 14:35:49 +01:00
Andy Wilkinson
7ac14203ab Expand Gradle plugin's docs on setting bootRun's system properties
Closes gh-23578
2020-10-06 14:35:30 +01:00
Stephane Nicoll
5feaf2bc1a Polish "Polish empty string checks"
See gh-23550
2020-10-05 10:42:19 +02:00
Santhoshkumar. P
5cb07e292d Polish empty string checks
See gh-23550
2020-10-05 10:38:47 +02: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
e58a92b3d0 Introduce a dedicated @GradleCompatibility annotation
Rather than using the extension directly, introduced a dedicated
annotation will enable customization of the compatibility tests that
are run via attributes on the annotation. For example, it will allow
certain test classes to run their tests with Gradle's configuration
cache enabled while others disable it.

Closes gh-23532
2020-09-30 14:50:48 +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
Andy Wilkinson
f5df6e463a Reduce configuration resolution when building a layered jar
Previously, BootJar would resolves all of a project's configurations
when building a layered jar. This was unnecessarily broad as it was
likely to include configurations that had contributed nothing to the
jar's classpath.

This commit replaces the configuration resolution with an afterResolve
action that populates the ResolvedDependencies in response to a
configuration being resolved. This allows the resolved dependencies to
be populated from all of the configurations that were resolved as part
of determining the jars classpath and no more.

Closes gh-23528
2020-09-29 17:51:55 +01:00
Lukas Cardot
e95bcfac34 Configure the bootBuildInfo task lazily
Prior to this commit, the bootBuildInfo was configured eagerly.
Configuring it lazily prevent this task from being configured when not
explicitly needed. Also, the 'classes' and 'bootJar' tasks are now
lazily configured, as the bootBuildInfo task was causing them to be
configured eagerly.

See gh-23435
2020-09-28 11:19:26 +01:00
Andy Wilkinson
558c2b4591 Merge branch '2.3.x'
Closes gh-23501
2020-09-26 09:17:08 +01:00
Andy Wilkinson
9bd040cb0f Merge branch '2.2.x' into 2.3.x
Closes gh-23500
2020-09-26 09:16:46 +01:00
Andy Wilkinson
e74f777971 Remove use of spring-core's Assert from PropertiesLauncher
Fixes gh-23474
2020-09-26 09:11:05 +01:00
Andy Wilkinson
b662f1e06e Remove UnresolvedDependenciesAnalyzer from the Gradle plugin
Closes gh-23479
2020-09-24 15:16:29 +01:00
Stephane Nicoll
37ded9f6d3 Merge branch '2.2.x' into 2.3.x
Closes gh-23446
2020-09-22 10:10:24 +02:00
dreis2211
fba1fb23e4 Fix multi-release JAR test on JDK 15
Backport of 54f93e9

See gh-23445
2020-09-22 10:09:18 +02:00
Phillip Webb
3fca8c6b4e Merge branch '2.2.x' into 2.3.x
Closes gh-23441
2020-09-21 22:27:45 -07:00
Phillip Webb
4945806d84 Make StringSequence.isEmpty() public
Make `StringSequence.isEmpty()` public for compatibility with JDK 15.

Closes gh-23440
2020-09-21 22:26:20 -07:00
Andy Wilkinson
9ecc548672 Merge branch '2.3.x'
Closes gh-23427
2020-09-21 12:16:28 +01:00
Andy Wilkinson
8667e9ded8 Merge branch '2.2.x' into 2.3.x
Closes gh-23426
2020-09-21 12:16:14 +01:00
Andy Wilkinson
581190d7a0 Test the Gradle plugin against 6.7-rc-1
Closes gh-23425
2020-09-21 12:14:35 +01:00
Andy Wilkinson
0f2ddd6480 Merge branch '2.3.x'
Closes gh-23423
2020-09-21 10:47:34 +01:00
Andy Wilkinson
d06af28cd8 Merge branch '2.2.x' into 2.3.x
Closes gh-23422
2020-09-21 10:47:06 +01:00
Andy Wilkinson
360e29af48 Polish "Add note about Kotlin main class name"
See gh-23418
2020-09-21 10:40:29 +01:00
Sebastiaan Fernandez
0bde5fda9b Add note about Kotlin main class name
See gh-23418
2020-09-21 10:36:16 +01:00