I'm using M2E for maven integration with eclipse. My unit tests reference property files in the resources/ directory. Well, everything fine in the command line test (mvn test
). However, in Eclipse, the resources couldn't be found.
Check the Java Build Path, there, all resources entries are marked with Excluded: **
. (I deem it should only exclude .java/.class files) Then, after removed the exclude pattern, the problem fixed.
I'm not sure whether I should remove all Excluded **
by hand, or maybe I doesn't use M2E correctly.
P.S. The projects are imported by Existing Maven Projects
.