maven - gmaven:execute can't find compiled class -
i'm attempting use gmaven-plugin compile class com.kc.validator
in src/test/groovy/com/kc/validator.groovy , run script using class. after mvn compile
.class file in *target/test-classes/com/kc script execution fails:
failed execute goal org.codehaus.gmaven:gmaven-plugin:1.5:execute (validate-configuration) on project solver2: startup failed, script1367530828433.groovy: 1: unable resolve class com.kc.validator
the relevant section of pom.xml is:
<plugin> <groupid>org.codehaus.gmaven</groupid> <artifactid>gmaven-plugin</artifactid> <version>1.5</version> <executions> <execution> <id>compile-groovy</id> <goals> <goal>compile</goal> <goal>testcompile</goal> </goals> </execution> <execution> <id>validate</id> <phase>test</phase> <goals> <goal>execute</goal> </goals> <configuration> <source> (new com.kc.validator()).validate() </source> </configuration> </execution> </executions> </plugin>
have tried using <scriptpath>
inside <configuration>
?
<configuration> <scriptpath> <element>${pom.basedir}/src/test/groovy/com/kc</element> </scriptpath> <source>......</souce> </configuration>
refer using groovy classes.
Comments
Post a Comment