Added: ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude-conf.html URL: http://svn.apache.org/viewvc/ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude-conf.html?rev=1005260&view=auto ============================================================================== --- ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude-conf.html (added) +++ ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude-conf.html Wed Oct 6 21:25:29 2010 @@ -0,0 +1,140 @@ + + + + + + + + +conf | Apache Ivy + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ +
+ + + + +
+ + +
+ + +
+ + + + + + + +
+
+ +

conf

+
Tag: conf Parent: artifact
+
+Specify a configuration in which the enclosing artifact exclusion should be included.

Attributes

+ + + + + + + + +
AttributeDescriptionRequired
namethe name of the master configuration in which the enclosing artifact should be excludedYes
+ + +
+
+ + + + + + + + + + + + +
+ + Added: ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude.html URL: http://svn.apache.org/viewvc/ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude.html?rev=1005260&view=auto ============================================================================== --- ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude.html (added) +++ ant/ivy/site/target/history/2.2.0/ivyfile/artifact-exclude.html Wed Oct 6 21:25:29 2010 @@ -0,0 +1,165 @@ + + + + + + + + +exclude | Apache Ivy + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ +
+ + + + +
+ + +
+ + +
+ + + + + + + +
+
+ +

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 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 avoid ivy to search for the module itself, and to resolve the dependencies of the module. But you can also exclude the whole 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

+ + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
orgthe organisation of the dependency module or artifact to exclude, or a regexp matching this organisation since 1.3No, defaults to *
modulethe name of the dependency module or the artifact to exclude, or a regexp matching this module name since 1.3No, defaults to *
namethe name of an artifact of the dependency module to add to the exclude list, or an expression matching this name (see matcher attribute below)No, defaults to *
typethe type of the artifact of the dependency module to add to the exclude list, or a regexp matching this nameNo, defaults to *
extthe extension of the artifact of the dependency module to add to the exclude list, or an expression matching this name (see matcher attribute below)No, defaults to type
matcherthe matcher to use to match the modules to excludes since 1.3No, defaults to exactOrRegexp in pre 1.3 ivy files, and exact in 1.3 and superior
confcomma separated list of the master configurations in which this artifact should be excluded.
'*' wildcard can be used to designate all configurations of this module
No, defaults to '*', unless nested conf are specified
+

Child elements

+ + + + + + + + +
ElementDescriptionCardinality
confconfiguration in which the artifact should be excluded0..n
+ + +
+
+ + + + + + + + + + + + +
+ + Added: ant/ivy/site/target/history/2.2.0/ivyfile/artifact.html URL: http://svn.apache.org/viewvc/ant/ivy/site/target/history/2.2.0/ivyfile/artifact.html?rev=1005260&view=auto ============================================================================== --- ant/ivy/site/target/history/2.2.0/ivyfile/artifact.html (added) +++ ant/ivy/site/target/history/2.2.0/ivyfile/artifact.html Wed Oct 6 21:25:29 2010 @@ -0,0 +1,174 @@ + + + + + + + + +artifact | Apache Ivy + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ +
+ + + + +
+ + +
+ + +
+ + + + + + + +
+
+ +

artifact

+
Tag: artifact Parent: publications

Declares an artifact published by this module. This is especially useful for other modules dependending on this one. They thus get all published artifacts belonging to the configurations asked. Indeed, each published artifact declares in which public configuration it is published. Thus a module depending on this module only get artifacts marked with the asked configurations, taking into account configurations extension (see configuration declaration).

The configurations in which an artifact is published can be configured in two ways: +
    +
  • conf attribute on artifact element
  • +
  • conf subelement
  • +
+The two are equivalent, it is only a matter of preference. However, do not mix both for one artifact.

since 1.4 The artifact element has default values for all its attributes, so if you want to declare a default artifact you can just declare it like that:
+<artifact />
+
If this is the only artifact declared, then it's equivalent to having no publication section at all.

since 1.4 It is possible to give a url at which artifacts can be found. This is not mandatory, and even not recommended. This is only a convenient way to deal with an existing repository with a bad layout, but should not be avoided in an enterprise repository.

since 1.4 This tag supports extra attributes.

Attributes

+ + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
namethe name of the published artifact. This name must not include revision.No, defaults to the name of the module
typethe type of the published artifact. It's usually its extension, but not necessarily. For instance, ivy files are of type 'ivy' but have 'xml' extensionNo, defaults to jar
extthe extension of the published artifactNo, defaults to type
confcomma separated list of public configurations in which this artifact is published.
'*' wildcard can be used to designate all public configurations of this module
No, defaults to defaultconf attribute value on parent publications element.
urla url at which this artifact can be found if it isn't located at the standard location in the repository since 1.4No, defaults to no url
+

Child elements

+ + + + + + + + +
ElementDescriptionCardinality
confindicates a public configuration in which this artifact is published0..n
+

Examples

+
+<artifact />
+
+Declares an artifact with the name of the module as name, type and ext jar, and published in all configurations.


+
+<artifact name="foo-src" type="source" ext="zip" conf="src" />
+
+Declares an artifact foo-src, of type 'source' with extension 'zip', and published in the src configuration.


+
+<artifact name="foo" url="http://www.acme.com/repository/barbaz/foo-1.2-bar.jar" />
+
+Declares an artifact foo, of type and extension 'jar' located at the url http://www.acme.com/repository/barbaz/foo-1.2-bar.jar. This url will only be used if the artifact cannot be found at its standard location.
+
+
+ + + + + + + + + + + + +
+ + Added: ant/ivy/site/target/history/2.2.0/ivyfile/conf.html URL: http://svn.apache.org/viewvc/ant/ivy/site/target/history/2.2.0/ivyfile/conf.html?rev=1005260&view=auto ============================================================================== --- ant/ivy/site/target/history/2.2.0/ivyfile/conf.html (added) +++ ant/ivy/site/target/history/2.2.0/ivyfile/conf.html Wed Oct 6 21:25:29 2010 @@ -0,0 +1,159 @@ + + + + + + + + +conf | Apache Ivy + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ +
+ + + + +
+ + +
+ + +
+ + + + + + + +
+
+ +

conf

+
Tag: conf Parent: configurations

Declares a configuration of this module. As described in the reference page, a configuration is a way to use or construct a module. Some modules may be used in different ways (think about hibernate which can be used inside or outside an application server), and this way may alter the artifacts you need (in the case of hibernate, jta.jar is needed only if it is used outside an application server). Moreover, a module may need some other modules and artifacts only at build time, and some others at runtime. All those differents ways to use or build a module are called in Ivy module configurations.

The conf element in the configurations section declares one configuration. This declaration gives the name of the configuration declared, its visibility and the other configura tions of the module it extends.

Visibility is used to indicate whether or not a configuration can be used from other modules depending on this one. Thus a private configuration is only used for internal purpose (maybe at build time), and other modules cannot declare to depend on it.

A configuration can also extend one or several other ones of the same module. When a configuration extends another one, then all artifacts required in the extended configuration will also be required in the configuration that extends the other one. For instance, if configuration B extends configuration A, and if artifacts art1 and art2 are required in configuration A, then they will be automatically required in configuration B. On the other hand, artifacts required in configuration B are not necessarily required in configuration A.

This notion is very helpful to define configurations which are similar with some differences.

since 1.4 The extends attribute can use the following wildcards: + + + +
*all other configurations
*(public)all other public configurations
*(private)all other private configurations
+
+ +since 1.4 A whole configuration can be declared as non transitive, so that all dependencies resolved in this configuration will be resolved with transitivity disabled. Note that the transitivity is disabled for all the configuration dependencies (including those obtained because this conf extends other ones), and only for this configuration (which means that a conf extending this one with transitivityy enabled will get transitive dependencies even for dependencies being part of the non transitive configuration).
This is very useful to build a compile configuration, for instance, forcing the dependency declaration on each direct dependency, with no risk to forget some because of transitivity.

since 1.4 This tag supports extra attributes.

Attributes

+ + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
namethe name of the declared configurationYes
descriptiona description for the declared configurationNo
visibilitythe visibility of the declared configuration.
'public' means that this configuration can be used by other modules, while 'private' means that this configuration is used only in the module itself, and is not exposed to other modules
No, defaults to public
extendsa comma separated list of configurations of this module that the
current configuration extends
No, defaults to none
transitivea boolean to indicate if this conf is transitive or not since 1.4No, defaults to true
deprecatedindicates that this conf has been deprecated by giving the date of the deprecation.
It should be given in this format: yyyyMMddHHmmss
No, by default the conf is not deprecated
+ +

Examples

+
+<conf name="core" visibility="private" />
<conf name="compile" extends="core" transitive="false" visibility="private" />
<conf name="runtime" extends="compile" description="everything needed to run this module" /> +
+Declares three configurations, core compile and runtime, with only the runtime one accessible from other modules, and with the compile one being non transitive.
Therefore the core configuration will only be composed of dependencies declared in the core configuration itself, the compile configuration will be composed of all dependencies required in either core or compile configuration, but without transivity (neither for core nor compile dependencies), and runtime will be composed of all dependencies, all transitively, including the dependencies declared only in compile.
+
+
+ + + + + + + + + + + + +
+ +