简体   繁体   English

在maven多模块项目中,建议使用软件包或安装

[英]In maven multimodule project is it recommended to use package or install

I have a maven multimodule project 我有一个Maven多模块项目

<modules>
 <module>A</module>
 <module>B</module>
 <module>C</module>
</modules>

Module C depends on Module A. In this project structure can you let me know it is recommended to use package or install. 模块C取决于模块A。在此项目结构中,您可以让我知道建议使用软件包或安装程序。 I do not have any other requirement to share this project with other projects. 我没有其他要求可以与其他项目共享该项目。

When launching a Maven command on multiple modules, if a dependency specified in one module is available as a project being built in the same command, Maven will use the output of the current build as dependency, instead of the JAR present in the local repository. 在多个模块上启动Maven命令时,如果一个模块中指定的依赖项作为在同一命令中构建的项目可用,则Maven将使用当前构建的输出作为依赖项,而不是本地存储库中存在的JAR。

So it is not necessary to use install to make the changes of a module available to modules depending on it, as long as these modules are always built together. 因此,只要这些模块始终构建在一起,就不必使用install来使模块的更改可供依赖于该模块的模块使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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