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 twos are equivalent, it is only a matter of preference. However, do not mix both for one artifact.

since 1.4 The artifact element as 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.


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' extension No, defaults to jar
extthe extension of the published artifact No, 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.4 No, defaults to no url

Child elements

confindicates a public configuration in which this artifact is published 0..n


<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="" />
Declares an artifact foo, of type and extension 'jar' located at the url This url will only be used if the artifact cannot be found at its standard location.