It is configurable in Eclipse how to handle and deploy the different folders, somehow the Eclipse plugin M2Eclipse should configure Eclipse right, it seams that the configuration sometimes is done and sometimes not.
So one has to check this two settings:
-
Project Properties\Java Build Path(Tab)Source : Outputfolder for
<PROJECT>/src/test/javaas well as<PROJECT>/src/test/resourcesmust be<PROJECT>/target/test-classes -
Project Properties\Deployment Assembly : There must be NO entry for
<PROJECT>/src/test/javaor<PROJECT>/target/test-classes