You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/10/19 15:13:01 UTC

[PR] CAMEL-25830: camel-jbang - camel run of a whole directory without --name is named after the directory [camel]

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

   [CAMEL-25830](https://issues.apache.org/jira/browse/CAMEL-25830): `camel run --source-dir=.` without `--name` named the integration after the first Java, XML or YAML file in the order that `Files.list` gives. The same goes for `camel run <dir>`, which runs the directory as a source directory. That first file can be any file, such as a Java class that a route uses. The order depends on the file system (on Linux it is not alphabetical), so a project could get another name on another machine.
   
   The `camel_run` tool runs a whole directory like that when no name is given. In a benchmark of Oct 18-19 2026 it answered "Started Order (pid 46489)" for the project `contracts-rest-code-first`, named after its `Order.java`. The model then looked the integration up by the name of the directory, which found nothing.
   
   ## What
   
   - **A run of a whole directory** (`--source-dir`, or a directory as the argument) without `--name` is named after the directory.
     - `.` is the working directory.
     - A folder of a project layout (`src`, `main`, `resources`, `java`, `camel` or `routes`) gives way to the first parent with another name, so `src/main/resources/camel` is named after the project.
   - **A run of files that are given** keeps the name of the first file, as before: the user chose the files, and the first one is usually the main route.
   - `--name`, and `camel.main.name` in application.properties, still win.
   - The description of `--name` says what the default is (in the generated docs of `camel run`, `camel dev` and `camel debug`).
   
   ## Tests
   
   - `RunTest` (1 more): the name of a directory, of a folder of a project layout under a project, of the working directory, and no name for `/src`.
   - End to end, with the camel launcher built from this branch, `camel run --source-dir=.` in a folder `orders-app` with `route.camel.yaml` and `Order.java`:
     - before: `Apache Camel 4.24.0-SNAPSHOT (Order) is starting`
     - after: `Apache Camel 4.24.0-SNAPSHOT (orders-app) is starting`
     - with `camel.main.name = from-props` in application.properties: `(from-props)`
   - All tests of camel-jbang-core pass (2306, 2 skipped, and 237).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


-- 
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-25830: camel-jbang - camel run of a whole directory without --name is named after the directory [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28122:
URL: https://github.com/apache/camel/pull/28122#issuecomment-6275521436

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `docs`
   - `dsl/camel-jbang/camel-jbang-core`
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 5 of 707 tested, 8 compile-only — current: 5 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **5 affected modules** (current approach: 5).
   
   **Skip-tests mode would test 5 modules** (2 direct + 5 downstream), **skip tests for 8** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (5)</summary>
   
   - `camel-jbang-mcp` ← downstream of org.apache.camel:camel-jbang-core
   - `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
   - `camel-jbang-plugin-tui` ← downstream of org.apache.camel:camel-jbang-core
   - `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-jbang-core
   - `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
   
   </details>
   
   <details><summary>Modules with tests skipped (8)</summary>
   
   - `camel-jbang-it`
   - `camel-jbang-main`
   - `camel-jbang-plugin-edit`
   - `camel-jbang-plugin-generate`
   - `camel-jbang-plugin-kubernetes`
   - `camel-jbang-plugin-test`
   - `camel-launcher`
   - `coverage`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `dsl/camel-jbang/camel-jbang-core`: 2 test(s) disabled on GitHub Actions
   
   :bulb: **Manual integration tests recommended:**
   
   > You modified `dsl/camel-jbang/camel-jbang-core`. The related integration tests in `dsl/camel-jbang/camel-jbang-it` are excluded from CI. Consider running them manually:
   > ```
   > mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
   > ```
   
   <details><summary>All tested modules (15 modules, 3m 15s total)</summary>
   
   **Total reactor time:** 3m 15s
   
   | Module | Duration | Status |
   | --- | --- | --- |
   | Camel :: Launcher | 54.9s | SUCCESS |
   | Camel :: JBang :: MCP | 46.7s | SUCCESS |
   | Camel :: JBang :: Plugin :: Validate | 31.9s | SUCCESS |
   | Camel :: Docs | 21.2s | SUCCESS |
   | Camel :: JBang :: Plugin :: Testing | 15.8s | SUCCESS |
   | Camel :: JBang :: Plugin :: Kubernetes | 15.4s | SUCCESS |
   | Camel :: JBang :: Plugin :: Edit | 1.9s | SUCCESS |
   | Camel :: Coverage | 1.5s | SUCCESS |
   | Camel :: JBang :: Plugin :: MCP | 1.5s | SUCCESS |
   | Camel :: JBang :: Plugin :: Generate | 1.4s | SUCCESS |
   | Camel :: JBang :: Integration tests | 1.2s | SUCCESS |
   | Camel :: Launcher :: Container | 0.9s | SUCCESS |
   | Camel :: JBang :: Main | 0.8s | SUCCESS |
   | Camel :: JBang :: Core | n/a |  |
   | Camel :: JBang :: Plugin :: TUI | n/a |  |
   
   **Top 20 slowest modules:**
   - `Camel :: Launcher` (54.9s)
   - `Camel :: JBang :: MCP` (46.7s)
   - `Camel :: JBang :: Plugin :: Validate` (31.9s)
   - `Camel :: Docs` (21.2s)
   - `Camel :: JBang :: Plugin :: Testing` (15.8s)
   - `Camel :: JBang :: Plugin :: Kubernetes` (15.4s)
   - `Camel :: JBang :: Plugin :: Edit` (1.9s)
   - `Camel :: Coverage` (1.5s)
   - `Camel :: JBang :: Plugin :: MCP` (1.5s)
   - `Camel :: JBang :: Plugin :: Generate` (1.4s)
   - `Camel :: JBang :: Integration tests` (1.2s)
   - `Camel :: Launcher :: Container` (0.9s)
   - `Camel :: JBang :: Main` (0.8s)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/39303217720)


-- 
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-25830: camel-jbang - camel run of a whole directory without --name is named after the directory [camel]

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


-- 
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-25830: camel-jbang - camel run of a whole directory without --name is named after the directory [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28122:
URL: https://github.com/apache/camel/pull/28122#issuecomment-6270775150

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: 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 `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](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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