我有一个Maven多模块项目,需要在此构建中使用两个不同的父POM。第一个是大多数模块的真正父POM,但一个模块是演示项目,它使用完全不同项目的父POM(因为它是一个演示如何使用我的项目生成第二个项目的代码)。构建可以正常工作,但我收到了一个警告:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for my_project:my_project.demo:jar:5.0.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at my_project:parent instead of other_project:parent, please verify your project structure @ line 5, column 10
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
由于other_project
并不是我构建的真正模块,所以它可以放在任何地方。这意味着我无法提供一个相对路径。
我该如何修复此警告?