Update nested JAR support to only obtain JUL loggers when absolutely
necessary and to defensively deal with failures.
Prior to this commit it was not possible to override
`java.util.logging.manager` to use a nested JAR as the logger
implementation.
Fixes gh-9848
In Gradle 4.x, SourceSetOutput now has multiple classes directories
and getClassesDir() has been deprecated. This commit introduces the
use of reflection to use getClassesDirs() when it's available rather
than getClassesDir().
Closes gh-9559
Calling launch of PropertiesLauncherTests sets the thread context
class loader to an instance of LaunchedURLClassLoader. To avoid this
class loader being used beyond the scope of the test and launcher
that created it, this commit updates PropertiesLauncherTests to
capture the TCCL before each test and restore it after each test.
Closes gh-9378
This commit allows to specify a deprecation level to a manual metadata
entry. The purpose of that new attribute is to distinguish cases where
the property is still bound (default) from cases where the property no
longer exists and won't be bound.
This gives the opportunity to IDEs to still show the property as an
error and offer documentation and an action to rename it if a
replacement exists.
Closes gh-9074
Previously, if lombok was running before the configuration metadata
annotation processor, duplicated keys were created as both the
getter/setter and the special lombok handling applied.
This commit makes sure to be lenient by removing duplicate metadata
entries. This commit also makes sure to identify the getter of a
nested group if present. That way, the sourceMethod is set consistently
and avoid the creation of a duplicate group.
Closes gh-8886
This commit makes sure the integration tests use the same versions as
the one managed by `spring-boot-dependencies` (including Maven plugins).
Closes gh-8947
Update `PropertiesLauncher` so that classes can be loaded outside of
`BOOT-INF/classes`. You can use a subdirectory, or the root directory
of an external jar (but not the parent archive to avoid issues
with agents and awkward delegation models).
Fixes gh-8480
Closes gh-8486
Previously, jars (either top-level or nested) in Zip64 format were
treated as normal jar files. This would lead to a failure later on
when an attempt was made to read an entry from the file.
This commit updates the loader to fail fast when it encounters a
Zip64 jar file. Such files are identified by the number of entries
in the central directory end record being 0xFFFF.
Closes gh-8735
Previously, only IOExceptions were caught and wrapped in a new
IOException that included the name of the nested entry that was
being read.
Following this commit, any Exception is caught and wrapped so that the
problematic entry can be identified in more failure scenarios.
Closes gh-8711
Previously, each entry in loader.path could only refer to a standard
jar file. Refering to such a jar would add all of the classes in
the root of the jar to the class path.
This commit adds support for referencing a directory within a jar file
that contains one or more nested jars. For example:
$ java -jar -Dloader.path='jar:file:./lib.jar/!BOOT-INF/lib' my.jar
This will add all of the classes in all of that jars in the
BOOT-INF/lib directory of lib.jar to the class path.
See gh-8334
The main changes are:
- Switch to `loader.properties` instead of `application.properties`
- Search for `loader.properties` in `loader.home` as well as in
the classpath
- Placeholder replacements in MANIFEST.MF (using `loader.properties`
or system/env vars)
See gh-7221
Closes gh-8346