Commit Graph

3231 Commits

Author SHA1 Message Date
Andy Wilkinson
dd38fb8b65 Limit wait time when checking process's availability
Closes gh-39788
2024-02-28 15:04:08 +00:00
Andy Wilkinson
bfc9ef8bc5 Merge branch '3.2.x'
Closes gh-39765
2024-02-27 12:39:28 +00:00
Andy Wilkinson
db0fcc5626 Merge branch '3.1.x' into 3.2.x
Closes gh-39764
2024-02-27 12:39:14 +00:00
Andy Wilkinson
54cdc83337 Only reference Gradle tasks beneath org.gradle.api
Fixes gh-39584
2024-02-27 12:38:07 +00:00
Phillip Webb
2b7320be1a Merge branch '3.2.x'
Closes gh-39690
2024-02-21 21:36:07 -08:00
Phillip Webb
a457638e6c Polish 'Decode URL content before passing it to NestedLocation.parse'
See gh-39675'

Closes gh-39675'
2024-02-21 21:16:33 -08:00
_ext Slovak, Jiri
06569e76f6 Decode URL content before passing it to NestedLocation.parse
URL can contains empty spaced encoded as %20, so it should be decoded
before passing it to NestedLocation. NestedLocation expects file system
path which should not contain URL encoded values.

See gh-39675
2024-02-21 17:28:55 -08:00
Phillip Webb
f8a1dae835 Merge branch '3.2.x' 2024-02-21 15:27:57 -08:00
Phillip Webb
12de6aa46a Merge branch '3.1.x' into 3.2.x 2024-02-21 15:27:27 -08:00
Phillip Webb
2c4909a89a Update copyright year of changed files 2024-02-21 13:58:53 -08:00
Scott Frederick
bb384f268e Merge branch '3.2.x'
Closes gh-39639
2024-02-20 10:34:54 -06:00
Scott Frederick
71e5e1252a Merge branch '3.1.x' into 3.2.x
Closes gh-39638
2024-02-20 10:34:32 -06:00
Scott Frederick
c93acdafbd Polish "Prevent long parse times for images with illegal char in tag"
See gh-39617
2024-02-20 10:27:28 -06:00
Jakob Wanger
c892544741 Prevent long parse times for images with illegal char in tag
Update the regular expression used to parse Docker images references to
prevent catastrophic backtracking when images names are long and the
tag contains an illegal character.

See gh-39617
2024-02-20 10:27:27 -06:00
Adrian Cole
4b0bed23b0 Migrate to Brave 6 and Zipkin Reporter 3
Signed-off-by: Adrian Cole <adrian@tetrate.io>

See gh-39049
2024-02-20 12:00:36 +01:00
Andy Wilkinson
e3de575841 Merge branch '3.2.x'
Closes gh-39550
2024-02-14 14:54:32 +00:00
Andy Wilkinson
deb3d70a2e Merge branch '3.1.x' into 3.2.x
Closes gh-39549
2024-02-14 14:54:16 +00:00
Andy Wilkinson
5bc4bdd1de Test Gradle plugin against Gradle 8.6
Closes gh-39548
2024-02-14 14:54:10 +00:00
Moritz Halbritter
7f55cae90f Merge branch '3.2.x' 2024-02-12 10:19:46 +01:00
Moritz Halbritter
4387b79831 Merge branch '3.1.x' into 3.2.x 2024-02-12 10:18:46 +01:00
Moritz Halbritter
8ffcfc9b77 Harmonize style of igored exceptions across the codebase 2024-02-12 10:14:20 +01:00
Scott Frederick
f5b1f811d6 Merge branch '3.2.x'
Closes gh-39514
2024-02-11 14:32:47 -06:00
Scott Frederick
eb75bb1339 Merge branch '3.1.x' into 3.2.x
Closes gh-39513
2024-02-11 14:32:35 -06:00
Jakob Wanger
7e90b4951b Enforce Gradle version to be at least of version 7.5
See gh-39508

Signed-off-by: Jakob Wanger <jakobwanger@gmail.com>
2024-02-11 14:30:26 -06:00
Scott Frederick
09a6ae51cc Add support for Bitnami container images with Docker Compose
Closes gh-35759
2024-02-09 14:58:25 -06:00
Andy Wilkinson
5ae533a00d Minimize scope of version management for commons-compress
See gh-39368
2024-02-06 15:08:15 +00:00
Chris Bono
ff8089de06 Update to Pulsar 3.2.0 and use Pulsar BOM
This commit updates Pulsar to 3.2.0 and leverages the newly added
Pulsar BOM in order to ease dependency management.

See gh-39408
2024-02-06 13:56:10 +01:00
Andy Wilkinson
9a5b3b3a2b Merge branch '3.2.x'
See gh-39369
2024-02-06 12:38:37 +00:00
Andy Wilkinson
84e390af70 Merge branch '3.1.x' into 3.2.x
See gh-39368
2024-02-06 12:37:18 +00:00
Andy Wilkinson
5f680ccac0 Revert "Stop managing version of commons-compress where it isn't needed"
This reverts commit 2b85cb0356.

See gh-39367
2024-02-06 12:36:26 +00:00
Moritz Halbritter
cc2233a7d9 Merge branch '3.2.x'
Closes gh-39423
2024-02-06 13:10:22 +01:00
Moritz Halbritter
976152b244 Merge branch '3.1.x' into 3.2.x
Closes gh-39422
2024-02-06 13:10:15 +01:00
Moritz Halbritter
8fd28d9ece Polish "Update the Debugging Documentation of the Spring Boot Maven Plugin"
See gh-39392
2024-02-06 13:07:55 +01:00
lukasdooo
b25d52c896 Update the Debugging Documentation of the Spring Boot Maven Plugin
See gh-39392
2024-02-06 13:06:57 +01:00
Moritz Halbritter
07ee7254a6 Align to Native Build Tools metadata repository default
Closes gh-39068
2024-02-05 08:46:57 +01:00
Eddú Meléndez
f3e7325064 Add service connection for Docker Compose and Testcontainers ActiveMQ
See gh-39363
2024-02-02 09:05:37 +01:00
Andy Wilkinson
f9363569ab Merge branch '3.2.x'
Closes gh-39369
2024-02-01 11:19:01 +00:00
Andy Wilkinson
0afe0635b9 Merge branch '3.1.x' into 3.2.x
Closes gh-39368
2024-02-01 11:17:41 +00:00
Andy Wilkinson
2b85cb0356 Stop managing version of commons-compress where it isn't needed
Closes gh-39367
2024-02-01 10:20:20 +00:00
Andy Wilkinson
899da7891a Merge branch '3.1.x' into 3.2.x
See gh-39340
2024-01-31 17:44:07 +00:00
Andy Wilkinson
dd082c6c21 Revert "Upgrade to Commons Compress 1.25.0"
This reverts commit 1c2a622f7f.

See gh-39148
2024-01-31 17:35:57 +00:00
Eddú Meléndez
f15cd93a35 Add service connection for Docker Compose and Testcontainers Artemis
See gh-39311
2024-01-31 08:37:03 +01:00
Scott Frederick
588d544392 Merge branch '3.2.x'
Closes gh-39348
2024-01-30 16:28:50 -06:00
Scott Frederick
5b76416b06 Merge branch '3.1.x' into 3.2.x
Closes gh-39347
2024-01-30 16:28:39 -06:00
Scott Frederick
a620d348ad Fix exporting of Docker image layers
The logic to extract layers from a downloaded Docker image assumed that
the layer entries in the image tar archive always had the file extension
`.tar`. This was the case with Docker and other compatible daemons until
Docker 25.0. With this commit, the extension is no longer assumed, but
any entries listed in `manifest.json` will be recognized.

Fixes gh-39323
2024-01-30 16:25:03 -06:00
Andy Wilkinson
10e750ab3b Merge branch '3.2.x'
Closes gh-39341
2024-01-30 13:53:13 +00:00
Andy Wilkinson
8c18d75b12 Merge branch '3.1.x' into 3.2.x
Closes gh-39340
2024-01-30 13:50:13 +00:00
Andy Wilkinson
1c2a622f7f Upgrade to Commons Compress 1.25.0
Closes gh-39148
2024-01-30 13:49:37 +00:00
Moritz Halbritter
f36b69f961 Merge branch '3.2.x'
Closes gh-39338
2024-01-30 13:48:44 +01:00
Piyal Ahmed
a85e99790b Fix NestedJarFile constructor javadoc
See gh-39285
2024-01-30 13:47:23 +01:00
Andy Wilkinson
df67dec561 Merge branch '3.2.x'
Closes gh-39306
2024-01-25 13:32:20 +00:00
Andy Wilkinson
a42a8ce620 Merge branch '3.1.x' into 3.2.x
Closes gh-39305
2024-01-25 13:31:59 +00:00
Andy Wilkinson
a6d1788be3 Tolerate OS and Java version differences in ExtractCommandTests
Co-Authored-By: Moritz Halbritter <moritz.halbritter@broadcom.com>

Closes gh-39303
2024-01-25 13:31:42 +00:00
Phillip Webb
8f1a330dd5 Update copyright header of cleaned up code
See gh-39259
2024-01-23 10:18:50 -08:00
Tobias Lippert
24e0864105 Replace !Optional.isPresent with Optional.isEmpty
See gh-39259
2024-01-23 10:18:50 -08:00
Tobias Lippert
7f4aaacf42 Simplify stream chain operations
See gh-39259
2024-01-23 10:18:49 -08:00
Phillip Webb
15f1e8536b Polish 'Remove redundant array creation'
See gh-39259
2024-01-23 10:18:49 -08:00
Tobias Lippert
d3c97adf79 Remove redundant array creation
See gh-39259
2024-01-23 10:18:49 -08:00
Tobias Lippert
316b415e95 Use try with resources instead of try-finally
See gh-39259
2024-01-23 10:18:49 -08:00
Tobias Lippert
cb26c31dd6 Replace explicit type with diamond operator
See gh-39259
2024-01-23 10:18:49 -08:00
Tobias Lippert
06265ee617 Use pattern variables
See gh-39259
2024-01-23 10:18:48 -08:00
Tobias Lippert
fe38cb3b4a Use string.repeat()
See gh-39259
2024-01-23 09:47:07 -08:00
Phillip Webb
ddb769bf7f Polish 'Simplify conditionals'
See gh-39259
2024-01-23 09:47:07 -08:00
Tobias Lippert
65a1ff84e6 Simplify conditionals
See gh-39259
2024-01-23 09:07:40 -08:00
Tobias Lippert
def7523398 Inline redundant if statements
See gh-39259
2024-01-23 09:07:35 -08:00
Scott Frederick
bee6fe899c Polish "Add Docker Compose service connection support for OpenLDAP"
See gh-39258
2024-01-22 16:51:45 -06:00
PhilKes
eb940c3907 Add Docker Compose service connection support for OpenLDAP
See gh-39258
2024-01-22 16:51:45 -06:00
Phillip Webb
a0a804cfdf Merge branch '3.2.x' 2024-01-22 12:20:41 -08:00
Phillip Webb
cff8cb98c7 Merge branch '3.1.x' into 3.2.x 2024-01-22 12:20:24 -08:00
Phillip Webb
088b313ae5 Polish 2024-01-22 11:57:37 -08:00
Moritz Halbritter
ca799f7b21 Tolerate actuator endpoints with the same id
Closes gh-39249
2024-01-22 12:33:05 +01:00
Phillip Webb
9de0085a43 Merge branch '3.2.x'
Closes gh-39226
2024-01-17 13:16:53 -08:00
Phillip Webb
eb0040c225 Fix ZipCentralDirectoryFileHeaderRecord entry comment read offset
Update `ZipCentralDirectoryFileHeaderRecord.copyTo` comment read offset
to account for the record position.

Fixes gh-39166
2024-01-17 13:16:43 -08:00
Andy Wilkinson
ac63fc0701 Merge branch '3.2.x'
Closes gh-39121
2024-01-12 16:25:13 +00:00
Andy Wilkinson
6bfac1f860 Fix handling of nested: UNC paths on Windows
Closes gh-38956
2024-01-12 15:53:19 +00:00
Andy Wilkinson
6f4a8cc0c3 Polish "Change log messages to use singular or plural instead of "noun(s)""
See gh-37017
2024-01-11 14:44:07 +00:00
teacmity
c6c7fbc15f Change log messages to use singular or plural instead of "noun(s)"
See gh-37017
2024-01-11 14:35:49 +00:00
Andy Wilkinson
17e9f0cb8e Merge branch '3.2.x'
Closes gh-39093
2024-01-11 11:36:38 +00:00
Andy Wilkinson
7087897507 Merge branch '3.1.x' into 3.2.x
Closes gh-39091
2024-01-11 10:33:57 +00:00
Andy Wilkinson
45c32854a5 Fix Checkstyle upgrade
Closes gh-38746
2024-01-10 15:37:38 +00:00
Christoph Dreis
b7c9c82180 Fix typos
See gh-38983
2024-01-10 09:06:45 +01:00
Phillip Webb
2d12fa073d Merge branch '3.2.x'
Closes gh-39071
2024-01-09 12:38:24 -08:00
Phillip Webb
e5f489f338 Restore manifest support for nested directory jars
Update `NestedJarFile` so that the `getManifest()` method returns the
manifest from the parent jar file for nested jars based on directory
entries.

This restores the previous behavior supported by Spring Boot 3.1 and
allows class methods such as `getPackage().getImplementationVersion()`
to return non `null` results.

Fixes gh-38996
2024-01-09 12:33:10 -08:00
Moritz Halbritter
25614710d5 Fail if superfluous properties are used in property metadata
Closes gh-37597
2024-01-09 13:59:51 +01:00
Moritz Halbritter
970c226847 Polish 2024-01-09 13:59:14 +01:00
Andy Wilkinson
5ef7db9a28 Start working on Spring Boot 3.3 2024-01-04 10:56:56 +00:00
Phillip Webb
f31ffbf927 Don't duplicate META-INF entries in nested directory jars
Update `ZipContent` so that `META-INF` entries are no longer duplicated
in nested jars created from directory entries. This aligns with the
behavior of the classic loader and prevents the same META-INF file from
being discovered twice.

Fixes gh-38862
2023-12-20 17:36:06 -08:00
Phillip Webb
246a0e6f21 Merge branch '3.1.x'
Closes gh-38878
2023-12-19 23:10:49 -08:00
Yanming Zhou
8cb8999772 Ban call of URLEncoder.encode/URLDecoder.decode(String,String)
Add ArchUnit rules to ban the use of `URLEncoder` calls with String
charsets and use `Charset` calls instead.

See gh-38740
2023-12-19 23:10:18 -08:00
Phillip Webb
5354ad15b3 Merge branch '3.1.x'
Closes gh-38877
2023-12-19 22:51:48 -08:00
Yanming Zhou
b6e87cee35 Remove unnecessary extends Object from generic
See gh-38739
2023-12-19 22:38:19 -08:00
Yanming Zhou
ac18e3015c Use .isEmpty() where feasible
See gh-38739
2023-12-19 22:38:05 -08:00
Phillip Webb
88429b6a66 Use file urls for unpacked jars
Update `JarFileArchive` so that unpacked jars use `file:` URLs rather
than `jar:file:`. This aligns with the behavior of Spring Boot 3.1 and
allows calls to `class.getSigners()` to work again.

Fixes gh-38833
2023-12-17 10:55:31 -08:00
Phillip Webb
b4a4e91238 Update ZipString to deal with reads that do not return all data
Refine the logic in `ZipString.hash` and `ZipString.compare` to deal
with the fact a read operation may not return all available bytes.

Fixes gh-38751
2023-12-13 13:29:37 -08:00
Moritz Halbritter
e81d1226fe Prevent integer overflow when checking disk space 2023-12-12 16:26:58 +01:00
Moritz Halbritter
a242bd81e2 Merge branch '3.1.x'
Closes gh-38747
2023-12-12 13:55:44 +01:00
Yanming Zhou
3c65fdfa12 Use idiomatic AssertJ assertions
See gh-38702
2023-12-12 13:53:20 +01:00
Phillip Webb
ea87787279 Merge branch '3.1.x'
Closes gh-38741
2023-12-11 20:37:45 -08:00
Phillip Webb
39bc7c8582 Support getPermissions() call on Gradle 8.6-milestone-1
The `getPermissions` method is now part of the private
`ParentDirectoryStub` class so we now need to call
`setAccessible(true)`.

Fixes gh-38718
2023-12-11 20:35:06 -08:00
Moritz Halbritter
6330190913 Merge branch '3.1.x'
Closes gh-38728
2023-12-11 09:44:19 +01:00
Yanming Zhou
ebfbc0ef05 Cleanup kotlin sources
1. remove unused imports
2. remove redundant semicolon
3. remove empty class body
4. remove redundant 'constructor' keyword
5. remove redundant 'Unit' return type
6. use non-null type if possible

See gh-38708
2023-12-11 09:23:42 +01:00
Andy Wilkinson
e6970243ee Retry read on ClosedByInterruptException
In gh-38154, we started handling ClosedByInterruptException. The
FileChannel was repaired by recreating it and then the exception was
rethrown. This allowed other threads to use the channel that had been
read by an interrupted thread while allowing that interruption to
continue.

This approach has proven to be insufficient as there are scenarios
where the read needs to succeed on the interrupted thread. This
commit updates the handling of ClosedByInterruptException so that
this is the case. The FileChannel is recreated as before but the
thread's interrupted flag is now cleared before retrying the read.
The flag is then reinstated so that any subsequent actions that
should fail due to the interruption will do so.

We could clear and reinstate the interrupted flag before the first
read, rather than catching ClosedByInterruptException. This approach
was rejected as it will have an impact on the performance of the
happy path where the thread hasn't been interrupted.

Fixes gh-38611
2023-12-07 10:49:40 -08:00
Phillip Webb
359a6cb5bb Use encoded version of path for jar URLs
Update `JarUrl` so that the encoded version of the path is used.
This allows jars to placed in directories with `#` or `!` in the
name.

Fixes gh-38660
2023-12-06 16:20:27 -08:00
Phillip Webb
847daf484c Fix JarUrlTests
Fix `JarUrlTests` to use the jarFile rather than temp.
2023-12-06 16:19:57 -08:00
Andy Wilkinson
49990afd78 Polish
See gh-38592
2023-12-05 20:49:34 +00:00
Andy Wilkinson
16c2ddb02c Merge branch '3.1.x'
Closes gh-38665
2023-12-05 20:31:17 +00:00
Andy Wilkinson
b424254587 Test Gradle plugin against Gradle 8.5
Closes gh-38664
2023-12-05 20:30:54 +00:00
Moritz Halbritter
d172b22064 Escape pipe symbol in properties changelog table cells
Closes gh-38515
2023-11-30 11:37:25 +01:00
Phillip Webb
6fd691af58 Allow FileSystems to be create by splitting URLs
Relax the constraint that a `NestedLocation` must have a nested entry
name specified so that URLs can be split and rebuilt.

Prior to this commit, given a URL of the following form:

	jar:nested:/myjar.jar!/nested.jar!/my/file

It was possible to create a FileSystem from
"jar:nested:/myjar.jar!/nested.jar" and from that create a path to
"my/file".

However, it wasn't possible to create a FileSystem from
"jar:nested:/myjar.jar", then create another file system from the path
"nested.jar" and then finally create a path to "/nested.jar".

This was because `nested:/myjar.jar` was not considered a value URL
because it didn't include a nested entry name.

Projects such as `JobRunr` were relying on the ability to compose file
systems, so it makes sense to remove our somewhat artificial
restriction.

Fixes gh-38592
2023-11-28 22:14:29 -08:00
Phillip Webb
9a0f95420a Update NestedByteChannel.read to read all possible data when
Update `NestedByteChannel.read` so that it loops until all
remaining data has been read into the buffer. Prior to this
commit, it was possible for to read only some bytes into the
buffer. Although it looks like this should be OK according to
the API documentation, the `ZipFileSystem` relies on all
remaining bytes being returned.

Fixes gh-38595
2023-11-28 22:14:29 -08:00
Phillip Webb
8c7e8778a6 Fix NegativeArraySizeException caused by missing unsigned conversion
Update `ZipContent` so that `eocd.totalNumberOfCentralDirectoryEntries`
is converted from a short to an unsigned int to prevent a negative
number from being used.

This commit also updates the code to consistently use `X.toUnsigned...`
helper methods rather than using bitwise operators.

Fixed gh-38572
2023-11-27 23:33:15 -08:00
Phillip Webb
0856e10443 Fix IndexOutOfBoundsException exception from parseUrl with empty spec
Update jar `Handler` code so that the `parseUrl` method can accept an
empty `spec`. Prior to this commit, a `classLoader.getResource("")`
call would result in a `null` result. This breaks a number of things
including `ClassPathResource` and `PathMatchingResourcePatternResolver`.

Fixes gh-38524
2023-11-23 14:35:04 -08:00
Johnny Lim
f9f73aa146 Polish
See gh-38508
2023-11-23 09:39:01 +01:00
Johnny Lim
175b6473c7 Polish
See gh-38389
2023-11-22 10:16:19 +01:00
Scott Frederick
d433deb737 Merge branch '3.0.x' into 3.1.x
Closes gh-38485
2023-11-21 17:30:54 -06:00
Scott Frederick
dabcebf8a3 Merge branch '2.7.x' into 3.0.x
Closes gh-38484
2023-11-21 17:30:07 -06:00
Scott Frederick
d1cce0f8ef Upgrade default CNB builders to Paketo Jammy
Closes gh-38477
2023-11-21 17:22:32 -06:00
Phillip Webb
6c3dec42e0 Add container support for Oracle Free which replaces Oracle XE
Update Docker Compose and Testcontainers support to work with
`gvenzl/oracle-free` which replaces `gvenzl/oracle-xe`.

Closes gh-38476
2023-11-21 11:51:59 -08:00
Phillip Webb
3a32e4e913 Merge branch '3.1.x'
Closes gh-38405
2023-11-20 16:27:46 -08:00
Phillip Webb
f68df82b30 Support lenient ContainerConnectionDetailsFactory hint registration
Update `ContainerConnectionDetailsFactory` hint registration logic
so that types are optional on the classpath.

See gh-36606
Fixes gh-38392
2023-11-20 16:26:22 -08:00
Moritz Halbritter
82f0684cd8 Merge branch '3.1.x'
Closes gh-38354
2023-11-14 17:04:41 +01:00
Moritz Halbritter
22a991b334 Document tags format used in Gradle and Maven plugins
Closes gh-33088
2023-11-14 17:03:50 +01:00
Phillip Webb
dbbde18d41 Attempt to fix Windows build failure due to open files
See gh-38204
2023-11-08 07:04:46 -08:00
Moritz Halbritter
b9a5bdc294 Merge branch '3.1.x'
Closes gh-38249
2023-11-07 11:28:52 +01:00
Moritz Halbritter
e549380a59 Merge branch '3.0.x' into 3.1.x
Closes gh-38248
2023-11-07 11:28:20 +01:00
Moritz Halbritter
3664877d80 Merge branch '2.7.x' into 3.0.x
Closes gh-38247
2023-11-07 11:24:16 +01:00
Andy Wilkinson
08a4a836aa Merge branch '3.1.x'
Closes gh-38233
2023-11-06 14:26:09 +00:00
Andy Wilkinson
b01235e68d Copy attributes from runtimeClasspath to productionRuntimeClasspath
Fixes gh-38209
2023-11-06 11:50:27 +00:00
Phillip Webb
c0f8b90d31 Return getLastModified result from JarUrlConnection
Update `JarUrlConnection` and `NestedUrlConnection` so that calls
to `getLastModified()` and `getHeaderFieldDate("last-modified", 0)`
always return a result.

Fixes gh-38204
2023-11-04 19:43:54 -07:00
Phillip Webb
77218a644e Merge branch '3.1.x' 2023-11-02 14:16:37 -07:00
Phillip Webb
afa4d274c2 Merge branch '3.0.x' into 3.1.x 2023-11-02 14:14:19 -07:00
Phillip Webb
8d53caa1c6 Merge branch '2.7.x' into 3.0.x 2023-11-02 14:13:47 -07:00
Phillip Webb
e891a3e24c Polish adoc formatting 2023-11-02 14:12:56 -07:00
Andy Wilkinson
890a3e72ac Repair file channel when it's closed by interruption
When an interrupted that calls FileChannel.read, the channel is
closed and the read fails with a ClosedByInterruptException. The
closure of the channel makes it unusable by other threads. To
allow other threads to read from the data block, this commit
recreates the FileChannel when a read fails on an interrupted
thread with a ClosedByInterruptException. The exception is then
rethrown to continue the thread's interruption.

Closes gh-38154
2023-11-01 17:12:43 +00:00
Andy Wilkinson
173e6543fd Merge branch '3.1.x'
Closes gh-38168
2023-11-01 15:06:20 +00:00
Andy Wilkinson
40ce6182a1 Merge branch '3.0.x' into 3.1.x
Closes gh-38167
2023-11-01 15:03:29 +00:00
Andy Wilkinson
b7f00c1087 Merge branch '2.7.x' into 3.0.x
Closes gh-38166
2023-11-01 15:02:54 +00:00
Moritz Halbritter
20edbb402f Merge branch '3.1.x' 2023-10-31 10:23:13 +01:00
Moritz Halbritter
607ed86edb Merge branch '3.0.x' into 3.1.x 2023-10-31 10:23:01 +01:00
Moritz Halbritter
f3c10ae97b Polish JsonStream 2023-10-31 09:49:01 +01:00
Andy Wilkinson
94e810201e Fix test for incremental build of renamed properties class
Previously, the .class file for the renamed properties class was
on the class path of the compilation in two places:

1. The output directory of the test's previous compilation
2. The output directory of the compilation of src/test/java of
   spring-boot-configuration-processor

The first of these locations is addressed by updating TestProject.
The .class file is now deleted from the project's output location
at the same time as the .java file is deleted from its source
location.

The second of these locations is addressed by configuring the class
path of the compiler to include a copy of the result of compiling
src/test/java of spring-boot-configuration-processor. From this copy
entries can then be deleted as needed without destabilizing other tests.

Closes gh-26271
2023-10-30 15:17:28 +00:00
Moritz Halbritter
f66c76e2a8 Merge branch '3.1.x'
Closes gh-38078
2023-10-27 13:47:23 +02:00
Moritz Halbritter
5ca7201fa5 Fix "Integrating with Actuator" code snippet
Closes gh-36114
2023-10-27 13:47:02 +02:00
Moritz Halbritter
35aa28485a Merge branch '3.1.x'
Closes gh-38069
2023-10-27 09:50:57 +02:00
Moritz Halbritter
8bb2228adf Document how to unset maven.compiler.release
Closes gh-37993
2023-10-27 09:50:12 +02:00
Phillip Webb
beb49e1933 Add tests for DataBlockInputStream and fix implementation oddities
Fix issues with `DataBlockInputStream` including the fact that remain
bytes were not tracked correctly. Also add some tests and fix a few
other unusual details with the implementation.

Closes gh-38066
2023-10-26 23:00:20 -07:00
Phillip Webb
4af9ed4d1d Fix Tomcat TldScanner issues by returning raw zip data for nested jars
Update JarUrlConnection so that the full raw zip data is returned from
nested jars when no entry name is specified. This update allows
Tomcat's `WarURLConnection` to work with our nested connections since
they can parse the returned raw zip data.

Fixes gh-38047
2023-10-26 23:00:20 -07:00
Phillip Webb
bba323ba5f Copy zip data descriptor records when creating virtual zip data
The zip specification states that when 'bit 3' of the general purpose
flags is set then a data descriptor record must be present. Prior to
this commit, our `VirtualZipDataBlock` ignored such records and would
create invalid data.

Although the generated data would work for zip parsers that read the
central directory records, it causes problems with streaming reader
implementations such as `JarInputStream`.

This commit updates the code so that it now copies the data descriptor
records. It support both blocks that have a signature and those that
don't. It also updates the generation logic to correctly deal with
any extra data bytes present after the local file header record.

Fixes gh-38063
2023-10-26 23:00:20 -07:00
Phillip Webb
b35c4d6497 Open loader jar URLs by default using runtimeVersion
Update `UrlJarFileFactory` so that `runtimeVersion` is used by default
instead of `baseVersion`. Prior to this commit we tried to mirror the
JDK handler on look for a `#runtime` fragment. This unfortunately
doesn't work with the URLs produced by `URLClassPath`.

This commit also fixes a bug in `NestedJarFile` where we didn't return
the correct result from `hasEntry`.

Fixes gh-38050
2023-10-25 21:20:42 -07:00
Andy Wilkinson
b167eb3b02 Merge branch '3.1.x' 2023-10-25 14:50:30 +01:00
Andy Wilkinson
4dea11ef96 Merge branch '3.0.x' into 3.1.x 2023-10-25 14:50:21 +01:00
Andy Wilkinson
ead0c77a5b Polish
See gh-38030
2023-10-25 14:50:07 +01:00
Andy Wilkinson
0d1a223fee Merge branch '3.1.x'
Closes gh-38032
2023-10-25 14:08:22 +01:00
Andy Wilkinson
649117de35 Merge branch '3.0.x' into 3.1.x
Closes gh-38031
2023-10-25 14:08:10 +01:00
Andy Wilkinson
331bf51332 Merge branch '2.7.x' into 3.0.x
Closes gh-38030
2023-10-25 14:07:57 +01:00
Andy Wilkinson
666f68ea60 Document configuration for building images with Colima
Closes gh-34522
2023-10-25 14:07:43 +01:00
Phillip Webb
4e7c0737d4 Fix PropertiesLauncher classpath detection without 'loader.path' set
Update `PropertiesLauncher` to restore classpath detection logic applied
when no `loader.path` property is set.

Fixes gh-37992
2023-10-24 17:03:18 -07:00
Johnny Lim
b5d4983829 Polish
See gh-37984
2023-10-23 11:15:27 +02:00
Phillip Webb
e1bd24695d Try @AssertFileChannelDataBlocksClosed for Windows fix
This updates commit dad5dc6750 to
see if @AssertFileChannelDataBlocksClosed will take care of
closing files.

See gh-7161
2023-10-20 10:05:43 -07:00
Andy Wilkinson
d13d38a141 Trim multiple leading slashes in NestedLocation
See gh-37668
2023-10-20 11:55:35 +01:00
Andy Wilkinson
88bf3dfba2 Close byte channel created by newByteChannelReturnsByteChannel
See gh-7161
2023-10-20 11:22:16 +01:00
Andy Wilkinson
dad5dc6750 Try to fix NestedFileSystemProviderTests on Windows
See gh-7161
2023-10-20 10:56:08 +01:00
Andy Wilkinson
4161eb1853 Fix path handling in NestedLocation on Windows
See 4b495ca
See gh-37668
2023-10-20 09:15:54 +01:00
Phillip Webb
3eeb1b2849 Merge branch '3.1.x' 2023-10-19 23:21:42 -07:00
Phillip Webb
7c864804d5 Merge branch '2.7.x' into 3.0.x 2023-10-19 23:21:08 -07:00
Phillip Webb
d47f8bf945 Update copyright year of changed files 2023-10-19 23:20:43 -07:00
Phillip Webb
d638bbb0ba Merge branch '3.1.x'
Closes gh-37967
2023-10-19 21:25:44 -07:00
Phillip Webb
1d456e09d2 Merge branch '3.0.x' into 3.1.x
Closes gh-37966
2023-10-19 21:12:52 -07:00
Phillip Webb
a0b999c8b4 Merge branch '2.7.x' into 3.0.x
Closes gh-37965
2023-10-19 20:55:51 -07:00
Phillip Webb
abdad1cabe Constently use assertThatExceptionOf... assertions
Closes gh-37964
2023-10-19 20:17:26 -07:00
Phillip Webb
b8365e3118 Fix misconfigured Maven test
See gh-37669
2023-10-18 22:58:45 -07:00
Phillip Webb
3c62defb9d Support java.nio.file Paths and FileSystems with nested jars
Add a `NestedFileSystemProvider` implementation so that the JDK's
`ZipFileSystem` can load content from nested jars and nested
directory entries.

Creating a `ZipFileSystem` may be a relatively expensive operation as
zip structures need to be parsed and in the case of directory entries
a virtual datablock nees to be generated on the fly. As such, we
install the `ZipFileSystem` as late as possible since in a typical
application it may never be needed.

This commit also tweaks Gradle and Maven plugins to ensure that the
service loader file is written to repackaged jars.

Closes gh-7161
2023-10-18 20:46:36 -07:00
Phillip Webb
4b495ca2a9 Change NestedLocation to hold a Path rather than a File
Refactor `NestedLocation` so that it holds a `Path` rather than a
`File`.

See gh-37668
2023-10-18 20:46:35 -07:00
Andy Wilkinson
1559485f56 Fix Gradle plugin test classpath after Kotlin upgrade
See gh-37926
2023-10-18 14:07:49 +01:00
Phillip Webb
33c5e1269a Write signature files to uber jars to for Oracle Java 17 verification
Update Gradle and Maven plugins to write an empty `META-INF/BOOT.SF`
file whenever there is a nested signed jar.

This update allows Oracle Java 17 to correctly verify the nested JARs.
The file is required because `JarVerifier` has code roughly equivalent
to:

	if (!jarManifestNameChecked && SharedSecrets
			.getJavaUtilZipFileAccess().getManifestName(jf, true) == null) {
    	throw new JarException("The JCE Provider " + jarURL.toString() +
    		" is not signed.");
	}

The `SharedSecrets.getJavaUtilZipFileAccess().getManifestName(jf, true)`
call ends up in `ZipFile.getManifestName(onlyIfSignatureRelatedFiles)`
which is a private method that we cannot override in our `NestedJarFile`
subclass. By writing an empty `.SF` file we ensure that the `Manifest`
is always returned because there are always "signature related files".

Fixes gh-28837
2023-10-16 16:19:16 -07:00
Andy Wilkinson
d6a9295c26 Allow additional build info properties to have provided values
Closes gh-37889
2023-10-16 18:15:42 +01:00
Andy Wilkinson
084bd3a420 Merge branch '3.1.x' 2023-10-13 21:38:06 +01:00
Andy Wilkinson
ccaa54436b Merge branch '3.0.x' into 3.1.x 2023-10-13 21:37:56 +01:00
Andy Wilkinson
b1eb08faba Merge branch '2.7.x' into 3.0.x 2023-10-13 21:37:44 +01:00
Andy Wilkinson
3dba0d76d2 Polish
See gh-37878
2023-10-13 21:17:12 +01:00
Andy Wilkinson
2231244d2c Merge branch '3.1.x' 2023-10-13 20:42:15 +01:00
Andy Wilkinson
e957c3087c Merge branch '3.0.x' into 3.1.x 2023-10-13 20:36:51 +01:00
Andy Wilkinson
c25e532aeb Merge branch '2.7.x' into 3.0.x 2023-10-13 20:36:32 +01:00
Andy Wilkinson
dbc06faed8 Polish
See gh-37878
2023-10-13 20:36:16 +01:00
Andy Wilkinson
60f05eaa94 Merge branch '3.1.x'
Closes gh-37882
2023-10-13 16:01:47 +01:00
Andy Wilkinson
5af13d191f Merge branch '3.0.x' into 3.1.x
Closes gh-37881
2023-10-13 16:01:32 +01:00
Andy Wilkinson
ae2693b7f1 Merge branch '2.7.x' into 3.0.x
Closes gh-37880
2023-10-13 16:01:14 +01:00
Andy Wilkinson
42ee6b9e74 Use new permissions API with Gradle 8.3+
Closes gh-37878
2023-10-13 16:00:54 +01:00
Johnny Lim
446677375e Polish gh-35082
See gh-37831
2023-10-12 14:17:02 +02:00
Andy Wilkinson
bdaf7a7603 Merge branch '3.1.x'
Closes gh-37830
2023-10-11 15:06:09 +01:00
Andy Wilkinson
411586347c Merge branch '3.0.x' into 3.1.x
Closes gh-37829
2023-10-11 15:04:21 +01:00
Andy Wilkinson
781ac2ece2 Merge branch '2.7.x' into 3.0.x
Closes gh-37828
2023-10-11 15:02:36 +01:00
Andy Wilkinson
5a75fae23b Polish "Polish"
See gh-37745
2023-10-11 14:58:04 +01:00
Johnny Lim
303015ea2d Polish
See gh-37745
2023-10-11 14:57:38 +01:00
Andy Wilkinson
d0486ef43f Merge branch '3.1.x'
Closes gh-37827
2023-10-11 14:47:35 +01:00
Andy Wilkinson
40461488db Merge branch '3.0.x' into 3.1.x
Closes gh-37826
2023-10-11 14:47:23 +01:00
Andy Wilkinson
a80f8ea5e6 Configure Java toolchain on AOT-processing tasks
Closes gh-37717
2023-10-11 14:31:44 +01:00
Andy Wilkinson
b9a0159b97 Merge branch '3.1.x'
Closes gh-37825
2023-10-11 13:54:39 +01:00
Andy Wilkinson
ac1f7ccc33 Merge branch '3.0.x' into 3.1.x
Closes gh-37824
2023-10-11 13:54:25 +01:00
Andy Wilkinson
5a6cd77c56 Merge branch '2.7.x' into 3.0.x
Closes gh-37823
2023-10-11 13:54:11 +01:00
Andy Wilkinson
5a1abb76f7 Test the Gradle plugin against Gradle 8.4
Closes gh-37811
2023-10-11 13:52:03 +01:00
Phillip Webb
9e4f160c17 Attempt to fix NestedJarFile file lock issues on Windows
Update `DefaultCleanerTracking` and `@AssertFileChannelDataBlocksClosed`
to capture and store the source object if it is a `Cleanable` so that
it can be released later.

Although the real cleaner cannot keep a reference to `obj`, it is safe
for us to do so in tests since we are in control of the object lifecycle
and we don't need it to be garbage collected.

This commit also updates the `UrlJarFile` to call the cleaner so that
it can be tracked.

See gh-37668
2023-10-06 23:44:55 -07:00
Phillip Webb
5da31aca46 Attempt to fix NestedJarFile file lock issues on Windows
Update `NestedJarFile.close()` to call `super.close()` so that the outer
jar file is closed and files can hopefully be deleted on Windows.

See gh-37668
2023-10-06 21:47:55 -07:00
Phillip Webb
1f5472387d Fix formatting 2023-10-03 20:41:48 -07:00
Phillip Webb
42f50fa292 Attempt to fix CI failures
Attempt to fix CI failures caused by timezone differences and different
JDK versions.

See gh-37668
2023-10-03 20:29:33 -07:00
Phillip Webb
7ad4a9817d Rewrite nested jar support code and remove Java 8 support
Rewrite nested jar code to better align with the implementations
provided in Java 17. This update makes two fundamental changes to
the previous implementation:

- Resource cleanup is now handled using the `java.lang.ref.Cleaner`

- Jar URLs now use the form `jar:nested:/my.jar/!nested.jar!/entry`

Unlike the previous `jar🫙/my,jar!/nested.jar!/entry` URL format,
the new format is compatible with Java's default Jar URL handler.
Specifically, it now only uses a single `jar:` prefix and it no longer
includes multiple `!/` separators.

In addition to the changes above, many of the ancillary classes have
also been refactored and updated to create cleaner APIs.

Closes gh-37668
2023-10-03 17:27:57 -07:00
Phillip Webb
75ddb9fa47 Fix test failure caused by PropertiesLoader class reference
See gh-37667
2023-10-03 17:27:39 -07:00
Phillip Webb
55b5610dd9 Add Maven and Gradle option for the loader implementation to use
Add properties to the Maven and Gradle plugins so that users can
switch between the two loader modules.

See gh-37669
2023-10-03 15:40:42 -07:00
Phillip Webb
a89057b7c7 Reintroduce spring-boot-loader modules
Restore the `spring-boot-loader` with the previous loader code so
that we can develop it further.

See gh-37669
2023-10-03 15:40:25 -07:00
Phillip Webb
aeb6537f57 Rename spring-boot-loader to spring-boot-loader-classic
Rename the `spring-boot-loader` module to `spring-boot-loader-classic`
so that we can introduce an alternative loader implementation.

See gh-37669
2023-10-03 15:40:04 -07:00
Phillip Webb
c22548982a Relocate launcher classes
Create alternative launcher classes under the package
`org.springframework.boot.loader.launch` and use them in favor
of the previous location.

This update is designed to improve compatibility with future
changes in the loader.

Closes gh-37667
2023-10-03 14:53:04 -07:00
Scott Frederick
f947bad3f7 Merge branch '3.1.x'
Closes gh-37666
2023-10-03 13:18:32 -05:00
Ivo Smid
f2a4336ea1 Increase the socket timeout for remote connections to Docker daemon
The default socket timeout with HttpClient 5 is not long enough
in some cases where Docker images are built that require the
GraalVM native image compiler to run in a buildpack. This commit
increases the timeout to 30 minutes.

Fixes gh-37665

Co-authored-by: Scott Frederick <sfrederick@vmware.com>"
2023-10-03 11:52:48 -05:00
Andy Wilkinson
7d40a45b50 Merge branch '3.1.x'
Closes gh-37662
2023-10-03 11:21:29 +01:00
Andy Wilkinson
a4100e12ff Merge branch '3.0.x' into 3.1.x
Closes gh-37661
2023-10-03 11:05:51 +01:00
Andy Wilkinson
931584f8af Merge branch '2.7.x' into 3.0.x
Closes gh-37659
2023-10-03 10:28:51 +01:00
Phillip Webb
3d6859e80f Use the term "uber jar" in reference documentation and javadoc
Update reference documentation and javadoc to use the term "uber jar"
rather than "fat jar".

Closes gh-37653
2023-10-02 23:01:34 -07:00
Scott Frederick
619a0f3b35 Merge branch '3.1.x'
Closes gh-37624
2023-09-28 16:32:45 -05:00
JinseongHwang
0b703f9007 Use consistent capitalization in MySQL and MariaDB test names
See gh-37497
2023-09-28 16:28:32 -05:00
Andy Wilkinson
bebca55a8f Add testAndDevelopmentOnly configuration
Closes gh-35436
2023-09-28 13:24:34 +01:00
Phillip Webb
052757c2d8 Polish 2023-09-27 20:58:09 -07:00
Scott Frederick
3cf08e1351 Clarify default security options for image building
See gh-37479
2023-09-27 11:05:40 -05:00
Scott Frederick
9811cc030f Fix LifecycleTests for security options on Windows
Fixes gh-37598
2023-09-27 10:09:44 -05:00
Scott Frederick
7c23c0b3c2 Merge branch '3.1.x' 2023-09-26 18:51:03 -05:00
Scott Frederick
5ae4ba83a7 Merge branch '3.0.x' into 3.1.x 2023-09-26 18:19:48 -05:00
Scott Frederick
7e29a3c70b Use latest available Gradle version for Paketo system tests
This ensures that the tests will run with the latest Java versions.

See gh-37507
2023-09-26 18:19:25 -05:00
Scott Frederick
d37e9424a2 Merge branch '3.1.x'
Closes gh-37589
2023-09-26 14:07:16 -05:00
Scott Frederick
4f8684fd69 Merge branch '3.0.x' into 3.1.x
Closes gh-37588
2023-09-26 14:07:05 -05:00
Scott Frederick
a03e3320a6 Merge branch '2.7.x' into 3.0.x
Closes gh-37587
2023-09-26 14:06:50 -05:00
Scott Frederick
aeeb5cf1f8 Apply Gradle fileMode and dirMode consistently in jar and war archives
Fixes gh-37496
2023-09-26 13:49:19 -05:00
Scott Frederick
c45ad6ce83 Use actual Java version in build image integration tests
See gh-37453
2023-09-22 13:38:37 -05:00
Scott Frederick
e80f743648 Merge branch '3.1.x'
Closes gh-37551
2023-09-22 11:37:00 -05:00
Scott Frederick
3803bd9af9 Merge branch '3.0.x' into 3.1.x
Closes gh-37550
2023-09-22 11:32:28 -05:00
Scott Frederick
7322c078c4 Merge branch '2.7.x' into 3.0.x
Closes gh-37549
2023-09-22 11:32:07 -05:00
Scott Frederick
98bfaf0412 Remove compatibility blocks from Gradle plugin integration tests
Closes gh-37453
2023-09-22 11:28:12 -05:00
Andy Wilkinson
fb15125d01 Merge branch '3.1.x'
Closes gh-37548
2023-09-22 16:30:36 +01:00
Andy Wilkinson
8080bb9cfb Merge branch '3.0.x' into 3.1.x
Closes gh-37547
2023-09-22 16:30:19 +01:00
Johnny Lim
ce813346c9 Add Javadoc since for AbstractAotMojo.getSession()
See gh-37462
2023-09-22 16:29:49 +01:00
Andy Wilkinson
af495b2dc0 Merge branch '3.1.x'
Closes gh-37546
2023-09-22 16:26:48 +01:00
Andy Wilkinson
e4d8b22403 Merge branch '3.0.x' into 3.1.x
Closes gh-37545
2023-09-22 16:26:31 +01:00
Andy Wilkinson
333820627f Merge branch '2.7.x' into 3.0.x
Closes gh-37544
2023-09-22 16:26:21 +01:00
Eric Haag
a2be276dd8 Mock working directory for extract test
Prior to this change, this test would create files in the project
directory. This can cause issues with Gradle caching and up-to-date
checks.

To address this, the value of the working directory is mocked to a
temporary directory like all the other tests.

See gh-37395
2023-09-22 16:24:49 +01:00
Andy Wilkinson
7bb40d50d4 Polish 2023-09-22 16:06:44 +01:00
Andy Wilkinson
1b6f29a1da Merge branch '3.1.x'
Closes gh-37540
2023-09-22 15:51:49 +01:00
Andy Wilkinson
e3c3cb4b47 Merge branch '3.0.x' into 3.1.x
Closes gh-37539
2023-09-22 15:50:28 +01:00
Andy Wilkinson
18b7015552 Merge branch '2.7.x' into 3.0.x
Closes gh-37538
2023-09-22 15:35:45 +01:00
Andy Wilkinson
89a86e91f5 Avoid deprecation warning with Gradle 8.4-rc-1
Closes gh-37493
2023-09-22 15:31:36 +01:00
Moritz Halbritter
ec9ac05d3d Merge branch '3.1.x'
Closes gh-37536
2023-09-22 11:21:53 +02:00
Moritz Halbritter
059bb69705 Merge branch '3.0.x' into 3.1.x
Closes gh-37535
2023-09-22 11:21:37 +02:00
Moritz Halbritter
c991a7b90b Merge branch '2.7.x' into 3.0.x
Closes gh-37534
2023-09-22 11:21:25 +02:00