Skip to content

CAMEL-22544: jbang dependency update supports multi-file and --scan-routes#22208

Open
gnodet wants to merge 1 commit intomainfrom
calm-hisser
Open

CAMEL-22544: jbang dependency update supports multi-file and --scan-routes#22208
gnodet wants to merge 1 commit intomainfrom
calm-hisser

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 23, 2026

JIRA: CAMEL-22544

Summary

  • Enhanced camel dependency update command to accept multiple target files (pom.xml or Java source files with //DEPS)
  • Added --scan-routes flag to sync dependencies from route definitions:
    • Manages only org.apache.camel dependencies
    • Preserves non-Camel dependencies (e.g., guava, netty)
    • Removes unused Camel dependencies no longer needed by routes
    • Idempotent on re-execution (no duplicates)
  • Route definition files (YAML, XML) passed as arguments are automatically classified and used as source files for the export pipeline
  • In scan-routes mode, existing Camel //DEPS in Java target files are stripped before running the export pipeline, so only actual route-based dependencies are resolved

Test plan

  • Existing DependencyUpdateTest (Maven pom.xml with quarkus, spring-boot, main runtimes) passes
  • New DependencyUpdateJBangTest:
    • Multi-file JBang //DEPS update
    • --scan-routes adds new deps from routes (Maven, all runtimes)
    • --scan-routes removes unused Camel deps from pom.xml
    • --scan-routes preserves non-Camel //DEPS in JBang files
    • --scan-routes is idempotent on re-execution

@github-actions github-actions bot added the dsl label Mar 23, 2026
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@gnodet gnodet marked this pull request as draft March 23, 2026 21:20
…outes

- Accept multiple target files (pom.xml or Java source files with //DEPS)
- Add --scan-routes flag to sync dependencies from route definitions:
  - Manages only org.apache.camel dependencies
  - Preserves non-Camel dependencies
  - Removes unused Camel dependencies
  - Idempotent on re-execution
- Route files (YAML, XML) passed as arguments are used as source files
  for the export pipeline dependency resolution
- In scan-routes mode, Camel //DEPS in Java target files are stripped
  before export to prevent stale deps from being resolved

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet marked this pull request as ready for review March 23, 2026 21:29
@github-actions
Copy link
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-core
All tested modules (26 modules)
  • Camel :: Coverage
  • Camel :: Coverage [pom]
  • Camel :: JBang :: Core
  • Camel :: JBang :: Core [jar]
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: Integration tests [jar]
  • Camel :: JBang :: MCP
  • Camel :: JBang :: MCP [jar]
  • Camel :: JBang :: Main
  • Camel :: JBang :: Main [jar]
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Edit [jar]
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Generate [jar]
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: Kubernetes [jar]
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: Route Parser [jar]
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Testing [jar]
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JBang :: Plugin :: Validate [jar]
  • Camel :: Launcher
  • Camel :: Launcher [jar]
  • Camel :: Launcher :: Container
  • Camel :: Launcher :: Container [pom]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant