@@ -0,0 +1,2469 @@
+package picocli;%0A%0Aimport picocli.CommandLine.ArgGroup;%0Aimport picocli.CommandLine.Command;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.concurrent.Callable;%0A%0A// https://github.com/remkop/picocli/issues/1815%0Apublic class Issue1815Group %7B%0A    @Command(name = %22groups%22, mixinStandardHelpOptions = true,%0A        description = %22groups fun%22)%0A    static class CmdTest implements Callable%3CInteger%3E %7B%0A%0A        @ArgGroup(validate = false, heading = %22GROUP A%25n%22, multiplicity = %220..1%22)%0A        private List%3CGroupA%3E a = new ArrayList%3CGroupA%3E();%0A%0A//        @ArgGroup(validate = true, exclusive = false, heading = %22GROUP A%25n%22, multiplicity = %220..1%22)%0A//        private GroupA a = new GroupA();%0A%0A        @ArgGroup(validate = false, heading = %22GROUP B%25n%22)%0A        private GroupB b = new GroupB();%0A%0A        public Integer call() %7B%0A            System.out.println(a);%0A            System.out.println(b);%0A            return 0;%0A        %7D%0A%0A        public static void main(String%5B%5D args) %7B%0A            int exitCode = new CommandLine(new CmdTest()).execute(args);%0A            System.exit(exitCode);%0A        %7D%0A    %7D%0A    static class GroupA %7B%0A        @CommandLine.Option(%0A            names = %7B%22--a-str%22%7D,%0A            paramLabel = %22%3CNETWORK%3E%22,%0A            //required = true,%0A            arity = %221%22)%0A        private String str = null;%0A%0A        @CommandLine.Option(%0A            names = %7B%22--a-bool%22%7D,%0A            paramLabel = %22%3CBOOLEAN%3E%22,%0A            arity = %221%22,%0A            //required = true,%0A            fallbackValue = %22true%22)%0A        private boolean bool = false;%0A%0A        public GroupA() %7B%0A        %7D%0A%0A        @Override%0A        public String toString() %7B%0A            final StringBuilder sb = new StringBuilder(%22GroupA%7B%22);%0A            sb.append(%22str='%22).append(str).append('%5C'');%0A            sb.append(%22, bool=%22).append(bool);%0A            sb.append('%7D');%0A            return sb.toString();%0A        %7D%0A    %7D%0A    static class GroupB %7B%0A        @CommandLine.Option(%0A            names = %7B%22--b-bool%22%7D,%0A            paramLabel = %22%3CBOOLEAN%3E%22,%0A            showDefaultValue = CommandLine.Help.Visibility.ALWAYS,%0A            fallbackValue = %22true%22,%0A            arity = %221%22)%0A        private boolean b = false;%0A%0A        public GroupB() %7B%0A        %7D%0A%0A        @Override%0A        public String toString() %7B%0A            final StringBuilder sb = new StringBuilder(%22GroupB%7B%22);%0A            sb.append(%22b=%22).append(b);%0A            sb.append('%7D');%0A            return sb.toString();%0A        %7D%0A    %7D%0A%7D%0A

add example application