目标中的Maven调用者跳过测试 [英] Maven Invoker Skipping Test in Goals
本文介绍了目标中的Maven调用者跳过测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面是我的代码
InvocationRequest request = new DefaultInvocationRequest();
request.setPomFile(new File(pom.xml));
request.setGoals(Arrays.asList("clean", "install"));
Invoker invoker = new DefaultInvoker();
try {
invoker.execute(request);
} catch (MavenInvocationException e) {
e.printStackTrace();
}
当我打电话给pom.xml时,我想跳过无法找到的测试.
when i am calling pom.xml i wanted to skip the test which i am not able to find out.
如何在setGoals方法中设置跳过测试.
How to set the skip test in setGoals method.
推荐答案
糟糕,很快就找到了以下答案.
Oops It was quick fix found the below answer.
request.setGoals(Arrays.asList("clean", "install","-Dmaven.test.skip=true"));
谢谢
这篇关于目标中的Maven调用者跳过测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文