Apache CLI: Required options contradicts with help option.
<p>If I have 2 options defined as required such as:</p>

<pre><code> public static void main(String [] args){
      Options options= new Options();
      Option  inputFileOp=Option.builder("i").longOpt("input").hasArg().desc("Input file").argName("file").required().build();
        options.addOption(inputFileOp);

      Option outputFileOp=Option.builder("o").longOpt("output").hasArg().desc("Output file").argName("file").required().build();
        options.addOption(outputFileOp);
</code></pre>

<p>and a help option </p>

<pre><code>    Option helpOp =new Option("h",false,"Show Help");
    helpOp.setLongOpt("help");
    helpOptions.addOption(helpOp);
</code></pre>

<p>and parser</p>

<pre><code>DefaultParser parser = new DefaultParser();
CommandLine cmd=parser.parse(options,args);

if(cmd.hasOption(helpOp.getOpt())){
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp( "MyApp.sh", options );
        System.exit(0);
    }

}
</code></pre>

<p>When the user input for example myApp -h .. An exception is raised in the parsing step  that there are missing required options, While I want to print the help data.</p>

<p>How to allow calling the help while keeping these options declared as required? </p>