- Documentation (2.5.0-rc1)
- Release Notes
- Tutorials
- Reference
- Introduction
- 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
exclude
Tag: exclude 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 excluding artifacts being published by the dependency or any of its transitive dependencies, even if configuration does not provide a good separation of published artifacts.
The same principle concerning configuration as for include applies to this exclude feature (see the include feature).
Note that exclusion is always done AFTER inclusion has been done.
(since 1.3) This exclude feature can also be used not only to exclude artifacts but also to exclude whole modules. Indeed when you exclude artifacts, it doesn’t prevent Ivy from searching for the module itself, and resolving the dependencies of the module. But you can also exclude the entire module, which means that the module will not be downloaded at all, and so its own dependencies will not be resolved. For sure, this is usually done to exclude not a direct dependency but an indirect one. To exclude a whole module, you just have to not specify any artifact name, type and ext in your exclude rule. For instance:
<dependency name="A" rev="1.0">
<exclude module="B"/>
</dependency>
(since 2.0) A module wide exclude can also be used to exclude dependencies for the whole module (and not only in the context of one dependency as it is the case here).
Attributes
Attribute | Description | Required |
---|---|---|
org |
the organisation of the dependency module or artifact to exclude, or a regexp matching this organisation (since 1.3) |
No, defaults to |
module |
the name of the dependency module or the artifact to exclude, or a regexp matching this module name (since 1.3) |
No, defaults to |
name |
the name of an artifact of the dependency module to add to the exclude 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 exclude list, or a regexp matching this name |
No, defaults to |
ext |
the extension of the artifact of the dependency module to add to the exclude list, or an expression matching this name (see |
No, defaults to the value of |
matcher |
the matcher to use to match the modules to excludes (since 1.3) |
No, defaults to |
conf |
comma separated list of the master configurations in which this artifact should be excluded.
|
No, defaults to |
Child elements
Element | Description | Cardinality |
---|---|---|
configuration in which the artifact should be excluded |
0..n |