问题
I've started this week to use Maven for some projects I'm working on and I use Eclipse with the m2e plugin. I've been having a look at it but I can't find a way to compile and package (as far as I can see I can do clean, generate-sources, test and install). How can this be achieved with m2e?
回答1:
- Right click on your project
- Run As
- Maven build...
- Fill in the goals you want
- Hit Run
回答2:
You have to create own Run Configuration of type Maven Build. These four are some kind of predefined builds, but you can create really customized own stuff.
来源:https://stackoverflow.com/questions/10313171/how-to-do-mvn-compile-and-mvn-package-with-m2e-in-eclipse