AnsweredAssumed Answered

ActivitiException: Can't find scripting engine for 'groovy'

Question asked by anasofiafreitas on Dec 14, 2015
Latest reply on Dec 18, 2015 by jbarrez
I'm trying to deploy and execute a very simple workflow that runs a groovy script.
I implemented the code in Eclipse and I can successfully execute it, but when I try to export it to a .jar file, using Maven, I'm getting an exception saying: Can't find scripting engine for 'groovy'.

I've seen a couple of old topics related to this exception here in the forum, and the solution was to add groovy-all as a dependency (instead of groovy). But I'm already doing it… and still the same problem.

Here is a snapshot of my pom.xml file. Does anybody know what I'm doing wrong here?


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>Oil_Spill</groupId>
  <artifactId>Oil_Spill</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>
  <build>
    <sourceDirectory>src/main/java/Job1</sourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
      <artifactId>maven-jar-plugin</artifactId>
      <version>2.3.1</version>
      <configuration>
        <archive>
          <index>true</index>
          <manifest>
            <addClasspath>true</addClasspath>
            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
          </manifest>
        </archive>
      </configuration>
    </plugin>
      <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <configuration>
        <archive>
          <manifest>
            <mainClass>Job1.Main</mainClass>
          </manifest>
        </archive>
        <descriptorRefs>
          <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
      </configuration>
    </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.bpmn</include>
          <include>*.xml</include>
        </includes>
      </resource>
    </resources>
  </build>
  <dependencies>
     <dependency>
        <groupId>org.activiti</groupId>
        <artifactId>activiti-engine</artifactId>
        <version>6.0.0.Beta1</version>
     </dependency>
     <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.4.3</version>
    </dependency>
     <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.13</version>
     </dependency>
     <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.3.176</version>
    </dependency>
  </dependencies>
</project>

Outcomes