- Documentation (2.4.0-rc1)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildobr
- buildnumber
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- repreport
- resolve
- resources
- retrieve
- report
- settings
- var
- Using standalone
- OSGi
- Developer doc
include
Tag: include
Includes another ivysettings file as if it were part of this one. since 1.3 The included ivysettings file has to be a complete well formed ivysettings file, i.e. it does have to include the
<ivysettings>tag.
Attributes
Attribute | Description | Required |
---|---|---|
url | a URL to the ivysettings file to include | Yes, unless file is specified |
file | a path to the ivysettings file to include | Yes, unless url is specified |
optional | indicates whether Ivy should throw an error if the specified file doesn't exist. (Since 2.4). | No, default to false |
Examples
<ivysettings>with ivysettings-default.xml:
<property name="myrepository" value="path/to/my/real/rep"/>
<settings defaultResolver="default"/>
<include file="path/to/ivysettings-default.xml"/>
</ivysettings>
<ivysettings>The included ivysettings 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 override the value given in the main ivysettings including this one, so the value used for myrepository will be path/to/my/real/rep.
<property name="myrepository" value="path/to/rep" overwrite="false"/>
<resolvers>
<ivyrep name="default" ivyroot="${myrepository}"/>
</resolvers>
</ivysettings>
<ivysettings>with ivysettings-macro.xml being the ivysettings example given on the macrodef documentation page.
<include file="ivysettings-macro.xml"/>
<resolvers>
<mymacro name="includeworks" mymainrep="included/myrep" mysecondrep="included/secondrep"/>
</resolvers>
</ivysettings>
This lets us easily reuse the custom macro resolver.