mirror of https://github.com/apache/ant-ivy
80 lines
4.0 KiB
HTML
80 lines
4.0 KiB
HTML
<!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">
|
|
<div class="since">since 1.1</div>
|
|
Sets an ant property for each dependency artifacts previously resolved.
|
|
|
|
<span class="since">since 2.0</span> This is a [[ant:postresolvetask post resolve task]], with all the behaviour and attributes common to all post resolve tasks.
|
|
|
|
Please prefer the use of retrieve + standard ant path creation, which make your build more independent from ivy (once artifacts are properly retrieved, ivy is not required any more).
|
|
|
|
The property name and value are generated using the classical pattern concept, all artifact tokens and ivy variables being available.
|
|
|
|
<span class="since">since 2.0</span> This tag will follow the ant usual behavior for properties. If a property of the same name already exist, it's value will be unchanged. This behavior can be changed using the 'overwrite' attribute.
|
|
<i>WARNING : Before 2.0, the behavior was to overwrite the properties. Since 2.0, the default is to not overwrite to properties</i>
|
|
|
|
|
|
<h1>Attributes</h1>
|
|
|
|
<table class="ant">
|
|
<thead>
|
|
<tr><th class="ant-att">Attribute</th><th class="ant-desc">Description</th><th class="ant-req">Required</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr><td>name</td><td>a pattern used to generate the name of the properties to set</td>
|
|
<td>Yes</td></tr>
|
|
<tr><td>value</td><td>a pattern used to generate the value of the properties to set</td>
|
|
<td>Yes</td></tr>
|
|
<tr><td>conf</td><td>a comma separated list of the configurations for which properties should be set</td>
|
|
<td>No. Defaults to the configurations resolved by the last resolve call, or * if no resolve was explicitly called</td></tr>
|
|
<tr><td>haltonfailure</td><td>true to halt the build on ivy failure, false to continue</td><td>No. Defaults to true</td></tr>
|
|
<tr><td>validate</td><td>true to force ivy files validation against ivy.xsd, false to force no validation</td>
|
|
<td>No. Defaults to default ivy value (as configured in configuration file)</td></tr>
|
|
<tr><td>settingsRef</td><td>A reference to the ivy settings that must be used by this task <b>(since 2.0)</b></td><td>No, 'ivy.instance' is taken by default.</td></tr>
|
|
<tr><td>overwrite</td><td>Overwrite the value of the property if it already exist <b>(since 2.0)</b>. Before 2.0, the properties were always overwritten.</td><td>No, 'false' by default.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h1>Example</h1>
|
|
Suppose we have one dependency called <i>mydep</i> in revision 1.0 publishing two artifacts: <i>foo.jar</i> and <i>bar.jar</i>.
|
|
Then:
|
|
<code type="xml">
|
|
<artifactproperty conf="build"
|
|
name="[module].[artifact]-[revision]"
|
|
value="${cache.dir}/[module]/[artifact]-[revision].[ext]"/>
|
|
</code>
|
|
will set two properties:
|
|
<code>
|
|
mydep.foo-1.0 = my/cache/dir/mydep/foo-1.0.jar
|
|
mydep.bar-1.0 = my/cache/dir/mydep/bar-1.0.jar
|
|
</code>
|
|
|
|
</textarea>
|
|
<script type="text/javascript">xooki.postProcess();</script>
|
|
</body>
|
|
</html>
|