Claus Ibsen created CAMEL-28011:
-----------------------------------

             Summary: 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-jbang, camel-core
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             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