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.

antlib_descriptors.xml 2.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0"?>
  2. <document>
  3. <properties>
  4. <index value="2"/>
  5. <author email="antoine@apache.org">Antoine Levy-Lambert</author>
  6. <title>Antlib Descriptor</title>
  7. </properties>
  8. <body>
  9. <section name="antlib descriptor in the proposal">
  10. <source><![CDATA[
  11. <antlib version="1.5" >
  12. <task name="mkdir" class="org.apache.tools.ant.taskdefs.Mkdir"/>
  13. ...
  14. <data-type name="fileset" class="org.apache.tools.ant.types.FileSet"/>
  15. ...
  16. <role name="filter" class="org.apache.tools.ant.filters.ChainableReader"/>
  17. ...
  18. <filter name="escapeunicode" class="org.apache.tools.ant.filters.EscapeUnicode"/>
  19. </antlib>
  20. ]]></source>
  21. <p>
  22. This is the layout of the antlib descriptor in the proposal. In each antlib jar file, the descriptor would be found under
  23. META-INF/antlib.xml
  24. </p>
  25. </section>
  26. <section name="concerns concerning the location of the descriptor (Costin Manolache)">
  27. My concerns with getResources() as opposed to
  28. getResource( PACKAGE/antlib.xml):
  29. <ol>
  30. <li>
  31. startup time. In order to load one library you need to process all
  32. of them. It can be resolved with caching the result and looking at .jar
  33. modifications. Most likely we'll have dozens of antlibs - and that'll only
  34. grow in time. The processing of (all) TLDs at startup ( for tomcat ) adds a
  35. very visible overhead on startup, and at least tomcat is a long-running
  36. process.
  37. </li>
  38. <br/>
  39. <li>
  40. Placing multiple antlibs in a single jar may be trickier.
  41. </li>
  42. <br/>
  43. <li>
  44. It may place too much emphasis on the .jars and filesystem layout.
  45. </li>
  46. <br/>
  47. <li>
  48. A bit harder to control ( as we know from c-logging and JAXP ),
  49. </li>
  50. <br/>
  51. <li>Explicit control over what antlibs are to be used - versus loading
  52. everything. Well - I like "magic" loading, but a lot of things in ant
  53. are done explicitely.
  54. </li>
  55. </ol>
  56. <br/>
  57. <p>
  58. I have no problem accepting a getResources() solution ( just like I'm
  59. ok with using XML - but not any XML :-), but those issues should be
  60. considered.
  61. <br/>
  62. A lot of the "mess" in ant is the result of doing some things without
  63. considering all implications or just as side effect of how code happened
  64. to work. That's why I'm so strongly for breaking things down to individual
  65. problems instead of a bundle solution.
  66. </p>
  67. Costin
  68. </section>
  69. </body>
  70. </document>