Community
Participate
Working Groups
When creating a _New JUnit Test Case_, the default _Source folder_ is ${project}/src/main/java. With m2e, we know that it should be ${project}/src/test/java. This should be automatically set.
I'll look into this and see if I can figure it out for #greatfix, hopefully by the end of March 2015.
@Dani the "New JUnit Test Case" is owned by JDT. The src/main/test folder convention is shared by other build tools, at the very least gradle, so it's not something specific to m2e One approach for the fix would be to "guess" test folders by looking at source classpath entries, see if it contains test. In case of ambiguous folders (src/test/java vs src/test/resources), then use src/test/java as a sensible default. The alternative would be to introduce an extension point to let build tools plugin list the default source location, but that's a bit overkill IMO.