Apache Commons CLI is distributed from Apache Commons project, which is command line option analysis library. We can use it going through three phase, definition, analysis, use.

However, using CLI, it requests a very bad programming, I personally think. The bad programming is appeared in definition phase. For example, we must write followng code to define block-size option of ls command.

options.addOption( OptionBuilder.withLongOpt( "block-size" )
                                .withDescription( "use SIZE-byte blocks" )
                                .withValueSeparator( '=' )

I think above code is not beautiful. Therefore, one of the answer to solve this issue, you describe command line option definition in the xml document and the xmlcli parses it. Then, Like above code is not appeared in the source code.