简体   繁体   English

在netbeans 7中,如何在构建maven项目时跳过测试并添加maven附加参数?

[英]In netbeans 7 how do I skip testing and add maven additional parameters when building a maven project?

我想发出像-Dmaven.test.skip=true -Dcheckstyle.skip这样的命令

Go to your project properties. 转到您的项目属性。 Right click on the project name in Project Explorer and click Properties . Project Explorer中右键单击项目名称,然后单击“ 属性” Select Actions . 选择操作

Select the configuration that you are interested in. Select the action that you are interested in. Under set properties you can add the skip test and so on. 选择您感兴趣的配置。选择您感兴趣的操作。在设置属性下,您可以添加跳过测试等。

Netbeans属性窗口

You can also set up global commands by going to: 您还可以通过以下方式设置全局命令:

Tools->Options->Miscellaneous->Maven->Edit Global Custom Goal Definitions. 工具 - >选项 - >杂项 - > Maven->编辑全局自定义目标定义。

These will be available to all maven projects. 这些将适用于所有maven项目。

In Netbeans 8.2 in addition to 在Netbeans 8.2中除了

Tools->Options->Java->Maven->Execution->Skip Tests (checkbox)

in the same dialog you may need to add -Dmaven.test.skip to the 在同一个对话框中,您可能需要将-Dmaven.test.skip添加到

Global Execution Options (textfield)

跳过测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM