Groovy compilation in a MAVEN Project via Camunda plugin in Eclipse


I have created a MAVEN project and by using the Eclipse plugin I have created some workflows. Parts of these workflows are connected with groovy scripts. When I build the MAVEN project, everything is fine except the fact that any syntax errors in Groovy (e.g semicolon missing) can’t be identified as errors.

So, I believe that these scripts haven’t been compiled at all. Do I have to make any updates to the MAVEN pom.xml or somewhere else in the IDE? In it says something about enableScriptCompilation but I don’t know where to apply this.

Thank you in advance

I believe this is a misunderstanding what script compilation means in the context of Camunda. It is not possible to deploy compiled Groovy scripts to Camunda, i.e. scripts that were compiled when process application was built. If you enable script compilation (a configuration property of the process engine), the process engine compiles the script at the time when you deploy your process application. This is not coupled to the Maven build of the application.

So, if I understand your point I can’t check for any groovy errors during the building phase.

Well, you could write a unit test for your process that invokes the script and run the tests during the build.

1 Like