Mercurial > hg > release > thermostat-0.5
view distribution/config/commands/connect.properties @ 915:0f4271d4e334
Change common options implementation.
This patch removes the old CommonCommandOptions class. Common options - dbUrl,
logLevel, username, password - are now automatically added if the "options"
list in command.properties contains "special" option names such as
AUTO_DB_OPTIONS (dbUrl, username, password) and AUTO_LOG_OPTION (logLevel). If
these are present thermostat adds options as requested automatically. Note that
all automatic options are optional. The required property can be
changed/overridden by using a <option-name>.required key in command.properties
and adding <option-name> to the "options" list AFTER the AUTO_* option.
I've also cleaned up the command.properties files and help command output.
command.properties don't need to maintain "thermostat" any longer. Moreover,
help output contains the description of the command as well. Example:
$ ./distribution/target/bin/thermostat help agent
usage: thermostat agent [-d <url> [-u <user> -p <password>]] [-s] [--debug] [-l
<level>]
starts and stops the thermostat agent
thermostat agent
-d,--dbUrl <dbUrl> connect to the given URL
-l,--logLevel <logLevel> sets the log level for this invocation. Possible
values for <level> in decreasing severity are:
SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
and OFF.
-p,--password <password> the password to use for authentication
-s,--saveOnExit save the data on exit
-u,--username <username> the username to use for authentication
-v,--debug launch with debug console enabled
Finally, this should be the last patch required in order to drop the
storage-core dependency of common-core, since it removes the need for
client-cli to depend on the launcher bundle.
It fixes PR1200 too.
Reviewed-by: ebaron, vanaltj
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-January/005118.html
author | Severin Gehwolf <sgehwolf@redhat.com> |
---|---|
date | Fri, 11 Jan 2013 19:23:03 +0100 |
parents | 7765a6857a8d |
children |
line wrap: on
line source
# In order to support web storage connections we add web bundles here bundles = thermostat-client-cli-${project.version}.jar, \ thermostat-web-common-${project.version}.jar, \ thermostat-web-client-${project.version}.jar, \ thermostat-storage-mongodb-${project.version}.jar, \ mongo.jar, \ commons-beanutils.jar, \ commons-codec.jar, \ commons-collections.jar, \ commons-logging.jar, \ httpcomponents-core.jar, \ httpcomponents-client.jar, \ gson.jar description = persistently connect to storage usage = connect -d <url> [-u <username>] [-p <password>] [-l <level>] options = AUTO_LOG_OPTION, AUTO_DB_OPTIONS, dbUrl dbUrl.required = true