Maven “Module” vs “Project” (Eclipse, m2eclipse plugin)

后端 未结 2 457
暖寄归人
暖寄归人 2020-12-04 07:03

I\'m a beginner at Maven and I\'ve played with it from a command line point of view a little, so now I was trying to use it in Eclipse; I installed the m2eclipse plugin to d

2条回答
  •  暖寄归人
    2020-12-04 07:47

    They are basically the same thing, but with one difference. When you create a module, you must specify a parent project. When you specify the parent project, it adds a section to the parent projects pom.xml. That section basically says to the parent project, "run every command I get against all of my modules first". So if you run, "mvn package" on the top level project, it will run "mvn package" against all it's module projects first.

    Hope that helps.

提交回复
热议问题