The JreProxySelector is used it to adjust the repositories
as they are added to the GrapeEngine. It looks at standard
System proeprties like http.proxyHost and http.proxyPort
and in addition consults standard JRE Authenticator features
for credentials (falling back to System properties
http.proxyUser and http.proxyPassword).
Fixes gh-136
Aether apparently doesn't use the java.net.* APIs for
TCP connections so it doesn't notice when a user sets
-Dhttp.Proxy*. To fix it is painful, and leads me to
suspect that actually we might want to parse a
settings.xml at some point (however unpalatable that
is).
For now I have added a Proxy to all RemoteRepository
instances that we create in the CLI if the user
has set -Dhttp.proxyHost (and/or -Dhttps.proxyHost for
a secure repository).
TODO: authentication. Is there a standard way to specify
that globally via system properties.
TODO: maybe use per-repository settings if provided
(e.g. in settings.xml).
Previously all EventListeners were eagerly instantiated
but that can cause problems because it happens quite early
in the lifecycle. Better to be explicit about the
supported types.
* Underscores are allowed as nested property field separators
* System and env vars are only considered for binding if they
look like they apply to a given bean when ignoreUnknownFields
is false
In case Spring Security is missing from the class path, shell auto configuration will now fall back gracefully to simple authentication and emit warning to the console.
fixes#114
@ConfigurationProperties(ignoreUnkownFields=false,ignoreNestedFields=true)
is now a useful option for binding to "top-level" command line options
(without a prefix). In that case we don't try to bind to `server.*` and
other common prefixed property values (at the cost of not being able to
bind to nested beans).
This leverages existing capabilities of teh JDK and the OS
to grab a port at random and not have it stolen by another
process. It's very hard to avoid that race condition in
pure Java code, so why bother?
User can set port<0 to disable autoStart of connectors (e.g.
to start a web application context but not have it listen on
any port). In that case the actual socket port will be set to
0 (and therefore if it ever starts up the local port will
be random).