////
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
////

*Tag:* include *Parent:* link:../ivyfile/dependency{outfilesuffix}[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:

[source,xml]
----
<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

[options="header",cols="15%,50%,35%"]
|=======
|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 `matcher` attribute below)|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 `matcher` attribute below)|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 `matcher` attribute below)|No, defaults to the value of `type`
|matcher|the link:../concept{outfilesuffix}#matcher[matcher] to use to match the modules to include (*__since 2.0__*)|No, defaults to `exactOrRegexp` in pre 1.3 Ivy files, and `exact` in 1.3 and superior
|conf|comma separated list of the master configurations in which this artifact should be included.

`$$*$$` wildcard can be used to designate all configurations of this module|No, defaults to `$$*$$`, unless nested conf are specified
|=======

== Child elements

[options="header"]
|=======
|Element|Description|Cardinality
|link:../ivyfile/dependency-include-conf.html[conf]|configuration in which the artifact should be included|0..n
|=======
