what does the little arrow -> do in the ivy dependency section?

若如初见. 提交于 2019-12-20 03:48:09

问题


i'm using ivy and the firm i work at has a few fun little ivy and ant tutorials.

Each tutorial helpfully completely skirts around what the arrow does in an ivy build xml file, when used in the dependencies section.

So, given this setup:

<configurations>
      <conf name = "runtime" />
      <conf name = "build-tests" extends="runtime" />
   </configurations>
   ...
   <dependencies>
        ...
        <dependency org="blah" name="junit" rev="default" conf="build-tests->runtime"/>
        <dependency org="blahblah" name="xmlutil" rev="default" conf="build-tests->testing"/>
        <dependency org="blahblahblah" name="slf4j" rev="default" conf="build-tests->simple"/>
    </dependencies>

What is each dependency declaring? I thought that build-tests was already extending runtime (from the config declaration), so why does the dependencies conf restate this? Is is needed?

The testing and simple aren't declared in the ivy.xml i have, are they magic and exist outside a formal declaration?

thanks!


回答1:


Configuration mappings are designed to associate locally declared configurations to configurations declared in a remote module.

   mylocalconf->remotemoduleconf

What are configurations? They are logical groupings of files, typically used to populate classpaths or directories.

"simple" and "testing" are not part of the standard configurations generated for remote maven modules, suggesting that you're downloading from an ivy repo? Check the ivy files of the dependencies, you'll find the missing configurations there.



来源:https://stackoverflow.com/questions/13582419/what-does-the-little-arrow-do-in-the-ivy-dependency-section

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