常春藤中的配置映射是什么? [英] What is a configurationmapping in ivy?

查看:66
本文介绍了常春藤中的配置映射是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的东西:

<configurations defaultconfmapping="build->default;compile->compile(*),master(*);test,runtime->runtime(*),master(*); statistic->stistic(*)">

在我的 ivy.xml 中,我不理解配置映射"的概念

in my ivy.xml and I don't understand the concept of a 'configuration mapping'

谁映射到了什么?为什么?(*)是什么意思?

Who gets mapped to what? Why? What does the (*) mean?

推荐答案

最近几天,我一直在试图自己理解这一点.我认为这是这样的:

I've been trying to understand this myself for the last few days. I think this is how it works:

"build-> default"意味着如果我要求jar的所有"build"依赖项,那么Ivy从存储库中提取该依赖项的"default"版本.相反,如果您说"build-> build"或等效的"build",那么Ivy会在存储库中查找一个标记为"build"的jar来满足该依赖性.我认为回购中具有多个标记工件的主要目的是拥有代码的默认",源","javadoc"甚至调试"版本.

"build->default" means that if I ask for all of the "build" dependencies of my jar, then Ivy pulls the "default" version of that dependency from the repository. If instead you say "build->build" or equivalently "build" then Ivy looks for a jar tagged "build" in the repository to satisfy that dependency. I think the main purpose of having multiple tagged artifacts in the repo are to have a "default", "source", "javadoc" and maybe "debug" version of your code.

我大量使用"provided-> default"来指定需要编译的jar,但是我不需要将其添加到插件安装程序中,因为我知道jar会在运行时已经存在,因为由其他安装程序提供.

I make heavy use of "provided->default" to specify jars that I need to compile against, but that I don't need to add to my plugin installer because I know that jar will already be present at runtime because it's provided by a different installer.

这篇关于常春藤中的配置映射是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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