|
- <!--
- 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-Language" content="en-us">
- <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
- <title>Makeurl Task</title>
- </head>
-
- <body>
-
- <h2>Makeurl Task</h2>
- <h3 id="description">Description</h3>
- This task takes one or more filenames and turns them into URLs, which it then assigns to a property.
- Useful when setting up RMI or JNLP codebases, for example.
- Nested filesets are supported; if present, these are turned into the URLs with the supplied separator between them (default: space).
- <p>Examples:</p>
- <pre>
- <makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/>
- </pre>
- Sets the property <code>m2.repository.url</code> to the file: URL of the local Maven2 repository.
- <pre>
- <makeurl property="codebase"><fileset dir="lib includes="*.jar"/></makeurl>
- </pre>
- Set the property <code>codebase</code> to the three URLs of the files provided as nested elements.
- <h3 id="attributes">Parameters</h3>
- <table>
- <tr>
- <td valign="top" align="left">
- <b>Attribute</b>
- </td>
- <td valign="top" align="left">
- <b>Description</b>
- </td>
- <td valign="top" align="left">
- <b>Type</b>
- </td>
- <td valign="top" align="left">
- <b>Requirement</b>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- file
- </td>
- <td valign="top" align="left">
- name of a file to be converted into a URL
- </td>
- <td valign="top" align="left">
- File
- </td>
- <td valign="top" align="left">
- optional, if a nested fileset or path is supplied
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- property
- </td>
- <td valign="top" align="left">
- name of a property to set to the URL
- </td>
- <td valign="top" align="left">
- String
- </td>
- <td valign="top" align="left">
- required
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- separator
- </td>
- <td valign="top" align="left">
- separator for the multi-URL option
- </td>
- <td valign="top" align="left">
- String
- </td>
- <td valign="top" align="left">
- optional
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- validate
- </td>
- <td valign="top" align="left">
- validate that every named file exists
- </td>
- <td valign="top" align="left">
- boolean
- </td>
- <td valign="top" align="left">
- optional; default: true
- </td>
- </tr>
- </table>
- <h3 id="elements">Parameters as nested elements</h3>
- <h4><strong>fileset</strong> (org.apache.tools.ant.types.FileSet)</h4>
-
- A fileset of JAR files to include in the URL list, each separated by the separator.
-
- <h4><strong>path</strong> (org.apache.tools.ant.types.Path)</h4>
-
- Add a path to the URL. All elements in the path will be converted to individual URL entries.
- </body>
- </html>
|