Browse Source

Merge changes made to 1.5 Beta2.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272967 13f79535-47bb-0310-9956-ffa450edef68
master
Magesh Umasankar 23 years ago
parent
commit
6bd8d6e938
100 changed files with 2598 additions and 894 deletions
  1. +191
    -1
      WHATSNEW
  2. +5
    -0
      build.xml
  3. +4
    -1
      docs/manual/CoreTasks/apply.html
  4. +9
    -2
      docs/manual/CoreTasks/checksum.html
  5. +2
    -2
      docs/manual/CoreTasks/chmod.html
  6. +3
    -3
      docs/manual/CoreTasks/copydir.html
  7. +2
    -2
      docs/manual/CoreTasks/delete.html
  8. +1
    -1
      docs/manual/CoreTasks/dirname.html
  9. +2
    -2
      docs/manual/CoreTasks/ear.html
  10. +4
    -1
      docs/manual/CoreTasks/exec.html
  11. +5
    -5
      docs/manual/CoreTasks/fixcrlf.html
  12. +2
    -2
      docs/manual/CoreTasks/jar.html
  13. +9
    -9
      docs/manual/CoreTasks/javac.html
  14. +14
    -5
      docs/manual/CoreTasks/mail.html
  15. +2
    -2
      docs/manual/CoreTasks/manifest.html
  16. +2
    -1
      docs/manual/CoreTasks/patch.html
  17. +8
    -11
      docs/manual/CoreTasks/property.html
  18. +2
    -2
      docs/manual/CoreTasks/replace.html
  19. +2
    -2
      docs/manual/CoreTasks/rmic.html
  20. +5
    -0
      docs/manual/CoreTasks/sql.html
  21. +3
    -3
      docs/manual/CoreTasks/style.html
  22. +4
    -4
      docs/manual/CoreTasks/tar.html
  23. +7
    -0
      docs/manual/CoreTasks/taskdef.html
  24. +5
    -3
      docs/manual/CoreTasks/tstamp.html
  25. +8
    -2
      docs/manual/CoreTasks/war.html
  26. +3
    -1
      docs/manual/CoreTasks/xmlproperty.html
  27. +7
    -2
      docs/manual/CoreTasks/zip.html
  28. +2
    -2
      docs/manual/CoreTypes/dirset.html
  29. +2
    -2
      docs/manual/CoreTypes/fileset.html
  30. +2
    -2
      docs/manual/CoreTypes/patternset.html
  31. +43
    -30
      docs/manual/OptionalTasks/BorlandEJBTasks.html
  32. +25
    -14
      docs/manual/OptionalTasks/BorlandGenerateClient.html
  33. +4
    -4
      docs/manual/OptionalTasks/antlr.html
  34. +5
    -5
      docs/manual/OptionalTasks/cab.html
  35. +6
    -6
      docs/manual/OptionalTasks/ccm.html
  36. +2
    -2
      docs/manual/OptionalTasks/dotnet.html
  37. +180
    -167
      docs/manual/OptionalTasks/ejb.html
  38. +119
    -0
      docs/manual/OptionalTasks/jarlib-available.html
  39. +65
    -0
      docs/manual/OptionalTasks/jarlib-display.html
  40. +108
    -0
      docs/manual/OptionalTasks/jarlib-manifest.html
  41. +196
    -0
      docs/manual/OptionalTasks/jarlib-resolve.html
  42. +57
    -39
      docs/manual/OptionalTasks/jspc.html
  43. +7
    -6
      docs/manual/OptionalTasks/junitreport.html
  44. +10
    -10
      docs/manual/OptionalTasks/native2ascii.html
  45. +3
    -3
      docs/manual/OptionalTasks/netrexxc.html
  46. +21
    -1
      docs/manual/OptionalTasks/pvcstask.html
  47. +7
    -7
      docs/manual/OptionalTasks/renameextensions.html
  48. +4
    -0
      docs/manual/OptionalTasks/test.html
  49. +54
    -54
      docs/manual/OptionalTasks/vss.html
  50. +99
    -0
      docs/manual/OptionalTypes/extension.html
  51. +69
    -0
      docs/manual/OptionalTypes/extensionset.html
  52. +1
    -0
      docs/manual/conceptstypeslist.html
  53. +1
    -1
      docs/manual/credits.html
  54. +1
    -1
      docs/manual/index.html
  55. +1
    -1
      docs/manual/install.html
  56. +4
    -0
      docs/manual/optionaltasklist.html
  57. +68
    -49
      docs/manual/running.html
  58. +10
    -7
      proposal/xdocs/build.xml
  59. +3
    -3
      proposal/xdocs/src/org/apache/tools/ant/xdoclet/TaskSubTask.java
  60. +194
    -91
      proposal/xdocs/src/org/apache/tools/ant/xdoclet/TaskTagsHandler.java
  61. +13
    -17
      proposal/xdocs/templates/task_xdoc.template
  62. +1
    -1
      src/etc/manifest
  63. +46
    -0
      src/etc/testcases/taskdefs/ant.xml
  64. +1
    -1
      src/etc/testcases/taskdefs/available.xml
  65. +2
    -0
      src/etc/testcases/taskdefs/fixcrlf/expected/Mac2Unix
  66. +1
    -1
      src/etc/testcases/taskdefs/fixcrlf/input/Mac2Unix
  67. +9
    -0
      src/etc/testcases/types/quote1.xml
  68. +10
    -0
      src/etc/testcases/types/quote2.xml
  69. +134
    -0
      src/etc/testcases/types/xmlcatalog.xml
  70. +31
    -0
      src/etc/testcases/types/xmlcatalog.xsl
  71. +14
    -0
      src/etc/testcases/types/xmlcatalog1.xml
  72. +11
    -0
      src/etc/testcases/types/xmlcatalog2.xml
  73. +17
    -0
      src/main/org/apache/tools/ant/AntClassLoader.java
  74. +19
    -11
      src/main/org/apache/tools/ant/DefaultLogger.java
  75. +32
    -26
      src/main/org/apache/tools/ant/Main.java
  76. +132
    -33
      src/main/org/apache/tools/ant/Project.java
  77. +65
    -28
      src/main/org/apache/tools/ant/RuntimeConfigurable.java
  78. +9
    -0
      src/main/org/apache/tools/ant/Task.java
  79. +17
    -22
      src/main/org/apache/tools/ant/UnknownElement.java
  80. +0
    -4
      src/main/org/apache/tools/ant/filters/LineContains.java
  81. +76
    -0
      src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
  82. +30
    -28
      src/main/org/apache/tools/ant/taskdefs/Ant.java
  83. +7
    -8
      src/main/org/apache/tools/ant/taskdefs/Available.java
  84. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/BZip2.java
  85. +9
    -3
      src/main/org/apache/tools/ant/taskdefs/Basename.java
  86. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/BuildNumber.java
  87. +7
    -7
      src/main/org/apache/tools/ant/taskdefs/CVSPass.java
  88. +10
    -11
      src/main/org/apache/tools/ant/taskdefs/CallTarget.java
  89. +22
    -11
      src/main/org/apache/tools/ant/taskdefs/Checksum.java
  90. +29
    -4
      src/main/org/apache/tools/ant/taskdefs/Chmod.java
  91. +4
    -4
      src/main/org/apache/tools/ant/taskdefs/Concat.java
  92. +7
    -6
      src/main/org/apache/tools/ant/taskdefs/ConditionTask.java
  93. +6
    -6
      src/main/org/apache/tools/ant/taskdefs/Copy.java
  94. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Cvs.java
  95. +65
    -23
      src/main/org/apache/tools/ant/taskdefs/Definer.java
  96. +6
    -5
      src/main/org/apache/tools/ant/taskdefs/Delete.java
  97. +30
    -30
      src/main/org/apache/tools/ant/taskdefs/DependSet.java
  98. +29
    -22
      src/main/org/apache/tools/ant/taskdefs/Dirname.java
  99. +6
    -1
      src/main/org/apache/tools/ant/taskdefs/Ear.java
  100. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/Echo.java

+ 191
- 1
WHATSNEW View File

@@ -128,6 +128,192 @@ Changes that could break older environments:
-------------------------------------------- --------------------------------------------


* Important: Single $ signs are no longer silently stripped! * Important: Single $ signs are no longer silently stripped!
=======
* Project.getBuildListeners now returns a clone of the listener
list. Changes to the returned list will not affect the listeners
currently attached to the Project. It also means that it is safe to
iterate over the returned list if listeners are added or removed
during the traversal.

* <pvcs> default filenameformat has been different from Ant 1.4.1.
Now it is different from 1.5beta1 and 1.5beta2.

* Some messages that are printed during startup will not be
written to the logfile specified via -logfile as they might destroy
the format of the file for special BuildLoggers (like XmlLogger).

Fixed bugs:
-----------

* <available> could fail to find files or directories that happen to
start with the name of the project's basedir but are not children of
the basedir.

* Nested <property>'s inside <ant> can now be overriden by subsequent
<ant> and <antcall> tasks.

* <xslt>'s outputtype attribute wouldn't do anything.

* <linecontains> filterreader could swallow lines.

* <sequential> used to configure the tasks (set their attributes)
before the first task has been executed. This means that properties
that have been set by nested task seemed to be unset for the other
tasks in the same <sequential> element.

* <javac>'s sourcepath setting has been ignored by some compiler
implementations.

* <javadoc>'s packagelist attribute didn't work.

* the plain mailer would always use port 25 in <mail>.

* Ant's default logger could swallow empty lines.

* ejbjar's iPlanet nested element now can process multiple descriptors.

* IPlanetEjbc was looking in the wrong place for four iiop files.

* <javac> would pass the -source switch to JDK 1.3's javac, even
though it doesn't support it.

Other changes:
--------------

* <checksum> now uses a buffer (of configurable size).

* The "Trying to override task definition" warning has been degraded
to verbose level if the two task definitions only differ in the class
loader instance that has loaded the definition.

* Add a jvmargs to the ejbjar's weblogic element to allow additional
arguments to be provided to the VM runnign ejbc. Document the
jvmdebuglevel attribute which can be used to avoid warnings about
interface classess being found on the classpath. Document the new
<sysproperty> element which allows JVM properties to be defined.
Added an outputdir attribute to allow the destination to be a
directory into which the exploded jar is written.

* ejbjar now supports Borland Enterprise Server 5 and Jonas 2.5

Changes from Ant 1.5beta1 to Ant 1.5beta2
=========================================

Changes that could break older environments:
--------------------------------------------

* Properties will now be expanded in mail message bodies. This means
that one $ sign will be stripped if your mail message contains the text
$$.

* org.apache.tools.ant.taskdefs.Expand no longer extends MatchingTask.

* Available#setFile now again uses a File argument as it did in 1.4,
this may break environments that have been adapted to the String
argument version present in 1.5beta1.

Fixed bugs:
-----------
* When <move> attempts a rename, it deletes the destination file, if it
exists, before renaming the source file. However, <move> was not
checking if the destination file was actually a directory before
trying to delete it.

* Make CVS Tasks to work under Cygwin.

* Fix LineContains to handle huge files elegantly without causing
Stack Overflows.

* if you ask for the "classic" compiler on Java1.4, you get upgraded to
"modern" because there is no classic compiler any more.

* the <http> condition was viewing 404 'not found' exceptions as success. Now
it defaults to viewing any response >=400 as an error, and has an errorsBeginAt
attribute you can use if you want a higher or lower value.

* <get> throws a build exception on an http authorization error, unless you
have set ignoreerrors to true.

* <wsdltodotnet> was spelt in Wintel case: <WsdlToDotnet>. It is now lower
case, though the old spelling is retained for anyone who used it.

* Merging of Manifests in jar now works as documented.

* paths that have been separated by colons would be incorrectly parsed
on NetWare.

* runant.pl now supports NetWare.

* <tempfile> and <setproxy> tasks were in beta1, but not defined by
default; They now are. <tempfile> fills a property with the name of a
temporary file; <setproxy> lets you set the JVM's http, ftp and socks proxy
settings.

* <available classname="foo" ignoresystemclasses="true"> failed for
JDK 1.1 and 1.2, even if the class could be found on the
user-specified classpath.

* <property environment=... /> now works on z/OS.

* forked <javac> failed for the wrong reason on JDK 1.1 - Ant would
use a temporary file to hold the names of the files to compile under
some conditons, but 1.1 doesn't support this feature. Ant will no
longer try this, but you may run into problems with the length of the
command line now.

* the refid attribute for <property>s nested into <ant> or <param>s
nested into <antcall> didn't work.

* <replaceregexp> didn't work for nested <fileset>s.

* <javadoc> dropped sourcepath entries if no "interesting" .java
source files could be found below them. This has been backwards
incompatible and caused problems with custom doclets like xdoclet.

* Using the doclet, docletpath or docletpathref attributes of
<javadoc> may have caused NullPointerExceptions.

* nested <filesets> of <javadoc> would include too much.

* <dependset> will no longer choke on <targetfileset>s that point to
non-existing directories.

* <patch> didn't work at all.

* <replace> and <replaceregexp> now fail if the file they are working
on is locked.

* <javadoc> would pick up the wrong executable in the combination JDK
1.2 and AIX.

Other changes:
--------------

* z/OS now gets detected by the os condition.

* <fileset> and <dirset> now have an optional followsymlink attribute
that can prevent Ant from following symbolic links on some platforms.

* BeanShell is now supported in the <script> task.

* <ejbjar> under Weblogic attempts to use the ejbc20 compiler for 2.0 beans
based on the deployment descriptor's DTD reference. Under weblogic 7.00 Beta
this ejbc class has been deprecated. To avoid the deprecation warning use
ejbcclass="weblogic.ejbc".

* <ejbjar> will add a manifest to the generated jar based on the naming
convention in use. This overrides the manifest specified in the
<ejbjar> attribute


Changes from Ant 1.4.1 to 1.5beta1
==================================

Changes that could break older environments:
--------------------------------------------

* Important: Single $ signs are no longer silently stripped!
>>>>>>> 1.263.2.51
Before you panic that we have broken all your build files, we have kept Before you panic that we have broken all your build files, we have kept
the old "$$" -> "$" behaviour. So only build files which accidentally had the old "$$" -> "$" behaviour. So only build files which accidentally had
a $ sign in a string that was being silently stripped may break. a $ sign in a string that was being silently stripped may break.
@@ -246,7 +432,11 @@ Other changes:
are added to the generated EJB jars. A new attribute "dependency" can be are added to the generated EJB jars. A new attribute "dependency" can be
defines which classes are added. The addition of classes now uses defines which classes are added. The addition of classes now uses
the Jakarta-BCEL library rather than reflection, meaning bean classes are the Jakarta-BCEL library rather than reflection, meaning bean classes are
no longer loaded into Ant's JVM.
no longer loaded into Ant's JVM. The default dependency analyzer is known as
the ancestor analyzer. It provides the same behaviour as the 1.4.1 version of
<ejbjar>. If the BCEL library is not present, a warning will be issued stating
the ancestor analyzer is not available. In this case <ejbjar> will continue
to function but will not add super classes to the jar.


* <available> has a new attribute named ignoreSystemClasses. * <available> has a new attribute named ignoreSystemClasses.




+ 5
- 0
build.xml View File

@@ -186,6 +186,8 @@
unless="trax.present"/> unless="trax.present"/>
<exclude name="${optional.package}/XsltTest.java" <exclude name="${optional.package}/XsltTest.java"
unless="trax.present"/> unless="trax.present"/>
<exclude name="${ant.package}/types/XMLCatalogBuildFileTest.java"
unless="trax.present"/>
</patternset> </patternset>
<patternset id="needs.xalan1"> <patternset id="needs.xalan1">
<exclude name="${optional.package}/XalanLiaison*.java" <exclude name="${optional.package}/XalanLiaison*.java"
@@ -302,6 +304,7 @@
<exclude name="${optional.package}/splash/*.java" unless="swing.present" /> <exclude name="${optional.package}/splash/*.java" unless="swing.present" />
</patternset> </patternset>
<patternset id="teststhatfail"> <patternset id="teststhatfail">
<exclude name="${ant.package}/types/XMLCatalogTest.java"/>
</patternset> </patternset>
<!-- <!--
@@ -1289,6 +1292,8 @@
unless="trax.impl.present"/> unless="trax.impl.present"/>
<exclude name="${optional.package}/XsltTest.java" <exclude name="${optional.package}/XsltTest.java"
unless="trax.impl.present"/> unless="trax.impl.present"/>
<exclude name="${ant.package}/types/XMLCatalogBuildFileTest.java"
unless="trax.impl.present"/>


<!-- needs BSF to work --> <!-- needs BSF to work -->
<exclude name="${optional.package}/XalanLiaisonTest.java" <exclude name="${optional.package}/XalanLiaisonTest.java"


+ 4
- 1
docs/manual/CoreTasks/apply.html View File

@@ -123,7 +123,10 @@ one mapper.</p>
Under some operating systems, this gives access to facilities Under some operating systems, this gives access to facilities
not normally available through the VM including, under Windows, not normally available through the VM including, under Windows,
being able to execute scripts, rather than their associated being able to execute scripts, rather than their associated
interpreter.</td>
interpreter. If you want to specify the name of the
executable as a relative path to the directory given by the
dir attribute, it may become necessary to set vmlauncher to
false as well.</td>
<td align="center" valign="top">No, default is <i>true</i></td> <td align="center" valign="top">No, default is <i>true</i></td>
</tr> </tr>
</table> </table>


+ 9
- 2
docs/manual/CoreTasks/checksum.html View File

@@ -58,7 +58,7 @@ perform checksum verifications.
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
<tr> <tr>
<td valign="top">overwrite</td>
<td valign="top">forceoverwrite</td>
<td valign="top">Overwrite existing files even if the destination <td valign="top">Overwrite existing files even if the destination
files are newer. Defaults to &quot;no&quot;.</td> files are newer. Defaults to &quot;no&quot;.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -73,6 +73,13 @@ perform checksum verifications.
check against the generated checksum. check against the generated checksum.
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
<tr>
<td valign="top">readbuffersize</td>
<td valign="top">The size of the buffer )in bytes) to use when
reading a file. Defaults to &quot;8192&quot; - you may get a
better performance on big files if you increase this value.</td>
<td valign="top" align="center">No</td>
</tr>
</table> </table>
<h3>Parameters specified as nested elements</h3> <h3>Parameters specified as nested elements</h3>


@@ -144,7 +151,7 @@ When working with more than one file, if condition and/or verifyproperty is used
the result will be true only if the checksums matched correctly for all files being the result will be true only if the checksums matched correctly for all files being
considered. considered.


<hr><p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 2
- 2
docs/manual/CoreTasks/chmod.html View File

@@ -43,13 +43,13 @@ directly. More FileSets can be specified using nested
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included.</td> included.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 3
- 3
docs/manual/CoreTasks/copydir.html View File

@@ -45,7 +45,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -57,7 +57,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -112,7 +112,7 @@ recursively. All java files are copied, except for files with the name <code>Tes
<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code> <p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>
recursively. All java files are copied, except for the files under the <code>mypackage/test</code> recursively. All java files are copied, except for the files under the <code>mypackage/test</code>
directory.</p> directory.</p>
<hr><p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 2
- 2
docs/manual/CoreTasks/delete.html View File

@@ -94,7 +94,7 @@ in <strong>Directory-based Tasks</strong>, and see the
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top"><em>Deprecated.</em> Use <code>&lt;fileset&gt;</code>. <td valign="top"><em>Deprecated.</em> Use <code>&lt;fileset&gt;</code>.
Comma-separated list of patterns of
Comma- or space-separated list of patterns of
files that must be deleted. All files are relative to the directory files that must be deleted. All files are relative to the directory
specified in <code>dir</code>. specified in <code>dir</code>.
</td> </td>
@@ -110,7 +110,7 @@ in <strong>Directory-based Tasks</strong>, and see the
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top"><em>Deprecated.</em> Use <code>&lt;fileset&gt;</code>. <td valign="top"><em>Deprecated.</em> Use <code>&lt;fileset&gt;</code>.
Comma-separated list of patterns of
Comma- or space-separated list of patterns of
files that must be excluded from the deletion list. files that must be excluded from the deletion list.
All files are relative to the directory specified in <code>dir</code>. All files are relative to the directory specified in <code>dir</code>.
No files (except default excludes) are excluded when omitted.</td> No files (except default excludes) are excluded when omitted.</td>


+ 1
- 1
docs/manual/CoreTasks/dirname.html View File

@@ -28,7 +28,7 @@ the directory will be the current directory.
</tr> </tr>
<tr> <tr>
<td valign="top">file</td> <td valign="top">file</td>
<td valign="top">The path to take the basename of.</td>
<td valign="top">The path to take the dirname of.</td>
<td valign="top" align="center">Yes</td> <td valign="top" align="center">Yes</td>
</tr> </tr>
<tr> <tr>


+ 2
- 2
docs/manual/CoreTasks/ear.html View File

@@ -58,7 +58,7 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -70,7 +70,7 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 4
- 1
docs/manual/CoreTasks/exec.html View File

@@ -99,7 +99,10 @@ systems.</p>
Under some operating systems, this gives access to facilities Under some operating systems, this gives access to facilities
not normally available through the VM including, under Windows, not normally available through the VM including, under Windows,
being able to execute scripts, rather than their associated being able to execute scripts, rather than their associated
interpreter.</td>
interpreter. If you want to specify the name of the
executable as a relative path to the directory given by the
dir attribute, it may become necessary to set vmlauncher to
false as well.</td>
<td align="center" valign="top">No, default is <i>true</i></td> <td align="center" valign="top">No, default is <i>true</i></td>
</tr> </tr>
</table> </table>


+ 5
- 5
docs/manual/CoreTasks/fixcrlf.html View File

@@ -12,7 +12,7 @@
<p> <p>
Adjusts a text file to local conventions. Adjusts a text file to local conventions.
</p> </p>
<p> <p>
The set of files to be adjusted can be refined with the The set of files to be adjusted can be refined with the
<i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>includes</i>, <i>includesfile</i>, <i>excludes</i>,
@@ -27,7 +27,7 @@
tasks</a>, for details of file inclusion/exclusion patterns tasks</a>, for details of file inclusion/exclusion patterns
and their usage. and their usage.
</p> </p>
<p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and <p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
supports all attributes of <code>&lt;fileset&gt;</code> supports all attributes of <code>&lt;fileset&gt;</code>
(<code>dir</code> becomes <code>srcdir</code>) as well as the nested (<code>dir</code> becomes <code>srcdir</code>) as well as the nested
@@ -61,7 +61,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -73,7 +73,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -267,7 +267,7 @@ EOF characters are left alone if run on
DOS systems, and are removed if run on Unix systems. DOS systems, and are removed if run on Unix systems.
You never know what editor a user will use to browse README's.</p> You never know what editor a user will use to browse README's.</p>
<hr> <hr>
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 2
- 2
docs/manual/CoreTasks/jar.html View File

@@ -88,7 +88,7 @@ being wrapped and continued on the next line.
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -100,7 +100,7 @@ being wrapped and continued on the next line.
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 9
- 9
docs/manual/CoreTasks/javac.html View File

@@ -119,7 +119,7 @@ invoking the compiler.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">Comma-separated list of files (may be specified using
<td valign="top">Comma- or space-separated list of files (may be specified using
wildcard patterns) that must be wildcard patterns) that must be
included; all <code>.java</code> files are included when omitted.</td> included; all <code>.java</code> files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -132,7 +132,7 @@ invoking the compiler.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">Comma-separated list of files (may be specified using
<td valign="top">Comma- or space-separated list of files (may be specified using
wildcard patterns) that must be excluded; no files (except default wildcard patterns) that must be excluded; no files (except default
excludes) are excluded when omitted.</td> excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -305,13 +305,13 @@ invoking the compiler.</p>


<td valign="top">Value of the <code>-source</code> command-line <td valign="top">Value of the <code>-source</code> command-line
switch; will be ignored by all implementations except switch; will be ignored by all implementations except
<code>modern</code> and <code>jikes</code>.<br>
If you use this attribute together with <code>jikes</code>, you
must make sure that your version of jikes supports the
<code>-source</code> switch.<br>
Legal values are <code>1.3</code> and <code>1.4</code> &ndash; by
default, no <code>-source</code> argument will be used at
all.</td>
<code>javac1.4</code> (or <code>modern</code> when Ant is not
running in a 1.3 VM) and <code>jikes</code>.<br> If you use this
attribute together with <code>jikes</code>, you must make sure
that your version of jikes supports the <code>-source</code>
switch.<br> Legal values are <code>1.3</code> and <code>1.4</code>
&ndash; by default, no <code>-source</code> argument will be used
at all.</td>


<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>


+ 14
- 5
docs/manual/CoreTasks/mail.html View File

@@ -10,9 +10,14 @@
<h2><a name="mail">Mail</a></h2> <h2><a name="mail">Mail</a></h2>
<h3>Description</h3> <h3>Description</h3>
<p>A task to send SMTP email. This task can send mail using either plain <p>A task to send SMTP email. This task can send mail using either plain
text, uu encoding or Mime format mail depending on what is available.
text, UU encoding, or MIME format mail, depending on what is available.
Attachments may be sent using nested Attachments may be sent using nested
<a href="../CoreTypes/fileset.html">fileset</a> elements.</p> <a href="../CoreTypes/fileset.html">fileset</a> elements.</p>
<p><strong>Note:</strong> This task may depend on external libraries
that are not included
in the Ant distribution. See <a href="../install.html#librarydependencies">
Library Dependencies</a> for more information.
</p>


<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
@@ -49,7 +54,8 @@ Attachments may be sent using nested
</tr> </tr>
<tr> <tr>
<td valign="top">messagefile</td> <td valign="top">messagefile</td>
<td valign="top">File to send as the body of the email.</td>
<td valign="top">File to send as the body of the email. Property
values in the file will be expanded.</td>
</tr> </tr>
<td valign="top">messagemimetype</td> <td valign="top">messagemimetype</td>
<td valign="top">The content type of the message. The default is <td valign="top">The content type of the message. The default is
@@ -148,7 +154,9 @@ attributes:</p>
</table> </table>


<p>If the <code>src</code> attribute is not specified, then text can be added <p>If the <code>src</code> attribute is not specified, then text can be added
inside the <code>&lt;message&gt;</code> element.</p>
inside the <code>&lt;message&gt;</code> element. Property expansion will occur
in the message, whether it is specified as an external file or as text within
the <code>&lt;message&gt;</code> element.</p>


<h3>Examples</h3> <h3>Examples</h3>


@@ -167,7 +175,7 @@ inside the <code>&lt;message&gt;</code> element.</p>
&lt;mail mailhost=&quot;smtp.myisp.com&quot; mailport=&quot;1025&quot; subject=&quot;Test build&quot;&gt; &lt;mail mailhost=&quot;smtp.myisp.com&quot; mailport=&quot;1025&quot; subject=&quot;Test build&quot;&gt;
&lt;from name=&quot;me@myisp.com&quot;&gt; &lt;from name=&quot;me@myisp.com&quot;&gt;
&lt;to name=&quot;all@xyz.com&quot;&gt; &lt;to name=&quot;all@xyz.com&quot;&gt;
&lt;message&gt;A new nightly build has completed&lt;/message&gt;
&lt;message&gt;The ${buildname} nightly build has completed&lt;/message&gt;
&lt;fileset dir=&quot;dist&quot;&gt; &lt;fileset dir=&quot;dist&quot;&gt;
&lt;includes name=&quot;**/*.zip&quot;/&gt; &lt;includes name=&quot;**/*.zip&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
@@ -177,7 +185,8 @@ inside the <code>&lt;message&gt;</code> element.</p>
<p>Sends an eMail from <i>me@myisp.com</i> to <i>all@xyz.com</i> with a subject of <p>Sends an eMail from <i>me@myisp.com</i> to <i>all@xyz.com</i> with a subject of
<i>Test Build</i> and attaches any zip files from the dist directory.&nbsp; The <i>Test Build</i> and attaches any zip files from the dist directory.&nbsp; The
task will attempt to use JavaMail and fall back to UU encoding or no encoding in task will attempt to use JavaMail and fall back to UU encoding or no encoding in
that order depending on what support classes are available.</p>
that order depending on what support classes are available. <code>${buildname}</code>
will be replaced with the <code>buildname</code> property's value.</p>
<hr> <hr>
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights <p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


+ 2
- 2
docs/manual/CoreTasks/manifest.html View File

@@ -58,7 +58,7 @@ not nested into a section will be added to the "Main" section.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">value</td> <td valign="top">value</td>
<td valign="top">the name of the attribute.</td>
<td valign="top">the value of the attribute.</td>
<td valign="top" align="center">Yes</td> <td valign="top" align="center">Yes</td>
</tr> </tr>
</table> </table>
@@ -77,7 +77,7 @@ href="#attribute">attribute</a> elements into sections.</p>
<tr> <tr>
<td valign="top">name</td> <td valign="top">name</td>
<td valign="top">the name of the section.</td> <td valign="top">the name of the section.</td>
<td valign="top" align="center">No, if ommitted it will be assumed
<td valign="top" align="center">No, if omitted it will be assumed
to be the main section.</td> to be the main section.</td>
</tr> </tr>
</table> </table>


+ 2
- 1
docs/manual/CoreTasks/patch.html View File

@@ -9,7 +9,8 @@


<h2><a name="patch">Patch</a></h2> <h2><a name="patch">Patch</a></h2>
<h3>Description</h3> <h3>Description</h3>
<p>Applies a diff file to originals.</p>
<p>Applies a diff file to originals. ; requires "patch" to be
on the execution path. </p>
<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
<tr> <tr>


+ 8
- 11
docs/manual/CoreTasks/property.html View File

@@ -11,11 +11,8 @@
<h3>Description</h3> <h3>Description</h3>
<p>Sets a property (by name and value), or set of properties (from file or <p>Sets a property (by name and value), or set of properties (from file or
resource) in the project. Properties are case sensitive.</p> resource) in the project. Properties are case sensitive.</p>
<p>When a property was set by the user, or was a property in a parent project
(that started this project with the <a href="ant.html">ant task</a>), then this
property cannot be set, and will be ignored. This means that properties set
outside the current project always override the properties of the current
project.</p>
Properties are immutable: whoever sets a property first freezes it for the
rest of the build; they are most definately not variable.
<p>There are five ways to set properties:</p> <p>There are five ways to set properties:</p>
<ul> <ul>
<li>By supplying both the <i>name</i> and <i>value</i> attribute.</li> <li>By supplying both the <i>name</i> and <i>value</i> attribute.</li>
@@ -30,7 +27,7 @@ project.</p>
Properties will be defined for every environment variable by Properties will be defined for every environment variable by
prefixing the supplied name and a period to the name of the variable.</li> prefixing the supplied name and a period to the name of the variable.</li>
</ul> </ul>
<p>Although combinations of the three ways are possible, only one should be used
<p>Although combinations of these ways are possible, only one should be used
at a time. Problems might occur with the order in which properties are set, for at a time. Problems might occur with the order in which properties are set, for
instance.</p> instance.</p>
<p>The value part of the properties being set, might contain references to other <p>The value part of the properties being set, might contain references to other
@@ -85,10 +82,10 @@ href="../using.html#built-in-props">here</a>.</p>
<td valign="top">the prefix to use when retrieving environment variables. Thus <td valign="top">the prefix to use when retrieving environment variables. Thus
if you specify environment=&quot;myenv&quot; you will be able to access OS-specific if you specify environment=&quot;myenv&quot; you will be able to access OS-specific
environment variables via property names &quot;myenv.PATH&quot; or environment variables via property names &quot;myenv.PATH&quot; or
&quot;myenv.TERM&quot;. Note that if you supply a property name with a final
&quot;.&quot; it will not be doubled. ie environment=&quot;myenv.&quot; will still
allow access of environment variables through &quot;myenv.PATH&quot; and
&quot;myenv.TERM&quot;. This functionality is currently only implemented
&quot;myenv.TERM&quot;. Note that if you supply a property name with a final
&quot;.&quot; it will not be doubled. ie environment=&quot;myenv.&quot; will still
allow access of environment variables through &quot;myenv.PATH&quot; and
&quot;myenv.TERM&quot;. This functionality is currently only implemented
on select platforms. Feel free to send patches to increase the number of platforms on select platforms. Feel free to send patches to increase the number of platforms
this functionality is supported on ;).<br> this functionality is supported on ;).<br>
Note also that properties are case sensitive, even if the Note also that properties are case sensitive, even if the
@@ -104,7 +101,7 @@ href="../using.html#built-in-props">here</a>.</p>
<tr> <tr>
<td valign="top">classpathref</td> <td valign="top">classpathref</td>
<td valign="top">the classpath to use when looking up a resource, <td valign="top">the classpath to use when looking up a resource,
given as <a href="../using.html#references">reference</a> to a PATH defined
given as <a href="../using.html#references">reference</a> to a &lt;path&gt; defined
elsewhere..</td> elsewhere..</td>
<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>


+ 2
- 2
docs/manual/CoreTasks/replace.html View File

@@ -70,7 +70,7 @@ must use a nested <code>&lt;replacetoken&gt;</code> element.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -82,7 +82,7 @@ must use a nested <code>&lt;replacetoken&gt;</code> element.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 2
- 2
docs/manual/CoreTasks/rmic.html View File

@@ -90,7 +90,7 @@ please consult miniRMI's documentation to learn how to use it.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -102,7 +102,7 @@ please consult miniRMI's documentation to learn how to use it.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 5
- 0
docs/manual/CoreTasks/sql.html View File

@@ -119,6 +119,11 @@ and <b>abort</b> execution and transaction and fail task.</p>
<td width="78%" valign="top">Execute task only if rdbms version match</td> <td width="78%" valign="top">Execute task only if rdbms version match</td>
<td width="10%" valign="top">No (no restriction)</td> <td width="10%" valign="top">No (no restriction)</td>
</tr> </tr>
<tr>
<td width="12%" valign="top">caching</td>
<td width="78%" valign="top">Should the task cache loaders and the driver?</td>
<td width="10%" valign="top">No (default=true)</td>
</tr>
</table> </table>


<h3>Parameters specified as nested elements</h3> <h3>Parameters specified as nested elements</h3>


+ 3
- 3
docs/manual/CoreTasks/style.html View File

@@ -83,7 +83,7 @@ element which is used to perform Entity and URI resolution</p>
<td valign="top">force</td> <td valign="top">force</td>
<td valign="top">Recreate target files, even if they are newer <td valign="top">Recreate target files, even if they are newer
than their corresponding source files or the stylesheet.</td> than their corresponding source files or the stylesheet.</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No; default is false</td>
</tr> </tr>
<tr> <tr>
<td valign="top">processor</td> <td valign="top">processor</td>
@@ -103,7 +103,7 @@ element which is used to perform Entity and URI resolution</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be included.
<td valign="top">comma- or space-separated list of patterns of files that must be included.
All files are included when omitted.</td> All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -115,7 +115,7 @@ element which is used to perform Entity and URI resolution</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be excluded.
<td valign="top">comma- or space-separated list of patterns of files that must be excluded.
No files (except default excludes) are excluded when omitted.</td> No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 4
- 4
docs/manual/CoreTasks/tar.html View File

@@ -58,7 +58,7 @@ or "bzip2".</p>
</tr> </tr>
<tr> <tr>
<td valign="top">basedir</td> <td valign="top">basedir</td>
<td valign="top">the directory from which to zip the files.</td>
<td valign="top">the directory from which to tar the files.</td>
<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>
<tr> <tr>
@@ -71,7 +71,7 @@ or "bzip2".</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -83,7 +83,7 @@ or "bzip2".</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -121,7 +121,7 @@ attributes
</tr> </tr>
<tr> <tr>
<td valign="top">mode</td> <td valign="top">mode</td>
<td valign="top">An 3 digit octal string, specify the user, group and other modes in
<td valign="top">A 3 digit octal string, specify the user, group and other modes in
the standard Unix fashion</td> the standard Unix fashion</td>
<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>


+ 7
- 0
docs/manual/CoreTasks/taskdef.html View File

@@ -59,6 +59,13 @@ href="../develop.html#writingowntask">Writing your own task</a>&quot;.</p>
<code>resource</code>.</td> <code>resource</code>.</td>
<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>
<tr>
<td valign="top">classpathref</td>
<td valign="top">Reference to a classpath to
use when looking up <code>classname</code> or
<code>resource</code>.</td>
<td align="center" valign="top">No</td>
</tr>
<tr> <tr>
<td valign="top">loaderRef</td> <td valign="top">the name of the loader that is <td valign="top">loaderRef</td> <td valign="top">the name of the loader that is
used to load the class, constructed from the specified classpath. Use this to used to load the class, constructed from the specified classpath. Use this to


+ 5
- 3
docs/manual/CoreTasks/tstamp.html View File

@@ -11,10 +11,12 @@


<h3>Description</h3> <h3>Description</h3>
<p>Sets the <code>DSTAMP</code>, <code>TSTAMP</code>, and <code>TODAY</code> <p>Sets the <code>DSTAMP</code>, <code>TSTAMP</code>, and <code>TODAY</code>
properties in the current project. The <code>DSTAMP</code> property is in the
properties in the current project. By default,
the <code>DSTAMP</code> property is in the
format &quot;yyyyMMdd&quot;, <code>TSTAMP</code> is in the format &quot;yyyyMMdd&quot;, <code>TSTAMP</code> is in the
format &quot;hhmm&quot;, and <code>TODAY</code> is in the format &quot;hhmm&quot;, and <code>TODAY</code> is in the
format &quot;month day year&quot;.</p>
format &quot;MMMM dd yyyy&quot;. Use the nested &lt;format&gt; element
to specify a different format.</p>


<p>These properties can be used in the build-file, for instance, to create <p>These properties can be used in the build-file, for instance, to create
time-stamped filenames, or used to replace placeholder tags inside documents time-stamped filenames, or used to replace placeholder tags inside documents
@@ -132,7 +134,7 @@ is suitable for use with the &lt;touch&gt; task. The standard properties are set
&lt;tstamp prefix="start"/&gt; &lt;tstamp prefix="start"/&gt;
</pre> </pre>
<p> <p>
Sets three properties with the standard formats, prefixed with "start.":
Sets three properties with the standard formats, prefixed with "start.":
<code>start.DSTAMP</code>, <code>start.TSTAMP</code>, and <code>start.TODAY</code>.</p> <code>start.DSTAMP</code>, <code>start.TSTAMP</code>, and <code>start.TODAY</code>.</p>






+ 8
- 2
docs/manual/CoreTasks/war.html View File

@@ -30,6 +30,12 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
<td valign="top">the WAR file to create.</td> <td valign="top">the WAR file to create.</td>
<td valign="top" align="center">Yes</td> <td valign="top" align="center">Yes</td>
</tr> </tr>
<tr>
<td valign="top">warfile</td>
<td valign="top"><i>Deprecated<i> name of the file to create
-use <tt>destfile</tt> instead.</td>
<td valign="top" align="center">No</td>
</tr>
<tr> <tr>
<td valign="top">webxml</td> <td valign="top">webxml</td>
<td valign="top">The deployment descriptor to use (WEB-INF/web.xml).</td> <td valign="top">The deployment descriptor to use (WEB-INF/web.xml).</td>
@@ -60,7 +66,7 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -72,7 +78,7 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 3
- 1
docs/manual/CoreTasks/xmlproperty.html View File

@@ -51,7 +51,9 @@ Loads property values from a valid xml file.
<h3>Examples</h3> <h3>Examples</h3>
<pre> &lt;xmlproperty file="somefile.xml" /&gt;</pre> <pre> &lt;xmlproperty file="somefile.xml" /&gt;</pre>


<p>Load contents of somefile.xml as Ant properties.</p>
<p>Load contents of somefile.xml as Ant properties,
generating the property names from the
file's element and attribute names.</p>


<pre> <pre>
&lt;root-tag myattr="true"&gt; &lt;root-tag myattr="true"&gt;


+ 7
- 2
docs/manual/CoreTasks/zip.html View File

@@ -64,6 +64,11 @@ Java.</p>
<td valign="top">the zip-file to create.</td> <td valign="top">the zip-file to create.</td>
<td align="center" valign="top">Yes</td> <td align="center" valign="top">Yes</td>
</tr> </tr>
<tr>
<td valign="top">zipfile</td>
<td valign="top">the <i>deprecated</i> old name of destfile.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr> <tr>
<td valign="top">basedir</td> <td valign="top">basedir</td>
<td valign="top">the directory from which to zip the files.</td> <td valign="top">the directory from which to zip the files.</td>
@@ -89,7 +94,7 @@ Java.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -101,7 +106,7 @@ Java.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 2
- 2
docs/manual/CoreTypes/dirset.html View File

@@ -34,7 +34,7 @@ elements of <code>&lt;patternset&gt;</code> directly, as well as
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">A comma-separated list of patterns of directories that
<td valign="top">A comma- or space-separated list of patterns of directories that
must be included; all directories are included when omitted.</td> must be included; all directories are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -46,7 +46,7 @@ elements of <code>&lt;patternset&gt;</code> directly, as well as
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">A comma-separated list of patterns of directories that
<td valign="top">A comma- or space-separated list of patterns of directories that
must be excluded; no directories are excluded when omitted.</td> must be excluded; no directories are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 2
- 2
docs/manual/CoreTypes/fileset.html View File

@@ -40,7 +40,7 @@ attributes.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma-separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included; all files are included when omitted.</td> included; all files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -52,7 +52,7 @@ attributes.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma-separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded; no files (except default excludes) are excluded when omitted.</td> excluded; no files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>


+ 2
- 2
docs/manual/CoreTypes/patternset.html View File

@@ -26,7 +26,7 @@ or the following attributes.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma-separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
</tr> </tr>
<tr> <tr>
@@ -37,7 +37,7 @@ or the following attributes.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma-separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded; no files (except default excludes) are excluded when omitted.</td> excluded; no files (except default excludes) are excluded when omitted.</td>
</tr> </tr>
<tr> <tr>


+ 43
- 30
docs/manual/OptionalTasks/BorlandEJBTasks.html View File

@@ -8,83 +8,96 @@
<body> <body>


<h2><a name="log">BorlandDeploy</a>Tool</h2> <h2><a name="log">BorlandDeploy</a>Tool</h2>
<p>by Benoit Moussaud (<a href="mailto:benoit.moussaud@criltelecom.com">benoit.moussaud@criltelecom.com</a>)</p>


<h3>Description</h3> <h3>Description</h3>
<p>The BorlandDeployTool is a vendor specific nested element for the Ejbjar optional task.</p> <p>The BorlandDeployTool is a vendor specific nested element for the Ejbjar optional task.</p>
<p>BorlandDeploymentTool is dedicated to the Borland Application Server 4.5. It
generates and compiles the stubs and skeletons for all ejb described into the
Deployment Descriptor, builds the jar file including the support files and
<p>BorlandDeploymentTool is dedicated to the Borland Application Server 4.5.x and Borland
Enterprise Server 5.x. It generates and compiles the stubs and skeletons for all ejb described into the
Deployment Descriptor, builds the jar file including the support files and
verify whether the produced jar is valid or not.</p> verify whether the produced jar is valid or not.</p>
<h3>Borland element</h3> <h3>Borland element</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
<tr>
<tr>
<td valign="top" width="63"><b>Attribute</b></td> <td valign="top" width="63"><b>Attribute</b></td>
<td valign="top" width="915"><b>Description</b></td> <td valign="top" width="915"><b>Description</b></td>
<td align="center" valign="top" width="62"><b>Required</b></td> <td align="center" valign="top" width="62"><b>Required</b></td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">destdir</td> <td valign="top" width="63">destdir</td>
<td valign="top" width="915">The base directory into which the generated borland
<td valign="top" width="915">The base directory into which the generated borland
ready jar files are deposited</td> ready jar files are deposited</td>
<td align="center" valign="middle" width="62">yes</td> <td align="center" valign="middle" width="62">yes</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">debug</td> <td valign="top" width="63">debug</td>
<td valign="top" width="915">If true, turn on the debug mode for each borland
<td valign="top" width="915">If true, turn on the debug mode for each borland
tools (java2iiop, iastool ...) default = false</td> tools (java2iiop, iastool ...) default = false</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">verify</td> <td valign="top" width="63">verify</td>
<td valign="top" width="915">If true, turn on the verification at the end
<td valign="top" width="915">If true, turn on the verification at the end
of the jar production (default = false)</td> of the jar production (default = false)</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">verifyargs</td> <td valign="top" width="63">verifyargs</td>
<td valign="top" width="915">extra parameter for verify command</td> <td valign="top" width="915">extra parameter for verify command</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">suffix</td> <td valign="top" width="63">suffix</td>
<td valign="top" width="915">String value appended to the basename of the
<td valign="top" width="915">String value appended to the basename of the
deployment descriptor to create the filename of the Borland EJB jar file.</td> deployment descriptor to create the filename of the Borland EJB jar file.</td>
<td align="center" valign="middle" width="62">No, defaults to '-ejb.jar'.</td> <td align="center" valign="middle" width="62">No, defaults to '-ejb.jar'.</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">basdtd</td> <td valign="top" width="63">basdtd</td>
<td valign="top" width="915"><b>Deprecated</b>. Defines the location of the
DTD which covers the Borland specific deployment descriptors.
This should not be necessary if you have borland in your classpath. If you
do not, you should use a nested
<a href="ejb.html#ejbjar-dtd">&lt;dtd&gt;</a> element, described
<td valign="top" width="915"><b>Deprecated</b>. Defines the location of the
DTD which covers the Borland specific deployment descriptors.
This should not be necessary if you have borland in your classpath. If you
do not, you should use a nested
<a href="ejb.html#ejbjar-dtd">&lt;dtd&gt;</a> element, described
in the ejbjar task documentation.</td> in the ejbjar task documentation.</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">ejbdtd</td> <td valign="top" width="63">ejbdtd</td>
<td valign="top" width="915"><b>Deprecated</b>. Defines the location of the
ejb-jar DTD in the class hierarchy. This should not be necessary
if you have borland in your classpath. If you do not, you should use a
nested <a href="ejb.html#ejbjar-dtd">&lt;dtd&gt;</a> element,
<td valign="top" width="915"><b>Deprecated</b>. Defines the location of the
ejb-jar DTD in the class hierarchy. This should not be necessary
if you have borland in your classpath. If you do not, you should use a
nested <a href="ejb.html#ejbjar-dtd">&lt;dtd&gt;</a> element,
described in the ejbjar task described in the ejbjar task
documentation. </td> documentation. </td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">generateclient </td> <td valign="top" width="63">generateclient </td>
<td valign="top" width="915">If true, turn on the generation of the corresponding
<td valign="top" width="915">If true, turn on the generation of the corresponding
ejbjar (default = false)</td> ejbjar (default = false)</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<td valign="top" width="63">version</td>
<td valign="top" width="915">set the Borland Application Version.
<ul>
<li>4 means B.A.S (Borland Application Server) 4.x, target will add ejb-inprise.xml file</li>
<li>5 means B.E.S (Borland Application Server) 5.x, target will add ejb-borland.xml file</li>
</ul>
</td>
<td align="center" valign="middle" width="62">No, defaults to 4</td>
</tr>
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<p>The following build.xml snippet is an example of how to use Borland element
<p>The following build.xml snippet is an example of how to use Borland element
into the ejbjar task</p> into the ejbjar task</p>
<pre> &lt;ejbjar srcdir=&quot;${build.classes}&quot; basejarname=&quot;vsmp&quot; descriptordir=&quot;${rsc.dir}/hrmanager&quot;&gt; <pre> &lt;ejbjar srcdir=&quot;${build.classes}&quot; basejarname=&quot;vsmp&quot; descriptordir=&quot;${rsc.dir}/hrmanager&quot;&gt;
&lt;borland destdir=&quot;lib&quot; verify=&quot;on&quot; generateclient=&quot;on&quot;&gt;
&lt;borland destdir=&quot;lib&quot; verify=&quot;on&quot; generateclient=&quot;on&quot; version=&quot;5&quot;&gt;
&lt;classpath refid=&quot;classpath&quot; /&gt; &lt;classpath refid=&quot;classpath&quot; /&gt;
&lt;/borland&gt;
&lt;/borland&gt;
&lt;include name=&quot;**\ejb-jar.xml&quot;/&gt; &lt;include name=&quot;**\ejb-jar.xml&quot;/&gt;
&lt;support dir=&quot;${build.classes}&quot;&gt; &lt;support dir=&quot;${build.classes}&quot;&gt;
&lt;include name=&quot;demo\*.class&quot;/&gt; &lt;include name=&quot;demo\*.class&quot;/&gt;
@@ -92,7 +105,7 @@
&lt;/support&gt; &lt;/support&gt;
&lt;/ejbjar&gt;</pre> &lt;/ejbjar&gt;</pre>
<pre>The borland element will generate into the lib dir an ejb jar file using the deployment descriptor placed into the ${rsc.dir}/hrmanager directory. <pre>The borland element will generate into the lib dir an ejb jar file using the deployment descriptor placed into the ${rsc.dir}/hrmanager directory.
The verify phase is turned on and the generate client phase as well.
The verify phase is turned on and the generate client phase as well.
</pre> </pre>


<h3>&nbsp;</h3> <h3>&nbsp;</h3>


+ 25
- 14
docs/manual/OptionalTasks/BorlandGenerateClient.html View File

@@ -8,48 +8,59 @@
<body> <body>


<h2><a name="log">BorlandGenerateClient</a></h2> <h2><a name="log">BorlandGenerateClient</a></h2>
<p>by Benoit Moussaud (<a href="mailto:benoit.moussaud@criltelecom.com">benoit.moussaud@criltelecom.com</a>)</p>
<h3>Description</h3> <h3>Description</h3>
<p>The BorlandGenerateClient is a task dedicated to Borland Application Server
v 4.5. It offers to generate the client jar file corresponding to an ejb jar
<p>The BorlandGenerateClient is a task dedicated to Borland Application Server
v 4.5. It offers to generate the client jar file corresponding to an ejb jar
file.</p> file.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
<tr>
<tr>
<td valign="top" width="63"><b>Attribute</b></td> <td valign="top" width="63"><b>Attribute</b></td>
<td valign="top" width="915"><b>Description</b></td> <td valign="top" width="915"><b>Description</b></td>
<td align="center" valign="top" width="62"><b>Required</b></td> <td align="center" valign="top" width="62"><b>Required</b></td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">ejbjar</td> <td valign="top" width="63">ejbjar</td>
<td valign="top" width="915">ejb jar file</td> <td valign="top" width="915">ejb jar file</td>
<td align="center" valign="middle" width="62">yes</td> <td align="center" valign="middle" width="62">yes</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">debug</td> <td valign="top" width="63">debug</td>
<td valign="top" width="915">If true, turn on the debug mode for each borland
<td valign="top" width="915">If true, turn on the debug mode for each borland
tools (java2iiop, iastool ...) default = false</td> tools (java2iiop, iastool ...) default = false</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<tr>
<td valign="top" width="63">clientjar</td> <td valign="top" width="63">clientjar</td>
<td valign="top" width="915">client jar file name. If missing the client jar
file name is build using the ejbjar file name: ejbjar = hellobean-ejb.jar
<td valign="top" width="915">client jar file name. If missing the client jar
file name is build using the ejbjar file name: ejbjar = hellobean-ejb.jar
=&gt; hellobean-ejbclient.jar</td> =&gt; hellobean-ejbclient.jar</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="63">mode</td> <td valign="top" width="63">mode</td>
<td valign="top" width="915">choose the command launching mode. Two values:
java or fork. default = java. Possibility to specify a classpath.</td>
<td valign="top" width="915">choose the command launching mode. Two values:
java or fork. default = fork. java is not supported for version=5.Possibility to specify a classpath.</td>
<td align="center" valign="middle" width="62">no</td> <td align="center" valign="middle" width="62">no</td>
</tr> </tr>
<tr>
<td valign="top" width="63">version</td>
<td valign="top" width="915">set the Borland Application Version.
<ul>
<li>4 means B.A.S (Borland Application Server 4.x)</li>
<li>5 means B.E.S (Borland Application Server 5.x)</li>
</ul>
</td>
<td align="center" valign="middle" width="62">No, defaults to 4</td>
</tr>
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<p>The following build.xml snippet is an example of how to use Borland element
<p>The following build.xml snippet is an example of how to use Borland element
into the ejbjar task using the java mode.</p> into the ejbjar task using the java mode.</p>
<pre> <pre>
&lt;blgenclient ejbjar=&quot;lib/secutest-ejb.jar&quot; clientjar=&quot;lib/client.jar&quot; debug=&quot;true&quot; mode=&quot;java&quot;&gt;
&lt;blgenclient ejbjar=&quot;lib/secutest-ejb.jar&quot; clientjar=&quot;lib/client.jar&quot; debug=&quot;true&quot; mode=&quot;fork&quot;&gt; version=&quot;5&quot;&gt;
&lt;classpath&gt; &lt;classpath&gt;
&lt;pathelement locacation=&quot;mymodule.jar&quot;/&gt; &lt;pathelement locacation=&quot;mymodule.jar&quot;/&gt;
&lt;/classpath&gt; &lt;/classpath&gt;
@@ -57,7 +68,7 @@
</pre> </pre>
<pre>&nbsp;</pre> <pre>&nbsp;</pre>


<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 4
- 4
docs/manual/OptionalTasks/antlr.html View File

@@ -90,7 +90,7 @@
<tr> <tr>
<td valign="top">trace</td> <td valign="top">trace</td>
<td valign="top"> <td valign="top">
Forces <b>all</b> rules to call traceIn/traceOut if set to "yes".
Forces <b>all</b> rules to call traceIn/traceOut if set to "yes".
The default is "no". The default is "no".
</td> </td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -98,7 +98,7 @@
<tr> <tr>
<td valign="top">traceParser</td> <td valign="top">traceParser</td>
<td valign="top"> <td valign="top">
Only forces parser rules to call traceIn/traceOut if set to "yes".
Only forces parser rules to call traceIn/traceOut if set to "yes".
The default is "no". The default is "no".
</td> </td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -106,7 +106,7 @@
<tr> <tr>
<td valign="top">traceLexer</td> <td valign="top">traceLexer</td>
<td valign="top"> <td valign="top">
Only forces lexer rules to call traceIn/traceOut if set to "yes".
Only forces lexer rules to call traceIn/traceOut if set to "yes".
The default is "no". The default is "no".
</td> </td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -170,7 +170,7 @@ href="../using.html#arg">Command line arguments</a>.</p>
</p> </p>
<hr> <hr>


<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 5
- 5
docs/manual/OptionalTasks/cab.html View File

@@ -13,7 +13,7 @@
similar to the <a href="../CoreTasks/jar.html">jar</a> or <a href="../CoreTasks/zip.html">zip</a> tasks. similar to the <a href="../CoreTasks/jar.html">jar</a> or <a href="../CoreTasks/zip.html">zip</a> tasks.
This task will work on Windows using the external cabarc tool (provided by Microsoft) This task will work on Windows using the external cabarc tool (provided by Microsoft)
which must be located in your executable path.</p> which must be located in your executable path.</p>
<p>To use this task on other platforms you need to download and compile libcabinet from
<p>To use this task on other platforms you need to download and compile libcabinet from
<a href="http://trill.cis.fordham.edu/~barbacha/cabinet_library/"> <a href="http://trill.cis.fordham.edu/~barbacha/cabinet_library/">
http://trill.cis.fordham.edu/~barbacha/cabinet_library/</a>.</p> http://trill.cis.fordham.edu/~barbacha/cabinet_library/</a>.</p>
<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based <p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based
@@ -61,7 +61,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that
<td valign="top">comma- or space-separated list of patterns of files that
must be included. All files are included when omitted.</td> must be included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -73,7 +73,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that
<td valign="top">comma- or space-separated list of patterns of files that
must be excluded. No files (except default excludes) are excluded must be excluded. No files (except default excludes) are excluded
when omitted.</td> when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -94,7 +94,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre> <blockquote><pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot; &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
basedir=&quot;htdocs/manual&quot;
basedir=&quot;htdocs/manual&quot;
/&gt; /&gt;
</pre></blockquote> </pre></blockquote>
<p>cabs all files in the htdocs/manual directory into a file called <p>cabs all files in the htdocs/manual directory into a file called
@@ -122,7 +122,7 @@ directory api are archived, and files with the name todo.html are
excluded. Output from the cabarc tool is displayed in the build excluded. Output from the cabarc tool is displayed in the build
output.</p> output.</p>
<hr> <hr>
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 6
- 6
docs/manual/OptionalTasks/ccm.html View File

@@ -45,7 +45,7 @@ Task to checkin a file
<td>No</td> <td>No</td>
</tr> </tr>
<tr> <tr>
<td>ccmcommand</td>
<td>ccmdir</td>
<td>path to the ccm executable file, required if it is not on the PATH</td> <td>path to the ccm executable file, required if it is not on the PATH</td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -87,7 +87,7 @@ Task to perform a Checkout command to Continuus
<td>No</td> <td>No</td>
</tr> </tr>
<tr> <tr>
<td>ccmcommand</td>
<td>ccmdir</td>
<td>path to the ccm executable file, required if it is not on the PATH</td> <td>path to the ccm executable file, required if it is not on the PATH</td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -123,7 +123,7 @@ Task to perform a check in default task command to Continuus
<td>No</td> <td>No</td>
</tr> </tr>
<tr> <tr>
<td>ccmcommand</td>
<td>ccmdir</td>
<td >path to the ccm executable file, required if it is not on the PATH</td> <td >path to the ccm executable file, required if it is not on the PATH</td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -161,7 +161,7 @@ Task to perform an reconfigure command to Continuus.
<td>Yes</td> <td>Yes</td>
</tr> </tr>
<tr> <tr>
<td>ccmcommand</td>
<td>ccmdir</td>
<td >path to the ccm executable file, required if it is not on the PATH</td> <td >path to the ccm executable file, required if it is not on the PATH</td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -196,7 +196,7 @@ Create a Continuus task.
<td>No</td> <td>No</td>
</tr> </tr>
<tr> <tr>
<td>ccmcommand</td>
<td>ccmdir</td>
<td >path to the ccm executable file, required if it is not on the PATH</td> <td >path to the ccm executable file, required if it is not on the PATH</td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -231,7 +231,7 @@ Create a Continuus task.
current user as the resolver for this task.</p> current user as the resolver for this task.</p>


<hr> <hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>
</body> </body>




+ 2
- 2
docs/manual/OptionalTasks/dotnet.html View File

@@ -75,7 +75,7 @@ Also, dependency checking only works if destfile is set.
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td> excluded. No files (except default excludes) are excluded when omitted.</td>
</tr> </tr>
<tr> <tr>
@@ -112,7 +112,7 @@ Also, dependency checking only works if destfile is set.
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
</tr> </tr>
<tr> <tr>


+ 180
- 167
docs/manual/OptionalTasks/ejb.html View File

@@ -47,9 +47,9 @@ In general these tasks are specific to the particular vendor's EJB Server.</p>
<li><a href="http://www.jboss.org/" target="_top"> <li><a href="http://www.jboss.org/" target="_top">
JBoss 2.1</a> and above EJB servers</li> JBoss 2.1</a> and above EJB servers</li>
<li><a href="http://www.bea.com" target="_top">Weblogic</a> <li><a href="http://www.bea.com" target="_top">Weblogic</a>
4.5.1, 5.1, and 6.0 EJB servers</li>
4.5.1 through to 7.0 EJB servers</li>
<li><a href="http://www.objectweb.org/jonas/" target="_top">JOnAS</a> <li><a href="http://www.objectweb.org/jonas/" target="_top">JOnAS</a>
2.4 Open Source EJB server</li>
2.4.x and 2.5 Open Source EJB server</li>
<li><a href="http://www.ibm.com/websphere">IBM WebSphere</a> 4.0</li> <li><a href="http://www.ibm.com/websphere">IBM WebSphere</a> 4.0</li>
</ul> </ul>
Over time we expect further optional tasks to support additional EJB Servers. Over time we expect further optional tasks to support additional EJB Servers.
@@ -67,11 +67,11 @@ In general these tasks are specific to the particular vendor's EJB Server.</p>
<tr><td><a href="BorlandEJBTasks.html">borland</a></td><td>Borland Application Server 4.5</td></tr> <tr><td><a href="BorlandEJBTasks.html">borland</a></td><td>Borland Application Server 4.5</td></tr>
<tr><td><a href="#ejbjar_iplanet">iPlanet</a></td><td>iPlanet Application Server 6.0</td></tr> <tr><td><a href="#ejbjar_iplanet">iPlanet</a></td><td>iPlanet Application Server 6.0</td></tr>
<tr><td><a href="#ejbjar_jboss">jboss</a></td><td>JBoss</td></tr> <tr><td><a href="#ejbjar_jboss">jboss</a></td><td>JBoss</td></tr>
<tr><td><a href="#ejbjar_jonas">jonas</a></td><td>JOnAS 2.4</td></tr>
<tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 &amp; 6.0</td></tr>
<tr><td><a href="#ejbjar_jonas">jonas</a></td><td>JOnAS 2.4.x and 2.5</td></tr>
<tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 to 7.0</td></tr>
<tr><td><a href="#ejbjar_websphere">websphere</a></td><td>IBM WebSphere 4.0</td></tr> <tr><td><a href="#ejbjar_websphere">websphere</a></td><td>IBM WebSphere 4.0</td></tr>
<tr><td><a href="#wlrun">wlrun</a></td><td colspan="2">Weblogic 4.5.1, 5.1 &amp; 6.0</td></tr>
<tr><td><a href="#wlstop">wlstop</a></td><td colspan="2">Weblogic 4.5.1, 5.1 &amp; 6.0</td></tr>
<tr><td><a href="#wlrun">wlrun</a></td><td colspan="2">Weblogic 4.5.1 to 7.0</td></tr>
<tr><td><a href="#wlstop">wlstop</a></td><td colspan="2">Weblogic 4.5.1 to 7.0</td></tr>


</table> </table>


@@ -533,7 +533,7 @@ include: </p>
<li>Weblogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool</li> <li>Weblogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool</li>
<li>IBM WebSphere 4.0</li> <li>IBM WebSphere 4.0</li>
<li>TOPLink for WebLogic 2.5.1-enabled entity beans</li> <li>TOPLink for WebLogic 2.5.1-enabled entity beans</li>
<li><a href="http://www.objectweb.org/jonas/">JOnAS</a> 2.4 Open Source EJB server</li>
<li><a href="http://www.objectweb.org/jonas/">JOnAS</a> 2.4.x and 2.5 Open Source EJB server</li>
</ul> </ul>




@@ -560,9 +560,12 @@ respect to the class files and deployment descriptors that make up the bean. If
any of these files are newer than the jar file the jar will be rebuilt otherwise any of these files are newer than the jar file the jar will be rebuilt otherwise
a message is logged that the jar file is up to date.</p> a message is logged that the jar file is up to date.</p>


<p>The task uses the jakarta-bcel framework, to extract all dependent classes. This
means, that beside the classes, that are mentioned in the deployment descriptor, also
all classes, that these depend on, are automatically included in the jar file.</p>
<p>The task uses the
<a href="http://jakarta.apache.org/bcel"> jakarta-BCEL </a> framework
to extract all dependent classes. This
means that, in addition to the classes that are mentioned in the
deployment descriptor, any classes that these depend on are also
automatically included in the jar file.</p>




<h3>Naming Convention</h3> <h3>Naming Convention</h3>
@@ -636,34 +639,37 @@ beans in the jar.
</ul> </ul>


<a name="ejbjar_deps"><h3>Dependencies</h3></a> <a name="ejbjar_deps"><h3>Dependencies</h3></a>
<p>In addition to the bean classes, ejbjar is able to ad additional classes to the generated
<p>In addition to the bean classes, ejbjar is able to ad additional classes to the generated
ejbjar. These classes are typically the support classes which are used by the bean's classes or as ejbjar. These classes are typically the support classes which are used by the bean's classes or as
parameters to the bean's methods.</p> parameters to the bean's methods.</p>


<p>In versions of Ant prior to 1.5, ejbjar used reflection and attempted to add the super
classes and super interfaces of the bean classes. For this technique to work the bean
<p>In versions of Ant prior to 1.5, ejbjar used reflection and attempted to add the super
classes and super interfaces of the bean classes. For this technique to work the bean
classes had to be loaded into Ant's JVM. This was not always possible due to class dependencies. classes had to be loaded into Ant's JVM. This was not always possible due to class dependencies.
</p> </p>


<p>The ejbjar task in Ant 1.5 uses the jakarta-BCEL library to analyze the bean's class
files directly, rather than loading them into the JVM. This also allows ejbjar to add all
<p>The ejbjar task in Ant 1.5 uses the
<a href="http://jakarta.apache.org/bcel"> jakarta-BCEL </a> library
to analyze the bean's class
files directly, rather than loading them into the JVM. This also allows ejbjar to add all
of the required support classes for a bean and not just super classes. of the required support classes for a bean and not just super classes.
</p> </p>


<p>In Ant 1.5, a new attribute, <code>dependency</code> has been introduced to allow the
buildfile to control what additional classes are added to the generated jar. It takes three
<p>In Ant 1.5, a new attribute, <code>dependency</code> has been introduced to allow the
buildfile to control what additional classes are added to the generated jar. It takes three
possible values</p> possible values</p>
<ul> <ul>
<li><code>none</code> - only the bean classes and interfaces described in the bean's
<li><code>none</code> - only the bean classes and interfaces described in the bean's
descriptor are added to the jar.</li> descriptor are added to the jar.</li>
<li><code>super</code> - this is the default value and replicates the original ejbjar
<li><code>super</code> - this is the default value and replicates the original ejbjar
behaviour where super classes and super interfaces are added to the jar</li> behaviour where super classes and super interfaces are added to the jar</li>
<li><code>full</code> - In this mode all classes used by the bean's classes and interfaces <li><code>full</code> - In this mode all classes used by the bean's classes and interfaces
are added to the jar</li> are added to the jar</li>
</ul> </ul>
<p>The <code>super</code> and <code>full</code> values require the jakarta-BCEL library
<p>The <code>super</code> and <code>full</code> values require the
<a href="http://jakarta.apache.org/bcel"> jakarta-BCEL </a> library
to be available. If it is not, ejbjar will drop back to the behaviour corresponding to to be available. If it is not, ejbjar will drop back to the behaviour corresponding to
the value <code>none</code>.</p>
the value <code>none</code>.</p>


<h3>Parameters:</h3> <h3>Parameters:</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
@@ -759,7 +765,7 @@ the value <code>none</code>.</p>
<tr> <tr>
<td valign="top">dependency</td> <td valign="top">dependency</td>
<td valign="top">This attribute controls which additional classes and interfaces <td valign="top">This attribute controls which additional classes and interfaces
are added to the jar. Please refer to the description
are added to the jar. Please refer to the description
<a href="#ejbjar_deps">above</a></td> <a href="#ejbjar_deps">above</a></td>
<td valign="top" align="center">No.</td> <td valign="top" align="center">No.</td>
</tr> </tr>
@@ -1042,15 +1048,43 @@ define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.</p>
<td valign="top">Specifies the classname of the ejbc compiler. Normally ejbjar determines <td valign="top">Specifies the classname of the ejbc compiler. Normally ejbjar determines
the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler
featured in weblogic 6 has, however, been deprecated in version 7. When featured in weblogic 6 has, however, been deprecated in version 7. When
using with version 7 this attribute should be set to
using with version 7 this attribute should be set to
&quot;weblogic.ejbc&quot; to avoid the deprecation warning.</td> &quot;weblogic.ejbc&quot; to avoid the deprecation warning.</td>
<td valign="top" align="center">No.</td> <td valign="top" align="center">No.</td>
</tr> </tr>
<tr>
<td valign="top">jvmargs</td>
<td valign="top">Any additional arguments to be passed to the Virtual Machine
running weblogic.ejbc tool. For example to set the memory size,
this could be jvmargs=&quot;-Xmx128m&quot;
</td>
<td valign="top" align="center">No.</td>
</tr>
<tr>
<td valign="top">jvmdebuglevel</td>
<td valign="top">Sets the weblogic.StdoutSeverityLevel to use when running
the Virtual Machine that executes ejbc. Set to 16 to avoid
the warnings about EJB Home and Remotes being in the classpath
</td>
<td valign="top" align="center">No.</td>
</tr>
<tr>
<td valign="top">outputdir</td>
<td valign="top">If set ejbc will be given this directory as the output
desitination rather than a jar file. This allows for the
generation of &quot;exploded&quot; jars.
</td>
<td valign="top" align="center">No.</td>
</tr>
</table> </table>


<p>The weblogic nested element itself supports two nested elements &lt;classpath&gt; and
&lt;wlclasspath&gt; which are used to set the respective classpaths. These nested elements
are useful when setting up class paths using reference Ids.</p>
<p>The weblogic nested element supports three nested elements. The
first two, &lt;classpath&gt; and &lt;wlclasspath&gt;, are used to set the
respective classpaths. These nested elements are useful when setting up
class paths using reference Ids. The last, &lt;sysproperty&gt;, allows
Java system properties to be set during the compiler run. This turns out
to be necessary for supporting CMP EJB compilation in all environments.
</p>


<h3>TOPLink for Weblogic element</h3> <h3>TOPLink for Weblogic element</h3>


@@ -1305,7 +1339,7 @@ in the descriptor dir:</p>
&lt;websphere dbvendor="DB2UDBOS390_V6" &lt;websphere dbvendor="DB2UDBOS390_V6"
ejbdeploy="true" ejbdeploy="true"
oldCMP="false" oldCMP="false"
tempdir="/tmp"
tempdir="/tmp"
destdir="${dist.server}"&gt; destdir="${dist.server}"&gt;
&lt;wasclasspath&gt; &lt;wasclasspath&gt;
&lt;pathelement location="${was4.home}/deploytool/itp/plugins/org.eclipse.core.boot/boot.jar"/&gt; &lt;pathelement location="${was4.home}/deploytool/itp/plugins/org.eclipse.core.boot/boot.jar"/&gt;
@@ -1479,35 +1513,40 @@ local DTDs are found in the [iAS-install-directory]/dtd directory.
&lt;dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN" &lt;dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"
location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/> location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/>
&lt;/ejbjar></pre> &lt;/ejbjar></pre>
<h3><a name="ejbjar_jonas">
<h3>JOnAS (Java Open Application Server) element</h3>
</a>
</h3>
<p>The &lt;jonas&gt; nested element is used to build JOnAS-specific stubs
and skeletons thanks to the GenIC specific tool, and construct a JAR file
which may be deployed to the JOnAS Application Server. The build process
will always determine if the EJB stubs/skeletons and the EJB-JAR file are
up to date, and it will do the minimum amount of work required. </p>


<p>Like the WebLogic element, a naming convention for the EJB descriptors
is most commonly used to specify the name for the completed JAR file. For
example, if the EJB descriptor ejb/Account.xml (or ejb/Account-ejb-jar.xml )
is found in the descriptor directory, the jonas element will search for a
JOnAS-specific EJB descriptor file named ejb/Account-jonas-ejb-jar.xml
(if it isn't found, the task will fail) and a JAR file named ejb/Account.jar
will be written in the destination directory. Note that when the EJB
descriptors are added to the JAR file, they are automatically renamed
META-INF/ejb-jar.xml and META-INF/jonas-ejb-jar.xml.<br><br>
But if you prefer, you can use JOnAS convention naming and keep your
XML file name : ejb/Account.xml and ejb/jonas-Account.xml, a JAR file named
ejb/Account.jar will be written in the destination directory.

</p>
<p>Of course, this naming behaviour can be modified by specifying attributes
in the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir)
as well as the iplanet element (for example, suffix). Refer to the appropriate
documentation for more details.</p>
<h3><a name="ejbjar_jonas">JOnAS (Java Open Application Server) element</a></h3>

<p>The &lt;jonas&gt; nested element is used to build JOnAS-specific stubs and
skeletons thanks to the <code>GenIC</code> specific tool, and construct a JAR
file which may be deployed to the JOnAS Application Server. The build process
will always determine if the EJB stubs/skeletons and the EJB-JAR file are up to
date, and it will do the minimum amount of work required.</p>

<p>Like the WebLogic element, a naming convention for the EJB descriptors is
most commonly used to specify the name for the completed JAR file. For example,
if the EJB descriptor <code>ejb/Account-ejb-jar.xml</code> is found in the
descriptor directory, the &lt;jonas&gt; element will search for a JOnAS-specific
EJB descriptor file named <code>ejb/Account-jonas-ejb-jar.xml</code> and a JAR
file named <code>ejb/Account.jar</code> will be written in the destination
directory. But the &lt;jonas&gt; element can also use the JOnAS naming
convention. With the same example as below, the EJB descriptor can also be named
<code>ejb/Account.xml</code> (no base name terminator here) in the descriptor
directory. Then the &lt;jonas&gt; element will search for a JOnAS-specific EJB
descriptor file called <code>ejb/jonas-Account.xml</code>. This convention do
not follow strictly the ejb-jar naming convention recommendation but is
supported for backward compatibility with previous version of JOnAS.</p>

<p>Note that when the EJB descriptors are added to the JAR file, they are
automatically renamed <code>META-INF/ejb-jar.xml</code> and
<code>META-INF/jonas-ejb-jar.xml</code>.</p>

<p>Of course, this naming behavior can be modified by specifying attributes in
the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir)
as well as the iplanet element (for example, suffix). Refer to the appropriate
documentation for more details.</p>

<h3> Parameters:</h3> <h3> Parameters:</h3>

<table border="1" cellspacing="0" cellpadding="2"> <table border="1" cellspacing="0" cellpadding="2">
<tbody> <tbody>
<tr> <tr>
@@ -1518,148 +1557,121 @@ up to date, and it will do the minimum amount of work required. </p>
<tr> <tr>
<td valign="Top">destdir</td> <td valign="Top">destdir</td>
<td valign="Top">The base directory into which the generated JAR files <td valign="Top">The base directory into which the generated JAR files
will be written. Each JAR file is written in directories which correspond
to their location within the "descriptordir" namespace.</td>
will be written. Each JAR file is written in directories which correspond
to their location within the "<code>descriptordir</code>" namespace.</td>
<td align="Center" valign="Top">Yes</td> <td align="Center" valign="Top">Yes</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">jonasroot<br>
</td>
<td valign="Top">The root directory for JOnAS. <br>
</td>
<td valign="Top">
<div align="Center">Yes<br>
</div>
</td>
<td valign="Top">jonasroot</td>
<td valign="Top">The root directory for JOnAS.</td>
<td valign="Top" align="Center">Yes</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">workdir<br>
</td>
<td valign="Top">The work directory to use. Specify where to place
the generated files, before to add to the jar. The directory should be empty.
If omitted, it defaults to a temporary directory.<br>
</td>
<td valign="Top">
<div align="Center">No<br>
</div>
</td>
<td valign="Top">classpath</td>
<td valign="Top">The classpath used when generating EJB stubs and
skeletons. If omitted, the classpath specified in the "ejbjar" parent
task will be used. If specified, the classpath elements will be prepended
to the classpath specified in the parent "ejbjar" task (see also the ORB
attribute documentation below). Note that nested "classpath" elements may
also be used.</td>
<td valign="Top" align="Center">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">cleanworkdir<br>
</td>
<td valign="Top">Clean the working directory after work.
If omitted, it defaults to false, but your jar will contain
wrong files if you don't clean the workdir yourself.<br>
Temporary working directory is always cleaned.<br>
</td>
<td valign="Top">
<div align="Center">No<br>
</div>
</td>
<td valign="Top">keepgenerated</td>
<td valign="Top"><code>true</code> if the intermediate Java
source files generated by GenIC must be deleted or not. If
omitted, it defaults to <code>false</code>.</td>
<td align="Center" valign="Top">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">classpath</td>
<td valign="Top">The classpath used when generating EJB stubs and skeletons.
If omitted, the classpath specified in the "ejbjar" parent task will
be used. If specified, the classpath elements will be prepended to the
classpath specified in the parent "ejbjar" task (see also the ORB
attribute documentation below). Note that nested "classpath" elements
may also be used.</td>
<td valign="Top">nocompil</td>
<td valign="Top"><code>true</code> if the generated source files
must not be compiled via the java and rmi compilers. If omitted,
it defaults to <code>false</code>.</td>
<td align="Center" valign="Top">No</td> <td align="Center" valign="Top">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">keepgenerated</td>
<td valign="Top">Indicates whether or not the Java source files which
are generated by GenIC will be saved or automatically deleted. If "yes", the
source files will be retained. If omitted, it defaults to "no". </td>
<td valign="Top">novalidation</td>
<td valign="Top"><code>true</code> if the XML deployment descriptors must
be parsed without validation. If omitted, it defaults to <code>false</code>.</td>
<td align="Center" valign="Top">No</td> <td align="Center" valign="Top">No</td>
</tr> </tr>
<tr>
<td valign="top">keepgeneric</td>
<td valign="top">This controls whether the generic file used as input to
GenIC is retained.</td>
<td valign="top" align="center">No, defaults to false</td>
</tr>
<tr>
<td valign="top">secpropag</td>
<td valign="top">Modify the RMI Skel. and Stub. to implement the
implicit propagation of the security context (note that
the transactional context is always provided).
</td>
<td valign="top" align="center">No, defaults to false.</td>
</tr>
<tr> <tr>
<td valign="Top">orb<br>
</td>
<td>Choose your ORB : RMI, JEREMIE, DAVID, ... If omitted, it defaults
to the one present in classpath. If specified, the corresponding JOnAS JAR is
automatically added to the classpath. <br>
</td>
<td valign="Top">javac</td>
<td valign="Top">Java compiler to use. If omitted, it defaults
to the value of <code>build.compiler</code> property.</td>
<td align="Center" valign="Top">No</td> <td align="Center" valign="Top">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">noGENIC<br>
</td>
<td valign="Top">If this attribute is set to true, JOnAS's GenIC will
not be run on the EJB jar. Use this if you prefer to
run GenIC at deployment time.</td>
<td>
<div align="Center">No</div>
</td>
<td valign="Top">javacopts</td>
<td valign="Top">Options to pass to the java compiler.</td>
<td align="Center" valign="Top">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">suffix</td>
<td>String value appended to the JAR filename when creating each JAR.
If omitted, it defaults to ".jar". </td>
<td valign="Top">rmicopts</td>
<td valign="Top">Options to pass to the rmi compiler.</td>
<td align="Center" valign="Top">No</td> <td align="Center" valign="Top">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">verbose<br>
</td>
<td valign="top">secpropag</td>
<td valign="top"><code>true</code> if the RMI Skel. and
Stub. must be modified to implement the implicit propagation of
the security context (the transactional context is always
provided). If omitted, it defaults to <code>false</code>.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="Top">verbose</td>
<td valign="Top">Indicates whether or not to use -verbose switch. If <td valign="Top">Indicates whether or not to use -verbose switch. If
omitted, it defaults to "no".</td>
<td valign="Top">
<div align="Center">No<br>
</div>
</td>
omitted, it defaults to <code>false</code>.</td>
<td align="Center" valign="Top">No</td>
</tr>
<td valign="Top">additionalargs</td>
<td valign="Top">Add additional args to GenIC.</td>
<td align="Center" valign="Top">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">compiler<br>
</td>
<td valign="Top">This allows for the selection of a different compiler
to be used for the compilation of the generated Java
files. This could be set, for example, to Jikes to
compile with the Jikes compiler. If this is not set
and the <code>build.compiler</code> property is set
to jikes, the Jikes compiler will be used. If this
is not desired, the value "<code>default</code>"
may be given to use the default compiler<br>
</td>
<td valign="Top">
<div align="Center">No<br>
</div>
</td>
<td valign="Top">keepgeneric</td>
<td valign="Top"><code>true</code> if the generic JAR file used as input
to GenIC must be retained. If omitted, it defaults to <code>false</code>.</td>
<td align="Center" valign="Top">No</td>
</tr>
<tr>
<td valign="Top">suffix</td>
<td>String value appended to the JAR filename when creating each JAR. If
omitted, it defaults to ".jar". </td>
<td align="Center" valign="Top">No</td>
</tr> </tr>
<tr> <tr>
<td valign="Top">args<br>
</td>
<td valign="Top">Add additional args to GenIC.<br>
</td>
<td valign="Top">
<div align="Center">No<br>
</div>
</td>
<td valign="Top">orb</td>
<td>Choose your ORB : RMI, JEREMIE, DAVID. If omitted, it defaults to the
one present in classpath. If specified, the corresponding JOnAS JAR is
automatically added to the classpath.</td>
<td align="Center" valign="Top">No</td>
</tr>
<tr>
<td valign="Top">nogenic</td>
<td valign="Top">If this attribute is set to <code>true</code>,
JOnAS's GenIC will not be run on the EJB JAR. Use this if you
prefer to run GenIC at deployment time. If omitted, it defaults
to <code>false</code>.</td>
<td align="Center" valign="Top">No</td>
</tr> </tr>
<tr>
</tbody> </tbody>
</table> </table>

<p>As noted above, the jonas element supports additional &lt;classpath&gt; <p>As noted above, the jonas element supports additional &lt;classpath&gt;
nested elements. </p>
nested elements.</p>

<h3>Examples</h3> <h3>Examples</h3>
<p>This example shows ejbjar being used to generate deployment jars using
a JOnAS EJB container. This example requires the naming standard to be
used for the deployment descriptors. Using this format will create a ejb
jar file for each variation of &nbsp;'*-jar.xml' that is found in the
deployment descriptor directory.&nbsp;</p>

<p>This example shows ejbjar being used to generate deployment jars using a
JOnAS EJB container. This example requires the naming standard to be used for
the deployment descriptors. Using this format will create a EJB JAR file for
each variation of &nbsp;'*-jar.xml' that is found in the deployment descriptor
directory.&nbsp;</p>

<pre> <pre>
&lt;ejbjar srcdir="${build.classes}" &lt;ejbjar srcdir="${build.classes}"
descriptordir="${descriptor.dir}"&gt; descriptordir="${descriptor.dir}"&gt;
@@ -1673,11 +1685,12 @@ deployment descriptor directory.&nbsp;</p>
&lt;/support&gt; &lt;/support&gt;
&lt;/ejbjar&gt; &lt;/ejbjar&gt;
</pre> </pre>
<p></p>
<p>This example shows ejbjar being used to generate a single deployment jar <p>This example shows ejbjar being used to generate a single deployment jar
using a JOnAS EJB container. This example does require the deployment
descriptors to use the naming standard. This will create only one ejb jar
file - 'TheEJBJar.jar'.</p>
using a JOnAS EJB container. This example does require the deployment
descriptors to use the naming standard. This will create only one ejb jar file -
'TheEJBJar.jar'.</p>

<pre> <pre>
&lt;ejbjar srcdir="${build.classes}" &lt;ejbjar srcdir="${build.classes}"
descriptordir="${descriptor.dir}" descriptordir="${descriptor.dir}"


+ 119
- 0
docs/manual/OptionalTasks/jarlib-available.html View File

@@ -0,0 +1,119 @@
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>jarlib-available Task</title>
</head>

<body>

<h2><a name="jarlib-available">jarlib-available</a></h2>
<h3>Description</h3>
<p>Check whether an extension is present in a fileset or an extensionSet.
If the extension is present then a property is set.</p>

<p>Note that this task
works with extensions as defined by the "Optional Package" specification.
For more information about optional packages, see the document
<em>Optional Package Versioning</em> in the documentation bundle for your
Java2 Standard Edition package, in file
<code>guide/extensions/versioning.html</code> or online at
<a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html">
http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p>
<p>See the Extension and ExtensionSet documentation for further details</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">property</td>
<td valign="top">The name of property to set if extensions is available.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">file</td>
<td valign="top">The file to check for extension</td>
<td valign="top" align="center">No, one of file, nested
ExtensionSet or nested fileset must be present.</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>

<h4>extension</h4>
<p><a href="../OptionalTypes/extension.html">Extension</a> the extension
to search for.</p>

<h4>fileset</h4>
<p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select
sets of files to check for extension.</p>

<h4>extensionSet</h4>
<p><a href="../OptionalTypes/extensionset.html">ExtensionSet</a>s is the set
of extensions to search for extension in.</p>

<h3>Examples</h3>
<p><b>Search for extension in single file</b></p>
<pre>
&lt;jarlib-available property=&quot;myext.present&quot; file=&quot;myfile.jar&quot;&gt;
&lt;extension
extensionName=&quot;org.apache.tools.ant&quot;
specificationVersion=&quot;1.4.9&quot;
specificationVendor=&quot;Apache Software Foundation&quot;/&gt;
&lt;/jarlib-available&gt;
</pre>

<p><b>Search for extension in single file refencing external Extension</b></p>
<pre>
&lt;extension id=&quot;myext&quot;
extensionName=&quot;org.apache.tools.ant&quot;
specificationVersion=&quot;1.4.9&quot;
specificationVendor=&quot;Apache Software Foundation&quot;/&gt;

&lt;jarlib-available property=&quot;myext.present&quot; file=&quot;myfile.jar&quot;&gt;
&lt;extension refid=&quot;myext&quot;/&gt;
&lt;/jarlib-available&gt;
</pre>
<p><b>Search for extension in fileset</b></p>
<pre>
&lt;extension id=&quot;myext&quot;
extensionName=&quot;org.apache.tools.ant&quot;
specificationVersion=&quot;1.4.9&quot;
specificationVendor=&quot;Apache Software Foundation&quot;/&gt;

&lt;jarlib-available property=&quot;myext.present&quot;&gt;
&lt;extension refid=&quot;myext&quot;/&gt;
&lt;fileset dir="lib"&gt;
&lt;include name="*.jar"/&gt;
&lt;/fileset&gt;
&lt;/jarlib-available&gt;
</pre>
<p><b>Search for extension in extensionSet</b></p>
<pre>
&lt;extension id=&quot;myext&quot;
extensionName=&quot;org.apache.tools.ant&quot;
specificationVersion=&quot;1.4.9&quot;
specificationVendor=&quot;Apache Software Foundation&quot;/&gt;

&lt;jarlib-available property=&quot;myext.present&quot;&gt;
&lt;extension refid=&quot;myext&quot;/&gt;
&lt;extensionSet id=&quot;exts3&quot;&gt;
&lt;libfileset
includeUrl=&quot;false&quot;
includeImpl=&quot;true&quot;
dir=&quot;lib&quot;&gt;
&lt;include name=&quot;*.jar&quot;/&gt;
&lt;/libfileset&gt;
&lt;/extensionSet&gt;
&lt;/jarlib-available&gt;
</pre>

<hr><p align="center">Copyright &copy; 2002 Apache Software Foundation.
All rights Reserved.</p>

</body>
</html>


+ 65
- 0
docs/manual/OptionalTasks/jarlib-display.html View File

@@ -0,0 +1,65 @@
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>jarlib-display Task</title>
</head>

<body>

<h2><a name="jarlib-display">jarlib-display</a></h2>
<h3>Description</h3>
<p>Display the "Optional Package" and "Package Specification" information
contained within the specified jars.</p>

<p>Note that this task
works with extensions as defined by the "Optional Package" specification.
For more information about optional packages, see the document
<em>Optional Package Versioning</em> in the documentation bundle for your
Java2 Standard Edition package, in file
<code>guide/extensions/versioning.html</code> or online at
<a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html">
http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p>
<p>See the Extension and ExtensionSet documentation for further details</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">file</td>
<td valign="top">The file to display extension information about.</td>
<td valign="top" align="center">No, but one of file or fileset must be
present.</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>

<h4>fileset</h4>
<p><a href="../CoreTypes/fileset.html">FileSet</a>s contain list of files to
display Extension information about.</p>

<h3>Examples</h3>
<p><b>Display Extension info for a single file</b></p>
<pre>
&lt;jarlib-display file=&quot;myfile.jar&quot;&gt;
</pre>

<p><b>Display Extension info for a fileset</b></p>
<pre>
&lt;jarlib-display&gt;
&lt;fileset dir="lib"&gt;
&lt;include name="*.jar"/&gt;
&lt;/fileset&gt;
&lt;/jarlib-display&gt;
</pre>

<hr><p align="center">Copyright &copy; 2002 Apache Software Foundation.
All rights Reserved.</p>

</body>
</html>


+ 108
- 0
docs/manual/OptionalTasks/jarlib-manifest.html View File

@@ -0,0 +1,108 @@
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>jarlib-manifest Task</title>
</head>

<body>

<h2><a name="jarlib-manifest">jarlib-manifest</a></h2>
<h3>Description</h3>
<p>Task to generate a manifest that declares all the dependencies
in manifest. The dependencies are determined by looking in the
specified path and searching for Extension / "Optional Package"
specifications in the manifests of the jars.</p>

<p>Note that this task
works with extensions as defined by the "Optional Package" specification.
For more information about optional packages, see the document
<em>Optional Package Versioning</em> in the documentation bundle for your
Java2 Standard Edition package, in file
<code>guide/extensions/versioning.html</code> or online at
<a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html">
http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p>
<p>See the Extension and ExtensionSet documentation for further details</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">destfile</td>
<td valign="top">The file to generate Manifest into</td>
<td valign="top" align="center">Yes.</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>

<h4>extension</h4>
<p><a href="../OptionalTypes/extension.html">Extension</a> the extension
that this library implements.</p>

<h4>depends</h4>
<p><a href="../OptionalTypes/extensionset.html">ExtensionSet</a>s containing
all dependencies for jar.</p>

<h4>options</h4>
<p><a href="../OptionalTypes/extensionset.html">ExtensionSet</a>s containing
all optional dependencies for jar. (Optional dependencies will be used if
present else they wilkl be ignored)</p>

<h3>Examples</h3>
<p><b>Basic Manifest generated for single Extension</b></p>
<pre>
&lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot;
specificationVendor=&quot;Peter Donald&quot;
implementationVendorID=&quot;vv&quot;
implementationVendor=&quot;Apache&quot;
implementationVersion=&quot;2.0&quot;
implementationURL=&quot;http://somewhere.com&quot;/&gt;

&lt;jarlib-manifest destfile=&quot;myManifest.txt&quot;&gt;
&lt;extension refid=&quot;e1&quot;/&gt;
&lt;/jarlib-manifest&gt;
</pre>

<p><b>Search for extension in fileset</b></p>
<p><b>A large example with required and optional dependencies</b></p>
<pre>
&lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot;
specificationVendor=&quot;Peter Donald&quot;
implementationVendorID=&quot;vv&quot;
implementationVendor=&quot;Apache&quot;
implementationVersion=&quot;2.0&quot;
implementationURL=&quot;http://somewhere.com&quot;/&gt;

&lt;extensionSet id=&quot;option.ext&quot;&gt;
&lt;libfileset dir=&quot;lib/option&quot;&gt;
&lt;include name=&quot;**/*.jar&quot;/&gt;
&lt;/libfileset&gt;
&lt;/extensionSet&gt;

&lt;extensionSet id=&quot;depends.ext&quot;&gt;
&lt;libfileset dir=&quot;lib/required&quot;&gt;
&lt;include name=&quot;*.jar&quot;/&gt;
&lt;/libfileset&gt;
&lt;/extensionSet&gt;

&lt;jarlib-manifest destfile=&quot;myManifest.txt&quot;&gt;
&lt;extension refid=&quot;e1&quot;/&gt;
&lt;depends refid=&quot;depends.ext&quot;/&gt;
&lt;options refid=&quot;option.ext&quot;/&gt;
&lt;/jarlib-manifest&gt;
</pre>

<hr><p align="center">Copyright &copy; 2002 Apache Software Foundation.
All rights Reserved.</p>

</body>
</html>


+ 196
- 0
docs/manual/OptionalTasks/jarlib-resolve.html View File

@@ -0,0 +1,196 @@
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>jarlib-resolve Task</title>
</head>

<body>

<h2><a name="jarlib-resolve">jarlib-resolve</a></h2>
<h3>Description</h3>
<p>Try to locate a jar to satisfy an extension and place
location of jar into property. The task allows you to
add a number of resolvers that are capable of locating a
library for a specifc extension. Each resolver will be attempted
in specified order until library is found or no resolvers are left.
If no resolvers are left and failOnError is true then a BuildException
will be thrown.</p>

<p>Note that this task
works with extensions as defined by the "Optional Package" specification.
For more information about optional packages, see the document
<em>Optional Package Versioning</em> in the documentation bundle for your
Java2 Standard Edition package, in file
<code>guide/extensions/versioning.html</code> or online at
<a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html">
http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p>
<p>See the Extension and ExtensionSet documentation for further details</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">property</td>
<td valign="top">The name of property to set to library location.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">failOnError</td>
<td valign="top">True if failure to locate library should result in build exception.</td>
<td valign="top" align="center">No, defaults to true.</td>
</tr>
<tr>
<td valign="top">checkExtension</td>
<td valign="top">True if librarys returned by nested resolvers should be checked to see if
they supply extension.</td>
<td valign="top" align="center">No, defaults to true.</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>

<h4>extension</h4>
<p><a href="../OptionalTypes/extension.html">Extension</a> the extension
to resolve. Must be present</p>

<h4>location</h4>
<p>The location sub element allows you to look for a library in a
location relative to project directory.</p>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">location</td>
<td valign="top">The pathname of library.</td>
<td valign="top" align="center">Yes</td>
</tr>
</table>

<h4>url</h4>
<p>The url resolver allows you to download a library from a URL to a
local file.</p>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">url</td>
<td valign="top">The URL to download.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">destfile</td>
<td valign="top">The file to download URL into.</td>
<td valign="top" align="center">No, But one of destfile or
destdir must be present</td>
</tr>
<tr>
<td valign="top">destdir</td>
<td valign="top">The directory in which to place downloaded file.</td>
<td valign="top" align="center">No, But one of destfile or
destdir must be present</td>
</tr>
</table>

<h4>ant</h4>
<p>The ant resolver allows you to run a ant build file to generate a library.</p>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">antfile</td>
<td valign="top">The build file.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">destfile</td>
<td valign="top">The file that the ant build creates.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">target</td>
<td valign="top">The target to run in build file.</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<h3>Examples</h3>
<p><b>Resolve Extension to file.</b> If file does not exist or file
does not implement extension then throw an exception.</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;
specificationVersion=&quot;1.2&quot;
specificationVendor=&quot;Peter Donald&quot;/&gt;

&lt;jarlib-resolve property="dve.library"&gt;
&lt;extension refid="dve.ext"/&gt;
&lt;location location="/opt/jars/dve.jar"/&gt;
&lt;/jarlib-resolve&gt;
</pre>

<p><b>Resolve Extension to url.</b> If url does not exist or can not write
to destfile or files does not implement extension then throw an exception.</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;
specificationVersion=&quot;1.2&quot;
specificationVendor=&quot;Peter Donald&quot;/&gt;

&lt;jarlib-resolve property="dve.library"&gt;
&lt;extension refid="dve.ext"/&gt;
&lt;url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/&gt;
&lt;/jarlib-resolve&gt;
</pre>

<p><b>Resolve Extension to file produce by ant build.</b> If file does not get produced
or ant file is missing or build fails then throw an exception (Note does not check
that library implements extension).</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;
specificationVersion=&quot;1.2&quot;
specificationVendor=&quot;Peter Donald&quot;/&gt;

&lt;jarlib-resolve property="dve.library" checkExtension="false"&gt;
&lt;extension refid="dve.ext"/&gt;
&lt;ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/&gt;
&lt;/jarlib-resolve&gt;
</pre>

<p><b>Resolve Extension via multiple methods.</b> First check local file to see if it implements
extension. If it does not then try to build it from source in parralel directory. If that
fails then finally try to download it from a website. If all steps fail then throw a build
exception.</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;
specificationVersion=&quot;1.2&quot;
specificationVendor=&quot;Peter Donald&quot;/&gt;

&lt;jarlib-resolve property="dve.library"&gt;
&lt;extension refid="dve.ext"/&gt;
&lt;location location="/opt/jars/dve.jar"/&gt;
&lt;ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/&gt;
&lt;url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/&gt;
&lt;/jarlib-resolve&gt;
</pre>

<hr><p align="center">Copyright &copy; 2002 Apache Software Foundation.
All rights Reserved.</p>

</body>
</html>


+ 57
- 39
docs/manual/OptionalTasks/jspc.html View File

@@ -14,17 +14,17 @@
<p> <p>


It can be used to precompile JSP pages for fast initial invocation It can be used to precompile JSP pages for fast initial invocation
of JSP pages, deployment on a server without the full JDK installed,
or simply to syntax check the pages without deploying them.
of JSP pages, deployment on a server without the full JDK installed,
or simply to syntax check the pages without deploying them.
In most cases, a javac task is usually the next stage in the build process. In most cases, a javac task is usually the next stage in the build process.
The task does basic dependency checking to prevent unnecessary recompilation -this The task does basic dependency checking to prevent unnecessary recompilation -this
checking compares source and destination timestamps, and does not factor checking compares source and destination timestamps, and does not factor
in class or taglib dependencies.
in class or taglib dependencies, or &lt;jsp:include&gt; references.


<p> <p>
The task needs jasper.jar and jasper-runtime.jar, which come with
builds of Tomcat 4/Catalina from the
By default the task uses the Jasper JSP compiler. This
means the task needs jasper.jar and jasper-runtime.jar, which come with
builds of Tomcat 4/Catalina from the
<a href="http://jakarta.apache.org/tomcat/">Jakarta Tomcat project</a> <a href="http://jakarta.apache.org/tomcat/">Jakarta Tomcat project</a>




@@ -59,6 +59,11 @@ The Task has the following attributes:<p>
classes.</td> classes.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
<tr>
<td valign="top">compiler</td>
<td valign="top">class name of a JSP compiler adapter</td>
<td valign="top" align="center">No</td>
</tr>
<tr> <tr>
<td valign="top">ieplugin</td> <td valign="top">ieplugin</td>
<td valign="top">Java Plugin classid for Internet Explorer.</td> <td valign="top">Java Plugin classid for Internet Explorer.</td>
@@ -74,7 +79,7 @@ The Task has the following attributes:<p>
<td valign="top">classpath</td> <td valign="top">classpath</td>
<td valign="top">The classpath to use to run the jsp compiler. <td valign="top">The classpath to use to run the jsp compiler.
This can also be specified This can also be specified
by the nested element <code>classpath</code>
by the nested element <code>classpath</code>
<a href="../using.html#path">Path</a>).</td> <a href="../using.html#path">Path</a>).</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -88,14 +93,14 @@ The Task has the following attributes:<p>
<td valign="top">failonerror</td> <td valign="top">failonerror</td>
<td valign="top">flag to control action on compile failures: default=yes</td> <td valign="top">flag to control action on compile failures: default=yes</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr>
</tr>
<tr> <tr>
<td valign="top">uribase</td> <td valign="top">uribase</td>
<td valign="top"> <td valign="top">
The uri context of relative URI
references in the JSP pages. If it does not
The uri context of relative URI
references in the JSP pages. If it does not
exist then it is derived from the location of the file exist then it is derived from the location of the file
relative to the declared or derived value of <tt>uriroot.</tt>
relative to the declared or derived value of <tt>uriroot.</tt>
</td> </td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -103,10 +108,10 @@ The Task has the following attributes:<p>
<td valign="top">uriroot</td> <td valign="top">uriroot</td>
<td valign="top"> <td valign="top">
The root directory that uri files should be resolved The root directory that uri files should be resolved
against.
against.
</td> </td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr>
</tr>
<tr> <tr>
<td valign="top">compiler</td> <td valign="top">compiler</td>
<td valign="top"> <td valign="top">
@@ -122,11 +127,11 @@ The Task has the following attributes:<p>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
</table> </table>
<P>The <tt>mapped</tt> option will, if set to true, split the JSP text content into a <P>The <tt>mapped</tt> option will, if set to true, split the JSP text content into a
one line per call format. There are comments above and below the mapped one line per call format. There are comments above and below the mapped
write calls to localize where in the JSP file each line of text comes write calls to localize where in the JSP file each line of text comes
from. This can lead to a minor performance degradation (but it is bound
from. This can lead to a minor performance degradation (but it is bound
by a linear complexity). Without this options all adjacent writes are by a linear complexity). Without this options all adjacent writes are
concatenated into a single write.</P> concatenated into a single write.</P>


@@ -134,45 +139,61 @@ concatenated into a single write.</P>
If the Java Plug-in COM Class-ID you want to use changes then it can be If the Java Plug-in COM Class-ID you want to use changes then it can be
specified here. This should not need to be altered.</P> specified here. This should not need to be altered.</P>


<P><tt>uriroot</tt> specifies the root of the web
application. This is where all absolute uris will be resolved from.
If it is not specified then the first JSP page will be used to derive
it. To derive it each parent directory of the first JSP page is
searched for a <tt>WEB-INF</tt> directory, and the directory closest to
the JSP page that has one will be used. If none can be found then the
directory Jasperc was called from will be used. This only affects pages
<P><tt>uriroot</tt> specifies the root of the web
application. This is where all absolute uris will be resolved from.
If it is not specified then the first JSP page will be used to derive
it. To derive it each parent directory of the first JSP page is
searched for a <tt>WEB-INF</tt> directory, and the directory closest to
the JSP page that has one will be used. If none can be found then the
directory Jasperc was called from will be used. This only affects pages
translated from an explicitly declared JSP file -including references translated from an explicitly declared JSP file -including references
to taglibs</P> to taglibs</P>


<P><tt>uribase</tt> is used to establish the uri context of <P><tt>uribase</tt> is used to establish the uri context of
relative URI references in the JSP pages. If it does not exist then it relative URI references in the JSP pages. If it does not exist then it
is derived from the location of the file relative to the declared or
derived value of <tt>uriroot</tt>. This only affects pages
is derived from the location of the file relative to the declared or
derived value of <tt>uriroot</tt>. This only affects pages
translated from an explicitly declared JSP file.</P> translated from an explicitly declared JSP file.</P>


<h3>Parameters specified as nested elements</h3> <h3>Parameters specified as nested elements</h3>


This task is a <a href="../dirtasks.html">directory based task</a>, like This task is a <a href="../dirtasks.html">directory based task</a>, like
<strong>javac</strong>, so the jsp files to be compiled are located as java <strong>javac</strong>, so the jsp files to be compiled are located as java
files are by <strong>javac</strong>. That is, elements such as <tt>includes</tt> and
<tt>excludes</tt> can be used directly inside the task declaration.
files are by <strong>javac</strong>. That is, elements such as <tt>includes</tt> and
<tt>excludes</tt> can be used directly inside the task declaration.


<p> <p>


Elements specific to the jspc task are:-
Elements specific to the jspc task are:-


<h4>classpath</h4> <h4>classpath</h4>


The classpath used to compile the JSP pages, specified as for any other The classpath used to compile the JSP pages, specified as for any other
classpath.
classpath.


<h4>classpathref</h4> <h4>classpathref</h4>
a reference to an existing classpath a reference to an existing classpath


<h4>compilerclasspath</h4> <h4>compilerclasspath</h4>


The classpath used to locate an optional compiler adapter specified by
The classpath used to locate an optional compiler adapter specified by
<code>compiler</code> <code>compiler</code>
<h4>webapp</h4>
Instructions to jasper to build an entire web application.
The base directory must have a WEB-INF subdirectory beneath it.
When used, the task hands off all dependency checking to the compiler.
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">basedir</td>
<td valign="top">the base directory of the web application</td>
<td valign="top" align="center">Yes</td>
</tr>
</table>
<h3>Example</h3> <h3>Example</h3>
<pre> <pre>
&lt;jspc srcdir="${basedir}/src/war" &lt;jspc srcdir="${basedir}/src/war"
@@ -182,18 +203,18 @@ The classpath used to locate an optional compiler adapter specified by
&lt;include name="**/*.jsp" /&gt; &lt;include name="**/*.jsp" /&gt;
&lt;/jspc&gt; &lt;/jspc&gt;
</pre> </pre>
Build all jsp pages under src/war into the destination /gensrc, in a
Build all jsp pages under src/war into the destination /gensrc, in a
package heirarchy beginning with com.i3sp.jsp. package heirarchy beginning with com.i3sp.jsp.
<pre> <pre>


&lt;jspc
&lt;jspc
destdir="interim" destdir="interim"
verbose="1"&gt; verbose="1"&gt;
srcdir="src" srcdir="src"
package="com.i3sp.jsp" package="com.i3sp.jsp"
&lt;include name="**/*.jsp" /&gt; &lt;include name="**/*.jsp" /&gt;
&lt;/jspc&gt; &lt;/jspc&gt;
&lt;depends
&lt;depends
srcdir="interim" srcdir="interim"
destdir="build" destdir="build"
cache="build/dependencies" cache="build/dependencies"
@@ -206,14 +227,11 @@ package heirarchy beginning with com.i3sp.jsp.
</pre> </pre>
Generate jsp pages then javac them down to Generate jsp pages then javac them down to
bytecodes. Include lib/taglib jar in the java compilation. bytecodes. Include lib/taglib jar in the java compilation.
Dependency checking is used to scrub the
java files if class dependencies indicate it is needed.
Dependency checking is used to scrub the
java files if class dependencies indicate it is needed.


<p><h4>Notes</h4> <p><h4>Notes</h4>
<p> At present, this task only supports the jasper compiler. In future,
other compilers will be supported by setting the <tt>jsp.compiler</tt> property.
<p> The jasper compiler option <code>-webapp</code> is not supported. Using
the <code>package</code> attribute it is possible to identify the resulting
Using the <code>package</code> attribute it is possible to identify the resulting
java files and thus do full dependency checking - this task only rebuilds java files and thus do full dependency checking - this task only rebuilds
java files if their jsp file has been modified. java files if their jsp file has been modified.
<p> <p>
@@ -221,7 +239,7 @@ Jasper generates JSP pages against the JSP1.3 specification -an implementation o
version 2.2 of the servlet specification is needed to compile or run the java code. version 2.2 of the servlet specification is needed to compile or run the java code.


<hr> <hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 7
- 6
docs/manual/OptionalTasks/junitreport.html View File

@@ -14,13 +14,14 @@ the Ant distribution. See <a href="../install.html#librarydependencies">
Library Dependencies</a> for more information.</p> Library Dependencies</a> for more information.</p>


<h3>Requirements</h3> <h3>Requirements</h3>
<p>The task will run with either <a href="http://xml.apache.org/xalan-j/">Xalan 2.x</a>
or <a href="http://xml.apache.org/dist/xalan-j/old/xalan-j_1_2_2.zip">Xalan 1.2.2</a>.</p>
<p>The task needs <a href="http://xml.apache.org/xalan-j/">Xalan 2.x</a>;
although
<a href="http://xml.apache.org/dist/xalan-j/old/xalan-j_1_2_2.zip">Xalan 1.2.2</a>
does work, but as Xalan1 is not supported, we do not recommend this.
</p>
<p> <p>
Note:<i>For a framed format Xalan 1.2.2 will need Xerces(xerces.jar) as well as BSF(bsf.jar)
that can be found in the distribution archive. Xerces will need to be before any other
parser (such as the shipped version of Xerces, which is too new). It is *highly* recommended to use Xalan2 instead
because Xalan1 is no more supported.
If you do you use Xalan 1.2.2 you will need a compatible (older) version of Xerces.
as well as BSF(bsf.jar). Again, using Xalan 2 is simpler and supported.
</i></p> </i></p>
<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">


+ 10
- 10
docs/manual/OptionalTasks/native2ascii.html View File

@@ -2,9 +2,9 @@
<head><title>Native2Ascii Task</title></head> <head><title>Native2Ascii Task</title></head>
<body> <body>
<h2>Native2Ascii</h2> <h2>Native2Ascii</h2>
<h3>Description:</h3> <h3>Description:</h3>
<p> <p>
Converts files from native encodings to ASCII with escaped Unicode. Converts files from native encodings to ASCII with escaped Unicode.
A common usage is to convert source files maintained in a native A common usage is to convert source files maintained in a native
@@ -20,12 +20,12 @@
For more information on file matching patterns, For more information on file matching patterns,
see the section on see the section on
<a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>. <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>.
If no <em>encoding</em> is specified,
If no <em>encoding</em> is specified,
the default encoding for the JVM is used. the default encoding for the JVM is used.
If <em>ext</em> is specified, then output files are renamed If <em>ext</em> is specified, then output files are renamed
to use it as a new extension.
to use it as a new extension.
More sophisticated file name translations can be achieved using a nested More sophisticated file name translations can be achieved using a nested
<em>&lt;mapper&gt;</em> element. By default an
<em>&lt;mapper&gt;</em> element. By default an
<a href="../CoreTypes/mapper.html#identity-mapper">identity mapper</a> will be used. <a href="../CoreTypes/mapper.html#identity-mapper">identity mapper</a> will be used.
If <em>dest</em> and <em>src</em> point to the same directory, If <em>dest</em> and <em>src</em> point to the same directory,
the <em>ext</em> attribute or a nested <em>&lt;mapper&gt;</em> the <em>ext</em> attribute or a nested <em>&lt;mapper&gt;</em>
@@ -35,7 +35,7 @@
<p> <p>
This task forms an implicit <a href="../CoreTypes/fileset.html">File Set</a>, This task forms an implicit <a href="../CoreTypes/fileset.html">File Set</a>,
and supports all attributes of <code>&lt;fileset&gt;</code> and supports all attributes of <code>&lt;fileset&gt;</code>
(<code>dir</code> becomes <code>src</code>) as well as
(<code>dir</code> becomes <code>src</code>) as well as
nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>, nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>,
and <code>&lt;patternset&gt;</code> elements. and <code>&lt;patternset&gt;</code> elements.
</p> </p>
@@ -83,7 +83,7 @@
</tr> </tr>
<tr> <tr>
<td>includes</td> <td>includes</td>
<td>comma separated list of patterns of files that must be
<td>comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td align="center">No</td> <td align="center">No</td>
</tr> </tr>
@@ -95,7 +95,7 @@
</tr> </tr>
<tr> <tr>
<td>excludes</td> <td>excludes</td>
<td>comma separated list of patterns of files that must be excluded.
<td>comma- or space-separated list of patterns of files that must be excluded.
No files (except default excludes) are excluded when omitted.</td> No files (except default excludes) are excluded when omitted.</td>
<td align="center">No</td> <td align="center">No</td>
</tr> </tr>
@@ -106,7 +106,7 @@
<td align="center">No</td> <td align="center">No</td>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>


<pre> <pre>
@@ -133,6 +133,6 @@
</p> </p>
</body> </body>
<hr> <hr>
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>
</html> </html>

+ 3
- 3
docs/manual/OptionalTasks/netrexxc.html View File

@@ -116,7 +116,7 @@ or from the command line as<br>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when excluded. No files (except default excludes) are excluded when
omitted.</td> omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -141,7 +141,7 @@ or from the command line as<br>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -307,7 +307,7 @@ or from the command line as<br>
</p> </p>
</blockquote> </blockquote>
<hr> <hr>
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 21
- 1
docs/manual/OptionalTasks/pvcstask.html View File

@@ -137,6 +137,24 @@ tag expects the executables to be found using the PATH environment variable.</td
newer than existing local files.</td> newer than existing local files.</td>
<td VALIGN=TOP WIDTH="10%">No</td> <td VALIGN=TOP WIDTH="10%">No</td>
</tr> </tr>
<tr>
<td valign="TOP">filenameformat</td>
<td valign="TOP">The format of your folder names in a
format suitable for <code>java.text.MessageFormat</code>.
Index 1 of the format will be used as the file name.
Defaults to <code>{0}-arc({1})</code>.</td>
<td valign="TOP">No</td>
</tr>
<tr>
<td valign="TOP">linestart</td>
<td valign="TOP">What a valid return value from PVCS looks like
when it describes a file. Defaults to <code>&quot;P:</code>.
If you are not using an UNC name for your repository and the
drive letter <code>P</code> is incorrect for your setup, you may
need to change this value, UNC names will always be
accepted.</td>
<td valign="TOP">No</td>
</tr>
</table> </table>
<h3><a name="nested">Nested Elements</a></h3> <h3><a name="nested">Nested Elements</a></h3>


@@ -230,6 +248,8 @@ repository from two projects using nested &lt;pvcsproject&gt; elements.
Total time: 22 seconds</pre> Total time: 22 seconds</pre>


<hr WIDTH="100%"> <hr WIDTH="100%">
PVCS is a registered trademark of MERANT.
<p align="center">Copyright &copy; 2001-2002 Apache Software
Foundation. All rights Reserved.</p>
<p>PVCS is a registered trademark of MERANT.</p>
</body> </body>
</html> </html>

+ 7
- 7
docs/manual/OptionalTasks/renameextensions.html View File

@@ -13,13 +13,13 @@
task with a <a href="../CoreTypes/mapper.html#glob-mapper">glob mapper</a> instead.</i></p> task with a <a href="../CoreTypes/mapper.html#glob-mapper">glob mapper</a> instead.</i></p>
<h3>Description</h3> <h3>Description</h3>
<p>Renames files in the <code>srcDir</code> directory ending with the <p>Renames files in the <code>srcDir</code> directory ending with the
<code>fromExtension</code> string so that they end with the
<code>toExtension</code> string. Files are only replaced if
<code>fromExtension</code> string so that they end with the
<code>toExtension</code> string. Files are only replaced if
<code>replace</code> is true <code>replace</code> is true
</p> </p>
<p>See the section on
<p>See the section on
<a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
inclusion/exclusion of files works, and how to write patterns.
inclusion/exclusion of files works, and how to write patterns.
This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
supports all attributes of <code>&lt;fileset&gt;</code> supports all attributes of <code>&lt;fileset&gt;</code>
(<code>dir</code> becomes <code>srcDir</code>) as well as the nested (<code>dir</code> becomes <code>srcDir</code>) as well as the nested
@@ -41,7 +41,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">excludes</td> <td valign="top">excludes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when excluded. No files (except default excludes) are excluded when
omitted.</td> omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
@@ -59,7 +59,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
<tr> <tr>
<td valign="top">includes</td> <td valign="top">includes</td>
<td valign="top">comma separated list of patterns of files that must be
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td> included. All files are included when omitted.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -100,7 +100,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</blockquote> </blockquote>


<hr> <hr>
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


</body> </body>


+ 4
- 0
docs/manual/OptionalTasks/test.html View File

@@ -10,6 +10,10 @@
<h2><a name="test">Test</a></h2> <h2><a name="test">Test</a></h2>
<h3>Description</h3> <h3>Description</h3>
<p>This is a primitive task to execute a unit test in the org.apache.testlet framework.</p> <p>This is a primitive task to execute a unit test in the org.apache.testlet framework.</p>
<p><strong>Note:</strong> This task depends on external libraries not included
in the Ant distribution. See <a href="../install.html#librarydependencies">
Library Dependencies</a> for more information.
</p>


<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">


+ 54
- 54
docs/manual/OptionalTasks/vss.html View File

@@ -25,11 +25,11 @@
</ul> </ul>
<br> <br>
<h2><a name="intro">Introduction</a></h2> <h2><a name="intro">Introduction</a></h2>
<p>These tasks provide an interface to the
<p>These tasks provide an interface to the
<a href="http://msdn.microsoft.com/ssafe/default.asp" target="_top">Microsoft Visual SourceSafe</a> SCM. <a href="http://msdn.microsoft.com/ssafe/default.asp" target="_top">Microsoft Visual SourceSafe</a> SCM.
The <code>org.apache.tools.ant.taskdefs.optional.vss</code> package consists of a simple framework to support
vss functionality as well as some Ant tasks encapsulating frequently used vss commands.
Although it is possible to use these commands on the desktop,
The <code>org.apache.tools.ant.taskdefs.optional.vss</code> package consists of a simple framework to support
vss functionality as well as some Ant tasks encapsulating frequently used vss commands.
Although it is possible to use these commands on the desktop,
they were primarily intended to be used by automated build systems.</p> they were primarily intended to be used by automated build systems.</p>


<h2><a name="tasks">The Tasks</a></h2> <h2><a name="tasks">The Tasks</a></h2>
@@ -77,7 +77,7 @@ they were primarily intended to be used by automated build systems.</p>
<h2><a name="vssget">VssGet</a></h2> <h2><a name="vssget">VssGet</a></h2>
<h3>Description</h3> <h3>Description</h3>
Task to perform GET commands to Microsoft Visual SourceSafe. Task to perform GET commands to Microsoft Visual SourceSafe.
<p>If you specify two or more attributes from version, date and
<p>If you specify two or more attributes from version, date and
label only one will be used in the order version, date, label.</p> label only one will be used in the order version, date, label.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
@@ -88,16 +88,16 @@ label only one will be used in the order version, date, label.</p>
</tr> </tr>
<tr> <tr>
<td>vsspath</td> <td>vsspath</td>
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
it is prepended by Ant automatically.</td> it is prepended by Ant automatically.</td>
<td>Yes</td> <td>Yes</td>
</tr> </tr>
<tr> <tr>
<td>login</td> <td>login</td>
<td>username[,password] - The username and password needed to get access <td>username[,password] - The username and password needed to get access
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
login without a password. </td> login without a password. </td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -157,7 +157,7 @@ label only one will be used in the order version, date, label.</p>
<blockquote> <blockquote>
<pre> <pre>
&lt;vssget localPath=&quot;C:\mysrc\myproject&quot; &lt;vssget localPath=&quot;C:\mysrc\myproject&quot;
recursive=&quot;true&quot;
recursive=&quot;true&quot;
label=&quot;Release1&quot; label=&quot;Release1&quot;
login=&quot;me,mypassword&quot; login=&quot;me,mypassword&quot;
vsspath=&quot;/source/aProject&quot; vsspath=&quot;/source/aProject&quot;
@@ -165,7 +165,7 @@ label only one will be used in the order version, date, label.</p>
</pre> </pre>
</blockquote> </blockquote>
<p>Does a get on the VSS-Project <i>$/source/myproject</i> using the username <p>Does a get on the VSS-Project <i>$/source/myproject</i> using the username
<i>me</i> and the password <i>mypassword</i>. It will recursively get the files
<i>me</i> and the password <i>mypassword</i>. It will recursively get the files
which are labeled <i>Release1</i> and write them to the local directory which are labeled <i>Release1</i> and write them to the local directory
<i>C:\mysrc\myproject</i>. The local files will be writable.</p> <i>C:\mysrc\myproject</i>. The local files will be writable.</p>
<hr> <hr>
@@ -186,16 +186,16 @@ project.</p>
</tr> </tr>
<tr> <tr>
<td>vsspath</td> <td>vsspath</td>
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
it is prepended by Ant automatically.</td> it is prepended by Ant automatically.</td>
<td>Yes</td> <td>Yes</td>
</tr> </tr>
<tr> <tr>
<td>login</td> <td>login</td>
<td>username[,password] - The username and password needed to get access <td>username[,password] - The username and password needed to get access
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
login without a password. </td> login without a password. </td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -242,7 +242,7 @@ project.</p>
</pre> </pre>
</blockquote> </blockquote>
<p>Labels the current version of the VSS project <i>$/source/aProject</i> with <p>Labels the current version of the VSS project <i>$/source/aProject</i> with
the label <i>Release1</i> using the username <i>me</i> and the password
the label <i>Release1</i> using the username <i>me</i> and the password
<i>mypassword</i>. <i>mypassword</i>.
</p> </p>
<blockquote> <blockquote>
@@ -265,23 +265,23 @@ the build) will fail.
Task to perform HISTORY commands to Microsoft Visual SourceSafe. Task to perform HISTORY commands to Microsoft Visual SourceSafe.
<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
<tr>
<tr>
<th>Attribute</th> <th>Attribute</th>
<th>Values</th> <th>Values</th>
<th>Required</th> <th>Required</th>
</tr> </tr>
<tr> <tr>
<td>vsspath</td> <td>vsspath</td>
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
it is prepended by Ant automatically.</td> it is prepended by Ant automatically.</td>
<td>Yes</td> <td>Yes</td>
</tr> </tr>
<tr> <tr>
<td>login</td> <td>login</td>
<td>username[,password] - The username and password needed to get access <td>username[,password] - The username and password needed to get access
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
login without a password. </td> login without a password. </td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -296,53 +296,53 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.
<td>directory where <code>srssafe.ini</code> resides.</td> <td>directory where <code>srssafe.ini</code> resides.</td>
<td>No</td> <td>No</td>
</tr> </tr>
<tr>
<tr>
<td>fromDate</td> <td>fromDate</td>
<td>Start date for comparison</td> <td>Start date for comparison</td>
<td>See below</td> <td>See below</td>
</tr> </tr>
<tr>
<tr>
<td>toDate</td> <td>toDate</td>
<td>Start date for comparison</td> <td>Start date for comparison</td>
<td>See below</td> <td>See below</td>
</tr> </tr>
<tr> <tr>
<td>dateFormat</td> <td>dateFormat</td>
<td>Format of dates in fromDate and toDate. Used when calculating dates with
the numdays attribute. This string uses the formatting rules of SimpleDateFormat.
<td>Format of dates in fromDate and toDate. Used when calculating dates with
the numdays attribute. This string uses the formatting rules of SimpleDateFormat.
Defaults to DateFormat.SHORT.</td> Defaults to DateFormat.SHORT.</td>
<td>No</td> <td>No</td>
</tr> </tr>
<tr>
<tr>
<td>fromLabel</td> <td>fromLabel</td>
<td>Start label for comparison</td> <td>Start label for comparison</td>
<td>No</td> <td>No</td>
</tr> </tr>
<tr>
<tr>
<td>toLabel</td> <td>toLabel</td>
<td>Start label for comparison</td> <td>Start label for comparison</td>
<td>No</td> <td>No</td>
</tr> </tr>
<tr>
<tr>
<td>numdays</td> <td>numdays</td>
<td>The number of days for comparison.</td> <td>The number of days for comparison.</td>
<td>See below</td> <td>See below</td>
</tr> </tr>
<tr>
<tr>
<td>output</td> <td>output</td>
<td>File to write the diff.</td> <td>File to write the diff.</td>
<td>No</td> <td>No</td>
</tr> </tr>
<tr>
<tr>
<td>recursive</td> <td>recursive</td>
<td>true or false</td> <td>true or false</td>
<td>No</td> <td>No</td>
</tr>
<tr>
</tr>
<tr>
<td>style</td> <td>style</td>
<td>brief, codediff, default or nofile. The default is default.</td> <td>brief, codediff, default or nofile. The default is default.</td>
<td>No</td> <td>No</td>
</tr>
</tr>
</table> </table>


<h4>Specifying the time-frame</h4> <h4>Specifying the time-frame</h4>
@@ -359,7 +359,7 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.
<h3>Examples</h3> <h3>Examples</h3>
<blockquote> <blockquote>
<pre> <pre>
&lt;vsshistory vsspath=&quot;/myProject&quot; recursive=&quot;true&quot;
&lt;vsshistory vsspath=&quot;/myProject&quot; recursive=&quot;true&quot;
fromLabel=&quot;Release1&quot; fromLabel=&quot;Release1&quot;
toLabel=&quot;Release2&quot;/&gt; toLabel=&quot;Release2&quot;/&gt;
</pre> </pre>
@@ -368,20 +368,20 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.


<blockquote> <blockquote>
<pre> <pre>
&lt;vsshistory vsspath=&quot;/myProject&quot; recursive=&quot;true&quot;
&lt;vsshistory vsspath=&quot;/myProject&quot; recursive=&quot;true&quot;
fromDate=&quot;01.01.2001&quot; fromDate=&quot;01.01.2001&quot;
toDate=&quot;31.03.2001&quot;/&gt; toDate=&quot;31.03.2001&quot;/&gt;
</pre> </pre>
</blockquote> </blockquote>
<p>Shows all changes between January 1st 2001 and March 31st 2001 (in Germany, date must be specified according to your locale).</p> <p>Shows all changes between January 1st 2001 and March 31st 2001 (in Germany, date must be specified according to your locale).</p>


<blockquote>
<blockquote>
<pre> <pre>
&lt;tstamp&gt; &lt;tstamp&gt;
&lt;format property=&quot;to.tstamp&quot; pattern=&quot;M-d-yy;h:mma&quot; /&gt; &lt;format property=&quot;to.tstamp&quot; pattern=&quot;M-d-yy;h:mma&quot; /&gt;
&lt;/tstamp&gt; &lt;/tstamp&gt;


&lt;vsshistory vsspath=&quot;/myProject&quot; recursive=&quot;true&quot;
&lt;vsshistory vsspath=&quot;/myProject&quot; recursive=&quot;true&quot;
numDays=&quot;-14&quot; numDays=&quot;-14&quot;
dateFormat=&quot;M-d-yy;h:mma&quot; dateFormat=&quot;M-d-yy;h:mma&quot;
toDate=&quot;${to.tstamp}&quot;/&gt; toDate=&quot;${to.tstamp}&quot;/&gt;
@@ -404,16 +404,16 @@ Task to perform CHECKIN commands to Microsoft Visual SourceSafe.
</tr> </tr>
<tr> <tr>
<td>vsspath</td> <td>vsspath</td>
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
it is prepended by Ant automatically.</td> it is prepended by Ant automatically.</td>
<td>Yes</td> <td>Yes</td>
</tr> </tr>
<tr> <tr>
<td>login</td> <td>login</td>
<td>username[,password] - The username and password needed to get access <td>username[,password] - The username and password needed to get access
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
login without a password. </td> login without a password. </td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -463,7 +463,7 @@ Task to perform CHECKIN commands to Microsoft Visual SourceSafe.
comment=&quot;Modified by automatic build&quot;/&gt; comment=&quot;Modified by automatic build&quot;/&gt;
</pre> </pre>
</blockquote> </blockquote>
<p>Checks in the file(s) named <i>test*</i> in the project <i>test</i> using
<p>Checks in the file(s) named <i>test*</i> in the project <i>test</i> using
the local directory <i>D:\build</i>.</p> the local directory <i>D:\build</i>.</p>
<hr> <hr>


@@ -472,7 +472,7 @@ the local directory <i>D:\build</i>.</p>
<h2><a name="vsscheckout">VssCheckout</a></h2> <h2><a name="vsscheckout">VssCheckout</a></h2>
<h3>Description</h3> <h3>Description</h3>
Task to perform CHECKOUT commands to Microsoft Visual SourceSafe. Task to perform CHECKOUT commands to Microsoft Visual SourceSafe.
<p>If you specify two or more attributes from version, date and
<p>If you specify two or more attributes from version, date and
label only one will be used in the order version, date, label.</p> label only one will be used in the order version, date, label.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">
@@ -483,16 +483,16 @@ label only one will be used in the order version, date, label.</p>
</tr> </tr>
<tr> <tr>
<td>vsspath</td> <td>vsspath</td>
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
<td>SourceSafe path which specifies the project/file(s) you wish to
perform the action on. You should not specify the leading dollar-sign -
it is prepended by Ant automatically.</td> it is prepended by Ant automatically.</td>
<td>Yes</td> <td>Yes</td>
</tr> </tr>
<tr> <tr>
<td>login</td> <td>login</td>
<td>username[,password] - The username and password needed to get access <td>username[,password] - The username and password needed to get access
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
login without a password. </td> login without a password. </td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -546,7 +546,7 @@ label only one will be used in the order version, date, label.</p>
login=&quot;me,mypass&quot;/&gt; login=&quot;me,mypass&quot;/&gt;
</pre> </pre>
</blockquote> </blockquote>
<p>Does a recursive checkout of the project test to the directory D:\build.
<p>Does a recursive checkout of the project test to the directory D:\build.
</p> </p>
<hr> <hr>


@@ -570,8 +570,8 @@ Task to perform ADD commands to Microsoft Visual SourceSafe.
<tr> <tr>
<td>login</td> <td>login</td>
<td>username[,password] - The username and password needed to get access <td>username[,password] - The username and password needed to get access
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
login without a password. </td> login without a password. </td>
<td>No</td> <td>No</td>
</tr> </tr>
@@ -634,16 +634,16 @@ directory (see vsscp).</p>
</tr> </tr>
<tr> <tr>
<td>vsspath</td> <td>vsspath</td>
<td>SourceSafe path which specifies the project you wish to
make the current project. You should not specify the leading dollar-sign -
<td>SourceSafe path which specifies the project you wish to
make the current project. You should not specify the leading dollar-sign -
it is prepended by Ant automatically.</td> it is prepended by Ant automatically.</td>
<td>Yes</td> <td>Yes</td>
</tr> </tr>
<tr> <tr>
<td>login</td> <td>login</td>
<td>username[,password] - The username and password needed to get access <td>username[,password] - The username and password needed to get access
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
to VSS. Note that you may need to specify both (if you have a password) -
Ant/VSS will hang if you leave the password out and VSS does not accept
login without a password. </td> login without a password. </td>
<td>No</td> <td>No</td>
</tr> </tr>


+ 99
- 0
docs/manual/OptionalTypes/extension.html View File

@@ -0,0 +1,99 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Extension Type</title>
</head>

<body>
<h2><a name="fileset">ClassFileSet</a></h2>
<p>Utility type that represents either an available "Optional Package"
(formerly known as "Standard Extension") as described in the manifest
of a JAR file, or the requirement for such an optional package.</p>
<p>Note that this type
works with extensions as defined by the "Optional Package" specification.
For more information about optional packages, see the document
<em>Optional Package Versioning</em> in the documentation bundle for your
Java2 Standard Edition package, in file
<code>guide/extensions/versioning.html</code> or online at
<a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html">
http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p>

<h3>Attributes</h3>
<p>The class fileset support the following attributes</a>:
</p>

<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">extensionName</td>
<td valign="top">The name of extension</td>
<td valign="top" align="center">yes</td>
</tr>
<tr>
<td valign="top">specificationVersion</td>
<td valign="top">The version of extension specification (Must be in
dewey decimal aka dotted decimal notation. 3.2.4)</td>
<td valign="top" align="center">no</td>
</tr>
<tr>
<td valign="top">specificationVendor</td>
<td valign="top">The specification vendor</td>
<td valign="top" align="center">no</td>
</tr>
<tr>
<td valign="top">implementationVersion</td>
<td valign="top">The version of extension implementation (Must be in
dewey decimal aka dotted decimal notation. 3.2.4)</td>
<td valign="top" align="center">no</td>
</tr>
<tr>
<td valign="top">implementationVendor</td>
<td valign="top">The implementation vendor</td>
<td valign="top" align="center">no</td>
</tr>
<tr>
<td valign="top">implementationVendorId</td>
<td valign="top">The implementation vendor ID</td>
<td valign="top" align="center">no</td>
</tr>
<tr>
<td valign="top">implementationURL</td>
<td valign="top">The url from which to retrieve extension.</td>
<td valign="top" align="center">no</td>
</tr>
</table>

<h4>Examples</h4>
<blockquote><pre>
&lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot;
specificationVendor=&quot;Peter Donald&quot;
implementationVendorID=&quot;vv&quot;
implementationVendor=&quot;Apache&quot;
implementationVersion=&quot;2.0&quot;
implementationURL=&quot;http://somewhere.com/myExt.jar&quot;/&gt;
</pre></blockquote>

<p>Fully specifiec extension object.</p>

<blockquote><pre>
&lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot;
specificationVendor=&quot;Peter Donald&quot; /&gt;
</pre></blockquote>

<p>Extension object that just species the specification details.</p>

<hr>
<p align="center">Copyright &copy; 2002 Apache Software Foundation. All rights
Reserved.</p>

</body>
</html>


+ 69
- 0
docs/manual/OptionalTypes/extensionset.html View File

@@ -0,0 +1,69 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>ExtensionSet Type</title>
</head>

<body>
<h2><a name="fileset">ClassFileSet</a></h2>
<p>Utility type that represents a set of Extensions.</p>
<p>Note that this type
works with extensions as defined by the "Optional Package" specification.
For more information about optional packages, see the document
<em>Optional Package Versioning</em> in the documentation bundle for your
Java2 Standard Edition package, in file
<code>guide/extensions/versioning.html</code> or online at
<a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html">
http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p>

<h3>Nested Elements</h3>

<h4>extension</h4>
<p><a href="extension.html">Extension</a> object to add to set.</p>

<h4>fileset</h4>
<p><a href="../CoreTypes/fileset.html">FileSet</a>s all files contained
contained within set that are jars and implement an extension are added
to extension set.</p>

<h4>fileset</h4>
<p><a href="libfileset.html">LibFileSet</a>s all files contained
contained within set that are jars and implement an extension are added
to extension set. However the extension information may be modified by
attributes of libfileset</p>

<h4>Examples</h4>
<blockquote><pre>
&lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot;
specificationVendor=&quot;Peter Donald&quot;
implementationVendorID=&quot;vv&quot;
implementationVendor=&quot;Apache&quot;
implementationVersion=&quot;2.0&quot;
implementationURL=&quot;http://somewhere.com/myExt.jar&quot;/&gt;

&lt;libfileset id="lfs"
includeUrl="true"
includeImpl="false"
dir="tools/lib"&gt;
&lt;include name="*.jar"/&gt;
&lt;/libfileset&gt;

&lt;extensionSet id="exts"&gt;
&lt;libfileset dir="lib"&gt;
&lt;include name="*.jar"/&gt;
&lt;/libfileset&gt;
&lt;libfileset refid="lfs"/&gt;
&lt;extension refid="e1"/&gt;
&lt;/extensionSet&gt;

</pre></blockquote>

<hr>
<p align="center">Copyright &copy; 2002 Apache Software Foundation. All rights
Reserved.</p>

</body>
</html>


+ 1
- 0
docs/manual/conceptstypeslist.html View File

@@ -24,6 +24,7 @@
<a href="CoreTypes/filterchain.html">FilterChains and FilterReaders</a><br> <a href="CoreTypes/filterchain.html">FilterChains and FilterReaders</a><br>
<a href="CoreTypes/filterset.html">FilterSet</a><br> <a href="CoreTypes/filterset.html">FilterSet</a><br>
<a href="CoreTypes/patternset.html">PatternSet</a><br> <a href="CoreTypes/patternset.html">PatternSet</a><br>
<a href="using.html#path">Path-like Structures</a><br>
<a href="CoreTypes/selectors.html">Selectors</a><br> <a href="CoreTypes/selectors.html">Selectors</a><br>
<a href="CoreTypes/xmlcatalog.html">XMLCatalog</a><br> <a href="CoreTypes/xmlcatalog.html">XMLCatalog</a><br>




+ 1
- 1
docs/manual/credits.html View File

@@ -36,7 +36,7 @@
<li>Roger Vaughn (<a href="mailto:rvaughn@seaconinc.com">rvaughn@seaconinc.com</a>)</li> <li>Roger Vaughn (<a href="mailto:rvaughn@seaconinc.com">rvaughn@seaconinc.com</a>)</li>
<li>Dave Walend (<a href="mailto:dwalend@cs.tufts.edu">dwalend@cs.tufts.edu</a>)</li> <li>Dave Walend (<a href="mailto:dwalend@cs.tufts.edu">dwalend@cs.tufts.edu</a>)</li>
<li>Phillip Wells (<a href="mailto:philwells@rocketmail.com">philwells@rocketmail.com</a>)</li> <li>Phillip Wells (<a href="mailto:philwells@rocketmail.com">philwells@rocketmail.com</a>)</li>
<li>Craeg Strong (<a href="mailto:cstrong@arielpartners.com">cstrong@arielpartners.com</a>)</li>
<li>Craeg Strong (<a href="mailto:cstrong@arielpartners.com">cstrong@arielpartners.com</a>)</li>
</ul> </ul>


<center> <center>


+ 1
- 1
docs/manual/index.html View File

@@ -5,7 +5,7 @@
<title>Apache Ant User Manual</title> <title>Apache Ant User Manual</title>
</head> </head>


<frameset cols="25%,75%">
<frameset cols="26%,74%">
<frame src="toc.html" name="navFrame"> <frame src="toc.html" name="navFrame">
<frame src="cover.html" name="mainFrame"> <frame src="cover.html" name="mainFrame">
</frameset> </frameset>


+ 1
- 1
docs/manual/install.html View File

@@ -287,7 +287,7 @@ Installing Ant / Optional Tasks</a> section above.</p>
<td><a href="http://www.junit.org/" target="_top">www.junit.org</a></td> <td><a href="http://www.junit.org/" target="_top">www.junit.org</a></td>
</tr> </tr>
<tr> <tr>
<td>xerces.jar and xalan.jar</td>
<td>xalan.jar</td>
<td>junitreport task</td> <td>junitreport task</td>
<td><a href="http://xml.apache.org/" target="_top">xml.apache.org</a></td> <td><a href="http://xml.apache.org/" target="_top">xml.apache.org</a></td>
</tr> </tr>


+ 4
- 0
docs/manual/optionaltasklist.html View File

@@ -23,6 +23,10 @@
<a href="OptionalTasks/echoproperties.html">Echoproperties</a><br> <a href="OptionalTasks/echoproperties.html">Echoproperties</a><br>
<a href="OptionalTasks/ftp.html">FTP</a><br> <a href="OptionalTasks/ftp.html">FTP</a><br>
<a href="OptionalTasks/icontract.html">IContract</a><br> <a href="OptionalTasks/icontract.html">IContract</a><br>
<a href="OptionalTasks/jarlib-available.html">jarlib-available</a><br>
<a href="OptionalTasks/jarlib-display.html">jarlib-display</a><br>
<a href="OptionalTasks/jarlib-manifest.html">jarlib-manifest</a><br>
<a href="OptionalTasks/jarlib-resolve.html">jarlib-resolve</a><br>
<a href="OptionalTasks/javacc.html">JavaCC</a><br> <a href="OptionalTasks/javacc.html">JavaCC</a><br>
<a href="OptionalTasks/javah.html">Javah</a><br> <a href="OptionalTasks/javah.html">Javah</a><br>
<a href="OptionalTasks/jspc.html">JspC</a><br> <a href="OptionalTasks/jspc.html">JspC</a><br>


+ 68
- 49
docs/manual/running.html View File

@@ -15,34 +15,49 @@ running Ant from the command-line is simple: just type
<code>ant</code>.</p> <code>ant</code>.</p>
<p>When no arguments are specified, Ant looks for a <code>build.xml</code> <p>When no arguments are specified, Ant looks for a <code>build.xml</code>
file in the current directory and, if found, uses that file as the file in the current directory and, if found, uses that file as the
buildfile and runs the &quot;default&quot; target.
If you use the <code>-find</code> option,
Ant will search for a buildfile first in the current directory, then in
the parent directory, and so on, until either a buildfile is found or the root
of the filesystem has been reached. To make Ant use
a buildfile other than <code>build.xml</code>, use the command-line
option <code>-buildfile <i>file</i></code>,
where <i>file</i> is the name of the buildfile you want to use.</p>

<p>You can also set <a href="using.html#properties">properties</a> that
override properties specified in the
buildfile (see the <a href="CoreTasks/property.html">property</a> task).
This can be done with
build file and runs the target specified in the <code>default</code>
attribute of the <code>&lt;project&gt;</code> tag.
To make Ant use
a build file other than <code>build.xml</code>, use the command-line
option <nobr><code>-buildfile <i>file</i></code></nobr>,
where <i>file</i> is the name of the build file you want to use.</p>
If you use the <nobr><code>-find [<i>file</i>]</code></nobr> option,
Ant will search for a build file first in the current directory, then in
the parent directory, and so on, until either a build file is found or the root
of the filesystem has been reached. By default, it will look for a build file
called <code>build.xml</code>. To have it search for a build file other
than <code>build.xml</code>, specify a file argument.
<strong>Note:</strong> If you include any other flags or arguments
on the command line after
the <nobr><code>-find</code></nobr> flag, you must include the file argument
for the <nobr><code>-find</code></nobr> flag, even if the name of the
build file you want to find is <code>build.xml</code>.

<p>You can also set <a href="using.html#properties">properties</a> on the
command line. This can be done with
the <nobr><code>-D<i>property</i>=<i>value</i></code></nobr> option, the <nobr><code>-D<i>property</i>=<i>value</i></code></nobr> option,
where <i>property</i> is the name of the property, where <i>property</i> is the name of the property,
and <i>value</i> is the value for that property.
This can also be used to pass in the value of environment variables.
Just pass <nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or
and <i>value</i> is the value for that property. If you specify a
property that is also set in the build file
(see the <a href="CoreTasks/property.html">property</a> task),
the value specified on the
command line will override the value specified in the
build file.
Defining properties on the command line can also be used to pass in
the value of environment variables - just pass
<nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or
<nobr><code>-DMYVAR=$MYVAR</code></nobr> (Unix) <nobr><code>-DMYVAR=$MYVAR</code></nobr> (Unix)
to Ant - you can then access
these variables inside your buildfile as <code>${MYVAR}</code>.
You can also access environment variables using the <a href="CoreTasks/property.html">
property</a> task.
to Ant. You can then access
these variables inside your build file as <code>${MYVAR}</code>.
You can also access environment variables using the
<a href="CoreTasks/property.html"> property</a> task's
<code>environment</code> attribute.
</p> </p>


<p>Options that affect the amount of logging output by Ant are: <nobr><code>-quiet</code></nobr>,
<p>Options that affect the amount of logging output by Ant are:
<nobr><code>-quiet</code></nobr>,
which instructs Ant to print less which instructs Ant to print less
information on the console when running;
information to the console;
<nobr><code>-verbose</code></nobr>, which causes Ant to print <nobr><code>-verbose</code></nobr>, which causes Ant to print
additional information to the console; and <nobr><code>-debug</code></nobr>, additional information to the console; and <nobr><code>-debug</code></nobr>,
which causes Ant to print considerably more additional information. which causes Ant to print considerably more additional information.
@@ -55,9 +70,10 @@ When omitted, the target that is specified in the
used.</p> used.</p>


<p>The <nobr><code>-projecthelp</code></nobr> option prints out a list <p>The <nobr><code>-projecthelp</code></nobr> option prints out a list
of the buildfile's targets, along with the
text in the <code>description</code> attribute of the target,
if one was specified, followed by a list of those targets without one.</p>
of the build file's targets. Targets that include a
<code>description</code> attribute are listed as &quot;Main targets&quot;,
those without a <code>description</code> are listed as
&quot;Subtargets&quot;, then the &quot;Default&quot; target is listed.


<h3><a name="options">Command-line Options Summary</a></h3> <h3><a name="options">Command-line Options Summary</a></h3>
<pre>ant [options] [target [target2 [target3] ...]] <pre>ant [options] [target [target2 [target3] ...]]
@@ -69,22 +85,22 @@ Options:
-verbose be extra verbose -verbose be extra verbose
-debug print debugging information -debug print debugging information
-emacs produce logging information without adornments -emacs produce logging information without adornments
-logfile &lt;file&gt; use given file for log
-logger &lt;classname&gt; the class which is to perform logging
-listener &lt;classname&gt; add an instance of class as a project listener
-buildfile &lt;file&gt; use given buildfile
-logfile &lt;file&gt; write logging output to given file
-logger &lt;classname&gt; the class that is to perform logging
-listener &lt;classname&gt; add an instance of <i>classname</i> as a project listener
-buildfile &lt;file&gt; use given build file
-D&lt;property&gt;=&lt;value&gt; use value for given property -D&lt;property&gt;=&lt;value&gt; use value for given property
-propertyfile &lt;name&gt; load all properties from file with -D
properties taking precedence
-inputhandler &lt;class&gt; the class which will handle input requests
-find &lt;file&gt; search for buildfile towards the root of the
filesystem and use it
-propertyfile &lt;file&gt; load all properties from <i>file</i> (with -D taking precedence)
-inputhandler &lt;class&gt; the class that will handle input requests
-find [&lt;file&gt;] search for build.xml, or <i>file</i>, towards the root of the
filesystem
</pre> </pre>
<p>For more information about <code>-logger</code> and <p>For more information about <code>-logger</code> and
<code>-listener</code> see the section <a
href="listeners.html">Loggers &amp; Listeners</a>
<p>For more information about <code>-inputhandler</code> see the
section <a href="inputhandler.html">InputHandler</a>
<code>-listener</code> see
<a href="listeners.html">Loggers &amp; Listeners</a>.
<p>For more information about <code>-inputhandler</code> see
<a href="inputhandler.html">InputHandler</a>.

<h3>Examples</h3> <h3>Examples</h3>
<blockquote> <blockquote>
<pre>ant</pre> <pre>ant</pre>
@@ -99,23 +115,23 @@ the default target.</p>
<blockquote> <blockquote>
<pre>ant -buildfile test.xml dist</pre> <pre>ant -buildfile test.xml dist</pre>
</blockquote> </blockquote>
<p>runs Ant using the <code>test.xml</code> file in the current directory, on a
target called <code>dist</code>.</p>
<p>runs Ant using the <code>test.xml</code> file in the current directory, on
the target called <code>dist</code>.</p>
<blockquote> <blockquote>
<pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre> <pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre>
</blockquote> </blockquote>
<p>runs Ant using the <code>test.xml</code> file in the current directory, on a
target called <code>dist</code>, setting the <code>build</code> property to the
value <code>build/classes</code>.</p>
<p>runs Ant using the <code>test.xml</code> file in the current directory, on
the target called <code>dist</code>, setting the <code>build</code> property
to the value <code>build/classes</code>.</p>


<h3><a name="files">Files</a></h3> <h3><a name="files">Files</a></h3>


<p>The Ant wrapper script for Unix will source (read and evaluate) the <p>The Ant wrapper script for Unix will source (read and evaluate) the
file <code>~/.antrc</code> before it does anything - the Windows batch
file invokes <code>%HOME%\antrc_pre.bat</code> at the start and
file <code>~/.antrc</code> before it does anything. On Windows, the Ant
wrapper batch-file invokes <code>%HOME%\antrc_pre.bat</code> at the start and
<code>%HOME%\antrc_post.bat</code> at the end. You can use these <code>%HOME%\antrc_post.bat</code> at the end. You can use these
files to set/unset environment variables that should only be visible
during the execution of Ant. See the next section for example.</p>
files, for example, to set/unset environment variables that should only be
visible during the execution of Ant. See the next section for examples.</p>


<h3><a name="envvars">Environment Variables</a></h3> <h3><a name="envvars">Environment Variables</a></h3>


@@ -131,8 +147,11 @@ set):</p>
the maximum Java heap size here.</li> the maximum Java heap size here.</li>


<li><code>ANT_ARGS</code> - Ant command-line arguments. For example, <li><code>ANT_ARGS</code> - Ant command-line arguments. For example,
set <code>ANT_ARGS</code> to point to a different logger and to
include the <code>-find</code> flag.</li>
set <code>ANT_ARGS</code> to point to a different logger, include a
listener, and to include the <code>-find</code> flag.</li>
<strong>Note:</strong> If you include <code>-find</code>
in <code>ANT_ARGS</code>, you should include the name of the build file
to find, even if the file is called <code>build.xml</code>.
</ul> </ul>


<h2><a name="viajava">Running Ant via Java</a></h2> <h2><a name="viajava">Running Ant via Java</a></h2>


+ 10
- 7
proposal/xdocs/build.xml View File

@@ -45,6 +45,9 @@
<pathelement location="${build.dir}"/> <pathelement location="${build.dir}"/>
</path> </path>


<property name="the.classpath" refid="xdoclet.classpath"/>
<echo>the.classpath = ${the.classpath}</echo>

<taskdef name="document" <taskdef name="document"
classname="xdoclet.doc.DocumentDocletTask" classname="xdoclet.doc.DocumentDocletTask"
classpathref="xdoclet.classpath"/> classpathref="xdoclet.classpath"/>
@@ -71,7 +74,7 @@
classpathref="xdoclet.classpath"> classpathref="xdoclet.classpath">
<fileset dir="${src.dir}"> <fileset dir="${src.dir}">
<include name="**/*.java" unless="class.name"/> <include name="**/*.java" unless="class.name"/>
<include name="**/${class.name}.java" if="class.name"/>
<include name="**/*${class.name}*.java" if="class.name"/>
</fileset> </fileset>


<!-- Generate XML task descriptor files --> <!-- Generate XML task descriptor files -->
@@ -79,9 +82,9 @@
destinationfile="{0}.xml"/> destinationfile="{0}.xml"/>


<!-- Generate XML datatype descriptor files --> <!-- Generate XML datatype descriptor files -->
<datatypes templateFile="${datatype_xdoc.template}"
<!-- <datatypes templateFile="${datatype_xdoc.template}"
destdir="${gen.dir}/datatypes" destdir="${gen.dir}/datatypes"
destinationfile="{0}.xml"/>
destinationfile="{0}.xml"/> -->


<!-- @todo - with some additional logic in these subtasks, they <!-- @todo - with some additional logic in these subtasks, they
could be used similar to above instead of <template> --> could be used similar to above instead of <template> -->
@@ -91,14 +94,14 @@
destinationfile="task_defaults.properties"/> destinationfile="task_defaults.properties"/>


<!-- Generate datatype defaults.properties --> <!-- Generate datatype defaults.properties -->
<template subTaskClassName="org.apache.tools.ant.xdoclet.DatatypeSubTask"
<!-- <template subTaskClassName="org.apache.tools.ant.xdoclet.DatatypeSubTask"
templateFile="${type.properties.template}" templateFile="${type.properties.template}"
destinationfile="type_defaults.properties"/>
destinationfile="type_defaults.properties"/> -->


<!-- Generate to-do list --> <!-- Generate to-do list -->
<info destdir="${gen.dir}/todo/ant"
<!-- <info destdir="${gen.dir}/todo/ant"
header="To-do List" header="To-do List"
projectname="Ant"/>
projectname="Ant"/> -->
</xdocs> </xdocs>


</target> </target>


+ 3
- 3
proposal/xdocs/src/org/apache/tools/ant/xdoclet/TaskSubTask.java View File

@@ -69,6 +69,7 @@ import java.io.File;
public class TaskSubTask extends TemplateSubTask { public class TaskSubTask extends TemplateSubTask {
public final static String SUBTASK_NAME = "tasks"; public final static String SUBTASK_NAME = "tasks";



public String getSubTaskName() { public String getSubTaskName() {
return SUBTASK_NAME; return SUBTASK_NAME;
} }
@@ -104,15 +105,14 @@ public class TaskSubTask extends TemplateSubTask {
return false; return false;
} }


/* Leave deprecated tasks in for now
/*
Tag[] tags = clazz.tags(); Tag[] tags = clazz.tags();
for (int i = 0; i < tags.length; i++) { for (int i = 0; i < tags.length; i++) {
if ("@deprecated".equals(tags[i].name())) { if ("@deprecated".equals(tags[i].name())) {
return false; return false;
} }
} }
*/

*/
if (hasExecuteMethod(clazz)) { if (hasExecuteMethod(clazz)) {
return true; return true;
} }


+ 194
- 91
proposal/xdocs/src/org/apache/tools/ant/xdoclet/TaskTagsHandler.java View File

@@ -53,19 +53,18 @@
*/ */
package org.apache.tools.ant.xdoclet; package org.apache.tools.ant.xdoclet;


import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.MethodDoc;
import com.sun.javadoc.Parameter;
import com.sun.javadoc.Type;

import com.sun.javadoc.*;
import org.apache.tools.ant.IntrospectionHelper;
import xdoclet.XDocletException; import xdoclet.XDocletException;
import xdoclet.XDocletTagSupport; import xdoclet.XDocletTagSupport;
import xdoclet.util.TypeConversionUtil;
import xdoclet.tags.AbstractProgramElementTagsHandler; import xdoclet.tags.AbstractProgramElementTagsHandler;


import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.Enumeration;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -172,11 +171,9 @@ public class TaskTagsHandler extends XDocletTagSupport {
String elementName = "<not a valid element>"; String elementName = "<not a valid element>";
if (methodName.startsWith("addConfigured")) { if (methodName.startsWith("addConfigured")) {
elementName = methodName.substring(13, methodName.length()); elementName = methodName.substring(13, methodName.length());
}
else if (methodName.startsWith("add")) {
} else if (methodName.startsWith("add")) {
elementName = methodName.substring(3, methodName.length()); elementName = methodName.substring(3, methodName.length());
}
else if (methodName.startsWith("create")) {
} else if (methodName.startsWith("create")) {
elementName = methodName.substring(6, methodName.length()); elementName = methodName.substring(6, methodName.length());
} }
return elementName.toLowerCase(); return elementName.toLowerCase();
@@ -201,9 +198,8 @@ public class TaskTagsHandler extends XDocletTagSupport {
ClassDoc classDoc = null; ClassDoc classDoc = null;
String methodName = getCurrentMethod().name(); String methodName = getCurrentMethod().name();
if (methodName.startsWith("addConfigured") || if (methodName.startsWith("addConfigured") ||
methodName.startsWith("add") ||
methodName.startsWith("create"))
{
methodName.startsWith("add") ||
methodName.startsWith("create")) {
classDoc = getCurrentMethod().returnType().asClassDoc(); classDoc = getCurrentMethod().returnType().asClassDoc();
if (classDoc == null) { if (classDoc == null) {
Parameter[] params = getCurrentMethod().parameters(); Parameter[] params = getCurrentMethod().parameters();
@@ -219,12 +215,42 @@ public class TaskTagsHandler extends XDocletTagSupport {
* Provides the Ant task name. * Provides the Ant task name.
* *
* @see #getTaskName(ClassDoc) * @see #getTaskName(ClassDoc)
* @doc:tag type="content"
* @doc:tag type="content"
*/ */
public String taskName() throws XDocletException { public String taskName() throws XDocletException {
return getTaskName(getCurrentClass()); return getTaskName(getCurrentClass());
} }


private static String[] fluffPrefixes = { "set a","set the","sets a","sets the" };

public String shortMethodDescription() throws XDocletException {
Tag[] tags = getCurrentMethod().firstSentenceTags();
String desc = null;

if( tags != null && tags.length > 0 ) {
desc = tags[0].text();
}

if( desc == null || desc.length() == 0 )
{
desc = "no description";
}

desc = desc.trim();
String descLower = desc.toLowerCase();
for (int i=0; i < fluffPrefixes.length; i++) {
String prefix = fluffPrefixes[i].toLowerCase() + " ";
if (descLower.startsWith(prefix)) {
desc = desc.substring(prefix.length());
break;
}
}

desc = desc.substring(0,1).toUpperCase() + desc.substring(1);

return desc;
}

/** /**
* Provides the Ant task name. * Provides the Ant task name.
* *
@@ -272,8 +298,7 @@ public class TaskTagsHandler extends XDocletTagSupport {
null, false, XDocletTagSupport.FOR_CLASS, false); null, false, XDocletTagSupport.FOR_CLASS, false);
if (tagValue != null) { if (tagValue != null) {
tagValue = tagValue.toLowerCase(); tagValue = tagValue.toLowerCase();
}
else {
} else {
tagValue = DEFAULT_CATEGORY; tagValue = DEFAULT_CATEGORY;
} }
return tagValue; return tagValue;
@@ -281,75 +306,61 @@ public class TaskTagsHandler extends XDocletTagSupport {




/** /**
* Returns true if the method corresponds to an Ant task attribute using
* the rules from IntrospectionHelper
*
* @todo filter out deprecated methods
* only filter org.apache.tools.ant.Task setters that are hidden
* check that it returns void and only has single argument
* incorporate rules for argument types from IntrospectionHelper
* - i.e. not an array
* - primitives/wrappers
* - File
* - Path
* - EnumeratedAttribute
* - Class with string constructor
* @todo refactor to cache methods per class, and save some time
*/ */
private boolean isAntAttribute(MethodDoc method) {
String[] excludeList = new String[]{"setLocation", "setDescription", "setOwningTarget", "setRuntimeConfigurableWrapper",
"setTaskName", "setTaskType", "setProject"};
for (int i = 0; i < excludeList.length; i++) {
if (excludeList[i].equals(method.name())) {
return true;
}
private MethodDoc[] getAttributeMethods(ClassDoc cur_class) throws XDocletException {
// Use Ant's own introspection mechanism to gather the
// attributes this class supports
IntrospectionHelper is = null;
try {
is = IntrospectionHelper.getHelper(Class.forName(cur_class.qualifiedName()));
} catch (ClassNotFoundException e) {
throw new XDocletException(e,e.getMessage());
} }


return false;
}

private MethodDoc[] getAttributeMethods(ClassDoc cur_class) throws XDocletException {
MethodDoc[] methods = getMethods(cur_class);
List attributeMethods = new ArrayList();
Map nameTypeMap = new HashMap();
// Regroup the attributes, since IntrospectionHelper
// doesn't give us the whole data structure directly
Enumeration enum = is.getAttributes();
Properties attributeTypeMap = new Properties();
while (enum.hasMoreElements()) {
String name = (String) enum.nextElement();
Class type = is.getAttributeType(name);
attributeTypeMap.setProperty(name, type.getName());
// System.out.println(name + " = " + type.getName());
}


for (int i = 0; i < methods.length; i++) {
MethodDoc method = methods[i];
// We need to return MethodDoc[] from this method
// so get all methods from the current class
MethodDoc[] allMethods = getMethods(cur_class);


if (!method.isPublic()) {
// And now filter the MethodDoc's based
// on what IntrospectionHelper says
List attributeMethods = new ArrayList();
for (int i = 0; i < allMethods.length; i++) {
MethodDoc method = allMethods[i];
String methodName = method.name();
if (!methodName.startsWith("set")) {
continue; continue;
} }


if (!method.name().startsWith("set")) {
String attributeName = methodName.substring(3).toLowerCase();
if ((method.parameters().length != 1) || (!method.isPublic())) {
continue; continue;
} }
String attributeType = method.parameters()[0].typeName();


// if superclass is org.apache.tools.ant.Task then
// remove some known unallowed properties
if (isAntAttribute(method)) {
String mapAttribute = attributeTypeMap.getProperty(attributeName);
if (mapAttribute == null) {
continue; continue;
} }


// ensure method only has one parameter
Parameter[] params = method.parameters();
if (params.length != 1) {
// inner classes are noted with $ in our map, but not
// n the parameter type name.
if (!attributeType.equals(mapAttribute.replace('$','.'))) {
continue; continue;
} }


Parameter param = params[0];

// Screen out attribute setters if there are duplicates,
// and only return the first non-String one
// (this may or may not jive with IntrospectionHelper)
MethodDoc oldMethod = (MethodDoc) nameTypeMap.get(method.name());
if (oldMethod == null) {
nameTypeMap.put(method.name(), method);
}
else {
if ("java.lang.String".equals(oldMethod.parameters()[0].typeName())) {
attributeMethods.remove(oldMethod);
nameTypeMap.put(method.name(), method);
}
}
// System.out.println(methodName + " : " + attributeName + " : " + attributeType);


attributeMethods.add(method); attributeMethods.add(method);
} }
@@ -361,47 +372,96 @@ public class TaskTagsHandler extends XDocletTagSupport {
* @todo add checks for number parameters and appropriate return value * @todo add checks for number parameters and appropriate return value
* check for proper exception too? * check for proper exception too?
* method prefixes: add, create, addConfigured (but not addText) * method prefixes: add, create, addConfigured (but not addText)
*
* @todo add DynamicConfigurator (this should be noted in the template, not dealt with here)
*/ */
private MethodDoc[] getElementMethods(ClassDoc cur_class) throws XDocletException { private MethodDoc[] getElementMethods(ClassDoc cur_class) throws XDocletException {
MethodDoc[] methods = getMethods(cur_class);
List attributeMethods = new ArrayList();
// Use Ant's own introspection mechanism to gather the
// elements this class supports
IntrospectionHelper is = null;
try {
is = IntrospectionHelper.getHelper(Class.forName(cur_class.qualifiedName()));
} catch (ClassNotFoundException e) {
throw new XDocletException(e.getMessage());
}


for (int i = 0; i < methods.length; i++) {
if (! methods[i].isPublic()) {
continue;
}
// Regroup the elements, since IntrospectionHelper
// doesn't give us the whole data structure directly
Enumeration enum = is.getNestedElements();
Properties elementTypeMap = new Properties();
while (enum.hasMoreElements()) {
String name = (String) enum.nextElement();
Class type = is.getElementType(name);
elementTypeMap.setProperty(name, type.getName());
// System.out.println(name + " = " + type.getName());
}


String name = methods[i].name();
// We need to return MethodDoc[] from this method
// so get all methods from the current class
MethodDoc[] allMethods = getMethods(cur_class);

// And now filter the MethodDoc's based
// on what IntrospectionHelper says
List elementMethods = new ArrayList();
for (int i = 0; i < allMethods.length; i++) {
MethodDoc method = allMethods[i];
String methodName = method.name();

// Object create(), void add(Object), void addConfigured(Object)
String elementName = null;
boolean adder = false; // true if addXXX or addConfiguredXXX
if (methodName.startsWith("create")) {
elementName = methodName.substring(6).toLowerCase();
}


// ensure if there are no parameters, there is a return type,
// otherwise ensure there's only one parameter.
Parameter[] params = methods[i].parameters();
if (params.length == 0) {
if (methods[i].returnType().asClassDoc() == null) {
continue;
if (methodName.startsWith("add")) {
int length = 3;
if (methodName.startsWith("addConfigured")) {
length = 13;
} }


// only the "createXXX" method has zero params
// the "addXXX" and "addConfiguredXXX" have 1 param
if (!name.startsWith("create")) {
elementName = methodName.substring(length).toLowerCase();
adder = true;
}

if (elementName == null) {
continue;
}

System.out.println("elementName = " + elementName);
String elementType = null;
if (adder) {
if (method.parameters().length != 1) {
continue; continue;
} }
elementType = method.parameters()[0].typeName();
} else {
elementType = method.returnType().qualifiedTypeName();
} }
else if (params.length != 1) {

if (!method.isPublic()) {
continue; continue;
} }


if ((name.startsWith("add") && !name.equals("addTask")) ||
name.startsWith("create")) {
attributeMethods.add(methods[i]);
String mapElementType = elementTypeMap.getProperty(elementName);
System.out.println("elementType = " + elementType + " mapElementType = " + mapElementType);
if (mapElementType == null) {
continue;
} }


// inner classes are noted with $ in our map, but not
// the parameter type name.
if (!elementType.equals(mapElementType.replace('$','.'))) {
continue;
}


elementMethods.add(method);
} }


return (MethodDoc[]) attributeMethods.toArray(new MethodDoc[0]);
return (MethodDoc[]) elementMethods.toArray(new MethodDoc[0]);
} }



/** /**
* This is a slightly refactored (thank you IntelliJ) version of * This is a slightly refactored (thank you IntelliJ) version of
* some cut-and-paste from XDoclet code. It sorts all methods together * some cut-and-paste from XDoclet code. It sorts all methods together
@@ -413,13 +473,26 @@ public class TaskTagsHandler extends XDocletTagSupport {
List methods = new ArrayList(); List methods = new ArrayList();


while (cur_class != null) { while (cur_class != null) {
// hardcoded to stop when it hits Task, nothing there
// or above that needs to be processed
if (cur_class.qualifiedName().equals("org.apache.tools.ant.Task") ||
cur_class.qualifiedName().equals("org.apache.tools.ant.taskdefs.MatchingTask")) {
break;
}
List curMethods = Arrays.asList(cur_class.methods()); List curMethods = Arrays.asList(cur_class.methods());


for (int j = 0; j < curMethods.size(); j++) { for (int j = 0; j < curMethods.size(); j++) {
MethodDoc method = (MethodDoc) curMethods.get(j); MethodDoc method = (MethodDoc) curMethods.get(j);
if (isDeprecated(method)) {
continue;
}
if (shouldIgnore(method)) {
continue;
}
String methodName = method.name();
if (method.containingClass() == cur_class) { if (method.containingClass() == cur_class) {
if (already.containsKey(method) == false) {
already.put(method, method);
if (already.containsKey(methodName) == false) {
already.put(methodName, method);
methods.add(method); methods.add(method);
} }
} }
@@ -431,6 +504,36 @@ public class TaskTagsHandler extends XDocletTagSupport {
return sortMethods(methods); return sortMethods(methods);
} }


private boolean isDeprecated (MethodDoc method) {
Tag[] tags = method.tags();
for (int i=0; i < tags.length; i++) {
if (tags[i].name().equals("@deprecated")) {
return true;
}
}
return false;
}

/**
* For now, lump attributes and elements together since we won't
* have those tags on the same method.
*/
private boolean shouldIgnore (MethodDoc method) throws XDocletException {
String value = getTagValue(method, "ant:attribute", "ignore", -1,
null, null, null, null,
null, false, XDocletTagSupport.FOR_METHOD, false);
if ("true".equals(value)) {
return true;
}
value = getTagValue(method, "ant:element", "ignore", -1,
null, null, null, null,
null, false, XDocletTagSupport.FOR_METHOD, false);
if ("true".equals(value)) {
return true;
}
return false;
}

private MethodDoc[] sortMethods(List methods) { private MethodDoc[] sortMethods(List methods) {
//sort methods //sort methods
Collections.sort(methods, Collections.sort(methods,


+ 13
- 17
proposal/xdocs/templates/task_xdoc.template View File

@@ -1,6 +1,8 @@
<XDtTagDef:tagDef namespace="Ant" handler="org.apache.tools.ant.xdoclet.TaskTagsHandler"/> <XDtTagDef:tagDef namespace="Ant" handler="org.apache.tools.ant.xdoclet.TaskTagsHandler"/>
<task name="<XDtAnt:taskName/>" category="<XDtAnt:categoryName/>" <task name="<XDtAnt:taskName/>" category="<XDtAnt:categoryName/>"
classname="<XDtClass:fullClassName/>">
classname="<XDtClass:fullClassName/>"
<XDtClass:ifHasClassTag tagName="deprecated">deprecated="true"</XDtClass:ifHasClassTag>
<XDtType:ifIsOfType type="org.apache.tools.ant.taskdefs.MatchingTask">matchingTask="true"</XDtType:ifIsOfType>>


<XDtMerge:merge file="{0}.xml" generateMergedFile="false"></XDtMerge:merge> <XDtMerge:merge file="{0}.xml" generateMergedFile="false"></XDtMerge:merge>


@@ -13,7 +15,9 @@


<attributes> <attributes>
<XDtAnt:forAllAttributes> <XDtAnt:forAllAttributes>
<attribute name="<XDtMethod:propertyName/>" type="<XDtParameter:forAllMethodParams><XDtParameter:methodParamType/></XDtParameter:forAllMethodParams>">
<attribute name="<XDtMethod:propertyName/>" type="<XDtParameter:forAllMethodParams><XDtParameter:methodParamType/></XDtParameter:forAllMethodParams>"
<XDtMethod:ifHasMethodTag tagName="deprecated">deprecated="true"</XDtMethod:ifHasMethodTag>>
<short-description><![CDATA[<XDtAnt:shortMethodDescription/>]]></short-description>
<description><![CDATA[ <description><![CDATA[
<XDtMethod:methodComment no-comment-signs="true"/> <XDtMethod:methodComment no-comment-signs="true"/>
]]></description> ]]></description>
@@ -23,23 +27,15 @@


<elements> <elements>
<XDtAnt:forAllElements> <XDtAnt:forAllElements>
<element name="<XDtAnt:elementName/>" type="<XDtAnt:elementType/>">
<element name="<XDtAnt:elementName/>" type="<XDtAnt:elementType/>"
<XDtMethod:ifHasMethodTag tagName="deprecated">deprecated="true"</XDtMethod:ifHasMethodTag>
<XDtClass:pushClass value="<XDtAnt:elementType/>">
<XDtClass:ifIsClassAbstract>abstract="true"</XDtClass:ifIsClassAbstract>>
</XDtClass:pushClass>
<short-description><![CDATA[<XDtAnt:shortMethodDescription/>]]></short-description>
<description> <description>
<![CDATA[<XDtMethod:methodComment no-comment-signs="true"/>]]> <![CDATA[<XDtMethod:methodComment no-comment-signs="true"/>]]>
</description> </description>
<XDtClass:pushClass value="<XDtAnt:elementType/>">
<XDtAnt:ifHasAttributes>
<attributes>
<XDtAnt:forAllAttributes>
<attribute name="<XDtMethod:propertyName/>" type="<XDtParameter:forAllMethodParams><XDtParameter:methodParamType/></XDtParameter:forAllMethodParams>">
<description><![CDATA[
<XDtMethod:methodComment no-comment-signs="true"/>
]]></description>
</attribute>
</XDtAnt:forAllAttributes>
</attributes>
</XDtAnt:ifHasAttributes>
</XDtClass:pushClass>
</element> </element>


</XDtAnt:forAllElements> </XDtAnt:forAllElements>
@@ -48,7 +44,7 @@
<!-- @todo: wrap setCurrentMethod inside AntTagsHandler --> <!-- @todo: wrap setCurrentMethod inside AntTagsHandler -->
<!-- @todo: create a XDtAnt:description wrapper for methodComment --> <!-- @todo: create a XDtAnt:description wrapper for methodComment -->
<XDtMethod:setCurrentMethod name="addText" parameters="java.lang.String"> <XDtMethod:setCurrentMethod name="addText" parameters="java.lang.String">
<body>
<body <XDtMethod:ifHasMethodTag tagName="deprecated">deprecated="true"</XDtMethod:ifHasMethodTag>>
<description><![CDATA[ <description><![CDATA[
<XDtMethod:methodComment no-comment-signs="true"/> <XDtMethod:methodComment no-comment-signs="true"/>
]]></description> ]]></description>


+ 1
- 1
src/etc/manifest View File

@@ -1,5 +1,5 @@
Manifest-Version: 1.0 Manifest-Version: 1.0
Main-Class: org.apache.tools.ant.Main Main-Class: org.apache.tools.ant.Main
Class-Path: jaxp.jar parser.jar crimson.jar optional.jar xalan.jar
Class-Path: xml-apis.jar xercesImpl.jar optional.jar xalan.jar





+ 46
- 0
src/etc/testcases/taskdefs/ant.xml View File

@@ -93,4 +93,50 @@
<property name="testprop" refid="inheritable" /> <property name="testprop" refid="inheritable" />
</ant> </ant>
</target> </target>

<target name="test-property-override-inheritall-start">
<property name="test" value="1" />
<ant antfile="ant.xml"
target="test-property-override-inheritall-level-2"
inheritall="true">
<property name="test" value="2" />
</ant>
</target>

<target name="test-property-override-inheritall-level-2">
<property name="test" value="3" />
<ant antfile="ant.xml"
target="test-property-override-inheritall-level-3"
inheritall="true">
<property name="test" value="4" />
</ant>
</target>

<target name="test-property-override-inheritall-level-3">
<property name="test" value="5" />
<echo message="The value of test is ${test}" />
</target>

<target name="test-property-override-no-inheritall-start">
<property name="test" value="1" />
<ant antfile="ant.xml"
target="test-property-override-no-inheritall-level-2"
inheritall="false">
<property name="test" value="2" />
</ant>
</target>

<target name="test-property-override-no-inheritall-level-2">
<property name="test" value="3" />
<ant antfile="ant.xml"
target="test-property-override-no-inheritall-level-3"
inheritall="false">
<property name="test" value="4" />
</ant>
</target>

<target name="test-property-override-no-inheritall-level-3">
<property name="test" value="5" />
<echo message="The value of test is ${test}" />
</target>
</project> </project>

+ 1
- 1
src/etc/testcases/taskdefs/available.xml View File

@@ -113,7 +113,7 @@
classname="java.awt.Graphics"> classname="java.awt.Graphics">
<classpath> <classpath>
<pathelement location="${java.home}/lib/rt.jar" /> <pathelement location="${java.home}/lib/rt.jar" />
<pathelement location="${java.home}/lib/classes.jar" />
<pathelement location="${java.home}/lib/classes.zip" />
<pathelement location="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar" /> <pathelement location="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar" />
<pathelement location="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/ui.jar" /> <pathelement location="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/ui.jar" />
</classpath> </classpath>


+ 2
- 0
src/etc/testcases/taskdefs/fixcrlf/expected/Mac2Unix View File

@@ -1,2 +1,4 @@
line1 line1
line2 line2

line3

+ 1
- 1
src/etc/testcases/taskdefs/fixcrlf/input/Mac2Unix View File

@@ -1 +1 @@
line1 line2
line1 line2 line3

+ 9
- 0
src/etc/testcases/types/quote1.xml View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!-- I belong to:
org.apache.tools.ant.types.XMLCatalogBuildFileTest.java
-->

<para>
A stitch in time saves nine
</para>

+ 10
- 0
src/etc/testcases/types/quote2.xml View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!-- I belong to:
org.apache.tools.ant.types.XMLCatalogBuildFileTest.java
-->

<para>
No news is good news
</para>


+ 134
- 0
src/etc/testcases/types/xmlcatalog.xml View File

@@ -0,0 +1,134 @@
<?xml version='1.0'?>
<!DOCTYPE project>

<project name="xmlcatalog" default="all" basedir=".">

<description>
This is to test XMLCatalog for external entity resolution from the
xslt task, both the simple case and using the document() function
to refer to a second file (which refers to the entity). This
buildfile is called by
org.apache.tools.ant.types.XMLCatalogBuildFileTest.java
Alternatively, you may try it out by hand by first removing the
comment symbols around the echo statements and then calling
ant -buildfile xmlcatalog.xml
</description>

<property name="transformer" value = "xmlcatalog.xsl"/>

<target
name = "all"
depends = "testentitynocatalog, testentitywithcatalog,
testdocumentnocatalog, testdocumentwithcatalog"/>

<target
name = "testentitynocatalog"
description = "Test external entity resolver for simple XML
document without using XMLCatalog">
<delete
quiet = "yes"
file = "result.out"/>
<xslt
basedir = "${basedir}"
destdir = "${basedir}"
extension = ".text"
style = "${transformer}"
in = "xmlcatalog1.xml"
out = "result.out">
<param
name = "outprop"
expression = "val1"/>
</xslt>
<property file = "result.out"/>
<!-- <echo message = "${val1}"/> -->
<delete
quiet = "yes"
file = "result.out"/>
</target>

<target
name = "testentitywithcatalog"
description = "Test external entity resolver for simple
XML document using XMLCatalog">
<delete
quiet = "yes"
file = "result.out"/>
<xslt
basedir = "${basedir}"
destdir = "${basedir}"
extension = ".text"
style = "${transformer}"
in = "xmlcatalog1.xml"
out = "result.out">
<param
name = "outprop"
expression = "val2"/>
<xmlcatalog>
<entity
publicId = "myquote"
location = "quote2.xml"/>
</xmlcatalog>
</xslt>
<property file = "result.out"/>
<!-- <echo message = "${val2}"/> -->
<delete
quiet = "yes"
file = "result.out"/>
</target>

<target
name = "testdocumentnocatalog"
description = "Test entity resolution in XML document called
from XSLT document() function without using XMLCatalog">
<delete
quiet = "yes"
file = "result.out"/>
<xslt
basedir = "${basedir}"
destdir = "${basedir}"
extension = ".text"
style = "${transformer}"
in = "xmlcatalog2.xml"
out = "result.out">
<param
name = "outprop"
expression = "val3"/>
</xslt>
<property file = "result.out"/>
<!-- <echo message = "${val3}"/> -->
<delete
quiet = "yes"
file = "result.out"/>
</target>

<target
name = "testdocumentwithcatalog"
description = "Test entity resolution in XML document called
from XSLT document() function using XMLCatalog">
<delete
quiet = "yes"
file = "result.out"/>
<xslt
basedir = "${basedir}"
destdir = "${basedir}"
extension = ".text"
style = "${transformer}"
in = "xmlcatalog2.xml"
out = "result.out">
<param
name = "outprop"
expression = "val4"/>
<xmlcatalog>
<entity
publicId = "myquote"
location = "quote2.xml"/>
</xmlcatalog>
</xslt>
<property file = "result.out"/>
<!-- <echo message = "${val4}"/> -->
<delete
quiet = "yes"
file = "result.out"/>
</target>

</project>

+ 31
- 0
src/etc/testcases/types/xmlcatalog.xsl View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<!-- I belong to:
org.apache.tools.ant.types.XMLCatalogBuildFileTest.java
-->

<xsl:output method="text"/>

<!-- name of the output parameter to write -->
<xsl:param name="outprop">value</xsl:param>

<xsl:strip-space elements="*"/>

<xsl:template match="/">
<xsl:value-of select="$outprop"/>: <xsl:apply-templates select="/fragment/para"/>
</xsl:template>

<!-- This will only be matched in doc2.xml -->
<xsl:template match="Ref">
<xsl:apply-templates select="document(@file)/fragment/para"/>
</xsl:template>

<!-- This will only be matched in doc1.xml -->
<xsl:template match="text()">
<xsl:value-of select="normalize-space(.)"/>
</xsl:template>

</xsl:stylesheet>

+ 14
- 0
src/etc/testcases/types/xmlcatalog1.xml View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE fragment [
<!ENTITY quote PUBLIC "myquote" "quote1.xml">
]>

<!-- I belong to:
org.apache.tools.ant.types.XMLCatalogBuildFileTest.java
-->

<fragment>
<para>
&quote;
</para>
</fragment>

+ 11
- 0
src/etc/testcases/types/xmlcatalog2.xml View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!-- I belong to:
org.apache.tools.ant.types.XMLCatalogBuildFileTest.java
-->

<fragment>
<para>
<Ref file="xmlcatalog1.xml"/>
</para>
</fragment>

+ 17
- 0
src/main/org/apache/tools/ant/AntClassLoader.java View File

@@ -71,6 +71,7 @@ import java.net.URL;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.LoaderUtils; import org.apache.tools.ant.util.LoaderUtils;
import org.apache.tools.ant.util.JavaEnvUtils;


/** /**
* Used to load classes within ant with a different claspath from * Used to load classes within ant with a different claspath from
@@ -318,6 +319,8 @@ public class AntClassLoader extends ClassLoader implements BuildListener {
this.parent = parent; this.parent = parent;
} }
this.parentFirst = parentFirst; this.parentFirst = parentFirst;
//TODO: turn on
//addJavaLibraries();
addSystemPackageRoot("java"); addSystemPackageRoot("java");
addSystemPackageRoot("javax"); addSystemPackageRoot("javax");
} }
@@ -1175,4 +1178,18 @@ public class AntClassLoader extends ClassLoader implements BuildListener {
*/ */
public void messageLogged(BuildEvent event) { public void messageLogged(BuildEvent event) {
} }
/**
* add any libraries that come with different java versions
* here
*/
private void addJavaLibraries() {
Vector packages=JavaEnvUtils.getJrePackages();
Enumeration e=packages.elements();
while(e.hasMoreElements()) {
String packageName=(String)e.nextElement();
addSystemPackageRoot(packageName);
}
}
} }

+ 19
- 11
src/main/org/apache/tools/ant/DefaultLogger.java View File

@@ -54,8 +54,10 @@


package org.apache.tools.ant; package org.apache.tools.ant;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.util.StringTokenizer;
import java.io.StringReader;


import org.apache.tools.ant.util.StringUtils; import org.apache.tools.ant.util.StringUtils;
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
@@ -261,18 +263,24 @@ public class DefaultLogger implements BuildLogger {
tmp.append(label); tmp.append(label);
label = tmp.toString(); label = tmp.toString();


StringTokenizer tok = new StringTokenizer(event.getMessage(),
"\r\n", false);
boolean first = true;
while (tok.hasMoreTokens()) {
if (!first) {
message.append(StringUtils.LINE_SEP);
try {
BufferedReader r =
new BufferedReader(
new StringReader(event.getMessage()));
String line = r.readLine();
boolean first = true;
while (line != null) {
if (!first) {
message.append(StringUtils.LINE_SEP);
}
first = false;
message.append(label).append(line);
line = r.readLine();
} }
first = false;
message.append(label);
message.append(tok.nextToken());
} catch (IOException e) {
// shouldn't be possible
message.append(label).append(event.getMessage());
} }

} else { } else {
message.append(event.getMessage()); message.append(event.getMessage());
} }


+ 32
- 26
src/main/org/apache/tools/ant/Main.java View File

@@ -115,7 +115,7 @@ public class Main {
* BuildLogger interface. * BuildLogger interface.
*/ */
private String loggerClassname = null; private String loggerClassname = null;
/** /**
* The Ant InputHandler class. There may be only one input * The Ant InputHandler class. There may be only one input
* handler. * handler.
@@ -251,6 +251,7 @@ public class Main {
protected Main(String[] args) throws BuildException { protected Main(String[] args) throws BuildException {


String searchForThis = null; String searchForThis = null;
PrintStream logTo = null;


// cycle through given args // cycle through given args


@@ -275,10 +276,7 @@ public class Main {
try { try {
File logFile = new File(args[i + 1]); File logFile = new File(args[i + 1]);
i++; i++;
out = new PrintStream(new FileOutputStream(logFile));
err = out;
System.setOut(out);
System.setErr(out);
logTo = new PrintStream(new FileOutputStream(logFile));
isLogFileUsed = true; isLogFileUsed = true;
} catch (IOException ioe) { } catch (IOException ioe) {
String msg = "Cannot write on the specified log file. " String msg = "Cannot write on the specified log file. "
@@ -437,12 +435,12 @@ public class Main {
System.out.println("Could not load property file " System.out.println("Could not load property file "
+ filename + ": " + e.getMessage()); + filename + ": " + e.getMessage());
} finally { } finally {
if (fis != null){
if (fis != null) {
try { try {
fis.close(); fis.close();
} catch (IOException e){ } catch (IOException e){
}
} }
}
} }


// ensure that -D properties take precedence // ensure that -D properties take precedence
@@ -455,6 +453,15 @@ public class Main {
} }
} }


if (msgOutputLevel >= Project.MSG_INFO) {
System.out.println("Buildfile: " + buildFile);
}

if (logTo != null) {
out = err = logTo;
System.setOut(out);
System.setErr(out);
}
readyToRun = true; readyToRun = true;
} }


@@ -539,12 +546,6 @@ public class Main {
return; return;
} }


// track when we started

if (msgOutputLevel >= Project.MSG_INFO) {
System.out.println("Buildfile: " + buildFile);
}

final Project project = new Project(); final Project project = new Project();
project.setCoreLoader(coreLoader); project.setCoreLoader(coreLoader);


@@ -667,14 +668,14 @@ public class Main {
handler = (InputHandler) handler = (InputHandler)
(Class.forName(inputHandlerClassname).newInstance()); (Class.forName(inputHandlerClassname).newInstance());
} catch (ClassCastException e) { } catch (ClassCastException e) {
String msg = "The specified input handler class "
+ inputHandlerClassname
String msg = "The specified input handler class "
+ inputHandlerClassname
+ " does not implement the InputHandler interface"; + " does not implement the InputHandler interface";
throw new BuildException(msg); throw new BuildException(msg);
} }
catch (Exception e) { catch (Exception e) {
String msg = "Unable to instantiate specified input handler " String msg = "Unable to instantiate specified input handler "
+ "class " + inputHandlerClassname + " : "
+ "class " + inputHandlerClassname + " : "
+ e.getClass().getName(); + e.getClass().getName();
throw new BuildException(msg); throw new BuildException(msg);
} }
@@ -704,7 +705,7 @@ public class Main {
throw new RuntimeException(); throw new RuntimeException();
} catch (Exception e) { } catch (Exception e) {
System.err.println("Unable to instantiate specified logger " System.err.println("Unable to instantiate specified logger "
+ "class " + loggerClassname + " : "
+ "class " + loggerClassname + " : "
+ e.getClass().getName()); + e.getClass().getName());
throw new RuntimeException(); throw new RuntimeException();
} }
@@ -731,14 +732,17 @@ public class Main {
msg.append(" -help print this message" + lSep); msg.append(" -help print this message" + lSep);
msg.append(" -projecthelp print project help information" + lSep); msg.append(" -projecthelp print project help information" + lSep);
msg.append(" -version print the version information and exit" + lSep); msg.append(" -version print the version information and exit" + lSep);
msg.append(" -quiet be extra quiet" + lSep);
msg.append(" -verbose be extra verbose" + lSep);
msg.append(" -quiet, -q be extra quiet" + lSep);
msg.append(" -verbose, -v be extra verbose" + lSep);
msg.append(" -debug print debugging information" + lSep); msg.append(" -debug print debugging information" + lSep);
msg.append(" -emacs produce logging information without adornments" + lSep); msg.append(" -emacs produce logging information without adornments" + lSep);
msg.append(" -logfile <file> use given file for log" + lSep); msg.append(" -logfile <file> use given file for log" + lSep);
msg.append(" -l <file> ''" + lSep);
msg.append(" -logger <classname> the class which is to perform logging" + lSep); msg.append(" -logger <classname> the class which is to perform logging" + lSep);
msg.append(" -listener <classname> add an instance of class as a project listener" + lSep); msg.append(" -listener <classname> add an instance of class as a project listener" + lSep);
msg.append(" -buildfile <file> use given buildfile" + lSep); msg.append(" -buildfile <file> use given buildfile" + lSep);
msg.append(" -file <file> ''" + lSep);
msg.append(" -f <file> ''" + lSep);
msg.append(" -D<property>=<value> use value for given property" + lSep); msg.append(" -D<property>=<value> use value for given property" + lSep);
msg.append(" -propertyfile <name> load all properties from file with -D" + lSep); msg.append(" -propertyfile <name> load all properties from file with -D" + lSep);
msg.append(" properties taking precedence" + lSep); msg.append(" properties taking precedence" + lSep);
@@ -807,7 +811,7 @@ public class Main {
*/ */
private static void printDescription(Project project) { private static void printDescription(Project project) {
if (project.getDescription() != null) { if (project.getDescription() != null) {
System.out.println(project.getDescription());
project.log(project.getDescription());
} }
} }


@@ -851,20 +855,21 @@ public class Main {
} }
} }


printTargets(topNames, topDescriptions, "Main targets:", maxLength);
printTargets(project, topNames, topDescriptions, "Main targets:",
maxLength);
//if there were no main targets, we list all subtargets //if there were no main targets, we list all subtargets
//as it means nothing has a description //as it means nothing has a description
if(topNames.size()==0) { if(topNames.size()==0) {
printSubTargets=true; printSubTargets=true;
} }
if (printSubTargets) { if (printSubTargets) {
printTargets(subNames, null, "Subtargets:", 0);
printTargets(project, subNames, null, "Subtargets:", 0);
} }


String defaultTarget = project.getDefaultTarget(); String defaultTarget = project.getDefaultTarget();
if (defaultTarget != null && !"".equals(defaultTarget)) { if (defaultTarget != null && !"".equals(defaultTarget)) {
// shouldn't need to check but... // shouldn't need to check but...
System.out.println("Default target: " + defaultTarget);
project.log("Default target: " + defaultTarget);
} }
} }


@@ -906,8 +911,9 @@ public class Main {
* position so they line up (so long as the names really * position so they line up (so long as the names really
* <i>are</i> shorter than this). * <i>are</i> shorter than this).
*/ */
private static void printTargets(Vector names, Vector descriptions,
String heading, int maxlen) {
private static void printTargets(Project project,Vector names,
Vector descriptions,String heading,
int maxlen) {
// now, start printing the targets and their descriptions // now, start printing the targets and their descriptions
String lSep = System.getProperty("line.separator"); String lSep = System.getProperty("line.separator");
// got a bit annoyed that I couldn't find a pad function // got a bit annoyed that I couldn't find a pad function
@@ -926,6 +932,6 @@ public class Main {
} }
msg.append(lSep); msg.append(lSep);
} }
System.out.println(msg.toString());
project.log(msg.toString());
} }
} }

+ 132
- 33
src/main/org/apache/tools/ant/Project.java View File

@@ -160,6 +160,13 @@ public class Project {
* Mapping is String to String. * Mapping is String to String.
*/ */
private Hashtable userProperties = new Hashtable(); private Hashtable userProperties = new Hashtable();
/**
* Map of inherited "user" properties - that are those "user"
* properties that have been created by tasks and not been set
* from the command line or a GUI tool.
* Mapping is String to String.
*/
private Hashtable inheritedProperties = new Hashtable();
/** Map of references within the project (paths etc) (String to Object). */ /** Map of references within the project (paths etc) (String to Object). */
private Hashtable references = new Hashtable(); private Hashtable references = new Hashtable();


@@ -350,13 +357,12 @@ public class Project {
} }


/** /**
* Returns a list of build listeners for the project. The returned
* vector is "live" and so should not be modified.
* Returns a list of build listeners for the project.
* *
* @return a list of build listeners for the project * @return a list of build listeners for the project
*/ */
public Vector getBuildListeners() { public Vector getBuildListeners() {
return listeners;
return (Vector) listeners.clone();
} }


/** /**
@@ -416,7 +422,7 @@ public class Project {
* @param value The new value of the property. * @param value The new value of the property.
* Must not be <code>null</code>. * Must not be <code>null</code>.
*/ */
public void setProperty(String name, String value) {
public synchronized void setProperty(String name, String value) {
// command line properties take precedence // command line properties take precedence
if (null != userProperties.get(name)) { if (null != userProperties.get(name)) {
log("Override ignored for user property " + name, MSG_VERBOSE); log("Override ignored for user property " + name, MSG_VERBOSE);
@@ -444,7 +450,7 @@ public class Project {
* Must not be <code>null</code>. * Must not be <code>null</code>.
* @since 1.5 * @since 1.5
*/ */
public void setNewProperty(String name, String value) {
public synchronized void setNewProperty(String name, String value) {
if (null != properties.get(name)) { if (null != properties.get(name)) {
log("Override ignored for property " + name, MSG_VERBOSE); log("Override ignored for property " + name, MSG_VERBOSE);
return; return;
@@ -463,13 +469,30 @@ public class Project {
* Must not be <code>null</code>. * Must not be <code>null</code>.
* @see #setProperty(String,String) * @see #setProperty(String,String)
*/ */
public void setUserProperty(String name, String value) {
public synchronized void setUserProperty(String name, String value) {
log("Setting ro project property: " + name + " -> " + log("Setting ro project property: " + name + " -> " +
value, MSG_DEBUG); value, MSG_DEBUG);
userProperties.put(name, value); userProperties.put(name, value);
properties.put(name, value); properties.put(name, value);
} }


/**
* Sets a user property, which cannot be overwritten by set/unset
* property calls. Any previous value is overwritten. Also marks
* these properties as properties that have not come from the
* command line.
*
* @param name The name of property to set.
* Must not be <code>null</code>.
* @param value The new value of the property.
* Must not be <code>null</code>.
* @see #setProperty(String,String)
*/
public synchronized void setInheritedProperty(String name, String value) {
inheritedProperties.put(name, value);
setUserProperty(name, value);
}

/** /**
* Sets a property unless it is already defined as a user property * Sets a property unless it is already defined as a user property
* (in which case the method returns silently). * (in which case the method returns silently).
@@ -532,7 +555,7 @@ public class Project {
*/ */
public String getUserProperty(String name) { public String getUserProperty(String name) {
if (name == null) { if (name == null) {
return null;
return null;
} }
String property = (String) userProperties.get(name); String property = (String) userProperties.get(name);
return property; return property;
@@ -573,6 +596,54 @@ public class Project {
return propertiesCopy; return propertiesCopy;
} }


/**
* Copies all user properties that have been set on the command
* line or a GUI tool from this instance to the Project instance
* given as the argument.
*
* <p>To copy all "user" properties, you will also have to call
* {@link #copyInheritedProperties copyInheritedProperties}.</p>
*
* @param other the project to copy the properties to. Must not be null.
*
* @since Ant 1.5
*/
public void copyUserProperties(Project other) {
Enumeration e = userProperties.keys();
while (e.hasMoreElements()) {
Object arg = e.nextElement();
if (inheritedProperties.containsKey(arg)) {
continue;
}
Object value = userProperties.get(arg);
other.setUserProperty(arg.toString(), value.toString());
}
}

/**
* Copies all user properties that have not been set on the
* command line or a GUI tool from this instance to the Project
* instance given as the argument.
*
* <p>To copy all "user" properties, you will also have to call
* {@link #copyUserProperties copyUserProperties}.</p>
*
* @param other the project to copy the properties to. Must not be null.
*
* @since Ant 1.5
*/
public void copyInheritedProperties(Project other) {
Enumeration e = inheritedProperties.keys();
while (e.hasMoreElements()) {
String arg = e.nextElement().toString();
if (other.getUserProperty(arg) != null) {
continue;
}
Object value = inheritedProperties.get(arg);
other.setInheritedProperty(arg, value.toString());
}
}

/** /**
* Sets the default target of the project. * Sets the default target of the project.
* *
@@ -818,8 +889,26 @@ public class Project {
MSG_VERBOSE); MSG_VERBOSE);
return; return;
} else { } else {
int logLevel = MSG_WARN;
if (old.getName().equals(taskClass.getName())) {
ClassLoader oldLoader = old.getClassLoader();
ClassLoader newLoader = taskClass.getClassLoader();
// system classloader on older JDKs can be null
if (oldLoader != null
&& newLoader != null
&& oldLoader instanceof AntClassLoader
&& newLoader instanceof AntClassLoader
&& ((AntClassLoader) oldLoader).getClasspath()
.equals(((AntClassLoader) newLoader).getClasspath())
) {
// same classname loaded from the same
// classpath components
logLevel = MSG_VERBOSE;
}
}

log("Trying to override old definition of task " + taskName, log("Trying to override old definition of task " + taskName,
MSG_WARN);
logLevel);
invalidateCreatedTasks(taskName); invalidateCreatedTasks(taskName);
} }
} }
@@ -893,23 +982,24 @@ public class Project {
* Must not be <code>null</code>. * Must not be <code>null</code>.
*/ */
public void addDataTypeDefinition(String typeName, Class typeClass) { public void addDataTypeDefinition(String typeName, Class typeClass) {
Class old = (Class) dataClassDefinitions.get(typeName);
if (null != old) {
if (old.equals(typeClass)) {
log("Ignoring override for datatype " + typeName
+ ", it is already defined by the same class.",
MSG_VERBOSE);
return;
} else {
log("Trying to override old definition of datatype "
+ typeName, MSG_WARN);
synchronized(dataClassDefinitions) {
Class old = (Class) dataClassDefinitions.get(typeName);
if (null != old) {
if (old.equals(typeClass)) {
log("Ignoring override for datatype " + typeName
+ ", it is already defined by the same class.",
MSG_VERBOSE);
return;
} else {
log("Trying to override old definition of datatype "
+ typeName, MSG_WARN);
}
} }
dataClassDefinitions.put(typeName, typeClass);
} }

String msg = " +User datatype: " + typeName + " " String msg = " +User datatype: " + typeName + " "
+ typeClass.getName(); + typeClass.getName();
log(msg, MSG_DEBUG); log(msg, MSG_DEBUG);
dataClassDefinitions.put(typeName, typeClass);
} }


/** /**
@@ -1677,22 +1767,24 @@ public class Project {
* @param value The value of the reference. Must not be <code>null</code>. * @param value The value of the reference. Must not be <code>null</code>.
*/ */
public void addReference(String name, Object value) { public void addReference(String name, Object value) {
Object old = references.get(name);
if (old == value) {
// no warning, this is not changing anything
return;
}
if (old != null) {
log("Overriding previous definition of reference to " + name,
MSG_WARN);
synchronized (references) {
Object old = references.get(name);
if (old == value) {
// no warning, this is not changing anything
return;
}
if (old != null) {
log("Overriding previous definition of reference to " + name,
MSG_WARN);
}
log("Adding reference: " + name + " -> " + value, MSG_DEBUG);
references.put(name, value);
} }
log("Adding reference: " + name + " -> " + value, MSG_DEBUG);
references.put(name, value);
} }


/** /**
* Returns a map of the references in the project (String to Object). * Returns a map of the references in the project (String to Object).
* The returned hashtable is "live" and so should not be modified.
* The returned hashtable is "live" and so must not be modified.
* *
* @return a map of the references in the project (String to Object). * @return a map of the references in the project (String to Object).
*/ */
@@ -1757,6 +1849,7 @@ public class Project {
*/ */
public void fireBuildStarted() { public void fireBuildStarted() {
BuildEvent event = new BuildEvent(this); BuildEvent event = new BuildEvent(this);
Vector listeners = getBuildListeners();
for (int i = 0; i < listeners.size(); i++) { for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i); BuildListener listener = (BuildListener) listeners.elementAt(i);
listener.buildStarted(event); listener.buildStarted(event);
@@ -1772,6 +1865,7 @@ public class Project {
public void fireBuildFinished(Throwable exception) { public void fireBuildFinished(Throwable exception) {
BuildEvent event = new BuildEvent(this); BuildEvent event = new BuildEvent(this);
event.setException(exception); event.setException(exception);
Vector listeners = getBuildListeners();
for (int i = 0; i < listeners.size(); i++) { for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i); BuildListener listener = (BuildListener) listeners.elementAt(i);
listener.buildFinished(event); listener.buildFinished(event);
@@ -1787,6 +1881,7 @@ public class Project {
*/ */
protected void fireTargetStarted(Target target) { protected void fireTargetStarted(Target target) {
BuildEvent event = new BuildEvent(target); BuildEvent event = new BuildEvent(target);
Vector listeners = getBuildListeners();
for (int i = 0; i < listeners.size(); i++) { for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i); BuildListener listener = (BuildListener) listeners.elementAt(i);
listener.targetStarted(event); listener.targetStarted(event);
@@ -1806,6 +1901,7 @@ public class Project {
protected void fireTargetFinished(Target target, Throwable exception) { protected void fireTargetFinished(Target target, Throwable exception) {
BuildEvent event = new BuildEvent(target); BuildEvent event = new BuildEvent(target);
event.setException(exception); event.setException(exception);
Vector listeners = getBuildListeners();
for (int i = 0; i < listeners.size(); i++) { for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i); BuildListener listener = (BuildListener) listeners.elementAt(i);
listener.targetFinished(event); listener.targetFinished(event);
@@ -1822,6 +1918,7 @@ public class Project {
// register this as the current task on the current thread. // register this as the current task on the current thread.
registerThreadTask(Thread.currentThread(), task); registerThreadTask(Thread.currentThread(), task);
BuildEvent event = new BuildEvent(task); BuildEvent event = new BuildEvent(task);
Vector listeners = getBuildListeners();
for (int i = 0; i < listeners.size(); i++) { for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i); BuildListener listener = (BuildListener) listeners.elementAt(i);
listener.taskStarted(event); listener.taskStarted(event);
@@ -1844,6 +1941,7 @@ public class Project {
System.err.flush(); System.err.flush();
BuildEvent event = new BuildEvent(task); BuildEvent event = new BuildEvent(task);
event.setException(exception); event.setException(exception);
Vector listeners = getBuildListeners();
for (int i = 0; i < listeners.size(); i++) { for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i); BuildListener listener = (BuildListener) listeners.elementAt(i);
listener.taskFinished(event); listener.taskFinished(event);
@@ -1863,6 +1961,7 @@ public class Project {
private void fireMessageLoggedEvent(BuildEvent event, String message, private void fireMessageLoggedEvent(BuildEvent event, String message,
int priority) { int priority) {
event.setMessage(message, priority); event.setMessage(message, priority);
Vector listeners = getBuildListeners();
for (int i = 0; i < listeners.size(); i++) { for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i); BuildListener listener = (BuildListener) listeners.elementAt(i);
listener.messageLogged(event); listener.messageLogged(event);
@@ -1919,9 +2018,9 @@ public class Project {
* *
* @param thread the thread on which the task is registered. * @param thread the thread on which the task is registered.
* @param task the task to be registered. * @param task the task to be registered.
* @since 1.102, Ant 1.5
* @since Ant 1.5
*/ */
public void registerThreadTask(Thread thread, Task task) {
public synchronized void registerThreadTask(Thread thread, Task task) {
if (task != null) { if (task != null) {
threadTasks.put(thread, task); threadTasks.put(thread, task);
} else { } else {


+ 65
- 28
src/main/org/apache/tools/ant/RuntimeConfigurable.java View File

@@ -61,8 +61,8 @@ import org.xml.sax.AttributeList;
import org.xml.sax.helpers.AttributeListImpl; import org.xml.sax.helpers.AttributeListImpl;


/** /**
* Wrapper class that holds the attributes of an element, its children, and
* any text within it. It then takes care of configuring that element at
* Wrapper class that holds the attributes of an element, its children, and
* any text within it. It then takes care of configuring that element at
* runtime. * runtime.
* *
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
@@ -79,10 +79,12 @@ public class RuntimeConfigurable {
private AttributeList attributes; private AttributeList attributes;
/** Text appearing within the element. */ /** Text appearing within the element. */
private StringBuffer characters = new StringBuffer(); private StringBuffer characters = new StringBuffer();
/** Indicates if the wrapped object has been configured */
private boolean proxyConfigured = false;


/** /**
* Sole constructor creating a wrapper for the specified object. * Sole constructor creating a wrapper for the specified object.
*
*
* @param proxy The element to configure. Must not be <code>null</code>. * @param proxy The element to configure. Must not be <code>null</code>.
* @param elementTag The tag name generating this element. * @param elementTag The tag name generating this element.
* Should not be <code>null</code>. * Should not be <code>null</code>.
@@ -90,21 +92,23 @@ public class RuntimeConfigurable {
public RuntimeConfigurable(Object proxy, String elementTag) { public RuntimeConfigurable(Object proxy, String elementTag) {
wrappedObject = proxy; wrappedObject = proxy;
this.elementTag = elementTag; this.elementTag = elementTag;
proxyConfigured = false;
} }


/** /**
* Sets the element to configure. This is used when the real type of
* Sets the element to configure. This is used when the real type of
* an element isn't known at the time of wrapper creation. * an element isn't known at the time of wrapper creation.
*
*
* @param proxy The element to configure. Must not be <code>null</code>. * @param proxy The element to configure. Must not be <code>null</code>.
*/ */
void setProxy(Object proxy) { void setProxy(Object proxy) {
wrappedObject = proxy; wrappedObject = proxy;
proxyConfigured = false;
} }


/** /**
* Sets the attributes for the wrapped element. * Sets the attributes for the wrapped element.
*
*
* @param attributes List of attributes defined in the XML for this * @param attributes List of attributes defined in the XML for this
* element. May be <code>null</code>. * element. May be <code>null</code>.
*/ */
@@ -114,7 +118,7 @@ public class RuntimeConfigurable {


/** /**
* Returns the list of attributes for the wrapped element. * Returns the list of attributes for the wrapped element.
*
*
* @return An AttributeList representing the attributes defined in the * @return An AttributeList representing the attributes defined in the
* XML for this element. May be <code>null</code>. * XML for this element. May be <code>null</code>.
*/ */
@@ -124,7 +128,7 @@ public class RuntimeConfigurable {


/** /**
* Adds a child element to the wrapped element. * Adds a child element to the wrapped element.
*
*
* @param child The child element wrapper to add to this one. * @param child The child element wrapper to add to this one.
* Must not be <code>null</code>. * Must not be <code>null</code>.
*/ */
@@ -134,9 +138,9 @@ public class RuntimeConfigurable {


/** /**
* Returns the child wrapper at the specified position within the list. * Returns the child wrapper at the specified position within the list.
*
*
* @param index The index of the child to return. * @param index The index of the child to return.
*
*
* @return The child wrapper at position <code>index</code> within the * @return The child wrapper at position <code>index</code> within the
* list. * list.
*/ */
@@ -146,8 +150,8 @@ public class RuntimeConfigurable {


/** /**
* Adds characters from #PCDATA areas to the wrapped element. * Adds characters from #PCDATA areas to the wrapped element.
*
* @param data Text to add to the wrapped element.
*
* @param data Text to add to the wrapped element.
* Should not be <code>null</code>. * Should not be <code>null</code>.
*/ */
public void addText(String data) { public void addText(String data) {
@@ -156,12 +160,12 @@ public class RuntimeConfigurable {


/** /**
* Adds characters from #PCDATA areas to the wrapped element. * Adds characters from #PCDATA areas to the wrapped element.
*
*
* @param buf A character array of the text within the element. * @param buf A character array of the text within the element.
* Must not be <code>null</code>. * Must not be <code>null</code>.
* @param start The start element in the array. * @param start The start element in the array.
* @param count The number of characters to read from the array. * @param count The number of characters to read from the array.
*
*
*/ */
public void addText(char[] buf, int start, int count) { public void addText(char[] buf, int start, int count) {
addText(new String(buf, start, count)); addText(new String(buf, start, count));
@@ -169,7 +173,7 @@ public class RuntimeConfigurable {


/** /**
* Returns the tag name of the wrapped element. * Returns the tag name of the wrapped element.
*
*
* @return The tag name of the wrapped element. This is unlikely * @return The tag name of the wrapped element. This is unlikely
* to be <code>null</code>, but may be. * to be <code>null</code>, but may be.
*/ */
@@ -183,47 +187,80 @@ public class RuntimeConfigurable {
* and then each child is configured and added. Each time the * and then each child is configured and added. Each time the
* wrapper is configured, the attributes and text for it are * wrapper is configured, the attributes and text for it are
* reset. * reset.
*
*
* If the element has an <code>id</code> attribute, a reference * If the element has an <code>id</code> attribute, a reference
* is added to the project as well. * is added to the project as well.
*
* @param p The project containing the wrapped element.
*
* @param p The project containing the wrapped element.
* Must not be <code>null</code>. * Must not be <code>null</code>.
*
*
* @exception BuildException if the configuration fails, for instance due * @exception BuildException if the configuration fails, for instance due
* to invalid attributes or children, or text being added to * to invalid attributes or children, or text being added to
* an element which doesn't accept it. * an element which doesn't accept it.
*/ */
public void maybeConfigure(Project p) throws BuildException { public void maybeConfigure(Project p) throws BuildException {
maybeConfigure(p, true);
}

/**
* Configures the wrapped element. The attributes and text for
* the wrapped element are configured. Each time the wrapper is
* configured, the attributes and text for it are reset.
*
* If the element has an <code>id</code> attribute, a reference
* is added to the project as well.
*
* @param p The project containing the wrapped element.
* Must not be <code>null</code>.
*
* @param configureChildren Whether to configure child elements as
* well. if true, child elements will be configured after the
* wrapped element.
*
* @exception BuildException if the configuration fails, for instance due
* to invalid attributes or children, or text being added to
* an element which doesn't accept it.
*/
public void maybeConfigure(Project p, boolean configureChildren)
throws BuildException {
String id = null; String id = null;


if (proxyConfigured) {
return;
}

if (attributes != null) { if (attributes != null) {
ProjectHelper.configure(wrappedObject, attributes, p); ProjectHelper.configure(wrappedObject, attributes, p);
id = attributes.getValue("id"); id = attributes.getValue("id");
attributes = null;
} }
if (characters.length() != 0) { if (characters.length() != 0) {
ProjectHelper.addText(p, wrappedObject, characters.toString()); ProjectHelper.addText(p, wrappedObject, characters.toString());
characters.setLength(0);
} }
Enumeration enum = children.elements(); Enumeration enum = children.elements();
while (enum.hasMoreElements()) { while (enum.hasMoreElements()) {
RuntimeConfigurable child
RuntimeConfigurable child
= (RuntimeConfigurable) enum.nextElement(); = (RuntimeConfigurable) enum.nextElement();
if (child.wrappedObject instanceof Task) { if (child.wrappedObject instanceof Task) {
Task childTask = (Task) child.wrappedObject; Task childTask = (Task) child.wrappedObject;
childTask.setRuntimeConfigurableWrapper(child); childTask.setRuntimeConfigurableWrapper(child);
childTask.maybeConfigure();
} else {
child.maybeConfigure(p);
} }
ProjectHelper.storeChild(p, wrappedObject, child.wrappedObject,
child.getElementTag().toLowerCase(Locale.US));
}


if (configureChildren) {
if (child.wrappedObject instanceof Task) {
Task childTask = (Task) child.wrappedObject;
childTask.maybeConfigure();
} else {
child.maybeConfigure(p);
}
ProjectHelper.storeChild(p, wrappedObject, child.wrappedObject,
child.getElementTag()
.toLowerCase(Locale.US));
}
}
if (id != null) { if (id != null) {
p.addReference(id, wrappedObject); p.addReference(id, wrappedObject);
} }
proxyConfigured = true;
} }


} }

+ 9
- 0
src/main/org/apache/tools/ant/Task.java View File

@@ -341,6 +341,15 @@ public abstract class Task extends ProjectComponent {
invalid = true; invalid = true;
} }


/**
* Has this task been marked invalid?
*
* @since Ant 1.5
*/
protected final boolean isInvalid() {
return invalid;
}

/** /**
* Replacement element used if this task is invalidated. * Replacement element used if this task is invalidated.
*/ */


+ 17
- 22
src/main/org/apache/tools/ant/UnknownElement.java View File

@@ -95,7 +95,7 @@ public class UnknownElement extends Task {
/** /**
* Returns the name of the XML element which generated this unknown * Returns the name of the XML element which generated this unknown
* element. * element.
*
*
* @return the name of the XML element which generated this unknown * @return the name of the XML element which generated this unknown
* element. * element.
*/ */
@@ -105,7 +105,7 @@ public class UnknownElement extends Task {


/** /**
* Creates the real object instance and child elements, then configures * Creates the real object instance and child elements, then configures
* the attributes and text of the real object. This unknown element
* the attributes and text of the real object. This unknown element
* is then replaced with the real object in the containing target's list * is then replaced with the real object in the containing target's list
* of children. * of children.
* *
@@ -122,11 +122,6 @@ public class UnknownElement extends Task {
handleChildren(realThing, wrapper); handleChildren(realThing, wrapper);


wrapper.maybeConfigure(project); wrapper.maybeConfigure(project);
if (realThing instanceof Task) {
target.replaceChild(this, (Task) realThing);
} else {
target.replaceChild(this, wrapper);
}
} }


/** /**
@@ -141,7 +136,7 @@ public class UnknownElement extends Task {
super.handleOutput(line); super.handleOutput(line);
} }
} }
/** /**
* Handles error output sent to System.err by this task or its real task. * Handles error output sent to System.err by this task or its real task.
* *
@@ -154,7 +149,7 @@ public class UnknownElement extends Task {
super.handleErrorOutput(line); super.handleErrorOutput(line);
} }
} }
/** /**
* Executes the real object if it's a task. If it's not a task * Executes the real object if it's a task. If it's not a task
* (e.g. a data type) then this method does nothing. * (e.g. a data type) then this method does nothing.
@@ -185,13 +180,13 @@ public class UnknownElement extends Task {
* Creates child elements, creates children of the children * Creates child elements, creates children of the children
* (recursively), and sets attributes of the child elements. * (recursively), and sets attributes of the child elements.
* *
* @param parent The configured object for the parent.
* @param parent The configured object for the parent.
* Must not be <code>null</code>. * Must not be <code>null</code>.
*
*
* @param parentWrapper The wrapper containing child wrappers * @param parentWrapper The wrapper containing child wrappers
* to be configured. Must not be <code>null</code> * to be configured. Must not be <code>null</code>
* if there are any children. * if there are any children.
*
*
* @exception BuildException if the children cannot be configured. * @exception BuildException if the children cannot be configured.
*/ */
protected void handleChildren(Object parent, protected void handleChildren(Object parent,
@@ -231,13 +226,13 @@ public class UnknownElement extends Task {
} }


/** /**
* Creates a named task or data type. If the real object is a task,
* Creates a named task or data type. If the real object is a task,
* it is configured up to the init() stage. * it is configured up to the init() stage.
*
*
* @param ue The unknown element to create the real object for. * @param ue The unknown element to create the real object for.
* Must not be <code>null</code>. * Must not be <code>null</code>.
* @param w Ignored in this implementation. * @param w Ignored in this implementation.
*
*
* @return the task or data type represented by the given unknown element. * @return the task or data type represented by the given unknown element.
*/ */
protected Object makeObject(UnknownElement ue, RuntimeConfigurable w) { protected Object makeObject(UnknownElement ue, RuntimeConfigurable w) {
@@ -253,7 +248,7 @@ public class UnknownElement extends Task {


/** /**
* Creates a named task and configures it up to the init() stage. * Creates a named task and configures it up to the init() stage.
*
*
* @param ue The UnknownElement to create the real task for. * @param ue The UnknownElement to create the real task for.
* Must not be <code>null</code>. * Must not be <code>null</code>.
* @param w Ignored. * @param w Ignored.
@@ -261,8 +256,8 @@ public class UnknownElement extends Task {
* a task. If this is <code>true</code> and the * a task. If this is <code>true</code> and the
* task name is not recognised, a BuildException * task name is not recognised, a BuildException
* is thrown. * is thrown.
*
* @return the task specified by the given unknown element, or
*
* @return the task specified by the given unknown element, or
* <code>null</code> if the task name is not recognised and * <code>null</code> if the task name is not recognised and
* onTopLevel is <code>false</code>. * onTopLevel is <code>false</code>.
*/ */
@@ -285,13 +280,13 @@ public class UnknownElement extends Task {
/** /**
* Returns a very verbose exception for when a task/data type cannot * Returns a very verbose exception for when a task/data type cannot
* be found. * be found.
*
*
* @param what The kind of thing being created. For example, when * @param what The kind of thing being created. For example, when
* a task name could not be found, this would be * a task name could not be found, this would be
* <code>"task"</code>. Should not be <code>null</code>. * <code>"task"</code>. Should not be <code>null</code>.
* @param elementName The name of the element which could not be found. * @param elementName The name of the element which could not be found.
* Should not be <code>null</code>. * Should not be <code>null</code>.
*
*
* @return a detailed description of what might have caused the problem. * @return a detailed description of what might have caused the problem.
*/ */
protected BuildException getNotFoundException(String what, protected BuildException getNotFoundException(String what,
@@ -320,7 +315,7 @@ public class UnknownElement extends Task {
+ " Fix: upgrade to at least the latest release version of Ant" + lSep + " Fix: upgrade to at least the latest release version of Ant" + lSep
+ " - The task is not an Ant core or optional task " + lSep + " - The task is not an Ant core or optional task " + lSep
+ " and needs to be declared using <taskdef>." + lSep + " and needs to be declared using <taskdef>." + lSep
+ lSep
+ lSep
+ "Remember that for JAR files to be visible to Ant tasks implemented" + lSep + "Remember that for JAR files to be visible to Ant tasks implemented" + lSep
+ "in ANT_HOME/lib, the files must be in the same directory or on the" + lSep + "in ANT_HOME/lib, the files must be in the same directory or on the" + lSep
+ "classpath" + lSep + "classpath" + lSep
@@ -346,7 +341,7 @@ public class UnknownElement extends Task {
/** /**
* Returns the task instance after it has been created and if it is a task. * Returns the task instance after it has been created and if it is a task.
* *
* @return a task instance or <code>null</code> if the real object is not
* @return a task instance or <code>null</code> if the real object is not
* a task. * a task.
*/ */
public Task getTask() { public Task getTask() {


+ 0
- 4
src/main/org/apache/tools/ant/filters/LineContains.java View File

@@ -155,10 +155,6 @@ public final class LineContains
break; break;
} }
} }
line = readLine();
}
if (goodLine != null) {
line = goodLine;
return read(); return read();
}; };
} }


+ 76
- 0
src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java View File

@@ -424,6 +424,11 @@ public abstract class AbstractCvsTask extends Task {
return stringBuffer.toString(); return stringBuffer.toString();
} }


/**
* The CVSROOT variable.
*
* @param root
*/
public void setCvsRoot(String root) { public void setCvsRoot(String root) {


// Check if not real cvsroot => set it to null // Check if not real cvsroot => set it to null
@@ -441,6 +446,11 @@ public abstract class AbstractCvsTask extends Task {
return this.cvsRoot; return this.cvsRoot;
} }


/**
* The CVS_RSH variable.
*
* @param rsh
*/
public void setCvsRsh(String rsh) { public void setCvsRsh(String rsh) {
// Check if not real cvsrsh => set it to null // Check if not real cvsrsh => set it to null
if (rsh != null) { if (rsh != null) {
@@ -457,6 +467,11 @@ public abstract class AbstractCvsTask extends Task {
return this.cvsRsh; return this.cvsRsh;
} }


/**
* Port used by CVS to communicate with the server.
*
* @param port
*/
public void setPort(int port){ public void setPort(int port){
this.port = port; this.port = port;
} }
@@ -466,6 +481,11 @@ public abstract class AbstractCvsTask extends Task {
return this.port; return this.port;
} }


/**
* Password file to read passwords from.
*
* @param passFile
*/
public void setPassfile(File passFile){ public void setPassfile(File passFile){
this.passFile = passFile; this.passFile = passFile;
} }
@@ -475,6 +495,11 @@ public abstract class AbstractCvsTask extends Task {
return this.passFile; return this.passFile;
} }


/**
* The directory where the checked out files should be placed.
*
* @param dest
*/
public void setDest(File dest) { public void setDest(File dest) {
this.dest = dest; this.dest = dest;
} }
@@ -484,6 +509,11 @@ public abstract class AbstractCvsTask extends Task {
return this.dest; return this.dest;
} }


/**
* The package/module to operate upon.
*
* @param p
*/
public void setPackage(String p) { public void setPackage(String p) {
this.cvsPackage = p; this.cvsPackage = p;
} }
@@ -493,6 +523,10 @@ public abstract class AbstractCvsTask extends Task {
return this.cvsPackage; return this.cvsPackage;
} }


/**
* The tag of the package/module to operate upon.
* @param p
*/
public void setTag(String p) { public void setTag(String p) {
// Check if not real tag => set it to null // Check if not real tag => set it to null
if (p != null && p.trim().length() > 0) { if (p != null && p.trim().length() > 0) {
@@ -514,6 +548,10 @@ public abstract class AbstractCvsTask extends Task {
} }




/**
* Use the most recent revision no later than the given date.
* @param p
*/
public void setDate(String p) { public void setDate(String p) {
if (p != null && p.trim().length() > 0) { if (p != null && p.trim().length() > 0) {
addCommandArgument("-D"); addCommandArgument("-D");
@@ -521,6 +559,10 @@ public abstract class AbstractCvsTask extends Task {
} }
} }


/**
* The CVS command to execute.
* @param c
*/
public void setCommand(String c) { public void setCommand(String c) {
this.command = c; this.command = c;
} }
@@ -528,26 +570,54 @@ public abstract class AbstractCvsTask extends Task {
return this.command; return this.command;
} }


/**
* If true, suppress informational messages.
* @param q
*/
public void setQuiet(boolean q) { public void setQuiet(boolean q) {
quiet = q; quiet = q;
} }


/**
* If true, report only and don't change any files.
*
* @param ne
*/
public void setNoexec(boolean ne) { public void setNoexec(boolean ne) {
noexec = ne; noexec = ne;
} }


/**
* The file to direct standard output from the command.
* @param output
*/
public void setOutput(File output) { public void setOutput(File output) {
this.output = output; this.output = output;
} }


/**
* The file to direct standard error from the command.
*
* @param error
*/
public void setError(File error) { public void setError(File error) {
this.error = error; this.error = error;
} }


/**
* Whether to append output/error when redirecting to a file.
* @param value
*/
public void setAppend(boolean value){ public void setAppend(boolean value){
this.append = value; this.append = value;
} }


/**
* Stop the build process if the command exits with
* a return code other than 0.
* Defaults to false.
* @param failOnError
*/
public void setFailOnError(boolean failOnError) { public void setFailOnError(boolean failOnError) {
this.failOnError = failOnError; this.failOnError = failOnError;
} }
@@ -581,6 +651,10 @@ public abstract class AbstractCvsTask extends Task {
vecCommandlines.removeElement(c); vecCommandlines.removeElement(c);
} }


/**
* Adds direct command-line to execute.
* @param c
*/
public void addConfiguredCommandline(Commandline c) { public void addConfiguredCommandline(Commandline c) {
this.addConfiguredCommandline(c, false); this.addConfiguredCommandline(c, false);
} }
@@ -611,6 +685,8 @@ public abstract class AbstractCvsTask extends Task {
} }


/** /**
* If true, this is the same as compressionlevel="3".
*
* @param usecomp If true, turns on compression using default * @param usecomp If true, turns on compression using default
* level, AbstractCvsTask.DEFAULT_COMPRESSION_LEVEL. * level, AbstractCvsTask.DEFAULT_COMPRESSION_LEVEL.
*/ */


+ 30
- 28
src/main/org/apache/tools/ant/taskdefs/Ant.java View File

@@ -130,18 +130,16 @@ public class Ant extends Task {
private PrintStream out = null; private PrintStream out = null;


/** /**
* If true, inherit all properties from parent Project
* If false, inherit only userProperties and those defined
* inside the ant call itself
* If true, pass all properties to the new Ant project.
* Defaults to true.
*/ */
public void setInheritAll(boolean value) { public void setInheritAll(boolean value) {
inheritAll = value; inheritAll = value;
} }


/** /**
* If true, inherit all references from parent Project
* If false, inherit only those defined
* inside the ant call itself
* If true, pass all references to the new Ant project.
* Defaults to false.
*/ */
public void setInheritRefs(boolean value) { public void setInheritRefs(boolean value) {
inheritRefs = value; inheritRefs = value;
@@ -255,14 +253,8 @@ public class Ant extends Task {
newProject.addDataTypeDefinition(typeName, typeClass); newProject.addDataTypeDefinition(typeName, typeClass);
} }


// set user-defined
Hashtable props = getProject().getUserProperties();
e = props.keys();
while (e.hasMoreElements()) {
String arg = e.nextElement().toString();
String value = props.get(arg).toString();
newProject.setUserProperty(arg, value);
}
// set user-defined properties
getProject().copyUserProperties(newProject);


if (!inheritAll) { if (!inheritAll) {
// set Java built-in properties separately, // set Java built-in properties separately,
@@ -272,7 +264,7 @@ public class Ant extends Task {
} else { } else {
// set all properties from calling project // set all properties from calling project


props = getProject().getProperties();
Hashtable props = getProject().getProperties();
e = props.keys(); e = props.keys();
while (e.hasMoreElements()) { while (e.hasMoreElements()) {
String arg = e.nextElement().toString(); String arg = e.nextElement().toString();
@@ -280,10 +272,12 @@ public class Ant extends Task {
// basedir and ant.file get special treatment in execute() // basedir and ant.file get special treatment in execute()
continue; continue;
} }

String value = props.get(arg).toString(); String value = props.get(arg).toString();
// don't re-set user properties, avoid the warning message
if (newProject.getProperty(arg) == null){ if (newProject.getProperty(arg) == null){
// no user property // no user property
newProject.setProperty(arg, value);
newProject.setNewProperty(arg, value);
} }
} }
} }
@@ -399,6 +393,7 @@ public class Ant extends Task {
p.setProject(newProject); p.setProject(newProject);
p.execute(); p.execute();
} }
getProject().copyInheritedProperties(newProject);
} }


/** /**
@@ -492,16 +487,19 @@ public class Ant extends Task {
} }


/** /**
* Set the dir attribute.
* The directory to use as a basedir for the new Ant project.
* Defaults to the current project's basedir, unless inheritall
* has been set to false, in which case it doesn't have a default
* value. This will override the basedir setting of the called project.
*/ */
public void setDir(File d) { public void setDir(File d) {
this.dir = d; this.dir = d;
} }


/** /**
* set the build file, it can be either absolute or relative.
* If it is absolute, <tt>dir</tt> will be ignored, if it is
* relative it will be resolved relative to <tt>dir</tt>.
* The build file to use.
* Defaults to "build.xml". This file is expected to be a filename relative
* to the dir attribute given.
*/ */
public void setAntfile(String s) { public void setAntfile(String s) {
// @note: it is a string and not a file to handle relative/absolute // @note: it is a string and not a file to handle relative/absolute
@@ -511,23 +509,27 @@ public class Ant extends Task {
} }


/** /**
* set the target to execute. If none is defined it will
* execute the default target of the build file
* The target of the new Ant project to execute.
* Defaults to the new project's default target.
*/ */
public void setTarget(String s) { public void setTarget(String s) {
this.target = s; this.target = s;
} }


/** /**
* Set the name of a log file. This will be resolved relative to
* the dir attribute if specified, relative to the current
* project's basedir otherwise.
* Filename to write the output to.
* This is relative to the value of the dir attribute
* if it has been set or to the base directory of the
* current project otherwise.
*/ */
public void setOutput(String s) { public void setOutput(String s) {
this.output = s; this.output = s;
} }


/** create a property to pass to the new project as a 'user property' */
/**
* Property to pass to the new project.
* The property is passed as a 'user property'
*/
public Property createProperty() { public Property createProperty() {
if (newProject == null) { if (newProject == null) {
reinit(); reinit();
@@ -540,8 +542,8 @@ public class Ant extends Task {
} }


/** /**
* create a reference element that identifies a data type that
* should be carried over to the new project.
* Reference element identifying a data type to carry
* over to the new project.
*/ */
public void addReference(Reference r) { public void addReference(Reference r) {
references.addElement(r); references.addElement(r);


+ 7
- 8
src/main/org/apache/tools/ant/taskdefs/Available.java View File

@@ -94,7 +94,7 @@ public class Available extends Task implements Condition {
private boolean ignoreSystemclasses = false; private boolean ignoreSystemclasses = false;


/** /**
* Set the classpath to be used when searching for classes and resources
* Set the classpath to be used when searching for classes and resources.
* *
* @param classpath an Ant Path object containing the search path. * @param classpath an Ant Path object containing the search path.
*/ */
@@ -103,8 +103,7 @@ public class Available extends Task implements Condition {
} }


/** /**
* Create a classpath object to be configured by Ant. The resulting
* path will be used when searching for classes or resources
* Classpath to be used when searching for classes and resources.
* *
* @return an empty Path instance to be configured by Ant. * @return an empty Path instance to be configured by Ant.
*/ */
@@ -126,7 +125,7 @@ public class Available extends Task implements Condition {
} }


/** /**
* Set the path to use when looking for a file
* Set the path to use when looking for a file.
* *
* @param filepath a Path instance containing the search path for files. * @param filepath a Path instance containing the search path for files.
*/ */
@@ -135,7 +134,7 @@ public class Available extends Task implements Condition {
} }


/** /**
* Create a filepath to be configured by Ant.
* Path to search for file resources.
* *
* @return a new Path instance which Ant will configure with a file search * @return a new Path instance which Ant will configure with a file search
* path. * path.
@@ -158,7 +157,7 @@ public class Available extends Task implements Condition {
} }


/** /**
* Set the value to be given to the property of the desired resource is
* Set the value to be given to the property if the desired resource is
* available. * available.
* *
* @param value the value to be given. * @param value the value to be given.
@@ -191,7 +190,7 @@ public class Available extends Task implements Condition {
} }


/** /**
* Set the name of a Java resouirce which is required to set the property.
* Set the name of a Java resource which is required to set the property.
* *
* @param resource the name of a resource which is required to be available. * @param resource the name of a resource which is required to be available.
*/ */
@@ -213,7 +212,7 @@ public class Available extends Task implements Condition {
} }


/** /**
* Set what type of file is required - either a directory or a file.
* Set what type of file is required - either directory or file.
* *
* @param type an instance of the FileDir enumeratedAttribute indicating * @param type an instance of the FileDir enumeratedAttribute indicating
* whether the file required is to be a directory or a plain * whether the file required is to be a directory or a plain


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/BZip2.java View File

@@ -62,7 +62,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.bzip2.CBZip2OutputStream; import org.apache.tools.bzip2.CBZip2OutputStream;


/** /**
* Compresses a file with the BZip2 algorithm. Normally used to compress
* Compresses a file with the BZIP2 algorithm. Normally used to compress
* non-compressed archives such as TAR files. * non-compressed archives such as TAR files.
* *
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a> * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>


+ 9
- 3
src/main/org/apache/tools/ant/taskdefs/Basename.java View File

@@ -94,17 +94,23 @@ public class Basename extends Task {
private String property; private String property;
private String suffix; private String suffix;


// The setter for the `file' attribute
/**
* File or directory to get base name from.
*/
public void setFile(File file) { public void setFile(File file) {
this.file = file; this.file = file;
} }


// The setter for the `property' attribute
/**
* Property to set base name to.
*/
public void setProperty(String property) { public void setProperty(String property) {
this.property = property ; this.property = property ;
} }


// The setter for the `suffix' attribute
/**
* Optional suffix to remove from base name.
*/
public void setSuffix(String suffix) { public void setSuffix(String suffix) {
this.suffix = suffix; this.suffix = suffix;
} }


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/BuildNumber.java View File

@@ -89,7 +89,7 @@ public class BuildNumber




/** /**
* Specify the file in which the build numberis stored. Defaults to
* The file in which the build number is stored. Defaults to
* "build.number" if not specified. * "build.number" if not specified.
* *
* @param file the file in which build number is stored. * @param file the file in which build number is stored.


+ 7
- 7
src/main/org/apache/tools/ant/taskdefs/CVSPass.java View File

@@ -1,7 +1,7 @@
/* /*
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved. * reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ import java.io.IOException;
*/ */
public class CVSPass extends Task { public class CVSPass extends Task {
/** CVS Root */ /** CVS Root */
private String cvsRoot = null;
private String cvsRoot = null;
/** Password file to add password to */ /** Password file to add password to */
private File passFile = null; private File passFile = null;
/** Password to add to file */ /** Password to add to file */
@@ -103,7 +103,7 @@ public class CVSPass extends Task {
192, 159, 244, 239, 185, 168, 215, 144, 139, 165, 180, 157, 147, 186, 214, 176, 192, 159, 244, 239, 185, 168, 215, 144, 139, 165, 180, 157, 147, 186, 214, 176,
227, 231, 219, 169, 175, 156, 206, 198, 129, 164, 150, 210, 154, 177, 134, 127, 227, 231, 219, 169, 175, 156, 206, 198, 129, 164, 150, 210, 154, 177, 134, 127,
182, 128, 158, 208, 162, 132, 167, 209, 149, 241, 153, 251, 237, 236, 171, 195, 182, 128, 158, 208, 162, 132, 167, 209, 149, 241, 153, 251, 237, 236, 171, 195,
243, 233, 253, 240, 194, 250, 191, 155, 142, 137, 245, 235, 163, 242, 178, 152
243, 233, 253, 240, 194, 250, 191, 155, 142, 137, 245, 235, 163, 242, 178, 152
}; };


/** /**
@@ -150,7 +150,7 @@ public class CVSPass extends Task {
} }
} }


String pwdfile = buf.toString() + cvsRoot + " A"
String pwdfile = buf.toString() + cvsRoot + " A"
+ mangle(password); + mangle(password);


log("Writing -> " + pwdfile , Project.MSG_DEBUG); log("Writing -> " + pwdfile , Project.MSG_DEBUG);
@@ -181,21 +181,21 @@ public class CVSPass extends Task {
} }


/** /**
* Sets cvs root to be added to the password file
* The CVS repository to add an entry for.
*/ */
public void setCvsroot(String cvsRoot) { public void setCvsroot(String cvsRoot) {
this.cvsRoot = cvsRoot; this.cvsRoot = cvsRoot;
} }


/** /**
* Sets the password file attribute.
* Password file to add the entry to.
*/ */
public void setPassfile(File passFile) { public void setPassfile(File passFile) {
this.passFile = passFile; this.passFile = passFile;
} }


/** /**
* Sets the password attribute.
* Password to be added to the password file.
*/ */
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;


+ 10
- 11
src/main/org/apache/tools/ant/taskdefs/CallTarget.java View File

@@ -93,16 +93,16 @@ public class CallTarget extends Task {
private boolean inheritRefs = false; private boolean inheritRefs = false;


/** /**
* If true, inherit all properties from parent Project
* If false, inherit only userProperties and those defined
* inside the antcall call itself
**/
* If true, pass all properties to the new Ant project.
* Defaults to true.
*/
public void setInheritAll(boolean inherit) { public void setInheritAll(boolean inherit) {
inheritAll = inherit; inheritAll = inherit;
} }


/** /**
* set the inherit refs flag
* If true, pass all references to the new Ant project.
* Defaults to false
* @param inheritRefs new value * @param inheritRefs new value
*/ */
public void setInheritRefs(boolean inheritRefs) { public void setInheritRefs(boolean inheritRefs) {
@@ -145,7 +145,7 @@ public class CallTarget extends Task {
} }


/** /**
* Create a nested param element.
* Property to pass to the invoked target.
*/ */
public Property createParam() { public Property createParam() {
if (callee == null) { if (callee == null) {
@@ -154,10 +154,9 @@ public class CallTarget extends Task {
return callee.createProperty(); return callee.createProperty();
} }


/**
* create a reference element that identifies a data type that
* should be carried over to the new project.
*
/**
* Reference element identifying a data type to carry
* over to the invoked target.
* @since Ant 1.5 * @since Ant 1.5
*/ */
public void addReference(Ant.Reference r) { public void addReference(Ant.Reference r) {
@@ -168,7 +167,7 @@ public class CallTarget extends Task {
} }


/** /**
* Sets the target attribute, required.
* Target to execute, required.
*/ */
public void setTarget(String target) { public void setTarget(String target) {
subTarget = target; subTarget = target;


+ 22
- 11
src/main/org/apache/tools/ant/taskdefs/Checksum.java View File

@@ -73,8 +73,7 @@ import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.FileSet;


/** /**
* This task can be used to create checksums for files.
* It can also be used to verify checksums.
* Used to create or verify file checksums.
* *
* @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a> * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
* *
@@ -129,6 +128,10 @@ public class Checksum extends MatchingTask implements Condition {
* is this task being used as a nested condition element? * is this task being used as a nested condition element?
*/ */
private boolean isCondition; private boolean isCondition;
/**
* Size of the read buffer to use.
*/
private int readBufferSize = 8 * 1024;


/** /**
* Sets the file for which the checksum is to be calculated. * Sets the file for which the checksum is to be calculated.
@@ -138,8 +141,8 @@ public class Checksum extends MatchingTask implements Condition {
} }


/** /**
* Sets the MessageDigest algorithm to be used
* to calculate the checksum.
* Specifies the algorithm to be used to compute the checksum.
* Defaults to "MD5". Other popular algorithms like "SHA" may be used as well.
*/ */
public void setAlgorithm(String algorithm) { public void setAlgorithm(String algorithm) {
this.algorithm = algorithm; this.algorithm = algorithm;
@@ -154,22 +157,22 @@ public class Checksum extends MatchingTask implements Condition {
} }


/** /**
* Sets the File Extension that is be to used to
* create or identify destination file
* Sets the file extension that is be to used to
* create or identify destination file.
*/ */
public void setFileext(String fileext) { public void setFileext(String fileext) {
this.fileext = fileext; this.fileext = fileext;
} }


/** /**
* Sets the property to hold the generated checksum
* Sets the property to hold the generated checksum.
*/ */
public void setProperty(String property) { public void setProperty(String property) {
this.property = property; this.property = property;
} }


/** /**
* Sets verify property. This project property holds
* Sets the verify property. This project property holds
* the result of a checksum verification - "true" or "false" * the result of a checksum verification - "true" or "false"
*/ */
public void setVerifyproperty(String verifyProperty) { public void setVerifyproperty(String verifyProperty) {
@@ -186,7 +189,14 @@ public class Checksum extends MatchingTask implements Condition {
} }


/** /**
* Adds a set of files (nested fileset attribute).
* The size of the read buffer to use.
*/
public void setReadBufferSize(int size) {
this.readBufferSize = size;
}

/**
* Files to generate checksums for.
*/ */
public void addFileset(FileSet set) { public void addFileset(FileSet set) {
filesets.addElement(set); filesets.addElement(set);
@@ -356,6 +366,7 @@ public class Checksum extends MatchingTask implements Condition {
boolean checksumMatches = true; boolean checksumMatches = true;
FileInputStream fis = null; FileInputStream fis = null;
FileOutputStream fos = null; FileOutputStream fos = null;
byte[] buf = new byte[readBufferSize];
try { try {
for (Enumeration e = includeFileMap.keys(); e.hasMoreElements();) { for (Enumeration e = includeFileMap.keys(); e.hasMoreElements();) {
messageDigest.reset(); messageDigest.reset();
@@ -366,8 +377,8 @@ public class Checksum extends MatchingTask implements Condition {
fis = new FileInputStream(src); fis = new FileInputStream(src);
DigestInputStream dis = new DigestInputStream(fis, DigestInputStream dis = new DigestInputStream(fis,
messageDigest); messageDigest);
while (dis.read() != -1) {
;
while (dis.read(buf, 0, readBufferSize) != -1) {
;
} }
dis.close(); dis.close();
fis.close(); fis.close();


+ 29
- 4
src/main/org/apache/tools/ant/taskdefs/Chmod.java View File

@@ -75,6 +75,8 @@ import org.apache.tools.ant.types.PatternSet;
* @since Ant 1.1 * @since Ant 1.1
* *
* @ant.task category="filesystem" * @ant.task category="filesystem"
* @todo Refactor so it does not extend from ExecuteOn and then turn around
* and unsupport several attributes.
*/ */
public class Chmod extends ExecuteOn { public class Chmod extends ExecuteOn {


@@ -99,6 +101,10 @@ public class Chmod extends ExecuteOn {
defaultSet.setProject(project); defaultSet.setProject(project);
} }


/**
* The file or single directory of which the permissions must be changed.
* @param src
*/
public void setFile(File src) { public void setFile(File src) {
FileSet fs = new FileSet(); FileSet fs = new FileSet();
fs.setDir(new File(src.getParent())); fs.setDir(new File(src.getParent()));
@@ -106,17 +112,25 @@ public class Chmod extends ExecuteOn {
addFileset(fs); addFileset(fs);
} }


/**
* The directory which holds the files whose permissions must be changed.
* @param src
*/
public void setDir(File src) { public void setDir(File src) {
defaultSet.setDir(src); defaultSet.setDir(src);
} }


/**
* The new permissions.
* @param perm
*/
public void setPerm(String perm) { public void setPerm(String perm) {
createArg().setValue(perm); createArg().setValue(perm);
havePerm = true; havePerm = true;
} }


/** /**
* add a name entry on the include list
* Add a name entry on the include list.
*/ */
public PatternSet.NameEntry createInclude() { public PatternSet.NameEntry createInclude() {
defaultSetDefined = true; defaultSetDefined = true;
@@ -124,7 +138,7 @@ public class Chmod extends ExecuteOn {
} }


/** /**
* add a name entry on the exclude list
* Add a name entry on the exclude list.
*/ */
public PatternSet.NameEntry createExclude() { public PatternSet.NameEntry createExclude() {
defaultSetDefined = true; defaultSetDefined = true;
@@ -132,7 +146,7 @@ public class Chmod extends ExecuteOn {
} }


/** /**
* add a set of patterns
* Add a set of patterns.
*/ */
public PatternSet createPatternSet() { public PatternSet createPatternSet() {
defaultSetDefined = true; defaultSetDefined = true;
@@ -218,17 +232,28 @@ public class Chmod extends ExecuteOn {
} }
} }



/**
* Not supported.
* @param e
*/
public void setExecutable(String e) { public void setExecutable(String e) {
throw new BuildException(taskType throw new BuildException(taskType
+ " doesn\'t support the executable attribute", location); + " doesn\'t support the executable attribute", location);
} }


/**
* Not supported.
* @param cmdl
*/
public void setCommand(Commandline cmdl) { public void setCommand(Commandline cmdl) {
throw new BuildException(taskType throw new BuildException(taskType
+ " doesn\'t support the command attribute", location); + " doesn\'t support the command attribute", location);
} }


/**
* Not supported.
* @param skip
*/
public void setSkipEmptyFilesets(boolean skip) { public void setSkipEmptyFilesets(boolean skip) {
throw new BuildException(taskType throw new BuildException(taskType
+ " doesn\'t support the skipemptyfileset attribute", location); + " doesn\'t support the skipemptyfileset attribute", location);


+ 4
- 4
src/main/org/apache/tools/ant/taskdefs/Concat.java View File

@@ -142,14 +142,14 @@ public class Concat extends Task {
// Attribute setters. // Attribute setters.


/** /**
* Sets the destination file for the stream.
* Sets the destination file, or uses the console if not specified.
*/ */
public void setDestfile(File destinationFile) { public void setDestfile(File destinationFile) {
this.destinationFile = destinationFile; this.destinationFile = destinationFile;
} }


/** /**
* Sets the behavior when the destination file exists, if set to
* Sets the behavior when the destination file exists. If set to
* <code>true</code> the stream data will be appended to the * <code>true</code> the stream data will be appended to the
* existing file, otherwise the existing file will be * existing file, otherwise the existing file will be
* overwritten. Defaults to <code>false</code>. * overwritten. Defaults to <code>false</code>.
@@ -169,14 +169,14 @@ public class Concat extends Task {
// Nested element creators. // Nested element creators.


/** /**
* Adds a set of files (nested fileset element).
* Set of files to concatenate.
*/ */
public void addFileset(FileSet set) { public void addFileset(FileSet set) {
fileSets.addElement(set); fileSets.addElement(set);
} }


/** /**
* Adds a list of files (nested filelist element).
* List of files to concatenate.
*/ */
public void addFilelist(FileList list) { public void addFilelist(FileList list) {
fileSets.addElement(list); fileSets.addElement(list);


+ 7
- 6
src/main/org/apache/tools/ant/taskdefs/ConditionTask.java View File

@@ -60,8 +60,8 @@ import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.taskdefs.condition.ConditionBase; import org.apache.tools.ant.taskdefs.condition.ConditionBase;


/** /**
* &lt;condition&gt; task as a generalization of &lt;available&gt; and
* &lt;uptodate&gt;.
* Task to set a property conditionally using &lt;uptodate&gt;, &lt;available&gt;,
* and many other supported conditions.
* *
* <p>This task supports boolean logic as well as pluggable conditions * <p>This task supports boolean logic as well as pluggable conditions
* to decide, whether a property should be set.</p> * to decide, whether a property should be set.</p>
@@ -89,7 +89,8 @@ public class ConditionTask extends ConditionBase {
public void setProperty(String p) {property = p;} public void setProperty(String p) {property = p;}


/** /**
* The value for the property to set. Defaults to "true".
* The value for the property to set, if condition evaluates to true.
* Defaults to "true".
* *
* @since Ant 1.4 * @since Ant 1.4
*/ */
@@ -102,17 +103,17 @@ public class ConditionTask extends ConditionBase {
*/ */
public void execute() throws BuildException { public void execute() throws BuildException {
if (countConditions() > 1) { if (countConditions() > 1) {
throw new BuildException("You must not nest more than one "
throw new BuildException("You must not nest more than one "
+ "condition into <condition>"); + "condition into <condition>");
} }
if (countConditions() < 1) { if (countConditions() < 1) {
throw new BuildException("You must nest a condition into "
throw new BuildException("You must nest a condition into "
+ "<condition>"); + "<condition>");
} }
if (property == null) { if (property == null) {
throw new BuildException("The property attribute is required."); throw new BuildException("The property attribute is required.");
} }
Condition c = (Condition) getConditions().nextElement(); Condition c = (Condition) getConditions().nextElement();
if (c.eval()) { if (c.eval()) {
log("Condition true; setting "+property+" to "+value, log("Condition true; setting "+property+" to "+value,


+ 6
- 6
src/main/org/apache/tools/ant/taskdefs/Copy.java View File

@@ -154,7 +154,7 @@ public class Copy extends Task {
} }


/** /**
* Create a nested filterchain
* Adds a FilterChain.
*/ */
public FilterChain createFilterChain() { public FilterChain createFilterChain() {
FilterChain filterChain = new FilterChain(); FilterChain filterChain = new FilterChain();
@@ -163,7 +163,7 @@ public class Copy extends Task {
} }


/** /**
* Create a nested filterset
* Adds a filterset.
*/ */
public FilterSet createFilterSet() { public FilterSet createFilterSet() {
FilterSet filterSet = new FilterSet(); FilterSet filterSet = new FilterSet();
@@ -217,7 +217,7 @@ public class Copy extends Task {
} }


/** /**
* Sets filtering.
* If true, enables filtering.
*/ */
public void setFiltering(boolean filtering) { public void setFiltering(boolean filtering) {
this.filtering = filtering; this.filtering = filtering;
@@ -260,7 +260,7 @@ public class Copy extends Task {
} }


/** /**
* Note errors to the output, but keep going
* If false, note errors to the output but keep going.
* @param failonerror true or false * @param failonerror true or false
*/ */
public void setFailOnError(boolean failonerror) { public void setFailOnError(boolean failonerror) {
@@ -268,14 +268,14 @@ public class Copy extends Task {
} }


/** /**
* Adds a set of files (nested fileset attribute).
* Adds a set of files to copy.
*/ */
public void addFileset(FileSet set) { public void addFileset(FileSet set) {
filesets.addElement(set); filesets.addElement(set);
} }


/** /**
* Defines the FileNameMapper to use (nested mapper element).
* Defines the mapper to map source to destination files.
*/ */
public Mapper createMapper() throws BuildException { public Mapper createMapper() throws BuildException {
if (mapperElement != null) { if (mapperElement != null) {


+ 2
- 0
src/main/org/apache/tools/ant/taskdefs/Cvs.java View File

@@ -55,6 +55,8 @@
package org.apache.tools.ant.taskdefs; package org.apache.tools.ant.taskdefs;


/** /**
* Performs operations on a CVS repository.
*
* original 1.20 * original 1.20
* *
* NOTE: This implementation has been moved to AbstractCvsTask with * NOTE: This implementation has been moved to AbstractCvsTask with


+ 65
- 23
src/main/org/apache/tools/ant/taskdefs/Definer.java View File

@@ -1,7 +1,7 @@
/* /*
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved. * reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -86,18 +86,22 @@ public abstract class Definer extends Task {
private boolean reverseLoader = false; private boolean reverseLoader = false;
private String loaderId = null; private String loaderId = null;
private String classpathId = null; private String classpathId = null;
private static final String REUSE_LOADER_REF = "ant.reuse.loader"; private static final String REUSE_LOADER_REF = "ant.reuse.loader";

/**
* @deprecated stop using this attribute
* @ant.attribute ignore="true"
*/
public void setReverseLoader(boolean reverseLoader) { public void setReverseLoader(boolean reverseLoader) {
this.reverseLoader = reverseLoader; this.reverseLoader = reverseLoader;
log("The reverseloader attribute is DEPRECATED. It will be removed",
log("The reverseloader attribute is DEPRECATED. It will be removed",
Project.MSG_WARN); Project.MSG_WARN);
} }
/** /**
* Set the classpath to be used when searching for component being defined * Set the classpath to be used when searching for component being defined
*
*
* @param classpath an Ant Path object containing the classpath. * @param classpath an Ant Path object containing the classpath.
*/ */
public void setClasspath(Path classpath) { public void setClasspath(Path classpath) {
@@ -108,6 +112,9 @@ public abstract class Definer extends Task {
} }
} }


/**
* Create the classpath to be used when searching for component being defined
*/
public Path createClasspath() { public Path createClasspath() {
if (this.classpath == null) { if (this.classpath == null) {
this.classpath = new Path(project); this.classpath = new Path(project);
@@ -115,6 +122,10 @@ public abstract class Definer extends Task {
return this.classpath.createPath(); return this.classpath.createPath();
} }


/**
* reference to a classpath to use when loading the files.
* To actually share the same loader, set loaderref as well
*/
public void setClasspathRef(Reference r) { public void setClasspathRef(Reference r) {
classpathId=r.getRefId(); classpathId=r.getRefId();
createClasspath().setRefid(r); createClasspath().setRefid(r);
@@ -124,9 +135,9 @@ public abstract class Definer extends Task {
* Use the reference to locate the loader. If the loader is not * Use the reference to locate the loader. If the loader is not
* found, taskdef will use the specified classpath and register it * found, taskdef will use the specified classpath and register it
* with the specified name. * with the specified name.
*
*
* This allow multiple taskdef/typedef to use the same class loader, * This allow multiple taskdef/typedef to use the same class loader,
* so they can be used togheter. It eliminate the need to
* so they can be used together. It eliminate the need to
* put them in the CLASSPATH. * put them in the CLASSPATH.
* *
* @since Ant 1.5 * @since Ant 1.5
@@ -135,7 +146,7 @@ public abstract class Definer extends Task {
loaderId = r.getRefId(); loaderId = r.getRefId();
} }


public void execute() throws BuildException { public void execute() throws BuildException {
AntClassLoader al = createLoader(); AntClassLoader al = createLoader();


@@ -159,31 +170,31 @@ public abstract class Definer extends Task {
+ "together with file or resource."; + "together with file or resource.";
throw new BuildException(msg, location); throw new BuildException(msg, location);
} }
if (file != null && resource != null) { if (file != null && resource != null) {
String msg = "You must not specify both, file and " String msg = "You must not specify both, file and "
+ "resource."; + "resource.";
throw new BuildException(msg, location); throw new BuildException(msg, location);
} }


Properties props = new Properties(); Properties props = new Properties();
if (file != null) { if (file != null) {
log("Loading definitions from file " + file,
log("Loading definitions from file " + file,
Project.MSG_VERBOSE); Project.MSG_VERBOSE);
is = new FileInputStream(file); is = new FileInputStream(file);
if (is == null) { if (is == null) {
log("Could not load definitions from file " + file log("Could not load definitions from file " + file
+ ". It doesn\'t exist.", Project.MSG_WARN); + ". It doesn\'t exist.", Project.MSG_WARN);
} }
}
}
if (resource != null) { if (resource != null) {
log("Loading definitions from resource " + resource,
log("Loading definitions from resource " + resource,
Project.MSG_VERBOSE); Project.MSG_VERBOSE);
is = al.getResourceAsStream(resource); is = al.getResourceAsStream(resource);
if (is == null) { if (is == null) {
log("Could not load definitions from resource "
+ resource + ". It could not be found.",
log("Could not load definitions from resource "
+ resource + ". It could not be found.",
Project.MSG_WARN); Project.MSG_WARN);
} }
} }
@@ -208,7 +219,11 @@ public abstract class Definer extends Task {
} }
} }
} }

/**
* create the classloader then hand the definition off to the subclass;
* @throws BuildException when the class wont load for any reason
*/
private void addDefinition(ClassLoader al, String name, String value) private void addDefinition(ClassLoader al, String name, String value)
throws BuildException { throws BuildException {
try { try {
@@ -216,18 +231,21 @@ public abstract class Definer extends Task {
AntClassLoader.initializeClass(c); AntClassLoader.initializeClass(c);
addDefinition(name, c); addDefinition(name, c);
} catch (ClassNotFoundException cnfe) { } catch (ClassNotFoundException cnfe) {
String msg = getTaskName() + " class " + value
String msg = getTaskName() + " class " + value
+ " cannot be found"; + " cannot be found";
throw new BuildException(msg, cnfe, location); throw new BuildException(msg, cnfe, location);
} catch (NoClassDefFoundError ncdfe) { } catch (NoClassDefFoundError ncdfe) {
String msg = getTaskName() + " class " + value
String msg = getTaskName() + " class " + value
+ " cannot be found"; + " cannot be found";
throw new BuildException(msg, ncdfe, location); throw new BuildException(msg, ncdfe, location);
} }
} }


/**
* create a classloader for this definition
*/
private AntClassLoader createLoader() { private AntClassLoader createLoader() {
// magic property
// magic property
if (project.getProperty(REUSE_LOADER_REF) != null) { if (project.getProperty(REUSE_LOADER_REF) != null) {
// Generate the 'reuse' name automatically from the reference. // Generate the 'reuse' name automatically from the reference.
// This allows <taskdefs> that work on both ant1.4 and ant1.5. // This allows <taskdefs> that work on both ant1.4 and ant1.5.
@@ -237,7 +255,7 @@ public abstract class Definer extends Task {
loaderId = "ant.loader." + classpathId; loaderId = "ant.loader." + classpathId;
} }
} }
// If a loader has been set ( either by loaderRef or magic property ) // If a loader has been set ( either by loaderRef or magic property )
if (loaderId != null) { if (loaderId != null) {
Object reusedLoader = project.getReference(loaderId); Object reusedLoader = project.getReference(loaderId);
@@ -251,12 +269,12 @@ public abstract class Definer extends Task {
// } // }
} }
} }
AntClassLoader al = null; AntClassLoader al = null;
if (classpath != null) { if (classpath != null) {
al = new AntClassLoader(project, classpath, !reverseLoader); al = new AntClassLoader(project, classpath, !reverseLoader);
} else { } else {
al = new AntClassLoader(project, Path.systemClasspath,
al = new AntClassLoader(project, Path.systemClasspath,
!reverseLoader); !reverseLoader);
} }
// need to load Task via system classloader or the new // need to load Task via system classloader or the new
@@ -276,25 +294,49 @@ public abstract class Definer extends Task {
return al; return al;
} }


/**
* Name of the property file to load
* ant name/classname pairs from.
*/
public void setFile(File file) { public void setFile(File file) {
this.file = file; this.file = file;
} }


/**
* Name of the property resource to load
* ant name/classname pairs from.
*/
public void setResource(String res) { public void setResource(String res) {
this.resource = res; this.resource = res;
} }


/**
* Name of the property resource to load
* ant name/classname pairs from.
*/
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }


/**
* what is the classname we are definining? Can be null
*/
public String getClassname() { public String getClassname() {
return value; return value;
} }


/**
* the full class name of the object being defined.
* Required, unless file or resource have
* been specified.
*/
public void setClassname(String v) { public void setClassname(String v) {
value = v; value = v;
} }


/**
* this must be implemented by subclasses; it is the callback
* they will get to add a new definition of their type
*/
protected abstract void addDefinition(String name, Class c); protected abstract void addDefinition(String name, Class c);
} }

+ 6
- 5
src/main/org/apache/tools/ant/taskdefs/Delete.java View File

@@ -114,7 +114,7 @@ public class Delete extends MatchingTask {
} }


/** /**
* Used to force listing of all names of deleted files.
* If true, list all names of deleted files.
* *
* @param verbose "true" or "on" * @param verbose "true" or "on"
*/ */
@@ -127,7 +127,7 @@ public class Delete extends MatchingTask {
} }


/** /**
* If the file does not exist, do not display a diagnostic
* If true and the file does not exist, do not display a diagnostic
* message or modify the exit status to reflect an error. * message or modify the exit status to reflect an error.
* This means that if a file or directory cannot be deleted, * This means that if a file or directory cannot be deleted,
* then no error is reported. This setting emulates the * then no error is reported. This setting emulates the
@@ -143,7 +143,8 @@ public class Delete extends MatchingTask {
} }


/** /**
* this flag means 'note errors to the output, but keep going'
* If false, note errors but continue.
*
* @param failonerror true or false * @param failonerror true or false
*/ */
public void setFailOnError(boolean failonerror) { public void setFailOnError(boolean failonerror) {
@@ -152,14 +153,14 @@ public class Delete extends MatchingTask {




/** /**
* Used to delete empty directories.
* If true, delete empty directories.
*/ */
public void setIncludeEmptyDirs(boolean includeEmpty) { public void setIncludeEmptyDirs(boolean includeEmpty) {
this.includeEmpty = includeEmpty; this.includeEmpty = includeEmpty;
} }


/** /**
* Adds a set of files (nested fileset attribute).
* Adds a set of files to be deleted.
*/ */
public void addFileset(FileSet set) { public void addFileset(FileSet set) {
filesets.addElement(set); filesets.addElement(set);


+ 30
- 30
src/main/org/apache/tools/ant/taskdefs/DependSet.java View File

@@ -81,21 +81,21 @@ import org.apache.tools.ant.types.FileList;
* <li>targetfileset (fileset describing the target files to examine) * <li>targetfileset (fileset describing the target files to examine)
* <li>targetfilelist (filelist describing the target files to examine) * <li>targetfilelist (filelist describing the target files to examine)
* </ul> * </ul>
* At least one instance of either a fileset or filelist for both source and
* At least one instance of either a fileset or filelist for both source and
* target are required. * target are required.
* <p> * <p>
* This task will examine each of the source files against each of the target
* files. If any target files are out of date with respect to any of the source
* files, all targets are removed. If any files named in a (src or target)
* This task will examine each of the source files against each of the target
* files. If any target files are out of date with respect to any of the source
* files, all targets are removed. If any files named in a (src or target)
* filelist do not exist, all targets are removed. * filelist do not exist, all targets are removed.
* Hint: If missing files should be ignored, specify them as include patterns
* Hint: If missing files should be ignored, specify them as include patterns
* in filesets, rather than using filelists. * in filesets, rather than using filelists.
* </p><p> * </p><p>
* This task attempts to optimize speed of dependency checking. It will stop
* after the first out of date file is found and remove all targets, rather
* This task attempts to optimize speed of dependency checking. It will stop
* after the first out of date file is found and remove all targets, rather
* than exhaustively checking every source vs target combination unnecessarily. * than exhaustively checking every source vs target combination unnecessarily.
* </p><p> * </p><p>
* Example uses:
* Example uses:
* <ul><li> * <ul><li>
* Record the fact that an XML file must be up to date * Record the fact that an XML file must be up to date
* with respect to its XSD (Schema file), even though the XML file * with respect to its XSD (Schema file), even though the XML file
@@ -107,7 +107,7 @@ import org.apache.tools.ant.types.FileList;
* Record the fact that java files must be recompiled if the ant build * Record the fact that java files must be recompiled if the ant build
* file changes * file changes
* </li></ul> * </li></ul>
*
*
* @author <a href="mailto:cstrong@arielpartners.com">Craeg Strong</a> * @author <a href="mailto:cstrong@arielpartners.com">Craeg Strong</a>
* @ant.task category="filesystem" * @ant.task category="filesystem"
* @version $Revision$ $Date$ * @version $Revision$ $Date$
@@ -127,28 +127,28 @@ public class DependSet extends MatchingTask {
} //-- DependSet } //-- DependSet


/** /**
* Nested &lt;srcfileset&gt; element.
* Add a set of source files.
*/ */
public void addSrcfileset(FileSet fs) { public void addSrcfileset(FileSet fs) {
sourceFileSets.addElement(fs); sourceFileSets.addElement(fs);
} }


/** /**
* Nested &lt;srcfilelist&gt; element.
* Add a list of source files.
*/ */
public void addSrcfilelist(FileList fl) { public void addSrcfilelist(FileList fl) {
sourceFileLists.addElement(fl); sourceFileLists.addElement(fl);
} }


/** /**
* Nested &lt;targetfileset&gt; element.
* Add a set of target files.
*/ */
public void addTargetfileset(FileSet fs) { public void addTargetfileset(FileSet fs) {
targetFileSets.addElement(fs); targetFileSets.addElement(fs);
} }


/** /**
* Nested &lt;targetfilelist&gt; element.
* Add a list of target files.
*/ */
public void addTargetfilelist(FileList fl) { public void addTargetfilelist(FileList fl) {
targetFileLists.addElement(fl); targetFileLists.addElement(fl);
@@ -160,7 +160,7 @@ public class DependSet extends MatchingTask {


public void execute() throws BuildException { public void execute() throws BuildException {


if ((sourceFileSets.size() == 0) && (sourceFileLists.size() == 0)) {
if ((sourceFileSets.size() == 0) && (sourceFileLists.size() == 0)) {
throw new BuildException("At least one <srcfileset> or <srcfilelist>" throw new BuildException("At least one <srcfileset> or <srcfilelist>"
+ " element must be set"); + " element must be set");
} }
@@ -188,23 +188,23 @@ public class DependSet extends MatchingTask {
File oldestTarget = null; File oldestTarget = null;
Enumeration enumTargetSets = targetFileSets.elements(); Enumeration enumTargetSets = targetFileSets.elements();
while (enumTargetSets.hasMoreElements()) { while (enumTargetSets.hasMoreElements()) {
FileSet targetFS = (FileSet) enumTargetSets.nextElement(); FileSet targetFS = (FileSet) enumTargetSets.nextElement();
if (!targetFS.getDir(getProject()).exists()) { if (!targetFS.getDir(getProject()).exists()) {
// this is the same as if it was empty, no target files found // this is the same as if it was empty, no target files found
continue; continue;
} }
DirectoryScanner targetDS = targetFS.getDirectoryScanner(project); DirectoryScanner targetDS = targetFS.getDirectoryScanner(project);
String[] targetFiles = targetDS.getIncludedFiles(); String[] targetFiles = targetDS.getIncludedFiles();
for (int i = 0; i < targetFiles.length; i++) { for (int i = 0; i < targetFiles.length; i++) {
File dest = new File(targetFS.getDir(project), targetFiles[i]); File dest = new File(targetFS.getDir(project), targetFiles[i]);
allTargets.addElement(dest); allTargets.addElement(dest);


if (dest.lastModified() > now) { if (dest.lastModified() > now) {
log("Warning: " + targetFiles[i] + " modified in the future.",
log("Warning: " + targetFiles[i] + " modified in the future.",
Project.MSG_WARN); Project.MSG_WARN);
} }


@@ -222,12 +222,12 @@ public class DependSet extends MatchingTask {
boolean upToDate = true; boolean upToDate = true;
Enumeration enumTargetLists = targetFileLists.elements(); Enumeration enumTargetLists = targetFileLists.elements();
while (enumTargetLists.hasMoreElements()) { while (enumTargetLists.hasMoreElements()) {
FileList targetFL = (FileList) enumTargetLists.nextElement(); FileList targetFL = (FileList) enumTargetLists.nextElement();
String[] targetFiles = targetFL.getFiles(project); String[] targetFiles = targetFL.getFiles(project);
for (int i = 0; i < targetFiles.length; i++) { for (int i = 0; i < targetFiles.length; i++) {
File dest = new File(targetFL.getDir(project), targetFiles[i]); File dest = new File(targetFL.getDir(project), targetFiles[i]);
if (!dest.exists()) { if (!dest.exists()) {
log(targetFiles[i] + " does not exist.", Project.MSG_VERBOSE); log(targetFiles[i] + " does not exist.", Project.MSG_VERBOSE);
@@ -237,7 +237,7 @@ public class DependSet extends MatchingTask {
allTargets.addElement(dest); allTargets.addElement(dest);
} }
if (dest.lastModified() > now) { if (dest.lastModified() > now) {
log("Warning: " + targetFiles[i] + " modified in the future.",
log("Warning: " + targetFiles[i] + " modified in the future.",
Project.MSG_WARN); Project.MSG_WARN);
} }


@@ -250,7 +250,7 @@ public class DependSet extends MatchingTask {
} }
if (oldestTarget != null) { if (oldestTarget != null) {
log(oldestTarget + " is oldest target file", Project.MSG_VERBOSE); log(oldestTarget + " is oldest target file", Project.MSG_VERBOSE);
} else {
} else {
// no target files, then we cannot remove any target files and // no target files, then we cannot remove any target files and
// skip the following tests right away // skip the following tests right away
upToDate = false; upToDate = false;
@@ -262,7 +262,7 @@ public class DependSet extends MatchingTask {
if (upToDate) { if (upToDate) {
Enumeration enumSourceLists = sourceFileLists.elements(); Enumeration enumSourceLists = sourceFileLists.elements();
while (upToDate && enumSourceLists.hasMoreElements()) { while (upToDate && enumSourceLists.hasMoreElements()) {
FileList sourceFL = (FileList) enumSourceLists.nextElement(); FileList sourceFL = (FileList) enumSourceLists.nextElement();
String[] sourceFiles = sourceFL.getFiles(project); String[] sourceFiles = sourceFL.getFiles(project);


@@ -270,12 +270,12 @@ public class DependSet extends MatchingTask {
File src = new File(sourceFL.getDir(project), sourceFiles[i]); File src = new File(sourceFL.getDir(project), sourceFiles[i]);


if (src.lastModified() > now) { if (src.lastModified() > now) {
log("Warning: " + sourceFiles[i]
log("Warning: " + sourceFiles[i]
+ " modified in the future.", Project.MSG_WARN); + " modified in the future.", Project.MSG_WARN);
} }


if (!src.exists()) { if (!src.exists()) {
log(sourceFiles[i] + " does not exist.",
log(sourceFiles[i] + " does not exist.",
Project.MSG_VERBOSE); Project.MSG_VERBOSE);
upToDate = false; upToDate = false;
break; break;
@@ -296,7 +296,7 @@ public class DependSet extends MatchingTask {
if (upToDate) { if (upToDate) {
Enumeration enumSourceSets = sourceFileSets.elements(); Enumeration enumSourceSets = sourceFileSets.elements();
while (upToDate && enumSourceSets.hasMoreElements()) { while (upToDate && enumSourceSets.hasMoreElements()) {
FileSet sourceFS = (FileSet) enumSourceSets.nextElement(); FileSet sourceFS = (FileSet) enumSourceSets.nextElement();
DirectoryScanner sourceDS = sourceFS.getDirectoryScanner(project); DirectoryScanner sourceDS = sourceFS.getDirectoryScanner(project);
String[] sourceFiles = sourceDS.getIncludedFiles(); String[] sourceFiles = sourceDS.getIncludedFiles();
@@ -322,12 +322,12 @@ public class DependSet extends MatchingTask {
log("Deleting all target files. ", Project.MSG_VERBOSE); log("Deleting all target files. ", Project.MSG_VERBOSE);
for (Enumeration e = allTargets.elements(); e.hasMoreElements();) { for (Enumeration e = allTargets.elements(); e.hasMoreElements();) {
File fileToRemove = (File) e.nextElement(); File fileToRemove = (File) e.nextElement();
log("Deleting file " + fileToRemove.getAbsolutePath(),
log("Deleting file " + fileToRemove.getAbsolutePath(),
Project.MSG_VERBOSE); Project.MSG_VERBOSE);
fileToRemove.delete(); fileToRemove.delete();
} }
} }


} //-- execute } //-- execute
} //-- DependSet.java } //-- DependSet.java

+ 29
- 22
src/main/org/apache/tools/ant/taskdefs/Dirname.java View File

@@ -55,6 +55,7 @@
package org.apache.tools.ant.taskdefs; package org.apache.tools.ant.taskdefs;


import java.io.File; import java.io.File;

import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task; import org.apache.tools.ant.Task;


@@ -83,31 +84,37 @@ import org.apache.tools.ant.Task;
*/ */


public class Dirname extends Task { public class Dirname extends Task {
private File file;
private String property;
private File file;
private String property;


// The setter for the `file' attribute
public void setFile(File file) {
this.file = file;
}
/**
* Path to take the dirname of.
* @param file
*/
public void setFile(File file) {
this.file = file;
}


// The setter for the `property' attribute
public void setProperty(String property) {
this.property = property ;
}
/**
* The name of the property to set.
* @param property
*/
public void setProperty(String property) {
this.property = property;
}




// The method executing the task
public void execute() throws BuildException {
if (property == null) {
throw new BuildException("property attribute required", location);
}
if (file == null) {
throw new BuildException("file attribute required", location);
} else {
String value = file.getParent();
getProject().setNewProperty(property, value);
}
}
// The method executing the task
public void execute() throws BuildException {
if (property == null) {
throw new BuildException("property attribute required", location);
}
if (file == null) {
throw new BuildException("file attribute required", location);
} else {
String value = file.getParent();
getProject().setNewProperty(property, value);
}
}
} }



+ 6
- 1
src/main/org/apache/tools/ant/taskdefs/Ear.java View File

@@ -93,7 +93,7 @@ public class Ear extends Jar {
} }


/** /**
* set the application XML file
* File to incorporate as application.xml.
*/ */
public void setAppxml(File descr) { public void setAppxml(File descr) {
deploymentDescriptor = descr; deploymentDescriptor = descr;
@@ -112,6 +112,11 @@ public class Ear extends Jar {
} }




/**
* Adds zipfileset.
*
* @param fs zipfileset to add
*/
public void addArchives(ZipFileSet fs) { public void addArchives(ZipFileSet fs) {
// We just set the prefix for this fileset, and pass it up. // We just set the prefix for this fileset, and pass it up.
// Do we need to do this? LH // Do we need to do this? LH


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/Echo.java View File

@@ -105,7 +105,7 @@ public class Echo extends Task {
} }


/** /**
* Sets the message variable.
* Message to write.
* *
* @param msg Sets the value for the message variable. * @param msg Sets the value for the message variable.
*/ */
@@ -114,14 +114,14 @@ public class Echo extends Task {
} }


/** /**
* Sets the file attribute.
* File to write to.
*/ */
public void setFile(File file) { public void setFile(File file) {
this.file = file; this.file = file;
} }


/** /**
* Shall we append to an existing file?
* If true, append to existing file.
*/ */
public void setAppend(boolean append) { public void setAppend(boolean append) {
this.append = append; this.append = append;


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save