adammurdoch 2002/06/16 17:15:56
Modified: container/src/java/org/apache/myrmidon/frontends
CLIMain.java Resources.properties
Log:
Added -S command-line option, which sets service parameters. The params end
up in the Context handed to each service.
Revision Changes Path
1.51 +12 -4
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/frontends/CLIMain.java
Index: CLIMain.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/frontends/CLIMain.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- CLIMain.java 13 Jun 2002 04:24:40 -0000 1.50
+++ CLIMain.java 17 Jun 2002 00:15:56 -0000 1.51
@@ -59,6 +59,7 @@
private static final int LISTENER_PARAM_OPT = 'L';
private static final int NO_PREFIX_OPT = 'p';
private static final int GUI_OPT = 'g';
+ private static final int SERVICE_PARAM_OPT = 'S';
private static final int VERSION_OPT = 1;
private static final int LISTENER_OPT = 2;
private static final int LISTENER_CONFIG_OPT = 3;
@@ -75,9 +76,9 @@
{
HELP_OPT, QUIET_OPT, VERBOSE_OPT, FILE_OPT,
LOG_LEVEL_OPT, LISTENER_PARAM_OPT,
- NO_PREFIX_OPT, VERSION_OPT, LISTENER_OPT, LISTENER_CONFIG_OPT,
- EXTLIB_DIR_OPT, INCREMENTAL_OPT, HOME_DIR_OPT, DRY_RUN_OPT,
- TYPE_OPT, BANNER_OPT
+ NO_PREFIX_OPT, SERVICE_PARAM_OPT, VERSION_OPT, LISTENER_OPT,
+ LISTENER_CONFIG_OPT, EXTLIB_DIR_OPT, INCREMENTAL_OPT,
+ HOME_DIR_OPT, DRY_RUN_OPT, TYPE_OPT, BANNER_OPT
};
//incompatable options for other logging options
@@ -252,6 +253,10 @@
CLOptionDescriptor.ARGUMENT_REQUIRED,
HOME_DIR_OPT,
REZ.getString( "home.opt" ) ),
+ new CLOptionDescriptor( "serviceparam",
+ CLOptionDescriptor.ARGUMENTS_REQUIRED_2
| CLOptionDescriptor.DUPLICATES_ALLOWED,
+ SERVICE_PARAM_OPT,
+ REZ.getString( "serviceparam.opt" ) ),
new CLOptionDescriptor( "dryrun",
CLOptionDescriptor.ARGUMENT_DISALLOWED,
DRY_RUN_OPT,
@@ -307,6 +312,9 @@
break;
case EXTLIB_DIR_OPT:
embeddedAnt.setEmbeddorProperty( "myrmidon.ext.path",
option.getArgument() );
+ break;
+ case SERVICE_PARAM_OPT:
+ embeddedAnt.setEmbeddorProperty( option.getArgument( 0
), option.getArgument( 1 ) );
break;
case LOG_LEVEL_OPT:
1.15 +1 -0
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/frontends/Resources.properties
Index: Resources.properties
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/frontends/Resources.properties,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Resources.properties 2 Jun 2002 05:03:46 -0000 1.14
+++ Resources.properties 17 Jun 2002 00:15:56 -0000 1.15
@@ -13,6 +13,7 @@
listenerconfig.opt=Specify the listener configuration file.
version.opt=Display version.
extlib.opt=Specify the path to use to search for optional packages.
+serviceparam.opt=Define a service parameter.
incremental.opt=Run in incremental mode.
home.opt=Specify Ant home directory.
define.opt=Define a property (ie -Dfoo=var).
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>