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

Claus Ibsen updated CAMEL-27441:
--------------------------------
    Fix Version/s: 4.25.0

> camel-kamelet - Kamelets moved into Camel core take the versions of their 
> mvn: dependencies from camel-parent, with ${...-version} placeholders
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27441
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27441
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-kamelet
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> When the Kamelet catalog moves from apache/camel-kamelets into Camel core, 
> the versions of the {{mvn:}} dependencies of the Kamelets should come from 
> the version properties of {{camel-parent}}, the same way camel-jbang takes 
> versions such as {{$\{hawtio-version\}}} from it (templating-maven-plugin 
> with {{src/main/java-templates}}).
> h3. Today, in camel-kamelets
> About a dozen Kamelets pin a library in {{spec.dependencies}}, such as JDBC 
> drivers, the ActiveMQ and Artemis clients, pooled-jms, commons-dbcp2 and 
> jackson-datatype-joda:
> {noformat}
> - "mvn:org.postgresql:postgresql:42.7.14"
> {noformat}
> The root {{pom.xml}} of camel-kamelets has its own property per library 
> ({{version.org.postgresql.postgresql}} and so on, bumped by Dependabot), and 
> {{script/version/UpdateDepsVersionKamelets.groovy}} rewrites the version 
> numbers in the Kamelet YAML in place with a regular expression on every 
> build. These versions are kept apart from the ones Camel manages and tests 
> with, and they have drifted:
> ||Library||Kamelets||camel-parent||
> |pooled-jms|3.2.6|3.2.5 ({{pooled-jms-version}})|
> |redshift-jdbc42|2.3.0|2.1.0.33 ({{redshift-jdbc-version}})|
> Only jackson-datatype-joda already points at a Camel property 
> ({{$\{jackson3-version\}}}).
> h3. Proposal
> * The source YAML names the property of camel-parent: 
> {{mvn:org.postgresql:postgresql:$\{pgjdbc-driver-version\}}}.
> * The build fills in only the entries of {{spec.dependencies}}, not the whole 
> file: Kamelet templates are full of simple expressions such as 
> {{$\{header.foo\}}} and {{$\{body\}}}, which Maven resource filtering would 
> break. This belongs in the build step that packages and checks the Kamelets 
> in core (camel-package-maven-plugin, or wherever the Kamelet catalog is 
> generated). A placeholder with no property fails the build.
> * The published YAML (the catalog JAR, the docs pages and the SBOM of the 
> catalog) has real versions, so Camel K, Camel Quarkus, Camel Spring Boot and 
> Camel JBang read it as today.
> * One version per library, managed in camel-parent: Dependabot bumps it once, 
> and the Kamelets use what Camel builds and tests with. Libraries that 
> camel-parent does not manage yet (snowflake-jdbc and databricks-jdbc today) 
> get a property there, or keep a literal version.
> * The descriptions of the Kamelets do not give version numbers in hints such 
> as {{camel run --dep=mvn:...:<version>}}, so they cannot go stale.
> * The {{UpdateDepsVersionKamelets.groovy}} step and the {{version.*}} 
> properties of camel-kamelets are then removed.
> Found while preparing the Kamelet catalog for Camel 4.24 
> (apache/camel-kamelets#3190, 2026-11-23).



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

Reply via email to