- Documentation (2.6.0-local-20230820130639)
- Release Notes
- Tutorials
- Reference
- Introduction
- System Properties
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildnumber
- buildobr
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- report
- repreport
- resolve
- resources
- retrieve
- settings
- var
- Using standalone
- OSGi
- Developer doc
include
Tag: include Parent: dependency
This feature gives you more control on a dependency for which you do not control its Ivy file. It enables to restrict the artifacts required by including only the artifacts given here, even if configuration does not provide a good separation of published artifacts.
Each artifact restriction can be given in the context of particular master configurations. By default, if no configuration is specified, artifact restrictions apply to all master configurations. But you can specify that a restriction applies only to one or several master configurations, using either inline or nested conf specification. In this case, do not forget that if you do not specify any restriction for a particular configuration, then no restriction will apply for this configuration and it will be resolved not taking any restriction into account.
For instance, imagine you have A, B & C master configurations. If you restrict to art1 in A & B and art2 in A, then C will not be restricted at all, and will thus get all artifacts of all dependency configurations if you do not specify a configuration mapping. To prevent this, you have to specify a configuration mapping for the dependency, mapping only A & B to some or all dependency configurations.
Example:
<dependency org="yourorg" name="yourmodule9" rev="9.1" conf="A,B->default">
<include name="art1" type="jar" conf="A,B"/>
<include name="art2" type="jar" conf="A"/>
</dependency>
Attributes
Attribute | Description | Required |
---|---|---|
name |
the name of an artifact of the dependency module to add to the include list, or an expression matching this name (see |
No, defaults to |
type |
the type of the artifact of the dependency module to add to the include list, or an expression matching this name (see |
No, defaults to |
ext |
the extension of the artifact of the dependency module to add to the include list, or an expression matching this name (see |
No, defaults to the value of |
matcher |
the matcher to use to match the modules to include (since 2.0) |
No, defaults to |
conf |
comma separated list of the master configurations in which this artifact should be included.
|
No, defaults to |
Child elements
Element | Description | Cardinality |
---|---|---|
configuration in which the artifact should be included |
0..n |