gpt4 book ai didi

maven多模块项目: is relativepath necessary?

转载 作者:行者123 更新时间:2023-12-01 02:20:09 29 4
gpt4 key购买 nike

我正在尝试将一组不相交的 Maven 项目链接到一个标准的多模块项目中。

有趣的是,模块目前没有按自然层次结构排列。如果我与父 pom 链接在一起,那么在我添加 relativePaths 之前 react 器不会启动到子 pom XML 文件中的父节。

如果 GAV 详细信息在父版本与子版本中是正确的,并且子模块都链接在父 pom 中 - 这还不够吗?

简单来说 - 对于非标准目录结构,relativePath多模块Maven项目绝对必要?

谢谢,艾斯

最佳答案

in simple terms - for a non-standard directory structure, is the relativePath strictly necessary for a multi module maven project?



答案是:是的!

如果父级尚未安装在本地存储库中,并且目录结构为例如:
.
|-- my-module
| `-- pom.xml
`-- parent
`-- pom.xml

如果不设置 <relativePath>,子模块无法继承其父 POM 的 groupId/版本。元素。

http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Example_2

关于maven多模块项目: is relativepath necessary?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21125358/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com