You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

makeurl.html 2.9 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>Makeurl Task</title>
  20. </head>
  21. <body>
  22. <h2>Makeurl Task</h2>
  23. <h3 id="description">Description</h3>
  24. <p>This task takes one or more filenames and turns them into URLs, which it then assigns to a
  25. property. Useful when setting up RMI or JNLP codebases, for example. Nested filesets are
  26. supported; if present, these are turned into the URLs with the supplied <var>separator</var> between
  27. them.</p>
  28. <h3 id="attributes">Parameters</h3>
  29. <table class="attr">
  30. <tr>
  31. <th>Attribute</th>
  32. <th>Description</th>
  33. <th>Type</th>
  34. <th>Required</th>
  35. </tr>
  36. <tr>
  37. <td>file</td>
  38. <td>name of a file to be converted into a URL</td>
  39. <td>File</td>
  40. <td>No, if a nested fileset or path is supplied</td>
  41. </tr>
  42. <tr>
  43. <td>property</td>
  44. <td>name of a property to set to the URL</td>
  45. <td>String</td>
  46. <td>Yes</td>
  47. </tr>
  48. <tr>
  49. <td>separator</td>
  50. <td>separator for the multi-URL option</td>
  51. <td>String</td>
  52. <td>No; default is space</td>
  53. </tr>
  54. <tr>
  55. <td>validate</td>
  56. <td>validate that every named file exists</td>
  57. <td>boolean</td>
  58. <td>No; default is <q>true</q></td>
  59. </tr>
  60. </table>
  61. <h3 id="elements">Parameters as nested elements</h3>
  62. <h4><strong>fileset</strong> (org.apache.tools.ant.types.FileSet)</h4>
  63. <p>A fileset of JAR files to include in the URL list, each separated by the separator.</p>
  64. <h4><strong>path</strong> (org.apache.tools.ant.types.Path)</h4>
  65. <p>Add a path to the URL. All elements in the path will be converted to individual URL entries.</p>
  66. <h3>Examples</h3>
  67. <pre>&lt;makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/&gt;</pre>
  68. <p>Sets the property <code>m2.repository.url</code> to the file: URL of the local Maven2
  69. repository.</p>
  70. <pre>&lt;makeurl property="codebase"&gt;
  71. &lt;fileset dir="lib includes="*.jar"/&gt;
  72. &lt;/makeurl&gt;</pre>
  73. <p>Set the property <code>codebase</code> to the three URLs of the files provided as nested
  74. elements.</p>
  75. </body>
  76. </html>