I use here Eclipse with m2e plugin. If I do a project clean, it doesn't do anything.
On my experiments, I see as if m2e simply weren't wired into the eclipse project cleaning option.
I've tried to set up in lifecycle-mapping-metadata.xml
, but it didn't work. If I understand this well, maybe a clean can't be set up here, because cleaning is not considered as part of a project lifecycle from the viewpoint of the eclipse.
So, is there any way to do a simple mvn clean
from eclipse on a project cleanup?
(The ideal solution didn't require to start a new jvm, and all run inside of the eclipse process.)
In lastest version of the m2e plugin, on Luna, you can display what Maven will do:
This explains why the clean step is never called.
And sadly, it is unsupported in default Eclipse clean, but you can also invoke Maven from Eclipse using Run As > Maven clean.