0
在Maven项目中,我使用maven-exec-plugin来启动我的Grunt测试。它是这样的:正确绑定maven exec插件到测试阶段
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>cmd</executable>
<workingDirectory>${project.basedir}/src/main/webapp</workingDirectory>
<arguments>
<argument>/C</argument>
<argument>grunt --no-color test</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
有了,我可以运行mvn test
和我的呼噜声test
任务将被执行:如果测试通过,Maven构建通,如果测试失败的Maven构建失败。当一些测试失败,我有以下的输出:
............................................. 1 failing
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.496s
[INFO] Finished at: ** ** ** **:**:** CEST ****
[INFO] Final Memory: *M/*M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project *****: Command execution failed. Process exited with an error: 6 (Exit value: 6) -> [Help 1]
我想知道是否有可能有失败的测试的“常态”行家输出。例如:Build failure, there are failing tests
。
谢谢
是啊,这就是我担心。感谢指向'grunt-maven-plugin'的指针,尽管我更喜欢使用'exec-maven-plugin'。 – htulipe