How to do 'mvn compile' and 'mvn package' with m2e in Eclipse?

半城伤御伤魂 提交于 2019-12-08 19:16:27

问题


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:


  1. Right click on your project
  2. Run As
  3. Maven build...
  4. Fill in the goals you want
  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!