1039 Commits

Author SHA1 Message Date
Phillip Webb
bf41da5322 Update copyright year of changed files 2020-04-21 18:12:27 -07:00
Phillip Webb
ed7a5db174 Fail operations when JarFile is closed
Update `JarFile` to track when the instance has been closed and throw
an exception in the same way that `ZipFile` does.

Closes gh-21072
2020-04-21 18:12:03 -07:00
Phillip Webb
cc33e23d31 Merge branch '2.2.x'
Closes gh-21074
2020-04-21 17:22:11 -07:00
Phillip Webb
6bf933205c Merge branch '2.1.x' into 2.2.x
Fixes gh-21073
2020-04-21 17:21:32 -07:00
Scott Frederick
fa186aa15b Preserve timestamps on loader directories
Prior to this commit, when the Maven plugin copied
spring-boot-loader.jar to a repackaged archive the timestamps of class
files were preserved but the timestamps of directories were not
preserved. This resulted in the directories having a current timestamp.

This commit copies the directory timestamps from spring-boot-loader.jar
to the repackaged archive and adds tests to verify the proper
behavior.

See gh-20927
2020-04-21 18:58:34 -05:00
Phillip Webb
c85918b8b3 Create new JarFile instance for URL connections
Update `JarURLConnection` to ensure that when connections are opened
a new copy of the JarFile is provided.

Prior to this commit, a single `JarFile` instance was shared which meant
that it could be accidental closed if accessed via
`JarURLConnection.getJarFile()`. If the underlying jar file is closed
then it's possible for a `NoClassDefFoundError` to be thrown if running
on JDK 11 with an active `SecurityManager`.

Closes gh-17796
2020-04-21 16:32:51 -07:00
Stephane Nicoll
692885f71e Merge branch '2.2.x'
Closes gh-21049
2020-04-21 16:00:41 +02:00
Stephane Nicoll
8cbd7f5cd0 Polish "Add support for initializing nested object when nothing bound"
This commit harmonizes the change made to @DefaultValue to the
annotation processor. If such annotation is added to a scalar value with
no value at all, no default value is produced.

Closes gh-18917
2020-04-21 15:59:34 +02: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
Stephane Nicoll
4648ecef6e Merge branch '2.2.x'
Closes gh-20969
2020-04-15 09:48:32 +02:00
Stephane Nicoll
1dd8dcc6c9 Polish "Polish JarFile to extra anonymous inner class"
See gh-20882
2020-04-15 09:39:00 +02:00
Konrado85
e0d1cf0e38 Polish JarFile to extra anonymous inner class
See gh-20882
2020-04-15 09:33:24 +02:00
Konrado85
9f4c39c985 Change PropertiesLauncher equals method to use URI
See gh-20872
2020-04-13 13:55:17 +02:00
dreis2211
4b9986d790 Remove unused fields in tests
See gh-20926
2020-04-13 13:46:43 +02:00
Cicio Flaviu
7f1655e5cb Add package-info to buildpack.platform.docker.ssl
See gh-20913
2020-04-10 08:57:23 -05:00
dreis2211
d4575bc122 Fix unused parameters
See gh-20911
2020-04-10 14:06:42 +02:00
Stephane Nicoll
1c70b6735a Remove plugin management for exec-maven-plugin
Closes gh-20883
2020-04-08 17:51:22 +02:00
dreis2211
ae15a3d162 Polish LayersIndex
See gh-20874
2020-04-08 17:29:07 +02:00
Madhura Bhave
62c09d607a Polish 2020-04-07 14:28:36 -07:00
Phillip Webb
3ca896e63f Polish 2020-04-07 12:10:49 -07:00
Phillip Webb
1640add8be Don't use Assert class from loader
Remove the use of `Assert` since it's unavailable that early.
2020-04-07 12:09:43 -07: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
729fc9dd6d Ensure streams are always closed
Update `AbstractJarWriter` to ensure that streams are always closed,
even if entries are not written.
2020-04-06 23:48:37 -07:00
Phillip Webb
1abbfbbfcd Attempt to fix failing Windows test 2020-04-06 23:48:28 -07:00
Phillip Webb
ffd499fdc7 Attempt to fix failing Windows test 2020-04-06 23:02:12 -07:00
Phillip Webb
d3c06ee0cf Remove windows line endings when parsing index 2020-04-06 21:57:36 -07:00
Phillip Webb
4b1346f4bf Polish 2020-04-06 21:52:25 -07:00
Phillip Webb
5b374e833b Cleanup paths to fix tests running on Windows 2020-04-06 20:33:33 -07: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
951a3e78f9 Test layer index can contain filenames with spaces
Add tests to ensure that the layer index can support filenames that
contain spaces.

Closes gh-20827
2020-04-06 19:18:22 -07:00
Phillip Webb
464c15e52c Ensure empty layers are written to the index file
Update the `LayersIndex` class to ensure that layers that do not contain
content are still written.

Closes gh-20858
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
Oleg Zhurakousky
9f75f30856 Change call to createClassLoader(URL) from 'super' to 'this'
ExecutableArchiveLauncher.createClassLoader(Iterator) calls
createClassLoader(URL) method with 'super'. This means overriding
createClassLoader(URL) is not possible without also overriding
createClassLoader(Iterator). The switch to 'this' enables that.

See gh-20851
2020-04-06 10:40:37 -07: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
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
Stephane Nicoll
c88ef6215f Polish 2020-04-03 10:34:23 +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
Madhura Bhave
d61a79d90b Support flat jar layering with layertools
Update layertools to support the flat jar format. Layers are now
determined by reading the `layers.idx` file.

Closes gh-20813
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
Madhura Bhave
4e3cdf936f Support flat jar layering with Maven
Update the Maven 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