Download parent pom from remote repository

北城余情 提交于 2019-12-10 21:25:10

问题


Is it possible (and how) to download the parent pom from a remote repository?

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:

  • update the parent pom with reference to the new jar
  • update the single module pom referring to the new parent 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 ...

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.


回答1:


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.



来源:https://stackoverflow.com/questions/12566835/download-parent-pom-from-remote-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!