Commit Graph

295 Commits

Author SHA1 Message Date
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
Andy Wilkinson
012fbb3a57 Merge branch '2.6.x' into 2.7.x
Closes gh-31949
2022-08-01 20:51:18 +01:00
Andy Wilkinson
c0daede1aa Ensure that jarmode jar added to an app has same SHA as published jar
Closes gh-31862
2022-08-01 20:49:10 +01:00
Phillip Webb
7377d85096 Merge branch '2.7.x'
Closes gh-31866
2022-07-26 12:18:14 +01:00
Phillip Webb
a4ef6a7c5c Merge branch '2.6.x' into 2.7.x
Closes gh-31865
2022-07-26 12:13:16 +01:00
Phillip Webb
f8412847dc Update copyright year for "Fix typos in code and documentation"
See gh-31734
2022-07-26 12:08:30 +01:00
Marc Wrobel
dbfc6bded4 Fix typos in code and documentation
See gh-31734
2022-07-26 12:08:07 +01:00
dreis2211
cc91009b70 Use java.util.HexFormat where appropriate
See gh-31477
2022-06-21 17:02:39 +01:00
dreis2211
5db04da275 Use pattern matching for instanceof where appropriate
See gh-31475
2022-06-20 17:55:36 +01:00
Andy Wilkinson
4bb5ba2bd0 Merge branch '2.7.x' 2022-05-26 18:26:52 +01:00
Andy Wilkinson
935d1264e0 Merge branch '2.6.x' into 2.7.x 2022-05-26 18:13:08 +01:00
Andy Wilkinson
3d203d0215 Polish 2022-05-26 17:30:39 +01:00
Andy Wilkinson
5dfa5adb75 Merge branch '2.7.x'
Closes gh-31178
2022-05-26 15:54:58 +01:00
Andy Wilkinson
455ee0ce22 Merge branch '2.6.x' into 2.7.x
Closes gh-31177
2022-05-26 15:53:38 +01:00
Andy Wilkinson
ee45fd2fc8 Remove redundant throws declarations from internal APIs
Closes gh-31176
2022-05-26 15:47:35 +01:00
Phillip Webb
f8a41d34aa Merge branch '2.7.x' 2022-05-17 22:22:08 -07:00
Andy Wilkinson
6c4fedb4a4 Revert "Logback 1.3 and SLF4J 2.0"
This reverts commit f39a080a0e that was
pushed prematurely.
2022-05-13 16:23:48 +01:00
Andy Wilkinson
f39a080a0e Logback 1.3 and SLF4J 2.0 2022-05-13 14:48:20 +01:00
Andy Wilkinson
eacd8c04a5 Merge branch '2.7.x' 2022-04-25 15:03:52 +01:00
Andy Wilkinson
56690a7eb9 Merge branch '2.6.x' into 2.7.x
Closes gh-30791
2022-04-25 15:03:32 +01:00
Andy Wilkinson
409ec48e2a Merge branch '2.5.x' into 2.6.x
Closes gh-30790
2022-04-25 15:00:51 +01:00
Andy Wilkinson
193ef9a06d Package META-INF/services/ files beneath BOOT-INF/classes/
Closes gh-30413
2022-04-25 14:32:47 +01:00
Scott Frederick
85ea6a1b8f Merge branch '2.7.x' into main 2022-02-11 15:31:33 -06:00
Scott Frederick
db6ef0e802 Exclude duplicate properties file when building a jar from jars
See gh-29670 and gh-23955
2022-02-11 15:31:20 -06:00
Andy Wilkinson
de3b9a4910 Remove code deprecated for removal in 2.x
Closes gh-29482
2022-01-19 17:25:14 +00:00
Phillip Webb
e1c84e2972 Merge branch '2.6.x' into 2.7.x
Closes gh-29372
2022-01-12 14:07:48 -08:00
Phillip Webb
72696cdb0f Merge branch '2.5.x' into 2.6.x
Closes gh-29371
2022-01-12 14:07:31 -08:00
Phillip Webb
9cf55808fb Ensure run user actually exists
Update `launch.script` so that the `run_user` variable is only set when
the user actually exists. Prior to this commit, if the jar file was
owned by a non-existing user the startup script could fail.

Fixes gh-29370
2022-01-12 14:05:30 -08:00
Andy Wilkinson
508d0af453 Merge branch '2.6.x' into 2.7.x
Closes gh-29269
2022-01-05 11:58:33 +00:00
Andy Wilkinson
a6d8ff4677 Merge branch '2.5.x' into 2.6.x
Closes gh-29268
2022-01-05 11:58:03 +00:00
Andy Wilkinson
41b01cc289 Only write parent entries when entry is new
Previously, when writing a repackaged jar, an attempt to write all of
an entry's parent directories would always be made, irrespective of
whether or not the entry itself had already been written. This was
inefficient as, due to the way that the jar is written, once an entry
itself has been written, we know that all of its parent directories
will also have been written.

This commit updates the jar writer so that no attempt is made to
write parent directory entries if the entry itself has already been
written.

Fixes gh-29175
2022-01-05 11:49:48 +00:00
Phillip Webb
f3bcbca841 Update copyright year of changed files 2021-12-16 13:05:17 -08:00