592 Commits

Author SHA1 Message Date
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
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
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
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
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
Andy Wilkinson
70c4baeef6 Merge branch '2.2.x'
Closes gh-21341
2020-05-06 17:34:48 +01:00
Andy Wilkinson
386d678d99 Use Gradle's CreateStartScripts task with 6.4 and later
Fixes gh-20759
2020-05-06 17:02:34 +01:00
Andy Wilkinson
693fa918e2 Tolerate deprecation warnings generated by Gradle 6.4
The warnings will be addressed by gh-20759. CreateBootStartScripts
must be excluded from the classes that are validated by the
ValidatePlugins task. It is invalid, but only for Gradle 6.4. gh-20759
will cause it to only be used with Gradle 6.3 and earlier.

See gh-21329
2020-05-06 15:33:11 +01:00
Stephane Nicoll
02aacf4f04 Upgrade to Gradle 6.4
Closes gh-21329
2020-05-06 15:03:50 +02:00
Andy Wilkinson
1bc41ec336 Stop developmentOnly from removing too much from executable jars and wars
Fixes gh-21288
2020-05-06 09:45:35 +01: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
Andy Wilkinson
2d769e7679 Polish "Stop limiting layer customization to external modules"
See gh-21207
2020-04-29 14:22:43 +01:00
Paddy Drury
98644df64d Stop limiting layer customization to external modules
See gh-21207
2020-04-29 14:22:43 +01: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
Andy Wilkinson
fb33610027 Automatically create developmentOnly configuration
Previously, the developmentOnly configuration, typically used for
Devtools, had to be declared manually. The BootJar and BootWar tasks
then had a property, excludeDevtools, that could be used to control
whether or not Devtools would be excluded from the executable archive.

This commit updates the reaction to the Java plugin being applied to
automatically create the developmentOnly configuration. The classpaths
of bootJar and bootWar are then configured not to include the contents
of the developmentOnly configuration. As a result of this, the
excludeDevtools property is no longer needed and has been deprecated.
Its default has also been changed from true to false to make it easy
to opt in to Devtools, when configured as a development-only
dependency, being included in executable jars and wars by adding
developmentOnly to the classpath of the archive task.

Closes gh-16599
2020-04-27 13:38:14 +01:00
Stephane Nicoll
961be0fea3 Merge branch '2.2.x'
Closes gh-21118
2020-04-25 09:15:49 +02:00
dreis2211
e3a9bacf3b Fix typo
See gh-21002
2020-04-25 09:14:01 +02:00
dreis2211
5eb5bf0a2d Polish
See gh-21009
2020-04-25 08:54:47 +02:00
Stephane Nicoll
85e9f713b0 Update copyright year of changed files
See gh-21007
2020-04-25 08:50:51 +02:00
Johnny Lim
29717423a3 Remove this keyword on member method invocations
See gh-21007
2020-04-25 08:49:44 +02:00
Andy Wilkinson
076a384c9c Merge branch '2.2.x'
Closes gh-21112
2020-04-24 18:10:00 +01:00
Andy Wilkinson
29dc236bb2 Broaden deprecation warning check in Gradle Plugin's tests
Closes gh-21111
2020-04-24 17:45:42 +01:00
Scott Frederick
8f5ef951de Use current timestamp for index files with Gradle
This commit removes changes the timestamp used when writing the
classpath and layers index files in the Gradle plugin to be the
current timestamp unless `preserveFileTimestamps=true`. It also
polishes some duplication in the handling of entry attributes
when creating the fat archive and adds a test to verify that
the Gradle plugin uses the same fixed timestamp constant as
Gradle uses internally.

See gh-21005
2020-04-23 16:05:32 -05:00
Scott Frederick
555132e096 Fix archive attributes in Gradle plugin
This commit ensures that file permissions are set on entries that the
Gradle plugin adds to an archive. It also reverts the constant date
and time used for added entries to a previous value to ensure a time
zone offset is not applied.

See gh-20927
2020-04-17 17:33:28 -05:00
Johnny Lim
5fad43ec40 Polish
See gh-20973
2020-04-16 13:46:53 +02:00
Phillip Webb
d9fb4dd477 Don't use monospacing in documentation headings
Closes gh-20875
2020-04-07 11:08:57 -07:00
Scott Frederick
e17d4be484 Polish plugin documentation headings 2020-04-07 09:17:51 -05:00
Scott Frederick
a64e26fc44 Polish plugin documentation headings 2020-04-07 08:53:37 -05:00
Phillip Webb
baa728c85e Cleanup paths to fix tests running on Windows 2020-04-06 20:17:16 -07:00
Phillip Webb
b50e8eb3aa Fix package tangle in Gradle plugin
Relocate `VersionExtractor` to fix a package tangle.
2020-04-06 19:18:22 -07:00
Phillip Webb
6e7b473fef Polish asciidoc formatting and use sentence case 2020-04-06 19:18:22 -07:00
Phillip Webb
df58b9baa2 Use YAML compatible classpath.idx format
Update the `classpath.idx` format to align with `layers.idx` and allow
third-parties can parse it as YAML

Closes gh-20861
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
c119dd2450 Rename plugin PDF reference doc files
This commit renames the PDF documentation files generated for the
build plugins when the distribution archive is created.

See gh-20829
2020-04-03 15:50:23 -05:00
Madhura Bhave
f40444e212 Fix typo 2020-04-03 12:30:46 -07:00
Andy Wilkinson
34e602652c Polish new layered jar support 2020-04-03 10:47:57 +01:00
Stephane Nicoll
3e936dd735 Polish 2020-04-03 10:36:06 +02:00
Phillip Webb
12bc890e75 Update Maven and Gradle layer customization docs
Update the Maven and Gradle documentation following the refined
layer customization changes.

See gh-20526
2020-04-03 00:34:27 -07:00
Andy Wilkinson
bfa04e6574 Support flat jar layering with Gradle
Update the Gralde plugin so that layered jars now use the regular "flat"
format. The layers.idx file now describes which layer each file should
be placed.

See gh-20813

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2020-04-03 00:34:27 -07:00
Phillip Webb
3f806aa513 Create a new layer for loader classes
Create a dedicated layer that is used to hold the launcher support
classes. The layer sits between `dependencies` and
`snapshot-dependencies` so that the layer is sensible for both
SNAPSHOT and RELEASE versions of Spring Boot

Closes gh-20529
2020-04-03 00:09:30 -07:00
Phillip Webb
7bc7d86ad4 Refine layer customization for Maven and Gradle
Simplify layer customization logic for both Maven and Gradle and
refactor some internals of the Gradle plugin.

Both Maven and Gradle now use a simpler customization format that
consists of `application`, `dependencies` and `layer order` sections.
The `application`, `dependencies` configurations support one or more
`into` blocks that are used to select content for a specific layer.

Closes gh-20526
2020-04-03 00:03:21 -07:00