what does the little arrow -> do in the ivy depend

2019-02-26 18:35发布

问题:

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.



标签: ivy