import groovy script

One Star

import groovy script

I would like to know how it could be to import a groovy script in a talend ESB Studio enterprise ( version 5.2.2); I would like to put this script in the classpath as a ressource: it will be used in a camel route like this:
.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy") ....
One Star

Re: import groovy script

It is possible, but I would not recommend this since you depend on different class loader algorithms during development (Studio) and deployment (ESB -- OSGi). Furthermore the Groovy and Camel version used in 5.2.2 has issues which forces you to upgrade to 5.3.
Just an advice: if you have the option to avoid using Groovy at all and write your logic in Java, I recommend to to the latter. You will run into many other issues (Groovy related) later on, even if you get the class path problem solved.