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 3.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. This task takes one or more filenames and turns them into URLs, which it then assigns to a property.
  25. Useful when setting up RMI or JNLP codebases, for example.
  26. Nested filesets are supported; if present, these are turned into the URLs with the supplied separator between them (default: space).
  27. <p>Examples:</p>
  28. <pre>
  29. &lt;makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/&gt;
  30. </pre>
  31. Sets the property <code>m2.repository.url</code> to the file: URL of the local Maven2 repository.
  32. <pre>
  33. &lt;makeurl property="codebase"&gt;&lt;fileset dir="lib includes="*.jar"/&gt;&lt;/makeurl&gt;
  34. </pre>
  35. Set the property <code>codebase</code> to the three URLs of the files provided as nested elements.
  36. <h3 id="attributes">Parameters</h3>
  37. <table>
  38. <tr>
  39. <td valign="top" align="left">
  40. <b>Attribute</b>
  41. </td>
  42. <td valign="top" align="left">
  43. <b>Description</b>
  44. </td>
  45. <td valign="top" align="left">
  46. <b>Type</b>
  47. </td>
  48. <td valign="top" align="left">
  49. <b>Requirement</b>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td valign="top" align="left">
  54. file
  55. </td>
  56. <td valign="top" align="left">
  57. name of a file to be converted into a URL
  58. </td>
  59. <td valign="top" align="left">
  60. File
  61. </td>
  62. <td valign="top" align="left">
  63. optional, if a nested fileset or path is supplied
  64. </td>
  65. </tr>
  66. <tr>
  67. <td valign="top" align="left">
  68. property
  69. </td>
  70. <td valign="top" align="left">
  71. name of a property to set to the URL
  72. </td>
  73. <td valign="top" align="left">
  74. String
  75. </td>
  76. <td valign="top" align="left">
  77. required
  78. </td>
  79. </tr>
  80. <tr>
  81. <td valign="top" align="left">
  82. separator
  83. </td>
  84. <td valign="top" align="left">
  85. separator for the multi-URL option
  86. </td>
  87. <td valign="top" align="left">
  88. String
  89. </td>
  90. <td valign="top" align="left">
  91. optional
  92. </td>
  93. </tr>
  94. <tr>
  95. <td valign="top" align="left">
  96. validate
  97. </td>
  98. <td valign="top" align="left">
  99. validate that every named file exists
  100. </td>
  101. <td valign="top" align="left">
  102. boolean
  103. </td>
  104. <td valign="top" align="left">
  105. optional; default: true
  106. </td>
  107. </tr>
  108. </table>
  109. <h3 id="elements">Parameters as nested elements</h3>
  110. <h4><strong>fileset</strong> (org.apache.tools.ant.types.FileSet)</h4>
  111. A fileset of JAR files to include in the URL list, each separated by the separator.
  112. <h4><strong>path</strong> (org.apache.tools.ant.types.Path)</h4>
  113. Add a path to the URL. All elements in the path will be converted to individual URL entries.
  114. </body>
  115. </html>