【发布时间】:2011-08-12 16:32:56
【问题描述】:
我有一个项目,我设置为使用 test-jar 和普通 jar 通过使用此设置来构建:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
这个问题是每当我在 pom 中升级项目版本时,我都需要使用测试进行构建,否则 maven 将无法在 test-compile 期间找到具有正确版本的 test-jar短语。很多时候我只想跳过测试,但由于缺少测试罐,test-compilephrase 将失败。
我尝试使用-Dmaven.test.skip=true,但这似乎并没有跳过test-compile 阶段。有没有办法跳过这个?
【问题讨论】:
标签: testing build maven compilation skip