我有一个 Maven 构建,我想为其执行 jar 创建,但mvn package
由于单元测试失败而失败。
尽管有些测试失败了,但我仍然想构建 jar,我试过了
mvn package -Dtest=false -DfailIFNoTests=false
但这失败了。
mvn jar:jar
似乎有效,但我宁愿使用更惯用的mvn package
方法。
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.119s
[INFO] Finished at: Mon Mar 11 12:07:16 EDT 2013
[INFO] Final Memory: 9M/234M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project glusterfs: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]