davsclaus opened a new pull request, #31216: URL: https://github.com/apache/camel/pull/31216
[CAMEL-28011](https://issues.apache.org/jira/browse/CAMEL-28011) Modeline (JBang style `//DEPS` lines in route files) makes the routes loader read every route file before it loads it, to find the `//DEPS` lines and download their dependencies, and then load the files. It is a relic from the Camel K era, with a single source file carrying its dependencies and traits. The dependencies are declared in `application.properties` (`camel.jbang.dependencies=group:artifact:version`) or with `camel run --dep` instead, which need no pre-parse. This deprecates modeline in 4.25, with the behavior unchanged: - `@Deprecated(since = "4.25.0")` on the `camel-dsl-modeline` classes, `camel.main.modeline`, `CamelContext.setModeline` / `isModeline` and the `ModelineFactory` SPI. The `camel-dsl-modeline` pom name and doc page say deprecated, and the page shows the replacement. `camel run --modeline` says it is deprecated. - A WARN is logged once for each route file with `//DEPS` lines, naming the replacement. - The guidance that steered users and AI tools to `//DEPS` points to `application.properties` and `--dep`: the Camel MCP server instructions, the Java and Groovy check hints of `camel validate`, the TUI CVE prompt, and the user manual (devtools, MCP and TUI pages). - `camel dependency list` / `camel dependency update` keep handling `//DEPS` lines, which JBang scripts use. - Upgrade guide entry for 4.25. Regenerated: the camel-main metadata, the `camel-dsl-modeline` JSON, the Camel CLI command docs and metadata, the golden CLI help, and the catalog copies. Tests: `JBangModelineParserTest` (the WARN shows in its log), `CliHelpGoldenTest`, `GroovyImportChecksTest`, `JavaChecksProjectTest`, `McpServerInstructionsTest` (the expected order now has `//DEPS` last), `CveAiPromptTest`, `DependencyAiPromptTest`. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
