The eclipse builder uses simpler logic than maven, so sometimes the things m2eclipse does are just not enough. I usually keep a shell open to issue simple commands before I run unit tests. depending on your setup, here are some commands that might be helpful.
mvn process-resources
# This is usually enough when you have
# changed something in src/main/resources
If you know that the only resource processing needed is maven resource filtering, just call the goal:
mvn resources:resources
Same for tests:
mvn processs-test-resources
or
mvn resources:test-resources
If you need a fuller solution, because perhaps some new code has to be generated etc, then use
mvn test-compile
# This will through recursion process the following phases:
validate
initialize
generate-sources
process-sources
generate-resources
process-resources
compile
process-classes
generate-test-sources
process-test-sources
generate-test-resources
process-test-resources
test-compile
So you're getting pretty much everything except the actual unit test execution. Most plugins are smart enough to detect changes and leave unchanged files alone, so mvn test-compile
is usually fast enough.
If you prefer not to use a shell, you can of course bind any of the above phases / goals to m2eclipse Run as... maven build
targets.