[
https://issues.apache.org/jira/browse/CAMEL-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-3940.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.9.0
Assignee: Claus Ibsen
Already implemented in Camel 2.9
> Add support for loading scripts from files in the Camel language component
> --------------------------------------------------------------------------
>
> Key: CAMEL-3940
> URL: https://issues.apache.org/jira/browse/CAMEL-3940
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.7.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.9.0
>
>
> This component
> http://camel.apache.org/language
> Can execute scripts. But the script is currently either from the endpoint uri
> or as a header. We should add an option to indicate the script should be
> loaded from a resource (file, classpath, http). And also whether or not the
> script should be cached or not. Its similar to the resource endpoint classes
> (velocity, freemarker etc.).
> If we build this logic into the camel-core then we can migrate the other
> components to use camel-core only. As they rely on Spring Resource
> abstraction. It would be nice to get rid of that dependency so end users can
> use those without the spring framework.
> Maybe something like
> {code}
> from("direct:start").to("language:groovy?script=classpath:com/foo/myScript.groovy&contentCache=false").to("mock:result");
> {code}
> Note I put in contentCache as the name for the cache option as thats the name
> freemarker, velocity uses.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira