解决ivy依赖版本顺序
在我的构建工件存储库中,我从分支和主干进行构建。
我已经测试过我的解决方案适用于分支,并获取正确的项目。
但如果依赖项也在主干存储库中,则这不起作用。在这种情况下,它从主干而不是我的分支获取依赖项。
如果依赖项不在分支中,我需要解析从主干存储库中提取依赖项,但如果依赖项在分支中,我需要分支版本,而不是主干版本。
我怎样才能在常春藤中做到这一点?我希望它只找到分支版本,然后停止寻找它。这样,如果分支中缺少它,它就会“落入”主干版本。
对于这种情况,我使用内部版本号的方式是否可能不正确?
这是一个示例:
trunkbuild - version = "1.0.4" Branchbuild - version = "1.0-SNAPSHOT"
我的分支应该是“1.1-SNAPSHOT”吗?
我的分支中的代码应该始终是前面的版本,而不是主干之后的版本。
In my build artifact repository, I have builds from both a branch and a trunk.
I have tested that my resolve works to the branch, and grabs the correct item.
But this doesn't work if the dependency is also in the trunk repo. In this case it grabs the dependency from the trunk and not my branch.
I need resolve to pull a dependency from the trunk repo if it's not in the branch, but if the dependency is in the branch, I need the branch version, not the trunk version.
How can I do this in Ivy? I'd prefer it to just find the branch version, then stop looking for it. That way if it's missing from the branch, it "falls through" to the trunk version.
Is it possible the way I am using build numbers is incorrect for this situation?
Here is an example:
trunkbuild - version = "1.0.4"
branchbuild - version = "1.0-SNAPSHOT"
Should my branches be "1.1-SNAPSHOT" instead?
The code in my branches should always be a version AHEAD, not behind the trunk.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为它的动态修订正是您所寻找的:
Maven 存储库支持两种基本类型的存储库:
只有在我的主干分支上构建的工件才会发布到发布存储库。
因此,以下 ivy 解析器设置应该足以使其正常工作,“latest.integration”解析为快照存储库中的工件。
注意:
您可以在存储库管理器中创建一个存储库组,并将 ivy 设置简化为单个 URL。
I think it's dynamic revisions is what you're looking for:
Maven repositories supports two basic types of repository:
Only artifacts built on my trunk branch are published to the Release repository.
So the following ivy resolver setup should be enough to get it working, with "latest.integration" resolving to artifacts in the snapshots repo.
Note:
You could create a repository group within your repository manager and simplify the ivy setup to a single URL.