Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus cli plugin mechanism #18408

Closed
maxandersen opened this issue Jul 5, 2021 · 4 comments
Closed

quarkus cli plugin mechanism #18408

maxandersen opened this issue Jul 5, 2021 · 4 comments
Assignees
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/jbang Issues related to when using jbang.dev with Quarkus kind/enhancement New feature or request

Comments

@maxandersen
Copy link
Member

Description

add ability to do quarkus someplugin (args) that will lookup in PATH for quarkus-someplugin(.cmd) and quarkus-* jbang aliases

Implementation ideas

meachnism lets you write and deliver plugins independently.

Example of usecases: quarkus upgrade to detect and apoly changes, quarkus scaffold / quarkus jhipster for doing codegeneration actions.

@maxandersen maxandersen added the kind/enhancement New feature or request label Jul 5, 2021
@quarkus-bot quarkus-bot bot added area/cli Related to quarkus cli (not maven/gradle/etc.) area/jbang Issues related to when using jbang.dev with Quarkus labels Jul 5, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 5, 2021

/cc @ebullient, @gsmet, @quarkusio/devtools

@maxandersen
Copy link
Member Author

maxandersen commented Dec 1, 2022

idea from chatting with @iocanel :

have the traditional convention to look for quarkus-deploy-gcloudin PATH when user does quarkus deploy gcloud
but in addition do a lookup in .jbang/jbang-catalog.json to find locally to the project installed scripts.

To allow version alignment of project and "plugins" a call to quarkus deploy gcloud would set -Dquarkus.version and QUARKUS_VERSION env var to allow the plugin mechanism (i.e. jbang) or even the plugin itself to change behavior based on the version without having to load the quarkus project.

example for jbang-catalog (Not tested!) you could do:

quarkus plugin install quarkus-deploy-gcloud which would make an entry in jbang-catalog similar to:

jbang alias add -f . quarkus-deploy-gcloud@quarkusio/${quarkus.version:2.14.Final}

@iocanel iocanel self-assigned this Jan 25, 2023
@iocanel
Copy link
Contributor

iocanel commented Jan 28, 2023

After playing with it for a while and discussing with @maxandersen here are some additional thoughts

  • CLI plugins should be explicitly enabled.
  • CLI plugins should be enabled by adding them to a user or project catalog (where the latter overrides the former).
  • Enabled plugins should be listable in --help as normal subcommands.
  • CLI plguins could be either jbang commands/aliases or binaries.

A working first attempt: https://github.com/iocanel/quarkus/tree/cli-extensions

@iocanel
Copy link
Contributor

iocanel commented Mar 28, 2023

Resolved by: #31198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/jbang Issues related to when using jbang.dev with Quarkus kind/enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants