Skip navigation.

include

A search was performed for "ivy doc use rereport", but nothing was found. Please use the form below to search all of our site content.

Tag: include

Includes another ivyconf file as if it were part of this one. since 1.3

The included ivyconf file has to be a complete well formed ivyconf file, i.e. it does have to include the <ivyconf> tag.

Attributes

Attribute Description Required
file a path to the ivyconf file to include Yes

Examples

<ivyconf>
  <property name="myrepository" value="path/to/my/real/rep"/>
  <conf defaultResolver="default"/>
  <include file="path/to/ivyconf-default.xml"/>
</ivyconf>

with ivyconf-default.xml:

<ivyconf>
  <property name="myrepository" value="path/to/rep" overwrite="false"/>
  <resolvers>
    <ivyrep name="default" ivyroot="${myrepository}"/>
  </resolvers>
</ivyconf>

The included ivyconf defines a resolver named default, which is an ivyrep resolver, with its root configured as being the value of myrepository variable. This variable is given the value path/to/rep in the included file, but because the attribute overwrite is set to false, it will not overide the value given in the main ivyconf including this one, so the value used for myrepository will be path/to/my/real/rep.


<ivyconf>
  <include file="ivyconf-macro.xml"/>
  <resolvers>
    <mymacro name="includeworks" mymainrep="included/myrep" mysecondrep="included/secondrep"/>
  </resolvers>
</ivyconf>

with ivyconf-macro.xml being the ivyconf example given on the macrodef documentation page.
This let reusing macro resolver easy.