Run only integration tests on a Maven exec

374 Views Asked by At

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.

0

There are 0 best solutions below