incubator-any23-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: CLI evaluator
Date Wed, 18 Jan 2012 07:58:18 GMT
Hi Mic,
thanks a lot for the hints, I'll try to give an experiment as soon as
I have the chance - I'll keep track of the activity on an issue with
patches, to avoid to break the current behavior.
All the best!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Tue, Jan 17, 2012 at 5:48 PM, Michele Mostarda
<michele.mostarda@gmail.com> wrote:
> On 17 January 2012 14:47, Simone Tripodi <simonetripodi@apache.org> wrote:
>
>> Hi all/Michele,
>>
>
> Hi Guys,
>
>>
>> while reading the core source, I noticed that CLI is managed via the
>> outdated commons-cli, I tried to replaced it with something more
>> sophisticated like JCommander[1] (ASL2.0) but I stopped as soon as I
>> started because I noticed the code uses custom annotations, so worried
>> about breaking something, I gave up.
>>
>> My question is: can you give me please a little of background about
>> the CLI design?
>>
>
> Well, any org.apache.any23.cli.Tool implementation provides a static void
> main(String[])
> access point which allows to run it directly.
>
> There is however a special CLI tool called org.apache.any23.cli.ToolRunner
> which takes
> care to detect all the CLI Tool implementations declared within the class
> path
> (asking also to the PluginManager) and drive an 'assisted' invocation.
>
> The invocation of org.apache.any23.cli.ToolRunner without parameters will
> list all the
> available Tools. To invoke a specific Tool just run:
>
> org.apache.any23.cli.ToolRunner <tool-class-simple-name>
> [<specific-tool-params>]
>
> The replacement of commons-cli with another options parsing library will
> not interfere
> with the custom annotations applied to the org.apache.any23.cli.Tool
> instances in any way.
>
> Let me know if you need any further explanation.
>
> Bye
>
> Mic
>
>
>> Any hint/help would be really appreciated!
>> Many thanks in advance, all the best!
>> -Simo
>>
>> [1] http://jcommander.org/
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>
>
>
> --
> Michele Mostarda
> Senior Software Engineer
> skype: michele.mostarda
> twitter: micmos
> mail: me@michelemostarda.com
> site : http://www.michelemostarda.com

Mime
View raw message