如何配置播放框架以将我的工件存储库用于所有依赖项?
我正在尝试添加一个本地 Maven 存储库,该存储库是我使用用于缓存 Maven 存储库的神器设置的。按照 依赖说明 我找到了如何使用 contains 属性设置存储库这限制了存储库的内容。我想做的是让这个存储库用于所有内容,有没有办法配置它?
repositories:
- artifactory:
type: iBiblio
artifact: "http://myartifactoryhost.com/artifactory/libs-release"
contains:
- foo-bars -> *
I am trying to add a local maven repository that I have set up using artifactory which I use to cache maven repositories. Following the dependency instructions I have found how to set up a repository with a contains attribute that scopes what the repository has. What I would like to do is have this repository used for everything, is there a way to configure that?
repositories:
- artifactory:
type: iBiblio
artifact: "http://myartifactoryhost.com/artifactory/libs-release"
contains:
- foo-bars -> *
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将以下内容放入 $HOME/.ivy2/ivysettings.xml
这将使 ivy (并因此发挥依赖解析)首先查看本地 maven 存储库,然后使用您的存储库管理器(类似于 .m2/settings.xml 中的mirrorOf * )。
You can put the following to $HOME/.ivy2/ivysettings.xml
This will make ivy (and therefore play dependency resolution) first look in local maven repo and then use your repo manager (similar to mirrorOf * in .m2/settings.xml).
您可以使用本地存储库之类的东西配置并将所有内容放在那里。在您的情况下,本地存储库将指向您的工件主机。
请注意,您无法替换“play”条目,尽管您可以将模块的本地副本添加到存储库中以使用它们。
You can use something like the local repository configuration and put everything in there. In your case the local repo would point to your artifacts host.
Be aware you can't replace the "play" entry, although you can add local copies of modules to your repository to use them.