Maven在Eclipse中构建调试 [英] Maven build debug in Eclipse

查看:142
本文介绍了Maven在Eclipse中构建调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过测试调试Eclipse构建。我尝试运行它运行>调试配置> Maven构建。在Base目录是我的Maven repo目录与pom.xml文件,在目标'干净的安装'。当我点击调试Eclipse启动构建,运行测试,但它不会在断点停止。

解决方案

我找到的最简单的方法是到:


  1. 右键单击项目


  2. 调试为 - > Maven构建 ...


  3. 在目标字段中,将 -Dmaven.surefire.debug测试


  4. 在参数中添加一个名为 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:

  1. Right click project

  2. Debug as -> Maven build ...

  3. In the goals field put -Dmaven.surefire.debug test

  4. In the parameters put a new parameter called forkCount with a value of 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中构建调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆