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.

defaultexcludes.html 3.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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>DefaultExcludes Task</title>
  20. </head>
  21. <body>
  22. <h2 id="defaultexcludes">DefaultExcludes</h2>
  23. <p><em>Since Apache Ant 1.6</em></p>
  24. <h3>Description</h3>
  25. <p>Alters the default excludes for all subsequent processing in the build, and prints out the
  26. current default excludes if desired.</p>
  27. <h3>Parameters</h3>
  28. <table class="attr">
  29. <tr>
  30. <th scope="col">Attribute</th>
  31. <th scope="col">Description</th>
  32. <th scope="col">Required</th>
  33. </tr>
  34. <tr>
  35. <td>echo</td>
  36. <td>whether or not to print out the default excludes</td>
  37. <td><q>true</q> required if no other attribute specified; defaults to <q>false</q></td>
  38. </tr>
  39. <tr>
  40. <td>default</td>
  41. <td>go back to hard wired default excludes</td>
  42. <td><q>true</q> required if no other attribute is specified</td>
  43. </tr>
  44. <tr>
  45. <td>add</td>
  46. <td>the pattern to add to the default excludes</td>
  47. <td>if no other attribute is specified</td>
  48. </tr>
  49. <tr>
  50. <td>remove</td>
  51. <td>remove the specified pattern from the default excludes</td>
  52. <td>if no other attribute is specified</td>
  53. </tr>
  54. </table>
  55. <h3>Examples</h3>
  56. <p>Print out the default excludes</p>
  57. <pre>&lt;defaultexcludes echo=&quot;true&quot;/&gt;</pre>
  58. <p>Print out the default excludes and exclude all <samp>*.bak</samp> files in <strong>all</strong>
  59. further processing</p>
  60. <pre>&lt;defaultexcludes echo=&quot;true&quot; add=&quot;**/*.bak&quot;/&gt;</pre>
  61. <p>Silently allow several fileset based tasks to operate on emacs backup files and then restore
  62. normal behavior</p>
  63. <pre>
  64. &lt;defaultexcludes remove=&quot;**/*~&quot;/&gt;
  65. (do several fileset based tasks here)
  66. &lt;defaultexcludes default=&quot;true&quot;/&gt;</pre>
  67. <h3>Notes</h3>
  68. <p>By default the pattern <samp>**/.svn</samp> and <samp>**/.svn/**</samp> are set as default
  69. excludes. Since version 1.3, Subversion supports
  70. the <a href="https://subversion.apache.org/docs/release-notes/1.3.html#_svn-hack"
  71. target="_top">&quot;_svn hack&quot;</a>. That means, that the svn-libraries evaluate environment
  72. variables and use <samp>.svn</samp> or <samp>_svn</samp> directory regarding to that value. We had
  73. chosen not to evaluate environment variables to get a more reliable build. Instead you have to
  74. change the settings by yourself by changing the exclude patterns:</p>
  75. <pre>
  76. &lt;defaultexcludes remove=&quot;**/.svn&quot;/&gt;
  77. &lt;defaultexcludes remove=&quot;**/.svn/**&quot;/&gt;
  78. &lt;defaultexcludes add=&quot;**/_svn&quot;/&gt;
  79. &lt;defaultexcludes add=&quot;**/_svn/**&quot;/&gt;
  80. </pre>
  81. </body>
  82. </html>