| 1 |
<!DOCTYPE html> |
| 2 |
<!-- |
| 3 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 |
contributor license agreements. See the NOTICE file distributed with |
| 5 |
this work for additional information regarding copyright ownership. |
| 6 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 |
(the "License"); you may not use this file except in compliance with |
| 8 |
the License. You may obtain a copy of the License at |
| 9 |
|
| 10 |
https://www.apache.org/licenses/LICENSE-2.0 |
| 11 |
|
| 12 |
Unless required by applicable law or agreed to in writing, software |
| 13 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 14 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 |
See the License for the specific language governing permissions and |
| 16 |
limitations under the License. |
| 17 |
--> |
| 18 |
<html lang="en"> |
| 19 |
|
| 20 |
<head> |
| 21 |
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> |
| 22 |
<title>Rename Task</title> |
| 23 |
</head> |
| 24 |
|
| 25 |
<body> |
| 26 |
|
| 27 |
<h2 id="rename">Rename</h2> |
| 28 |
<h3><em><u>Deprecated</u></em></h3> |
| 29 |
<p><em>This task has been <u>deprecated</u>. Use the <code>Move</code> task instead.</em></p> |
| 30 |
<h3>Description</h3> |
| 31 |
<p>Renames a given file.</p> |
| 32 |
<h3>Parameters</h3> |
| 33 |
<table class="attr"> |
| 34 |
<tr> |
| 35 |
<th scope="col">Attribute</th> |
| 36 |
<th scope="col">Description</th> |
| 37 |
<th scope="col">Required</th> |
| 38 |
</tr> |
| 39 |
<tr> |
| 40 |
<td>src</td> |
| 41 |
<td>file to rename.</td> |
| 42 |
<td>Yes</td> |
| 43 |
</tr> |
| 44 |
<tr> |
| 45 |
<td>dest</td> |
| 46 |
<td>new name of the file.</td> |
| 47 |
<td>Yes</td> |
| 48 |
</tr> |
| 49 |
<tr> |
| 50 |
<td>replace</td> |
| 51 |
<td>Enable replacing of existing file.</td> |
| 52 |
<td>No; default is <q>on</q></td> |
| 53 |
</tr> |
| 54 |
</table> |
| 55 |
<h3>Examples</h3> |
| 56 |
|
| 57 |
<p>Rename the file <samp>foo.jar</samp> to <samp>${name}-${version}.jar</samp> |
| 58 |
(assuming <code>name</code> and <code>version</code> being predefined properties). If a file |
| 59 |
named <samp>${name}-${version}.jar</samp> already exists, it will be removed prior to |
| 60 |
renaming <samp>foo.jar</samp>.</p> |
| 61 |
<pre><rename src="foo.jar" dest="${name}-${version}.jar"/></pre> |
| 62 |
|
| 63 |
</body> |
| 64 |
</html> |