用于 Git 或 TFS 的 Ivy 自定义解析器 [英] Ivy Custom Resolvers for Git or TFS

查看:19
本文介绍了用于 Git 或 TFS 的 Ivy 自定义解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Ivy 还很陌生,所以也许有一种直接的方式我无法在文档中找到,或者我正在寻找的东西是不可能的,但这里是.我希望能够指定源代码位于使用不同协议的本地和/或远程服务器上的依赖关系.

I'm fairly new to Ivy, so perhaps there's a straight forward way that I'm not able to find in the documentation or what I'm looking for is not possible, but here goes. I want to be able to specify dependencies where the source code is located on local and/or remote servers which use different protocols.

具体来说,我有一些项目依赖项存储在本地网络 TFS 服务器上,而其他项目依赖项存储在远程 Git 服务器上(更准确地说是 www.github.com).是否可以让 Ivy 下载源代码并构建一个 jar 文件,然后将其用作依赖项?如果是这样,如何?

Specifically, I have some project dependencies that are stored on a local network TFS server and additional project dependencies stored on a remote Git server (more precisely www.github.com). Is it possible to have Ivy download the source code and build a jar file which would then be used as the dependency? If so, how?

推荐答案

这要么是不可能的,要么需要严重的黑客攻击.Ivy 旨在下载已编译的依赖项.使用任何现代构建管理工具(Maven、Ivy、Gradle 等),您总是最好尽可能坚持约定.越是偏离常人的道路,最后给自己带来的痛苦就越多.

This is either impossible or would require serious hacks. Ivy is designed to download dependencies which have already been compiled. With any of the modern build management tools (Maven, Ivy, Gradle, etc.) you are always better off sticking to convention when possible. The farther you stray from the well-beaten path, the more pain you are going to cause yourself in the end.

为什么需要动态下载和编译代码?如果您只想将源代码用于调试目的,这个问题 可能会有所帮助.如果原因是因为您总是想要签入 VCS 的任何内容的绝对前沿版本,那么您最好设置某种连续构建来为您生成工件.

Why do you need to download and compile the code dynamically? If you just want to have the source code available for debugging purposes, this question may help. If the reason is because you always want the absolute bleeding edge version of whatever is checked into your VCS, you would be better off setting up some sort of continuous build which produces your artifacts for you.

这篇关于用于 Git 或 TFS 的 Ivy 自定义解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆