diff --git a/crd-generator/cli/pom.xml b/crd-generator/cli/pom.xml
index 0b86b0a1037..9dbea66be83 100644
--- a/crd-generator/cli/pom.xml
+++ b/crd-generator/cli/pom.xml
@@ -117,7 +117,7 @@
2.1.1
-Xmx1G
- java-gen
+ crd-gen
true
diff --git a/crd-generator/cli/src/main/java/io/fabric8/crd/generator/cli/CRDGeneratorCLI.java b/crd-generator/cli/src/main/java/io/fabric8/crd/generator/cli/CRDGeneratorCLI.java
index 034b4ee99d4..28d79fa5615 100644
--- a/crd-generator/cli/src/main/java/io/fabric8/crd/generator/cli/CRDGeneratorCLI.java
+++ b/crd-generator/cli/src/main/java/io/fabric8/crd/generator/cli/CRDGeneratorCLI.java
@@ -21,89 +21,134 @@
import io.fabric8.crdv2.generator.CustomResourceInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.slf4j.simple.SimpleLogger;
import picocli.CommandLine;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
+import java.util.stream.Collectors;
-@CommandLine.Command(name = "crd-gen", mixinStandardHelpOptions = true, helpCommand = true, versionProvider = KubernetesClientVersionProvider.class)
+/**
+ * CRD-Generator Command Line Interface.
+ */
+@CommandLine.Command(name = "crd-gen", mixinStandardHelpOptions = true, helpCommand = true, versionProvider = KubernetesClientVersionProvider.class, sortOptions = false, description = "\nFabric8 CRD-Generator:\nGenerate Custom Resource Definitions (CRD) for Kubernetes from Java classes.\n")
public class CRDGeneratorCLI implements Runnable {
- private static final Logger log = LoggerFactory.getLogger(CustomResourceCollector.class);
private static final CRDGenerationInfo EMPTY_INFO = new CRDGenerationInfo();
+ private Logger log;
+
@CommandLine.Spec
CommandLine.Model.CommandSpec spec;
- @CommandLine.Option(names = { "-c",
- "--classes" }, description = "Directories or JAR files to be used to scan for Custom Resource classes")
- List classesToIndex;
+ @CommandLine.Parameters(arity = "1..*", converter = SourceTypeConverter.class, description = "A directory or JAR file to scan for Custom Resource classes, or a full qualified Custom Resource class name.")
+ List