问题描述
我想通过测试调试Eclipse构建。我尝试运行它运行>调试配置> Maven构建。在Base目录是我的Maven repo目录与pom.xml文件,在目标'干净的安装'。当我点击调试Eclipse启动构建,运行测试,但它不会在断点停止。我找到的最简单的方法是到:
-
右键单击项目
-
调试为 - > Maven构建 ...
-
在目标字段中,将 -Dmaven.surefire.debug测试
-
在参数中添加一个名为 forkCount 的新参数,值为
为 0 (以前是forkMode =从不,但它已被弃用,不再工作)
将断点设置为运行此配置,它应该触发断点。
I want to debug Eclipse build with tests. I tried to run it by Run > Debug Configurations > Maven Build. In Base directory is my Maven repo directory with pom.xml file, in goals 'clean install'. When I click on debug Eclipse starts build, run tests but it doesn't stops on breakpoints.
Easiest way I find is to:
Right click project
Debug as -> Maven build ...
In the goals field put -Dmaven.surefire.debug test
In the parameters put a new parameter called forkCount with a valueof 0 (previously was forkMode=never but it is deprecated and doesn't work anymore)
Set your breakpoints down and run this configuration and it should hit the breakpoint.
这篇关于Maven在Eclipse中构建调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!