Jiří Ondrušek created CAMEL-27546:
-------------------------------------
Summary: Camel JBang export: let a plugin remove dependencies from
the exported project
Key: CAMEL-27546
URL: https://issues.apache.org/jira/browse/CAMEL-27546
Project: Camel
Issue Type: Improvement
Reporter: Jiří Ondrušek
Assignee: Jiří Ondrušek
`camel export` collects the dependencies from the routes and from the export
plugins. A plugin can add dependencies, but it cannot remove one that was
collected from the same input.
Use case (Forage, {{--runtime=quarkus}}): Forage translates its model
configuration to native {{quarkus-langchain4j-*}} extensions. The
{{forage-model-*}} artifacts are then not needed, but they stay in the
generated {{pom.xml}}, next to the Quarkus extensions. The export plugin has no
way to drop them.
Proposal: a hook on the export plugin that returns dependencies to remove.
Camel JBang applies it after all plugins have added theirs and before the
project files are generated.
* default implementation returns nothing, so existing plugins are not affected;
* matching by {{groupId:artifactId}};
* a removal of a dependency that is not present is ignored.
Acceptance: a plugin can remove a dependency in {{camel export}} for the
Quarkus runtime; a camel-jbang test covers add + remove from two plugins.
_Generated with [Claude Code|https://claude.com/claude-code] on behalf of
[~jondruse]_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)