m2eclipse过滤测试资源 [英] m2eclipse filtering test resources

查看:76
本文介绍了m2eclipse过滤测试资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用m2eclipse,我想右键单击并从Eclipse内部运行测试,同时从Maven中过滤掉测试资源.我怎样才能做到这一点?当我右键单击测试时,从eclipse中我没有任何m2eclipse选项

I am using m2eclipse and I want to right click and run tests from inside eclipse while the test resources get filtered from Maven. How can I do this? From eclipse when I right click on a test I do not get any m2eclipse options

朱莉娅.

类似于:

使用过滤后的资源调试Maven junit测试吗?

推荐答案

  1. pom.xml中设置过滤(并且您将在Eclipse下使用m2eclipse进行过滤,m2eclipse在更改任何资源后将运行process-resources).
  2. 像其他测试一样运行您的测试(右键单击,然后运行方式> JUnit测试).
  3. 第一次运行后,您可以运行单个测试方法(在JUnit视图中在该方法上右键单击).
  1. Setup filtering in your pom.xml (and you'll get filtering under Eclipse with m2eclipse, m2eclipse runs process-resources after a change of any resource).
  2. Run your test as any other test (right-click then Run As > JUnit Test).
  3. After a first run, you can run an individual test method (right-click on the method in the JUnit view).

这篇关于m2eclipse过滤测试资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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