gpt4 book ai didi

java - 模块可以与父模块具有相同的artifactID吗? |梅文

转载 作者:行者123 更新时间:2023-12-01 16:45:48 26 4
gpt4 key购买 nike

我有一个具有以下结构的 Maven 项目:

parent (artifactID: ABC)
|
|---- module 1 (artifactID: ***)
|---- module 2 (artifactID: XYZ)

模块 1 可以有 artifactID:ABC 吗?

我的父模块只是为了将模块打包在一起。它没有自己的任何源代码。

Maven 是否考虑模块的层次结构来区分两个模块?如果不是为什么?
区分两个同名但在不同地点的人应该不难。

最佳答案

groupId相同时,artifactId必须不同。

作为专家 docs状态,groupId 必须是全局唯一的,并且 artifactIdgroupId 内必须是唯一的。

groupId

A universally unique identifier for a project. It is normal to use a fully-qualified package name to distinguish it from other projects with a similar name

artifactId

The identifier for this artifact that is unique within the group given by the group ID.

关于java - 模块可以与父模块具有相同的artifactID吗? |梅文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51464197/

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