我可以使用Ivy发布目录吗? [英] Can I publish a directory using Ivy?

查看:76
本文介绍了我可以使用Ivy发布目录吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个python库,我想使用Ivy来管理我的私有库.

I have a python lib, and I want to use Ivy to manage my private libraries.

我的python lib文件结构如下:

I python lib file structure looks like:

mylib\
    __init__.py
    f1.py
    f2.py
    ...

现在,我要整体发布mylib,而不是逐个文件发布.在Ivy中,我知道如何使用artifact标记发布一个文件.但是如何发布整个目录?

Now I want to publish mylib as a whole, instead file by file. In Ivy, I know how to publish one file by using the artifact tag. But how can I publish the whole directory?

推荐答案

目录的问题在于对其内容进行版本化不是一件容易的事……解决此问题的最常见方法是创建tar或zip包并将其发布到您的存储库中.

The problem with a directory is that it's not very easy to version it's contents... The most common solution to this problem is to create a tar or zip package and publish this to your repository.

使用该目录的第三方组织可以下载并解压缩该文件,也可以使用打包器解析器,用于访问包中的文件.

3rd party builds consuming the directory can either download and unpack it, or alternatively use the packager resolver to access files inside the package.

包装器解析器确实增加了一些复杂性,但这是常春藤的一项非常强大的功能. ivy综述是常春藤存储库的一个示例,该存储库旨在容纳打包程序文件,从而使其更容易消耗普通存储库无法提供的工件.

The packager resolver does add some complexity, but it's a very powerful feature of ivy. The ivy roundup is an example of an ivy repository designed to hold packager files, making it easier to consume artifacts not available via normal repositories.

最后,以下答案给出了打包程序解析器示例:

Finally, the following answers gives packager resolver examples:

  • gradle - how to declare a dependency of a jar in a jar
  • Issues using ivy
  • ivy dependency on external JAR
  • Ivy Custom Resolvers for Git or TFS
  • Apache Ivy: resolving dependencies embedded in an installer

这篇关于我可以使用Ivy发布目录吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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