This commit reworks BootRun so that it no longer subclasses JavaExec.
This provides Boot with greater control of how the executed JVM is
configured, including the possibility of using @Option to provide args
and JVM args via the command line (gh-1176). It also allows some usage
of convention mappings to be removed in favour of PropertyState and
Provider (gh-9891). For users who relied up the advanced (and rather
complex) configuration options provided by JavaExec, an escape hatch
is provided by allowing the JavaExecSpec that's used to execute the
JVM to be customized.
Closes gh-9884
This commit uppgrade our Log4j dependency to 2.9.1. It also modifies
ModifiedClassPathRunner so that log4j-*.jar jars are always excluded
from the class path when using the runner. This is necessary due to
a change in Log4j [1] which makes assumptions about the class loader
hierarchy that do not hold true when using the modified class path
runner. Specifically, it assumes that the system class loader should
always be used to load providers. This is exactly what we don't want
to happen when using the modified class path runner as it breaks the
filtering of the class path and leads to Log4j classes being loaded
from both the system class loader and the filtering class loader.
Closes gh-10407
[1] 9422ca7489
In Java 9, a package may return null for its implementation version
even when the manifest attribute specifying the version is present
in the jar from which the package was loaded.
This commit updates DependencyManagementPluginAction to fall back to
accessing the jar and its manifest attributes directly when the
implementation version of its package is null.
Closes gh-10049
This commit introduces a DefaultEnablement enum that replaces the
"enabledByDefault" boolean flag of Endpoint. This allows to better
control what indicates the default enablement of an endpoint.
With DefaultEnablement#ENABLED, the endpoint is enabled unless an
endpoint specific property says otherwise. With DefaultEnabled#DISABLED,
the endpoint is disabled unless an endpoint specific property says
otherwise. DefaultEnablement#NEUTRAL provides a dedicated option to
indicate that we should resort to the default settings in absence of
a specific property.
See gh-10161
Following the rework on Security that expects web endpoints to be
disabled by default, this commit updates the metadata (including the
automatic generation) to reflect this decision.
This commit improves the configuration metadata annotation processor to
explicitly handle `@Endpoint` annotated class. Adding a new endpoint on
a project potentially creates the following keys:
* `endpoints.<id>.enabled`
* `endpoints.<id>.cache.time-to-live`
* `endpoints.<id>.jmx.enabled`
* `endpoints.<id>.web.enabled`
Default values are extracted from the annotation type. If an endpoint
is restricted to a given tech, properties from unrelated techs are not
generated.
Closes gh-9692
Previously when Handler was creating a URL from a context URL and a
spec, any occurrances of /../ or /./ in the spec would be left as-is.
This differed from the JDK's Handler implementation which normalizes
the URL by modifying the path to remove any occurrences of /../ or
/./
This commit updates our Handler implementation to align it with the
JDK's. Tests have been added to assert that, given the same inputs,
the two Handler classes produce the same output.
Closes gh-9917