Can I publish a directory using Ivy?

删除回忆录丶 提交于 2019-12-20 05:53:09

问题


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

I python lib file structure looks like:

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

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?


回答1:


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.

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


来源:https://stackoverflow.com/questions/14009339/can-i-publish-a-directory-using-ivy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!