![JAR search and dependency download from the Maven repository](/logo.png)
io.quarkus.cli.ProjectExtensions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-cli Show documentation
Show all versions of quarkus-cli Show documentation
Quarkus command line utility
package io.quarkus.cli;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
import io.quarkus.cli.common.OutputOptionMixin;
import picocli.CommandLine;
import picocli.CommandLine.ParseResult;
import picocli.CommandLine.Unmatched;
@CommandLine.Command(name = "extension", aliases = {
"ext" }, header = "Configure extensions of an existing project.", subcommands = {
ProjectExtensionsList.class,
ProjectExtensionsCategories.class,
ProjectExtensionsAdd.class,
ProjectExtensionsRemove.class })
public class ProjectExtensions implements Callable {
@CommandLine.Mixin(name = "output")
protected OutputOptionMixin output;
@CommandLine.Spec
protected CommandLine.Model.CommandSpec spec;
@Unmatched // avoids throwing errors for unmatched arguments
List unmatchedArgs;
@Override
public Integer call() throws Exception {
output.info("Listing extensions (default action, see --help).");
ParseResult result = spec.commandLine().getParseResult();
List args = result.originalArgs().stream().filter(x -> !"extension".equals(x) && !"ext".equals(x))
.collect(Collectors.toList());
CommandLine listCommand = spec.subcommands().get("list");
return listCommand.execute(args.toArray(new String[0]));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy