[ 
https://issues.apache.org/jira/browse/CLI-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953607#comment-16953607
 ] 

Richard commented on CLI-298:
-----------------------------

Strictly speaking I suppose they are properties files since (at the moment) all 
definition take the form x=y.

So right now they are configuration files that are property-based.

However, I am not sure if this will always hold since there are more phases to 
this to finish. For example adding builder and checkers to get values as 
integral values and checking that the values are correct according to 
user-defined 'properties'. This will greatly reduce the amount of code users 
have to write.

As it stands, I believe that future updates (I plan to finish this by the end 
of next week) will take the same form.

I assume that you're thinking that it would be worthwhile renaming the test 
files to .properties instead of .conf?

The reason I've not read them in as a properties file is that there's a strict 
format to which the options appear which I believe reading as a properties file 
would break.

What are your thoughts on this?

> Define CLI options via configuration file
> -----------------------------------------
>
>                 Key: CLI-298
>                 URL: https://issues.apache.org/jira/browse/CLI-298
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: Options definition
>    Affects Versions: 1.5, Nightly Builds
>            Reporter: Richard
>            Priority: Minor
>              Labels: newbie, pull-request-available, ready-to-commit
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Create a configuration that enables users to define CLI options via a 
> configuration file. Such configuration would normally pre-defined and bundled 
> inside the executable jar running the application. This would reduce the 
> amount of code required to define command line options and introduce the 
> ability to do a lot of the checking a user does (such as converting values to 
> integers, files, checking if integers are above/below a certain amount, 
> checking that files or directories do/don't exist etc.) For security 
> purposes, at compile time calculate an MD5 for the application, if this 
> doesn't match at runtime warn of corrupted file exception. Also add I18N 
> since this will be driven via the user experience for exception messages.
> So far I've catered for basic options that utilise strings.
> Code already started with a pull request at 
> [https://github.com/zendawg/commons-cli] underneath the branch named 
> "cli-configuration".
> Apologies in advance, never contributed to Apache SWF before.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to