You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
picocli.CommandLine$InitializationException: Cannot instantiate subcommand app.AppCommand: the class has no constructor
at picocli.CommandLine$Model$CommandReflection.initSubcommands(CommandLine.java:5969)
at picocli.CommandLine$Model$CommandReflection.updateCommandAttributes(CommandLine.java:5956)
at picocli.CommandLine$Model$CommandReflection.updateCommandAttributes(CommandLine.java:5940)
at picocli.CommandLine$Model$CommandReflection.extractCommandSpec(CommandLine.java:5910)
at picocli.CommandLine$Model$CommandSpec.forAnnotatedObject(CommandLine.java:3594)
at picocli.CommandLine.<init>(CommandLine.java:185)
at picocli.CommandLine.<init>(CommandLine.java:164)
at picocli.AutoComplete$App.run(AutoComplete.java:92)
at picocli.CommandLine.execute(CommandLine.java:1048)
at picocli.CommandLine.access$900(CommandLine.java:142)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1255)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1223)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1131)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1414)
at picocli.CommandLine.run(CommandLine.java:1878)
at picocli.CommandLine.run(CommandLine.java:1824)
at picocli.AutoComplete.main(AutoComplete.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: app.AppCommand.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at picocli.CommandLine$DefaultFactory.create(CommandLine.java:3260)
at picocli.CommandLine$Model$CommandReflection.initSubcommands(CommandLine.java:5963)
... 22 more
Usage: picocli.AutoComplete [-fhw] [-n=<commandName>] [-o=<autoCompleteScript>]
<commandLineFQCN>
Generates a bash completion script for the specified command class.
<commandLineFQCN> Fully qualified class name of the annotated @Command
class to generate a completion script for.
-n, --name=<commandName> Name of the command to create a completion script for.
When omitted, the annotated class @Command 'name'
attribute is used. If no @Command 'name' attribute
exists, '<CLASS-SIMPLE-NAME>' (in lower-case) is used.
-o, --completionScript=<autoCompleteScript>
Path of the completion script file to generate. When
omitted, a file named '<commandName>_completion' is
generated in the current directory.
-w, --writeCommandScript Write a '<commandName>' sample command script to the
same directory as the completion script.
-f, --force Overwrite existing script files.
-h, --help Display this help message and quit.
The text was updated successfully, but these errors were encountered:
Regarding default-cli, you're right that's not strictly needed. However, it's quite useful for development with Maven so that you don't have setup a classpath or rebuild a jar. If your IDE has automatic build you can simply save and go to the command line and execute.
Currently this will not fail a build if the command is run via Maven, Gradle etc.
For example, the following Maven configuration (might be useful for docs):
produces
The text was updated successfully, but these errors were encountered: