views:

56

answers:

2

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

Julia.

Similar to:

http://stackoverflow.com/questions/2855706/debugging-maven-junit-tests-with-filtered-resources/2856104#2856104

A: 

Right click on the project -> Run As -> Maven test

splash
I want to run a specific method in a TestCase
Julia
A: 
  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).
Pascal Thivent
I have set filtering as true for both process resources as well as process test resources, the problem is the values for the placeholders are in profiles.xml which m2eclipse is not able to pick up but when I run it from command line it works.
Julia
@Julia Oh, you're using a `profiles.xml` file. I don't recommend it and this `profiles.xml` is actually deprecated. Move the profiles into your pom.xml (or settings.xml).
Pascal Thivent
Ok, will do. Thanks. Just wondering if there is any workaround?
Julia