view distribution/config/commands/storage.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 6cd46e3563ce
children
line wrap: on
line source

bundles = thermostat-agent-core-@project.version@.jar, \
          thermostat-osgi-process-handler-@project.version@.jar, \
          thermostat-agent-cli-@project.version@.jar, \
          thermostat-common-command-@project.version@.jar, \
          thermostat-agent-command-@project.version@.jar, \
          commons-codec.jar, \
          netty.jar

description = starts and stops the thermostat storage

usage = storage <--start|--stop> [--dryRun] [-q] [-l <level>]

options = dryRun, start|stop, quiet, AUTO_LOG_OPTION

dryRun.short = d
dryRun.long = dryRun
dryRun.hasarg = false
dryRun.required = false
dryRun.description = run the service in dry run mode

start.long = start
start.hasarg = false
start.required = false
start.description = start the database

stop.long = stop
stop.hasarg = false
stop.required = false
stop.description = stop the database

quiet.short = q
quiet.long = quiet
quiet.hasarg = false
quiet.required = false
quiet.description = don't produce any output