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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -