[
https://issues.apache.org/jira/browse/CAMEL-23169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18065023#comment-18065023
]
Claus Ibsen commented on CAMEL-23169:
-------------------------------------
Use the repacker plugin we use in camel-launcher instead. Then change the
camel-jbang export to use this instead
> camel-jbang - Export to camel main as fat-jar should can cause overrides in
> META-INF services files that camel-jq needs
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-23169
> URL: https://issues.apache.org/jira/browse/CAMEL-23169
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Affects Versions: 4.18.0
> Reporter: Simon Hartl
> Priority: Minor
> Fix For: 4.x
>
>
> A route containing a JQ snipped using a JQ function like {{split}} can be
> exported and build with the maven plugin.
> When the exported project is build with {{maven compile}} the resulting JAR
> file causes this error:
> {{Failed delivery for (MessageId: 35141FECA14F3DE-0000000000000000 on
> ExchangeId: 35141FECA14F3DE-0000000000000000). Exhausted after delivery
> attempt: 1 caught: org.apache.camel.RuntimeCamelException:
> net.thisptr.jackson.jq.exception.JsonQueryException: Function split/1 does
> not exist}}
>
> The root problem is in the JQ libraries and packaging with
> {{{}maven-assembly-plugin{}}}:
> In both the artifacts of jackson-jq and the jackson-jq-extra there is a file
> {{META-INF/services/net.thisptr.jackson.jq.Function}} which defines the
> available functions for JQ.
> When maven-assembly-plugin packages all libraries the file from jackson-jq is
> overwritten by the other and therefore the link to the required function is
> lost.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)