常春藤:防止下载源代码和.txt文件 [英] ivy: prevent downloading sources and .txt files
问题描述
如何告诉IVY不要下载源文件和.txt文件.我有一个依赖项,当我使用这样的东西时,它会与它一起下载license.txt文件
How to tell IVY to not download source and .txt files. I have a dependency and it downloads license.txt files with it, when i use soemthing like this
<ivy:cachepath pathid="ivy-src-classpath" conf="compile"/>
将.txt文件放在使用Java任务时出错的类路径中
it put the .txt files in the classpath which errors out while using java task
Unable to obtain resource from /home/muthiah/Work/ivy/cache/org.apache.commons/com.springsource.org.apache.commons.logging/licenses/license-1.1.1.txt: java.util.zip.ZipException: error in opening zip file
推荐答案
在您的 ivy.xml 文件中,将配置映射添加到另一个模块的默认"配置:
In your ivy.xml file add a configuration mapping to the other module's "default" configuration:
<dependency org="commons-lang" name="commons-lang" rev="2.5" conf="compile->default"/>
没有此映射,您将同时检索远程模块的默认和可选依赖关系.
Without this mapping you're retrieving both the default and optional dependencies of the remote module.
要使用的另一个良好的映射(对于Maven模块)是:
Another good mapping (for Maven modules) to use is:
conf="compile->master"
这将检索没有临时依赖项的远程工件.
This will retrieve the remote artifact without it's transient dependencies.
这篇关于常春藤:防止下载源代码和.txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!