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

Claus Ibsen updated CAMEL-23881:
--------------------------------
    Fix Version/s: 4.22.0

> camel-jbang export generates invalid Maven POM with literal 
> \$\{citrus.version} instead of ${citrus.version}
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-23881
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23881
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.21.0
>            Reporter: Federico Mariani
>            Priority: Major
>             Fix For: 4.22.0
>
>
> When running camel export --runtime=quarkus on a project that has a test/ 
> subdirectory, the _TestPluginExporter_ adds Citrus test dependencies to the 
> generated pom.xml with escaped property references (\$\{citrus.version}) 
> instead of valid Maven property expressions (${citrus.version}).
> This produces an invalid POM that Maven cannot resolve.
> Example generated output:
> <dependency>
>      <groupId>org.citrusframework</groupId>
>      <artifactId>citrus-base</artifactId>
>      <version>\$\{citrus.version}</version>
>      <scope>test</scope>
> </dependency>
> Expected:
> <dependency>
>      <groupId>org.citrusframework</groupId>
>      <artifactId>citrus-base</artifactId>
>      <version>${citrus.version}</version>
>      <scope>test</scope>
> </dependency>
> The issue is in TestPluginExporter.asDependency() which formats the version 
> as \\$\\{citrus.version} , the backslash escaping is carried through to the 
> final POM output rather than being resolved during template rendering.
> Steps to reproduce:
> 1. Create a Camel project with a test/ subdirectory
> 2. Run camel export --runtime=quarkus --gav="it.test:export:1.0" 
> --dir="export-test" <routes>
> 3. Inspect export-test/pom.xml — Citrus dependency versions contain literal 
> backslashes



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to