Build specific module in multi-module project

非 Y 不嫁゛ 提交于 2019-12-10 20:23:13

问题


I have a multi-module project.

I thought I can compile only a single module from that multi module project with this line:

mvn -amd -pl "module-name"

This does not seem to work, but only builds the specific module. Its dependencies are not compiled yet so it fails.

Any ideas how to solve that?


回答1:


Try mvn -am -pl "module-name" instead (replace -amd with -am).

The -amd flag tries to build projects that depend upon "module-name" whereas -am builds projects that "module-name" depends upon. I feel that the documentation on those flags is a little counter-intuitive, but I'm pretty sure that this will fix your problem.



来源:https://stackoverflow.com/questions/2616260/build-specific-module-in-multi-module-project

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