如何阻止 Ivy 解析的状态
在我们公司,我们使用每个人都包含的基本 Ant 文件来进行构建。它包含我们想要全局和统一定义的内容,例如构建测试、测试覆盖、构建发布、在ivy上发布等。
我想在为创建发布版本而完成的ivy解析中强制执行这一点,具有测试(集成)状态的库将被拒绝。基本上,对于发布版本,您只能使用发布类库。
但是,我找不到在 ivy 解析 ant 任务中强制执行此操作的方法(不在 ivy.xml 文件中)。
有人知道如何实现这一目标吗?
At our company, we use a base ant file that is included by everyone to do their builds. It contains the things we want to define globally and uniform, like build-test, test-coverage, build-release, publish on ivy, etc.
I would like to enforce that in the ivy resolve that is done for creating a release build, libraries that have test (integration) status are rejected. Basically, that for a release build, you can only use release-class libraries.
However, I cannot find a way to enforce this in the ivy resolve ant task (not in the ivy.xml file).
Does anybody have an idea on how to accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
选项 1
严格来说,您有两组已解析的库,因此可以通过两个 ivy 文件来解决这个问题。一个列出了对最新集成修订版的依赖关系,另一个列出了最新发布版本的依赖关系。
然后,build.xml 文件将有两个解析目标,由发布属性控制
选项 2
使用属性来确定所需的动态版本:
ivy.xml
build.xml
属性dynamic.revision有一个默认值latest.integration
然后发布版本将覆盖该值,可能从命令行,如下所示:
Option 1
Strictly speaking you have two sets of resolved libraries, so this could be solved by having two ivy files. One listing dependencies on the latest integration revisions the other the latest release versions.
The build.xml file would then have two resolution targets, controlled by a release property
Option 2
Use a property to determine the desired dynamic revision:
ivy.xml
build.xml
The property dynamic.revision has a default value of latest.integration
A release build would then override this value, possibly from the command-line as follows: