<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.13</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>call-groovy</id>
<phase>package</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<providerSelection>1.8</providerSelection>
<source>src/main/java/test.groovy</source>
</configuration>
</execution>
</executions>
</plugin>
this test.groovy script invokes util methods as below
class test {
util.getDetails()
}
util class is not resolved here even though both are in the same package and throwing the below error
[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.5:execute (call-groovy) on project farmer: startup failed: [ERROR] src/main/java/test.groovy: 7: unable to resolve class FarmerUtility
The error is resolved after adding maven-antrun-plugin which concatenate both the classes