My application compiled OK with mvn clean package -Pnative but when it ran, it failed with:
Exception in thread "main" picocli.CommandLine$InitializationException: picocli.CommandLine$AutoHelpMixin@74a833e8 is not a command: it has no @Command, @Option, @Parameters or @Unmatched annotations
I am using PicoCli 4.7.5 (Java version: 21.0.2+13, vendor version: GraalVM CE 21.0.2+13.1)
I found this related issue which clued me in. The solution was to rename my own options. I was using "-h" for "--host". When I used @Option(names = {"-H", "--host"} it compiled and ran without problems.
But I wasted hours going down a rabbit-hole of manually specifying annotated classes, methods and fields when it was a simple matter of renaming my option.
Please could you throw an error in the annotationProcessor if there is an overlapping @Option and save us from a world of pain.
Much appreciated!