Simon Hartl created CAMEL-23169:
-----------------------------------

             Summary: camel export can be packaged when containing JQ
                 Key: CAMEL-23169
                 URL: https://issues.apache.org/jira/browse/CAMEL-23169
             Project: Camel
          Issue Type: Bug
          Components: camel-jbang
    Affects Versions: 4.18.0
            Reporter: Simon Hartl


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)

Reply via email to