I want to run only my integration tests using the grails-maven-plugin. I setup a profile to run the exec command as such:
<profile>
<id>run-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<executions>
<execution>
<id>grails-integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<command>test-app</command>
<env>integration</env>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
The problem is to run only the integration tests the grails command looks like:
grails test-app integration:
With the colon at the end of integration, so when I do
<args>integration:</args>
This throws:
BasicLazyInitializer: Javassist Enhancement failed: <my classes in integration tests>
groovy.lang.MissingPropertyException: No such property: hasProperty for class: groovy.lang.MetaClassImpl
So basically I need to figure out how to pass the argument integration:
into the maven exec, but I think maven doesn't like the colon.
-DskipTests=true
and having the exec run both unit and integration tests. Thanks for the help @dmahapatro! – janDro Nov 13 '14 at 21:07