[ http://issues.apache.org/jira/browse/CLI-113?page=comments#action_12434307 ]
David Leal commented on CLI-113:
--------------------------------
The similar product JSAP, provide such utility, it simplify a lot the process of defining
the input argument syntax, because you don't need a Java class for defining the its syntax.
You can look on the following link:
http://www.martiansoftware.com/jsap/doc/ch14.html
as you can see they use xstream and probably from it generates an equivalent Java source class.
The important point is to define a quite general XML syntax.
As you can see the JSAP syntax is language depend, becuase the help node, a better solution
would be to define a help_key, so the application will look in to properties file, via ResourceBundle
class.
I would be a kind of Inverse of Control (IoC) for CLI, you define what you want in a configuration
file, and the application instance the corresponding parser after XML validation the Java
validation will be simpler.
David Leal
> generate ant task automatically from CLI
> ----------------------------------------
>
> Key: CLI-113
> URL: http://issues.apache.org/jira/browse/CLI-113
> Project: Commons CLI
> Issue Type: Improvement
> Environment: Operating System: other
> Platform: Other
> Reporter: pklein
> Priority: Minor
> Fix For: 2.1
>
>
> I'd like to suggest an enhancement to CLI -
> 1) have CLI generate a schema of the command line options it expects
> 2) write some code to read the schema, and generate an ant task
> Any project using CLI would then be able to easily produce an ant task.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|