Polish "Tighten up PropertiesLauncher's contract"
See gh-8346 Closes gh-7221
This commit is contained in:
@@ -214,7 +214,10 @@ NOTE: `PropertiesLauncher` supports loading properties from
|
||||
just like a regular `-classpath` on the `javac` command line.
|
||||
|
||||
|`loader.home`
|
||||
|Used to resolve relative paths in `loader.path`. E.g. `loader.path=lib` then `${loader.home}/lib` is a classpath location (along with all jar files in that directory). Also used to locate a `loader.properties file`. Example `file:///opt/app` (defaults to `${user.dir}`).
|
||||
|Used to resolve relative paths in `loader.path`. E.g. `loader.path=lib` then
|
||||
`${loader.home}/lib` is a classpath location (along with all jar files in that
|
||||
directory). Also used to locate a `loader.properties file`. Example `file:///opt/app`
|
||||
(defaults to `${user.dir}`).
|
||||
|
||||
|`loader.args`
|
||||
|Default arguments for the main method (space separated)
|
||||
@@ -271,21 +274,24 @@ TIP: Build plugins automatically move the `Main-Class` attribute to `Start-Class
|
||||
the fat jar is built. If you are using that, specify the name of the class to launch using
|
||||
the `Main-Class` attribute and leave out `Start-Class`.
|
||||
|
||||
* `loader.properties` are searched for in `loader.home` then in the root of the classpath,
|
||||
then in `classpath:/BOOT-INF/classes`. The first location that exists is used.
|
||||
* `loader.home` is only the directory location of an additional properties file (overriding
|
||||
the default) as long as `loader.config.location` is not specified.
|
||||
* `loader.properties` are searched for in `loader.home` then in the root of the
|
||||
classpath, then in `classpath:/BOOT-INF/classes`. The first location that exists is
|
||||
used.
|
||||
* `loader.home` is only the directory location of an additional properties file
|
||||
(overriding the default) as long as `loader.config.location` is not specified.
|
||||
* `loader.path` can contain directories (scanned recursively for jar and zip files),
|
||||
archive paths, or wildcard patterns (for the default JVM behavior).
|
||||
* `loader.path` (if empty) defaults to `BOOT-INF/lib` (meaning a local directory or a
|
||||
nested one if running from an archive). Because of this `PropertiesLauncher` behaves the
|
||||
same as `JarLauncher` when no additional configuration is provided.
|
||||
* `loader.path` can not be used to configure the location of `loader.properties` (the classpath
|
||||
used to search for the latter is the JVM classpath when `PropertiesLauncher` is launched).
|
||||
* `loader.path` can not be used to configure the location of `loader.properties` (the
|
||||
classpath used to search for the latter is the JVM classpath when `PropertiesLauncher`
|
||||
is launched).
|
||||
* Placeholder replacement is done from System and environment variables plus the
|
||||
properties file itself on all values before use.
|
||||
* The search order for properties (where it makes sense to look in more than one place)
|
||||
is env vars, system properties, `loader.properties`, exploded archive manifest, archive manifest.
|
||||
is env vars, system properties, `loader.properties`, exploded archive manifest, archive
|
||||
manifest.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user