What version of Camel are you using?

The following works for me in Camel 2.17.3
<camelContext xmlns="http://camel.apache.org/schema/spring";>
    <route id="exec-path-text">
        <from uri="direct://trigger" />
        <setHeader headerName="CamelExecCommandExecutable">
            <constant>/tmp/my-script.sh</constant>
        </setHeader>
        <to uri="exec://dummy-target" />
        <log message="result: ${body}" />
        <to uri="mock://result" />
    </route>
</camelContext>
It correctly calls the script in /tmp

> On Sep 8, 2016, at 3:11 PM, clinton <clint.pe...@ionep.com> wrote:
> 
> I have a route that I want to call out to a shell script from (Linux). Using
> spring XML dsl
> It seems that the path I put in the CamelExecCommandExecutable header is
> being treated as relative to the current directory, while I gave it an
> absolute path.
> So, I tried putting several ../../../ in front of my script name, to back
> down to where I know the right dirs. were.  I've verified that the resulting
> concatenation of path info, does in fact resolve to my shell script, but
> came continues to tell me that the file doesn't exist.  
> I couldn't find in the doc that this was used as a relative path, but it
> seems like that must be the case. 
> Running in Jboss EAP 6.2
> I could put the target dir in the PATH, but would like to understand what is
> going on.
> Thanks
> Clint
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-exec-component-how-to-reference-the-executable-tp5787392.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to