Commit Graph

326 Commits

Author SHA1 Message Date
Andy Wilkinson
28a887ad0f Raise minimum supported version of Gradle
Closes gh-41180
2024-06-21 14:52:22 +01:00
Andy Wilkinson
cf447e3aa6 Merge branch '3.2.x'
Closes gh-40931
2024-05-28 16:52:32 +01:00
Andy Wilkinson
5ee0580339 Upgrade to the latest Framework 6.0.x release
Closes gh-40929
2024-05-28 16:52:00 +01:00
Moritz Halbritter
d3e49747b0 Merge branch '3.2.x' 2024-05-02 14:48:37 +02:00
Moritz Halbritter
75dac1435f Merge branch '3.1.x' into 3.2.x 2024-05-02 14:48:04 +02:00
Moritz Halbritter
68a63a7797 Polish 2024-05-02 14:47:53 +02:00
Moritz Halbritter
3ab21ce146 Merge branch '3.2.x'
Closes gh-40118
2024-03-27 09:42:59 +01:00
Moritz Halbritter
957facf1cc Merge branch '3.1.x' into 3.2.x
Closes gh-40117
2024-03-27 09:35:44 +01:00
Moritz Halbritter
ff66036e90 Remove redundant Regex escapes
Closes gh-40116
2024-03-27 09:34:28 +01:00
Moritz Halbritter
4047c00aa5 Implement SBOM actuator endpoint
Closes gh-39799
2024-03-21 18:06:48 -07:00
Moritz Halbritter
793aca60d2 Implement extract and list-layers command
Adds a new jarmode called 'tools'. This provides two commands,
'extract' and 'list-layers'. list-layers is the same as list from
the layertools.

extract is able to extract the JAR in four different modes:

- CDS compatible extraction with libraries in a lib folder and a runner
.jar
- CDS compatible as above, but with layers
- Launcher based
- Launcher based with layers. This is essentially the same as extract
  from the layertools

The commands in layertools have been deprecated in favor of the commands
in 'tools'.

This also changes the behavior of layers.enabled from the Gradle and
Maven plugin: before this commit, layers.enabled prevents the inclusion
of the layer index file as well as the layertools JAR.
After this commit, layers.enabled only prevents the inclusion of the
layer index file.

layer.includeLayerTools have been deprecated in favor of includeTools,
and the layertools JAR has been renamed to tools.

Closes gh-38276
2024-03-07 13:34:13 +01:00
Andy Wilkinson
5ae533a00d Minimize scope of version management for commons-compress
See gh-39368
2024-02-06 15:08:15 +00: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
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
Phillip Webb
8f1a330dd5 Update copyright header of cleaned up code
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
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
Phillip Webb
3eeb1b2849 Merge branch '3.1.x' 2023-10-19 23:21:42 -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
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
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
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
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
Andy Wilkinson
ca5bd37e81 Upgrade to Spring Framework 6.1.0-M1
Closes gh-35977
Closes gh-35980
2023-06-19 18:12:16 +01:00
Johnny Lim
ff9fd1abeb Polish
See gh-35185
2023-05-10 08:31:36 +02:00
Phillip Webb
f5cf821479 Merge branch '2.7.x' into 3.0.x
Closes gh-34430
2023-03-01 21:28:51 -08:00
Phillip Webb
998d59b7ac Ignore system timezone when applying outputTimestamp to entries
Update `JarWriter` so that entry times are set with the default TimeZone
offset removed. The Javadoc for `ZipEntry.setTime` states:

  The file entry is "encoded in standard `MS-DOS date and time format`.
  The default TimeZone is used to convert the epoch time to the MS-DOS
  data and time.

Removing the offset from our UTC time before calling `entry.setTime()`
ensures that we get consistent bytes in the zip file when the output
stream reapplies the offset during write.

Fixes gh-34424
2023-03-01 21:27:08 -08:00
Phillip Webb
c4de86c244 Merge branch '2.7.x' into 3.0.x 2023-02-21 23:17:57 -08:00
Phillip Webb
df5898a146 Reformat code following spring-javaformat upgrade 2023-02-21 22:53:27 -08:00
Krzysztof Krason
94996664bc Drop unnecessary Collections.unmodifiableSet
See gh-33987
2023-01-26 20:47:35 -08:00
Krzysztof Krason
d3efd7e091 Use try with close
See gh-33987
2023-01-26 20:36:38 -08:00
Phillip Webb
a2ac38e203 Update copyright year of changed files 2023-01-09 15:46:07 -08:00
Krzysztof Krason
cf6493f65c Simplify AssertJ assertions and also make them more readable
See gh-33653
2023-01-09 11:10:20 +01:00
Phillip Webb
f588793445 Update copyright year of changed files 2022-12-22 01:00:42 -08:00
Moritz Halbritter
725337f976 Make fields final
Closes gh-33537
2022-12-16 14:28:44 +01:00
Moritz Halbritter
c6536c54d8 Write native-image argfile only if there are excludes
Refactors duplicate logic in BootZipCopyAction and Packager into
separate classes.

Closes gh-33363

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2022-11-30 14:29:35 +01:00
Phillip Webb
c16c6bc3b5 Fix reachability argfile format
Update the argfile to a format that actually works when
passed to the `native-image` command.

See gh-32738
2022-10-17 18:59:50 -07:00
Phillip Webb
8358a0e3f3 Fix reachability-metadata.properties location
Update tools to use the correct `reachability-metadata.properties`
location which should include the version number.

See gh-32738
2022-10-17 14:31:38 -07:00
Phillip Webb
071649360b Generate 'META-INF/native-image/argfile' file for buildpack use
Update the Maven and Gradle plugin to generate an `argfile` file
file under `META-INF/native-image` that contains `--exclude-config`
arguments that should be passed when generating a native image.

The contents of the file is generated for each nested jar that has a
`reachability-metadata.properties` file containing 'override=true'.

The `reachability-metadata.properties` file is expected to be generated
by the Graal native build tools plugin.

Closes gh-32738
2022-10-14 15:23:06 -07:00
Phillip Webb
e0b67889a8 Use Stream.toList instead of Stream.collect when possible
Update code to make use of `Stream.toList()` whenever possible.

Closes gh-28177
2022-10-04 00:29:22 -07:00
dreis2211
65ef8fc51a Use ByteArrayOutputStream.toString where possible
See gh-32534
2022-09-29 15:03:24 +02:00
dreis2211
f0b4a65546 Avoid usage of StringBuffer where possible
See gh-32519
2022-09-29 09:29:10 +02:00
Andy Wilkinson
0bfa9cd704 Upgrade to Logback 1.4 and SLF4J 2.0
Closes gh-12649
2022-09-28 21:14:08 +01:00
Andy Wilkinson
8a2cdb9759 Merge branch '2.7.x'
Closes gh-31950
2022-08-01 20:51:40 +01:00