[ 
https://issues.apache.org/jira/browse/CAMEL-28011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-28011.
---------------------------------
    Resolution: Fixed

Fixed in https://github.com/apache/camel/pull/31216 (commit 9af2da185942 on 
main), for 4.25.0.

_Claude Code on behalf of davsclaus_

> Deprecate modeline (//DEPS lines in route files)
> ------------------------------------------------
>
>                 Key: CAMEL-28011
>                 URL: https://issues.apache.org/jira/browse/CAMEL-28011
>             Project: Camel
>          Issue Type: Task
>          Components: camel-core, camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.25.0
>
>
> Modeline lets a route file name its extra dependencies in JBang //DEPS 
> comment lines. To support it, the routes loader pre-parses every source file, 
> triggers what the modeline does (download the dependencies), and then loads 
> the files again. It is a relic from the Camel K era, with a single source 
> file carrying its dependencies and traits, and it is no longer good practice.
> The replacements exist: camel.jbang.dependencies in application.properties, 
> and camel run --dep.
> In 4.25, deprecate modeline, with the behavior unchanged:
> * @Deprecated on camel-dsl-modeline, camel.main.modeline, 
> CamelContext.setModeline/isModeline, the ModelineFactory SPI and camel run 
> --modeline
> * log a WARN when a //DEPS line is used, naming the file and the replacement
> * the Camel CLI and MCP guidance, the validator hints and the documentation 
> point to application.properties and --dep instead of //DEPS
> * camel dependency list/update keep reading and updating //DEPS lines while 
> the feature is deprecated
> * upgrade guide entry
> Removal in a later release.
> ----
> _Filed by Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to