仅对Maven exec运行集成测试

时间:2014-11-13 20:22:31

标签: maven grails grails-maven

我想使用grails-maven-plugin只运行我的集成测试。我设置了一个配置文件来运行exec命令:

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

问题是只运行grails命令的集成测试: grails test-app integration: 在整合结束时使用冒号,所以当我做

<args>integration:</args>

这引发:

BasicLazyInitializer: Javassist Enhancement failed: <my classes in integration tests>
groovy.lang.MissingPropertyException: No such property: hasProperty for class: groovy.lang.MetaClassImpl

所以基本上我需要弄清楚如何将参数integration:传递给maven exec,但我认为maven不喜欢冒号。

0 个答案:

没有答案
相关问题