我试图在Grails应用程序上运行单元测试,它们恰好运行在maven生命周期的验证阶段,而不是测试阶段(首先,maven生命周期是这样的:"clean"->"validate"->"compile"->"test"->"package"->"verify"->"install"->"site"->"deploy").有没有办法将负责测试的插件(即grails:test-app)重新关联到“测试”阶段?
发布于 2016-06-07 06:34:05
如果从执行插件运行grails测试,则可以指定阶段:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>Unit-test-app</id>
<phase>test</phase>
<configuration>
<executable>grails</executable>
<commandlineArgs>test-app -unit --non-interactive </commandlineArgs>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>https://stackoverflow.com/questions/37662938
复制相似问题