Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-253

Unrecognized option: --null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.3, 1.3.1
    • None
    • CLI-1.x
    • None

    Description

      groovy project uses commons-cli in following way:

      options.addOption(OptionBuilder.hasArg().withArgName("path").withDescription("Specify where to find the class files - must be first argument").create("classpath"));
      options.addOption(OptionBuilder.withLongOpt("classpath").hasArg().withArgName("path").withDescription("Aliases for '-classpath'").create("cp"));
      

      https://github.com/groovy/groovy-core/blob/GROOVY_1_8_X/src/main/org/codehaus/groovy/tools/FileSystemCompiler.java#L297-L298

      When called with long option "--classpath ...", it throws exception:
      org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --null

      Same code works fine with commons-cli 1.2.

      Attachments

        Issue Links

          Activity

            People

              britter Benedikt Ritter
              msrb Michal Srb
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: