blob: 78c7c5fef893aec46b86c0f4b926226f47e23f17 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
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.
-->
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<script type="text/javascript">var xookiConfig = {level: 1};</script>
<script type="text/javascript" src="../xooki/xooki.js"></script>
</head>
<body>
<textarea id="xooki-source">
<b>Tag:</b> artifact <b>Parent:</b> <a href="../ivyfile/publications.html">publications</a>
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 <a href="../ivyfile/conf.html">configuration declaration</a>).
The configurations in which an artifact is published can be configured in two ways:
<ul>
<li>conf attribute on artifact element</li>
<li>conf subelement</li>
</ul>
The two are equivalent, it is only a matter of preference. However, do not mix both for one artifact.
<span class="since">since 1.4</span> 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:<code type="xml">
<artifact />
</code>If this is the only artifact declared, then it's equivalent to having no publication section at all.
<span class="since">since 1.4</span> 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.
<span class="since">since 1.4</span> This tag supports <a href="../concept.html#extra">extra attributes</a>.
<span class="since">since 2.4</span> This tag supports the 'packaging' attributes; complete documentation can be found in the <a href="../concept.html#packaging">concept page</a>.
<h1>Attributes</h1>
<table class="ivy-attributes">
<thead>
<tr><th class="ivy-att">Attribute</th><th class="ivy-att-desc">Description</th><th class="ivy-att-req">Required</th></tr>
</thead>
<tbody>
<tr><td>name</td><td>the name of the published artifact. This name must not include revision.</td>
<td>No, defaults to the name of the module</td></tr>
<tr><td>type</td><td>the 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</td>
<td>No, defaults to jar</td></tr>
<tr><td>ext</td><td>the extension of the published artifact</td>
<td>No, defaults to type</td></tr>
<tr><td>conf</td><td>comma separated list of public configurations in which this artifact is published.
'*' wildcard can be used to designate all public configurations of this module</td>
<td>No, defaults to defaultconf attribute value on parent publications element.</td></tr>
<tr><td>url</td><td>a url at which this artifact can be found if it isn't located at the standard location in the repository <span class="since">since 1.4</span></td>
<td>No, defaults to no url</td></tr>
<tr><td>packaging</td><td>a comma separated list of <a href="../concept.html#packaging">packaging</a> types <span class="since">since 2.4</span></td>
<td>No, defaults to no packaging</td></tr>
</tbody>
</table>
<h1>Child elements</h1>
<table class="ivy-children">
<thead>
<tr><th class="ivy-chld">Element</th><th class="ivy-chld-desc">Description</th><th class="ivy-chld-card">Cardinality</th></tr>
</thead>
<tbody>
<tr><td><a href="../ivyfile/artifact-conf.html">conf</a></td><td>indicates a public configuration in which this artifact is published</td>
<td>0..n</td></tr>
</tbody>
</table>
<h1>Examples</h1>
<code type="xml">
<artifact />
</code>
Declares an artifact with the name of the module as name, type and ext jar, and published in all configurations.
<hr />
<code type="xml">
<artifact name="foo-src" type="source" ext="zip" conf="src" />
</code>
Declares an artifact foo-src, of type 'source' with extension 'zip', and published in the src configuration.
<hr />
<code type="xml">
<artifact name="foo" url="http://www.acme.com/repository/barbaz/foo-1.2-bar.jar" />
</code>
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.
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>