简体   繁体   中英

Using maven-clean-plugin with m2e

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:

Eclipse偏好

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM