quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.36k stars 2.56k forks source link

Allow inferring the alias of an extension CLI plugin from the root command name #41656

Open iocanel opened 4 days ago

iocanel commented 4 days ago

Description

Currently when a quarkus extension brings in a CLI plguin, the name of the plugin is configured in the extension metadata. Extension developer need to align the alias used with the root command name. So, one needs to add the same information in two places.

It would be nice if there was a way to infer the alias from the root command name.

Challenges

However, this means that the CLI should download the CLI plugin, find the root command and get the information from there. And this is something that most probably should be repeated on each invocation of quarkus --help and quarkus my-plugin xyz

On top of that we will have to deal with things like maven artifact downloading etc, that's now outsourced to jbang.

An alternative could be to produce some short of metadata at the time of building the CLI plugin that would be available to the extension. But I don't have something more concrete than that.

Implementation ideas

No response

quarkus-bot[bot] commented 4 days ago

/cc @ebullient (cli), @maxandersen (cli,jbang), @quarkusio/devtools (jbang)

aloubyansky commented 4 days ago

@holly-cummins this might be relevant to your extension metadata refactoring effort