[
https://issues.apache.org/jira/browse/CAMEL-26402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-26402:
--------------------------------
Summary: camel-jbang - Tests plugin adding the wrong dependency for Citrus
(was: Tests plugin adding the wrong dependency for Citrus)
> camel-jbang - Tests plugin adding the wrong dependency for Citrus
> -----------------------------------------------------------------
>
> Key: CAMEL-26402
> URL: https://issues.apache.org/jira/browse/CAMEL-26402
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Affects Versions: 4.23.0, 4.24.0
> Reporter: Ricardo Martinez
> Priority: Trivial
> Fix For: 4.24.0
>
>
> h2. Description
> When running a Camel integration with {{--runtime=camel-main}} (or running
> Camel export) from a directory containing a {{test/}} subdirectory,
> {{TestPluginExporter}} is automatically enabled and contributes Citrus test
> dependencies to the generated {{pom.xml}}.
> However, {{TestPluginExporter}} configures the Citrus JUnit dependency as
> {{org.citrusframework:citrus-junit5:${citrus.version}}}:
> {code:java}
> deps.add(asDependency("citrus-junit5"));
> {code}
> Since Citrus was upgraded to 5.x, the JUnit 5 test engine module was renamed
> from {{citrus-junit5}} to {{citrus-junit-jupiter}}. As a result,
> {{org.citrusframework:citrus-junit5}} does not exist for Citrus 5.x releases
> (5.0.0, 5.0.1, 5.0.2, 5.1.0) on Maven Central, causing Maven build failures
> during dependency resolution when packaging the exported project:
> {noformat}
> [ERROR] Failed to execute goal on project CamelJBang: Could not resolve
> dependencies for project org.example.project:CamelJBang:jar:1.0-SNAPSHOT
> [ERROR] dependency: org.citrusframework:citrus-junit5:jar:5.0.2 (test)
> [ERROR] org.citrusframework:citrus-junit5:jar:5.0.2 was not found in
> https://repo.maven.apache.org/maven2 during a previous attempt.
> {noformat}
> h2. Steps to Reproduce
> 1. Create a workspace with a Camel route (e.g. {{demo.camel.yaml}}) and a
> {{test/}} folder.
> 2. Run the integration with Camel Main runtime:
> {code:bash}
> camel run demo.camel.yaml --runtime=camel-main
> {code}
> (or using Kaoto / Camel Launcher).
> 3. The build fails with dependency resolution error for
> {{org.citrusframework:citrus-junit5:<citrus.version>}}.
> h2. Expected Behavior
> {{TestPluginExporter}} should add {{citrus-junit-jupiter}} instead of
> {{citrus-junit5}}.
> h2. Affected Versions
> * 4.22.x (Citrus 5.0.0)
> * 4.23.0 (Citrus 5.0.2)
> * 4.24.0-SNAPSHOT (Citrus 5.1.0)
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)