@@ -0,0 +1,1447 @@
+package picocli.examples.arggroup;%0A%0Aimport picocli.CommandLine;%0Aimport picocli.CommandLine.*;%0Aimport picocli.CommandLine.Model.CommandSpec;%0A%0A// see https://stackoverflow.com/questions/61963756/picocli-dependent-arguments-in-arggroup%0Apublic class SO61963756 implements Runnable %7B%0A%0A    static class MyGroupX %7B%0A        @Option(names=%22-A1%22, required=false) boolean A1;%0A        @Option(names=%22-A2%22, required=false) boolean A2;%0A    %7D%0A%0A    static class MyGroup %7B%0A        @Option(names=%22-A%22, required=true) boolean A;%0A        @ArgGroup(exclusive=false, multiplicity=%221%22) MyGroupX myGroupX;%0A    %7D%0A%0A    @ArgGroup(exclusive=false) MyGroup myGroup;%0A%0A    @Spec CommandSpec spec;%0A%0A    @Override%0A    public void run() %7B%0A        System.out.printf(%22OK: %25s%25n%22, spec.commandLine().getParseResult().originalArgs());%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        //test: these should be valid%0A        new CommandLine(new SO61963756()).execute();%0A        new CommandLine(new SO61963756()).execute(%22-A -A1%22.split(%22 %22));%0A        new CommandLine(new SO61963756()).execute(%22-A -A2%22.split(%22 %22));%0A        new CommandLine(new SO61963756()).execute(%22-A -A1 -A2%22.split(%22 %22));%0A%0A        //test: these should FAIL%0A        new CommandLine(new SO61963756()).execute(%22-A%22);%0A        new CommandLine(new SO61963756()).execute(%22-A1%22);%0A        new CommandLine(new SO61963756()).execute(%22-A2%22);%0A        new CommandLine(new SO61963756()).execute(%22-A1 -A2%22.split(%22 %22));%0A    %7D%0A%7D

add example for https://stackoverflow.com/questions/61963756/picocli-dependent-arguments-in-arggroup