从远程存储库下载父pom [英] Download parent pom from remote repository
问题描述
是否可以(以及如何)从远程存储库下载父pom?
Is it possible (and how) to download the parent pom from a remote repository?
为什么? 我有一个包含许多模块的项目设置.父pom指定对第三方jar的依赖关系.如果其中一个模块需要其中一个jar的更高版本中的新功能,我想:
Why? I have a project setup with many modules. The parent pom specifies dependencies to third-party jars. If one of the modules needs a new feature in a later version of one of the jars, I'd like to:
- 参考新的jar更新父pom
- 引用新的父pom更新单个模块pom.
但是,这会中断所有其他模块的构建,具体取决于较早的父pom.我收到错误消息
However, this breaks the build for all other modules depending on the older parent pom. I get the error message
Non-resolvable parent POM: Could not find artifact company:modbase:pom:2.0.6
in mirrored.repo.com (http:((mirrored.repos.com/pub/java/maven2) and
'parent.relativePath' points at wrong local POM ...
所需的较早的父pom部署在pom文件中指定的远程maven存储库中,但是,maven尝试搜索在settings.xml中指定为镜像的存储库.
The desired older parent pom is deployed at a remote maven repository specified in the pom file, however, maven tries to search in a repo specified as mirror in settings.xml.
推荐答案
只需从父pom中创建一个单独的maven模块,并在对其进行更改后制作一个新版本,从而产生一个新版本,该版本可在其他版本中用作父版本.模块.
Just make a separate maven module out of the parent pom and after changing it make a new release which results in a new version which can be used as parent in other modules.
这篇关于从远程存储库下载父pom的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!