无法解析 gmaven 插件中的 class 实用程序

Unable to resolve the class util in gmaven plugin

            <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>

此 test.groovy 脚本调用 util 方法如下

class test {
util.getDetails() 
} 

util class 未在此处解析,即使两者在同一个包中并抛出以下错误

[ERROR] 无法执行目标 org.codehaus.gmaven:gmaven-plugin:1.5:execute (call-groovy) on project farmer: startup failed: [错误] src/main/java/test.groovy: 7: 无法解析 class FarmerUtility

添加连接 类

的 maven-antrun-plugin 后错误得到解决