You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "christophd (via GitHub)" <gi...@apache.org> on 2023/12/22 15:56:05 UTC

[PR] CAMEL-20270: Introduce JBang plugins [camel]

christophd opened a new pull request, #12583:
URL: https://github.com/apache/camel/pull/12583

   # Description
   
   - Introduce plugin mechanism to modularize Camel JBang
   - Add new plugin sub-commands (add, get, delete) to manage plugins
   - Plugin configuration is stored to user home directory
   - Load plugin commands on demand
   - Create 1st plugin for Camel K and move commands into separate Maven module camel-jbang-plugin-k
   
   PR introduces plugins for Camel JBang where each plugin is able to add sub-commands to the CLI. The advantage of having a plugin in a separate Maven module is to modularize the Camel JBang CLI and avoid stuffing all dependencies and functionality into `camel-jbang-core`.
   
   The PR adds a 1st plugin module `camel-jbang-plugin-k` that manages integrations on Kubernetes (the commands have been added to Camel JBang recently).
   
   Users need to enable/add plugins with the new command `camel plugin add`. The plugin usually gets a name, a command and a dependency (Maven GAV) that is added on demand when the user calls a plugin command. Once the plugin is added for the environment all commands of the plugin get listed in the CLI and users can just call the sub-commands like every other sub-command.
   
   The plugin config holding all enabled plugins for the environment is stored in the `user.home` directory (`.camel-jbang-plugins.json`).
   
   Users are able to list enabled plugins with `camel plugin list` (`--all` option to list all supported plugins in the Camel project).
   
   `camel plugin delete` will remove a plugin from the current environment so that the plugin commands are no longer listed in the CLI and users will not be able to call the plugin`s commands any more.
   
   # Follow-up actions
   
   - Update the documentation to describe new JBang plugin mechanism
   - Extract more plugins from current Camel JBang sub-commands (e.g. sbom, hawtio, jolokia)
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (note that Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   
   Relates to CAMEL-20270
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally and I have committed all auto-generated changes
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20270: Introduce JBang plugins [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12583:
URL: https://github.com/apache/camel/pull/12583#issuecomment-1867949566

   I didn't see whether there was some updates to the documentation - that is something we would need down the road when we have more plugins and users need to install them.
   
   Also it may be possible to install multiple at once
   
   camel plugin add foo bar cheese
   
   or maybe you want all out of the box
   
   camel plugin add --all


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20270: Introduce JBang plugins [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #12583:
URL: https://github.com/apache/camel/pull/12583


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org