Bugs/missing documentation in JCli API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jcli |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The following test class shows three things which weren't clear from the example or the JavaDocs.
1. @Cli is not mentioned on the example page
2. the longName version of an option is never set if it contains a dash ("-")
3. the ArgumentProcessor does not enforce required options
import java.io.File;
import org.cyclopsgrou
import org.cyclopsgrou
import org.cyclopsgrou
// NB: JCli example page does not mention @Cli
@Cli(name = "test")
public class TestLongName {
File srcDir;
public static void main(String[] args) {
TestLongName pojo = new TestLongName();
ArgumentProce
argProcessor.
System.
}
// NB: longName options which include "-" are never set
// NB: required options are not enforced
@Option(name="s", longName="src-dir", required = true)
public void setSrcDir(File srcDir) {
this.srcDir = srcDir;
}
}
Changed in jcli: | |
status: | New → Confirmed |
Changed in jcli: | |
status: | Confirmed → Fix Committed |
Changed in jcli: | |
status: | Fix Committed → Fix Released |
Another point about the http:// wiki.cyclopsgro up.org/ jcli:example page. The @Argument values will be silently ignored unless a setArguments() method is implemented.