Browse Source

Merge changes made to 1.5 Beta1.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272826 13f79535-47bb-0310-9956-ffa450edef68
master
Magesh Umasankar 23 years ago
parent
commit
ca91f8cb7e
100 changed files with 2631 additions and 352 deletions
  1. +245
    -135
      WHATSNEW
  2. +2
    -2
      bootstrap.bat
  3. +1
    -1
      bootstrap.sh
  4. +1
    -1
      build.bat
  5. +1
    -1
      build.sh
  6. +84
    -15
      build.xml
  7. +104
    -20
      docs/ant_task_guidelines.html
  8. +17
    -0
      docs/antnews.html
  9. +56
    -0
      docs/external.html
  10. +4
    -4
      docs/index.html
  11. +5
    -4
      docs/manual/CoreTasks/ant.html
  12. +2
    -2
      docs/manual/CoreTasks/antcall.html
  13. +1
    -1
      docs/manual/CoreTasks/antstructure.html
  14. +1
    -1
      docs/manual/CoreTasks/apply.html
  15. +1
    -1
      docs/manual/CoreTasks/available.html
  16. +1
    -1
      docs/manual/CoreTasks/chmod.html
  17. +9
    -2
      docs/manual/CoreTasks/conditions.html
  18. +20
    -12
      docs/manual/CoreTasks/copy.html
  19. +1
    -1
      docs/manual/CoreTasks/copydir.html
  20. +1
    -1
      docs/manual/CoreTasks/copyfile.html
  21. +1
    -1
      docs/manual/CoreTasks/cvs.html
  22. +1
    -1
      docs/manual/CoreTasks/delete.html
  23. +1
    -1
      docs/manual/CoreTasks/deltree.html
  24. +1
    -1
      docs/manual/CoreTasks/echo.html
  25. +1
    -1
      docs/manual/CoreTasks/exec.html
  26. +1
    -1
      docs/manual/CoreTasks/fail.html
  27. +1
    -1
      docs/manual/CoreTasks/filter.html
  28. +1
    -1
      docs/manual/CoreTasks/fixcrlf.html
  29. +1
    -1
      docs/manual/CoreTasks/genkey.html
  30. +1
    -1
      docs/manual/CoreTasks/get.html
  31. +19
    -12
      docs/manual/CoreTasks/jar.html
  32. +3
    -3
      docs/manual/CoreTasks/java.html
  33. +22
    -3
      docs/manual/CoreTasks/javac.html
  34. +1
    -1
      docs/manual/CoreTasks/javadoc.html
  35. +1
    -1
      docs/manual/CoreTasks/loadfile.html
  36. +1
    -1
      docs/manual/CoreTasks/mail.html
  37. +1
    -1
      docs/manual/CoreTasks/mkdir.html
  38. +7
    -4
      docs/manual/CoreTasks/move.html
  39. +1
    -1
      docs/manual/CoreTasks/pack.html
  40. +1
    -1
      docs/manual/CoreTasks/patch.html
  41. +1
    -1
      docs/manual/CoreTasks/property.html
  42. +1
    -1
      docs/manual/CoreTasks/rename.html
  43. +1
    -1
      docs/manual/CoreTasks/replace.html
  44. +1
    -1
      docs/manual/CoreTasks/rmic.html
  45. +1
    -1
      docs/manual/CoreTasks/signjar.html
  46. +1
    -1
      docs/manual/CoreTasks/sql.html
  47. +22
    -3
      docs/manual/CoreTasks/style.html
  48. +1
    -1
      docs/manual/CoreTasks/tar.html
  49. +8
    -1
      docs/manual/CoreTasks/taskdef.html
  50. +195
    -0
      docs/manual/CoreTasks/tempfile.html
  51. +1
    -1
      docs/manual/CoreTasks/touch.html
  52. +2
    -2
      docs/manual/CoreTasks/tstamp.html
  53. +8
    -1
      docs/manual/CoreTasks/typedef.html
  54. +1
    -1
      docs/manual/CoreTasks/unpack.html
  55. +6
    -6
      docs/manual/CoreTasks/unzip.html
  56. +2
    -2
      docs/manual/CoreTasks/uptodate.html
  57. +1
    -1
      docs/manual/CoreTasks/war.html
  58. +1
    -1
      docs/manual/CoreTasks/zip.html
  59. +6
    -0
      docs/manual/CoreTypes/dirset.html
  60. +13
    -1
      docs/manual/CoreTypes/fileset.html
  61. +147
    -2
      docs/manual/CoreTypes/filterchain.html
  62. +1
    -1
      docs/manual/CoreTypes/mapper.html
  63. +1
    -1
      docs/manual/CoreTypes/patternset.html
  64. +124
    -0
      docs/manual/CoreTypes/selectors-program.html
  65. +760
    -0
      docs/manual/CoreTypes/selectors.html
  66. +127
    -31
      docs/manual/CoreTypes/xmlcatalog.html
  67. +10
    -6
      docs/manual/OptionalTasks/BorlandEJBTasks.html
  68. +1
    -1
      docs/manual/OptionalTasks/antlr.html
  69. +1
    -1
      docs/manual/OptionalTasks/cab.html
  70. +1
    -1
      docs/manual/OptionalTasks/clearcase.html
  71. +2
    -2
      docs/manual/OptionalTasks/ejb.html
  72. +1
    -1
      docs/manual/OptionalTasks/ftp.html
  73. +1
    -1
      docs/manual/OptionalTasks/javacc.html
  74. +21
    -7
      docs/manual/OptionalTasks/jlink.html
  75. +1
    -1
      docs/manual/OptionalTasks/junit.html
  76. +1
    -1
      docs/manual/OptionalTasks/junitreport.html
  77. +1
    -1
      docs/manual/OptionalTasks/native2ascii.html
  78. +1
    -1
      docs/manual/OptionalTasks/netrexxc.html
  79. +5
    -3
      docs/manual/OptionalTasks/perforce.html
  80. +1
    -1
      docs/manual/OptionalTasks/propertyfile.html
  81. +1
    -1
      docs/manual/OptionalTasks/renameextensions.html
  82. +9
    -2
      docs/manual/OptionalTasks/script.html
  83. +219
    -0
      docs/manual/OptionalTasks/setproxy.html
  84. +1
    -1
      docs/manual/OptionalTasks/telnet.html
  85. +1
    -1
      docs/manual/OptionalTasks/vss.html
  86. +21
    -0
      docs/manual/OptionalTasks/xmlvalidate.html
  87. +145
    -0
      docs/manual/antexternal.html
  88. +2
    -0
      docs/manual/anttaskslist.html
  89. +87
    -0
      docs/manual/base_task_classes.html
  90. +1
    -0
      docs/manual/conceptstypeslist.html
  91. +2
    -1
      docs/manual/coretasklist.html
  92. +1
    -1
      docs/manual/cover.html
  93. +2
    -1
      docs/manual/credits.html
  94. +3
    -2
      docs/manual/develop.html
  95. +2
    -0
      docs/manual/developlist.html
  96. +1
    -1
      docs/manual/dirtasks.html
  97. +1
    -1
      docs/manual/feedback.html
  98. +17
    -2
      docs/manual/ide.html
  99. +9
    -4
      docs/manual/install.html
  100. +1
    -1
      docs/manual/intro.html

+ 245
- 135
WHATSNEW View File

@@ -15,14 +15,124 @@ Changes from Ant 1.4.1 to Ant 1.5
Changes that could break older environments:
--------------------------------------------

* Important: Single $ signs are no longer silently stripped!
* 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!
Before you panic that we have broken all your build files, we have kept
the old "$$" -> "$" behaviour. So only build files which accidentally had
a $ sign in a string that was being silently stripped may break.
We added this fix to stop newbie confusion; if you want to write a
build file which works on ant versions 1.4.1 or earlier, stay with
the double $$ sign rule.
We added this fix to stop newbie confusion; if you want to write a
build file which works on ant versions 1.4.1 or earlier, stay with
the double $$ sign rule.
* Shipped XML parser is now Xerces 2.0.1 along with the XML Parser APIs.
XML Parser APIs is a separate jar that contains the necessary
JAXP/DOM/SAX classes.
@@ -30,7 +140,7 @@ Changes that could break older environments:
* <telnet> was fixed to expand properties inside nested <read> and
<write> elements; before this only happened when you assigned the text
to the string attribute. If you had $ signs in the string, they may
need escaping.
need escaping.

* the RegexpMatcher interface has been extended to support case
insensitive matches and other options - custom implementations of
@@ -48,18 +158,18 @@ Changes that could break older environments:
<condition>, <exec>, <pathconvert>, or <tstamp>. In some exceptional
cases it will generate a warning if you attempt to overwrite an
existing property.
* Taskwriters please note: Whenever tasks had any overloaded set* methods,
Ant's introspection mechanism would select the last overloaded method
provided to it by the Java Runtime. A modification has now been made such
that when the Java Runtime provides a method with a String as its argument,
provided to it by the Java Runtime. A modification has now been made such
that when the Java Runtime provides a method with a String as its argument,
a check is made to see if there is another overloaded method that takes in
some other type of argument. If there is one such method, then the method
some other type of argument. If there is one such method, then the method
that takes in String as an argument is not selected by the Introspector.
* The pattern definition **/._* has been included into the Default
* The pattern definition **/._* has been included into the Default
Excludes list.
* <propertyfile>'s <entry> element was modified to remove "never" as a value
as its behavior was undocumented and flakey.

@@ -78,7 +188,7 @@ Changes that could break older environments:

Fixed bugs:
-----------
* A bug existed that prevented generated log files from being deleted as
* A bug existed that prevented generated log files from being deleted as
part of the build process itself. This has now been fixed.

* Fixed bug where <move> ignored <filterset>s.
@@ -97,7 +207,7 @@ Fixed bugs:

* <propertyfile> would not close the original property file.

* <ant> will no longer override a subbuild's basedir with inheritall="true".
* <ant> will no longer override a subbuild's basedir with inheritall="true".

* Fixed problem with the built-in <junit> formatters which assumed
that only one test could be running at the same time - this is not
@@ -120,7 +230,7 @@ Fixed bugs:

Other changes:
--------------
* Selector Elements now provide a way to create filesets based on
* Selector Elements now provide a way to create filesets based on
sophisticated selection criteria.

* Gzip and Bzip2 files can now be constructed in the fly when using
@@ -131,54 +241,54 @@ Other changes:
* New optional type, <classfileset> added.

* <ejbjar> now allows control over which additional classes and interfaces
are added to the generated EJB jars. A new attribute "dependency" can be
defines which classes are added. The addition of classes now uses
are added to the generated EJB jars. A new attribute "dependency" can be
defines which classes are added. The addition of classes now uses
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.

* <available> has a new attribute named ignoreSystemClasses.

* New task <cvschangelog/> generates an XML report of changes that occur
on CVS repository.

* New filter readers: ClassConstants, ExpandProperties, HeadFilter,
LineContains, LineContainsRegExp, PrefixLines, ReplaceTokens,
StripJavaComments, StripLineBreaks, StripLineComments, TabsToSpaces,
* New filter readers: ClassConstants, ExpandProperties, HeadFilter,
LineContains, LineContainsRegExp, PrefixLines, ReplaceTokens,
StripJavaComments, StripLineBreaks, StripLineComments, TabsToSpaces,
TailFilter.

* <copy>, <loadfile>, <loadproperties>, <move> support FilterChains
* <copy>, <loadfile>, <loadproperties>, <move> support FilterChains
of FilterReaders.
* New task <loadproperties> to load contents of file as Ant properties,
with nested <filterchain> elements.
* New task <loadfile> to load a whole file into a property.

* New task <echoproperties> to list your current properties to the screen
or a file.
or a file.

* New tasks <bzip2> and <bunzip2> to pack and unpack files using the
* New tasks <bzip2> and <bunzip2> to pack and unpack files using the
BZip2 alogrithm.

* New tasks <replaceregexp>, <checksum>, <translate>, <waitfor>,
* New tasks <replaceregexp>, <checksum>, <translate>, <waitfor>,
<manifest>, <vsscp>, <vssadd>, <vsscreate>, <splash>, <basename>, <dirname>,
<concat>.

* A new combined <mail> task, which replaces the old <mail> and
<mimemail> tasks, has been added. The <mimemail> task, and
<mimemail> tasks, has been added. The <mimemail> task, and
old SendEmail and MimeMail classes have been deprecated.

* Mail task allows specification of port number.

* Users can control what <zip> and <jar> must do when duplicate files
are found. A new element <zipgroupfileset> allows for multiple zip
files to be merged into the archive. In addition, <jar> also has
* Users can control what <zip> and <jar> must do when duplicate files
are found. A new element <zipgroupfileset> allows for multiple zip
files to be merged into the archive. In addition, <jar> also has
another new attribute: filesetmanifest. The existing manifest
attribute of <jar> now also accepts the name of a jar added through
attribute of <jar> now also accepts the name of a jar added through
a fileset.

* gzip now checks that the zipfile is older than the source file
before rebuilding the zipfile.
before rebuilding the zipfile.

* TarFileset takes in three new attributes - fullpath, prefix
and preserveLeadingSlashes.
@@ -191,24 +301,24 @@ Other changes:

* Exec task has extra attribute "resultproperty" to get the return code
into a property.
* Exec task prints a message when a timed-out process is killed.
* Exec task prints a message when a timed-out process is killed.
* Added optional attributes - name, arch and version to the <os> task.

* Unjar, Untar, Unwar and Unzip now support patternsets to
select files from an archive for extraction. Filesets may be
* Unjar, Untar, Unwar and Unzip now support patternsets to
select files from an archive for extraction. Filesets may be
used to select archived files for unarchival.

* Javac task allows debug levels to be specified. Debug levels
will have an effect only when the modern compiler or the
will have an effect only when the modern compiler or the
classic compiler (version 1.2 and higher) is used and debugging
is enabled.

* Added support for specifying CVS_RSH in the <cvs/> task

* The attributes zipfile, jarfile, warfile and earfile (from the Zip,
Jar, War and Ear tasks) have been deprecated and superseded by a
* The attributes zipfile, jarfile, warfile and earfile (from the Zip,
Jar, War and Ear tasks) have been deprecated and superseded by a
new attribute "destfile".

* Added new conditions <isset>, <checksum>, <http>, <socket>, <contains>,
@@ -235,17 +345,17 @@ Other changes:
* <fail> now supports builds to fail based on conditions via if and
unless attributes.

* Ant now comes with two new BuildLogger implementations - one that
* Ant now comes with two new BuildLogger implementations - one that
can send emails containing a log of the build process (MailLogger),
and one that colorizes the output based on message levels, using
ANSI color code escape sequences (AnsiColorLogger).

* A "package" mapper type has been added to allow package directory
names replaced with the dotted form.
* You can now specify environment variables in the <java> and <junit> tasks
* You can now specify environment variables in the <java> and <junit> tasks
if the fork attribute has been set to true.
* -propertyfile command-line option has been added to load an entire
property file just as -D properties are declared (as user properties).
-D properties take precedence over -propertyfile specified ones.
@@ -253,7 +363,7 @@ Other changes:
* You can now set an ANT_ARGS environment variable to hold arguments you
always want passed to the 'ant' command -- for example, if you always
want to use a different logger or the -find flag.
* <tstamp> now supports a new "prefix" attribute to prefix properties set.

* You can now specify the -sourcepath for <javac> explicitly.
@@ -264,7 +374,7 @@ Other changes:
* The compiler implementation for <javac> can now be chosen on a task by
task basis. The new "compiler" attribute of <javac> can be used to override
the value of the build.compiler property, if set.
* <javac> has a new nested element, <compilerarg>, which allows you
to specify additional args for the specific compiler you're using.

@@ -272,7 +382,7 @@ Other changes:

* <propertyfile>'s <entry> now has a 'unit' attribute to specify the
increment/decrement unit on date operations.
* <property> now supports a 'prefix' attribute when loading from a file
or resource.

@@ -293,7 +403,7 @@ Other changes:
* <ftp> can now chmod files on a remote server that supports
"site chmod", as well as set the umask before transferring files, if
the server supports "site umask".
* New <serverdeploy> "optional" task.

* <patternset> now supports nested patternsets.
@@ -315,13 +425,13 @@ Other changes:
* <copy> task now has a 'failonerror' attribute to allow keep-going
behaviour when the file to be copied is not found (defaults to "true").

* <uptodate> now has a 'srcfile' attribute to allow specifying a
* <uptodate> now has a 'srcfile' attribute to allow specifying a
full-path filename.

* <exec>, <sql> and <java> now support append attributes to allow
appending the output to an existing file.

* <java> now supports a timeout attribute analog to <exec> - it is
* <java> now supports a timeout attribute analog to <exec> - it is
highly recommended to only use it together with fork="true".

* <javadoc> now supports a source attribute to enable javadoc to
@@ -330,16 +440,16 @@ Other changes:
* <replace> supports a new replacefilterfile attribute that
automatically turns all properties of a given file into
replacefilters.
* An alias of <xslt> has been added to refer to the <style> task.

* The compiler implementation for <rmic> can now be chosen on a task by
task basis. The new "compiler" attribute of <rmic> can be used to override
the value of the build.rmic property, if set.
* <rmic> has a new nested element, <compilerarg>, which allows you
to specify additional args for the specific compiler you're using.
* org.apache.tools.ant.XmlLogger now is a BuildLogger, rather than just
a BuildListener. It can operate in either mode successfully.

@@ -369,21 +479,21 @@ Fixed bugs:

* <ant>'s antfile attribute will now also be considered an absolute path on
Windows systems, if it starts with a \ and no drive specifier.
* The fullpath attribute of <zipfileset> has been ignored if you used
the src attribute at the same time.

* The manifest file is now always placed as the second entry (after /META-INF)
in generated jars. This allows the manifest to be read by JarInputStreams
* Fixed bug in depend task which would fail with a NullPointerException if no
dependency cache was specified.
* sql task now handles REM statements correctly so that lines starying with rem
but which are not comments are actually processed.
* XMLLogger now uses the task's name rather than the classname
* <mapper>s will now work as expected if the to pattern expands to an
absolute pathname.

@@ -447,33 +557,33 @@ Changes that could break older environments:

* <fixcrlf> will not remove trailing whitespace at the end of lines anymore.

* The Classloader usage has been changed for the taskdef, property, available
and sql tasks so that it delegates to the parent classloader. This may cause
* The Classloader usage has been changed for the taskdef, property, available
and sql tasks so that it delegates to the parent classloader. This may cause
ClassNotFoundExceptions to be thrown if a system class attempts to load a
class in the taskdef's classpath (typically factory objects).

* Ant now allows multithreading of tasks and the containment of tasks within
other tasks. This can break customer listeners which do not expect messages
from a task before the previous task has finished.
from a task before the previous task has finished.
* Ant now installs its own ouput stream into System.out to route output to the
task currently executing on the current thread. This also means that all
output is now routed as Ant message events. Customer listeners and loggers
should not call System.out at any time. This has always been true but such
task currently executing on the current thread. This also means that all
output is now routed as Ant message events. Customer listeners and loggers
should not call System.out at any time. This has always been true but such
usage now will cause problems due to possible recursion.

* Invalid manifest files will now cause build failures in the <jar> task.

* Ant Introspection now looks for methods with method names starting with
addConfigured. When called these methods are passed an argument after it has
been configured from the build file. Custom tasks supporting nested elements
starting with the name configured will no longer function.
addConfigured. When called these methods are passed an argument after it has
been configured from the build file. Custom tasks supporting nested elements
starting with the name configured will no longer function.

* The environment variable JAVACMD that can be used to specify the
java executable to Ant's wrapper scripts must not contain additional
command line parameters any longer - please use the environment
variable ANT_OPTS for such parameters now.
* Ant's wrapper scripts now quote the CLASSPATH environment variable, thus
supporting classpaths which refer to directories containing spaces. This means
that the CLASSPATH environment variable cannot have quotes. Any quotes should
@@ -486,12 +596,12 @@ Changes that could break older environments:
</delete>
will now remove "somedir" as well, unless there are still files left
in it (matched by the default excludes).
* The copy task will now fail if the file to be copied is not found.

* Ant properties defined in properties files now behave the same way as
* The copy task will now fail if the file to be copied is not found.

* Ant properties defined in properties files now behave the same way as
properties defined in the build file. In particular the $ character needs
to be escaped in property values by doubling it to $$. So, to define a
to be escaped in property values by doubling it to $$. So, to define a
property with the value $hello, you need to define it in a properties file
as
test.prop=$$hello
@@ -539,9 +649,9 @@ Other changes:
* <ejbjar> changes
* Add support for Borland Application Server to the <ejbjar> task using
a <borland> nested element.
* Add support for iPlanet Application Server to the <ejbjar> task. Also
* Add support for iPlanet Application Server to the <ejbjar> task. Also
includes some iPlanet utility tasks
* Add support for JBoss Application Server to the <ejbjar> task.
* Add support for JBoss Application Server to the <ejbjar> task.
* Add a naming attribute to control the naming scheme that
ejbjar uses to name the generated EJB jars.
* Weblogic element now sets the compiler class for EJB 2.0 beans
@@ -551,11 +661,11 @@ Other changes:
* Allow the manifest to be specified for the generated jars
* The weblogic element now supprts an attribte noEJBC to skip the processing
of the jar by ejbc. The ejbc step will then occur at deployment
* weblogic will tell ejbc to use Jikes compiler if build.compiler is set to
jikes. It can be restored to the default, javac, operation if desired.
* weblogic will tell ejbc to use Jikes compiler if build.compiler is set to
jikes. It can be restored to the default, javac, operation if desired.
* Allow the <sql> Delimiter to be set in the so that Oracle stored procs may be
entered
entered

* <execon> and <apply> can now optionally skip empty filesets.

@@ -574,8 +684,8 @@ Other changes:

* added vmlauncher attribute to exec tasks. This defaults to true. If
it is set to false, the VM's ability to launch commands in bypassed
and the OS shell, either directly or through the auxillary antRun
scripts is used.
and the OS shell, either directly or through the auxillary antRun
scripts is used.

* regexp mapper now supports the java.util.regex package of JDK 1.4.

@@ -594,7 +704,7 @@ Other changes:

* <junit> can now optionally set a property on test failure.

* <taskdef> can now define several tasks at once, reading the
* <taskdef> can now define several tasks at once, reading the
name/classname pairs from a property file or resource.

* <unzip/unjar/unwar> and <untar> now have an overwrite attribute that
@@ -603,10 +713,10 @@ Other changes:

* <patternset> and <fileset> now support nested <in/excludesfile>
elements - using these you can have more than one in/excludes file
per <patternset>.
per <patternset>.

* Three new supported compilers for javac: kjc for kopi, gcj for the
gcc frontend and sj for Symantec's compiler.
gcc frontend and sj for Symantec's compiler.
In addition extJavac or the new fork attribute can be
used to run the JDK's javac in a JVM separate from Ant.

@@ -617,44 +727,44 @@ Other changes:

* <move> will now try to rename() files before copying them byte by
byte - only if filtering is of, of course.
* <ant> and <antcall> tasks now support a new attribute inheritAll. When set to
false, only user properties are passed through to the target Ant instance.
This includes properties set on the command line and properties explicitly
passed
* <javadoc> now skips off line links if the package list cannot be found.

* <wlrun> now allows the security policy file to exist outside the weblogic
directory.
* <java> task will set the Thread contextClassLoader under JDKs 1.2+ to the
classloader for the class being executed.
* Introduce the concept of a TaskContainer - a task or element which can contain
Ant Tasks.
Ant Tasks.
* Add new tasks implementing the TaskContainer interface <parallel> and
<sequential> which allow parallel execution of tasks to be specified.

* <depend> task will now take into account dependencies on jar files and class
files from a given classpath.
* <jar> manifest entries may now be specified in the build file either
* <jar> manifest entries may now be specified in the build file either
completely or to be merged with a manifest file.

* <tstamp> task custom formats now support locales.
* <tstamp> task custom formats now support locales.

* Added a listner which will forward events to Log4J. The log4j configuration
* Added a listner which will forward events to Log4J. The log4j configuration
file should be in the directory from which Ant is run or passed as a system
property using a JVM argument.

* Introduced the concept of <filtersets> to allow for more control in which
filters get applied in a <copy> or <move> operation.
* Introduced the concept of <filtersets> to allow for more control in which
filters get applied in a <copy> or <move> operation.

* Added nowarn attribute to javac and deprecated the Jikes-magic property
build.compiler.warnings.
* The <depend> task cache format has changed and all dependency information is
now stored in a single file.

@@ -671,7 +781,7 @@ Fixed bugs:
* <javah>'s outputfile attribute will be resolved as relative to the
projects basedir.

* <antstructure> should create a valid DTD for propertyfile.operation.entry
* <antstructure> should create a valid DTD for propertyfile.operation.entry
and omit tasks it fails to load.

* won't try to pass a -bootclasspath flag to javac 1.1 anymore
@@ -690,25 +800,25 @@ Fixed bugs:

* Output written by testcases will now be captured by the <junit> task
and passed to the formatters.
* Quote the -group parameter to Javadoc as per the specification

* Initialise classes when loaded through the AntClassLoader - that is, run
static initializers
* Implement getResource() and getResources() in AntClassLoader

* Create the <ejbjar> weblogic command line as a set of arguments rather than
as a single line. Avoids problems with paths which contain spaces.
* <ejbjar> now fails when the weblogic ejbc compiler reports an error.
* Make the AntClassLoader load resources in the same order as it currently
loads classes.
loads classes.
* Handle classpaths with spaces

* Make sure XSLT processors close their output files in <style>.
* Make sure XSLT processors close their output files in <style>.

* perform proper uptodate check in <rmic> when compiling for IIOP.

@@ -739,23 +849,23 @@ Fixed bugs:

* Ant classloader will now ignore paths which are invalid relative to the
project base
* <ejbjar> weblogic elements check for jar file changes has been fixed.
Previously some changes would not be included.

* properties loaded from properties files are now resolved internally. This
removes the spurious warnings about usage of properties which have not been
set.
* <jar> task and friends now process the JAR manifest to ensure it is valid.

* The task finished event now includes any exception thrown by the task.

* <java> task now supports a jvmVersion attribute so that if another JVM is
being used, Ant can determine which options to use for features such as the
VM memory limits
being used, Ant can determine which options to use for features such as the
VM memory limits


Changes from Ant 1.2 to Ant 1.3
===========================================

@@ -788,14 +898,14 @@ Other changes:

* Added nested zipfileset element to <zip>

* Changed <sql> so that printing is at the task level rather than
* Changed <sql> so that printing is at the task level rather than
the statement level.
* javadoc task will pass -d flag to any doclet if the destDir attribute is
given. If the doclet does not accept the -d flag then omit the destdir
attribute.

* <cab> can work on non-Windows platforms with the help of libcabinet.
* <cab> can work on non-Windows platforms with the help of libcabinet.
See http://trill.cis.fordham.edu/~barbacha/cabinet_library/.

* <ftp> now supports passive mode.
@@ -809,20 +919,20 @@ Other changes:
command.

* Style tasks will now support TraX compliant XSL processors if one is present
in your classpath.
in your classpath.

* Added a failonerror to the javac task. If set to false, the build will
* Added a failonerror to the javac task. If set to false, the build will
continue even if there are compilation errors.
* Added nested format elements to the tstamp task allowing additional time
formats to be defined for arbitrary properties.
* Added nested format elements to the tstamp task allowing additional time
formats to be defined for arbitrary properties.

* Added classpath attribute and nested classpath element to <property>
to make the resource attribute more powerful.

* ${} property expansion will now be performed on the patterns read
from files specified as includesfile or excludesfile attributes.
* The <tar> and <untar> tasks now support GNU format for handling paths
which are greater than 100 characters in length. In addition the <tar>
task now supports nested filesets through which the file permissions
@@ -849,16 +959,16 @@ Fixed bugs:

* Changes to ddcreator and ejbc helper to respect the descriptor hierarchy
keppgenerated in ejbc can now be turned off
* ejbjar now correctly ignores <ejb-ref> elements in the deployment descriptor.
CMP files are included by parsing the weblogic deployment descriptor rather
CMP files are included by parsing the weblogic deployment descriptor rather
than relying on the naming convention used in ant 1.2
* ejbjar includes super classes and super interfaces into the generated ejb
jar files. The <support> nested element allows support classes to be
* ejbjar includes super classes and super interfaces into the generated ejb
jar files. The <support> nested element allows support classes to be
included in the EJB jar. The toplink element should now correctly locate
the toplink descriptor.
* <vssget> now correctly deals with spaces in arguments

* <jar> fails early if a given manifest file doesn't exist
@@ -867,7 +977,7 @@ Fixed bugs:
set to 1.2.

* <rmic> uses the the same classpath to verify a class can be rmic'd
as it passes to the compiler.
as it passes to the compiler.

* org.apache.tools.mail.MailMessage (and therefore <mail>) can now
handle SMTP servers sending multi line responses.
@@ -878,13 +988,13 @@ Fixed bugs:
* <property> and <available> will search for the resource "foo" instead
of "/org/apache/tools/ant/taskdefs/foo" when given a relative resource
name foo.
* Handle build files in directories whose name contained a "#" character

* <junit> can now log to files whose name contains a comma as well.
* <junit> can now log to files whose name contains a comma as well.

* The AntClassLoader now refers to the loader which loaded it, any
requests it does not handle itself. Previously these went to the
* The AntClassLoader now refers to the loader which loaded it, any
requests it does not handle itself. Previously these went to the
primordial loader.

Changes from Ant 1.1 to Ant 1.2
@@ -930,7 +1040,7 @@ behavior has been dropped.

* <ejbjar> task syntax has been changed significantly

* <exec> is no longer implemented by org.apache.tool.ant.taskdefs.Exec.
* <exec> is no longer implemented by org.apache.tool.ant.taskdefs.Exec.
Custom tasks that rely on Project.createTask("exec") to return an
instance of this class are going to fail.

@@ -967,7 +1077,7 @@ level and later be referenced by their id attribute.
* <get> can check whether a remote file is actually newer than a local
copy before it starts a download (HTTP only).

* Added a -logger option to allow the class which performs logging to be
* Added a -logger option to allow the class which performs logging to be
specified on the command line.

* Added a -emacs option to tell the logger to leave out taskname adornments
@@ -1007,5 +1117,5 @@ cases.
* many more fixes we've forgotten to document here ...

* The packagelistloc attribute of <javadoc>'s <link> child will be
resolved as a file (i.e. it is either absolute or relative to
resolved as a file (i.e. it is either absolute or relative to
basedir).

+ 2
- 2
bootstrap.bat View File

@@ -26,7 +26,7 @@ if not "%OS%" == "Windows_NT" if exist bootstrap\nul deltree/y bootstrap
if "%OS%" == "Windows_NT" if exist build\nul rmdir/s/q build
if not "%OS%" == "Windows_NT" if exist build\nul deltree/y build

SET LOCALCLASSPATH=lib\xercesImpl.jar;lib\xmlParserAPIs.jar
SET LOCALCLASSPATH=lib\xercesImpl.jar;lib\xml-apis.jar
for %%i in (lib\optional\*.jar) do call src\script\lcp.bat %%i
if exist "%JAVA_HOME%\lib\tools.jar" call src\script\lcp.bat %JAVA_HOME%\lib\tools.jar
if exist "%JAVA_HOME%\lib\classes.zip" call src\script\lcp.bat %JAVA_HOME%\lib\classes.zip
@@ -50,7 +50,7 @@ if not exist build\classes\nul mkdir build\classes
echo.
echo ... Compiling Ant Classes

"%JAVAC%" -d %CLASSDIR% %TOOLS%\bzip2\*.java %TOOLS%\tar\*.java %TOOLS%\zip\*.java %TOOLS%\ant\*.java %TOOLS%\ant\types\*.java %TOOLS%\ant\taskdefs\*.java %TOOLS%\ant\util\*.java %TOOLS%\ant\util\regexp\RegexpMatcher.java %TOOLS%\ant\util\regexp\RegexpMatcherFactory.java %TOOLS%\ant\taskdefs\condition\*.java %TOOLS%\ant\taskdefs\compilers\*.java
"%JAVAC%" %BOOTJAVAC_OPTS% -d %CLASSDIR% %TOOLS%\bzip2\*.java %TOOLS%\tar\*.java %TOOLS%\zip\*.java %TOOLS%\ant\*.java %TOOLS%\ant\types\*.java %TOOLS%\ant\taskdefs\*.java %TOOLS%\ant\util\*.java %TOOLS%\ant\util\regexp\RegexpMatcher.java %TOOLS%\ant\util\regexp\RegexpMatcherFactory.java %TOOLS%\ant\taskdefs\condition\*.java %TOOLS%\ant\taskdefs\compilers\*.java

echo.
echo ... Copying Required Files


+ 1
- 1
bootstrap.sh View File

@@ -79,7 +79,7 @@ if [ -d "build" ] ; then
rm -r build
fi

CLASSPATH=lib/xercesImpl.jar:lib/xmlParserAPIs.jar:${CLASSPATH}
CLASSPATH=lib/xercesImpl.jar:lib/xml-apis.jar:${CLASSPATH}

DIRLIBS=lib/optional/*.jar
for i in ${DIRLIBS}


+ 1
- 1
build.bat View File

@@ -13,7 +13,7 @@ echo Bootstrap FAILED
goto cleanup

:runAnt
set LOCALCLASSPATH=lib\xercesImpl.jar;lib\xmlParserAPIs.jar;bootstrap\lib\ant.jar
set LOCALCLASSPATH=lib\xercesImpl.jar;lib\xml-apis.jar;bootstrap\lib\ant.jar
for %%i in (lib\optional\*.jar) do call bootstrap\bin\lcp.bat %%i
set CLASSPATH=lib\optional\xalanj1compat.jar;%LOCALCLASSPATH%;%CLASSPATH%
set LOCALCLASSPATH=


+ 1
- 1
build.sh View File

@@ -21,7 +21,7 @@ if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/
exit
fi

LOCALCLASSPATH=lib/xercesImpl.jar:lib/xmlParserAPIs.jar
LOCALCLASSPATH=lib/xercesImpl.jar:lib/xml-apis.jar:bootstrap/lib/ant.jar
# add in the dependency .jar files
DIRLIBS=lib/optional/*.jar
for i in ${DIRLIBS}


+ 84
- 15
build.xml View File

@@ -52,6 +52,8 @@
<property name="regexp.package" value="${util.package}/regexp"/>

<property name="manifest" value="src/etc/manifest"/>
<property name="unfiltered.files" value="**/*.gif,**/*.jpg,**/*.ico"/>


<!--
@@ -65,6 +67,7 @@
<property name="build.lib" value="${build.dir}/lib"/>
<property name="build.javadocs" value="${build.dir}/javadocs"/>
<property name="build.tests" value="${build.dir}/testcases"/>
<property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/>

<path id="classpath">
</path>
@@ -118,6 +121,8 @@
-->
<!-- depends on JDK version -->
<patternset id="needs.jdk1.2+">
<exclude name="${optional.package}/extension/**/*.java"
unless="jdk1.2+" />
<exclude name="${util.package}/optional/NoExitSecurityManager.java"
unless="jdk1.2+" />
<exclude name="${optional.package}/Javah.java"
@@ -136,6 +141,10 @@
<!-- use various 1.2 methods -->
<exclude name="${optional.package}/sitraka/**/*.java"
unless="jdk1.2+" />
<exclude name="${optional.package}/ide/VAJ*.java"
unless="jdk1.2+" />
<exclude name="${optional.package}/starteam/*.java"
unless="jdk1.2+" />
</patternset>
<patternset id="needs.jdk1.3+">
<exclude name="${ant.package}/taskdefs/TestProcess.java"
@@ -294,6 +303,20 @@
</patternset>
<patternset id="teststhatfail">
</patternset>
<!--
===================================================================
Set up a patternsets that matches the parts of our JUnit testsuite
that may be useful for task developers.
===================================================================
-->
<patternset id="useful.tests">
<include name="${ant.package}/BuildFileTest*" />
<include name="${regexp.package}/RegexpMatcherTest*" />
<include name="${regexp.package}/RegexpTest*" />
<include name="${optional.package}/AbstractXSLTLiaisonTest*" />
<include name="${ant.package}/types/AbstractFileSetTest*" />
</patternset>

<!--
===================================================================
@@ -317,6 +340,16 @@
<available property="trax.present"
classname="javax.xml.transform.Transformer"
classpathref="classpath" />
<condition property="trax.impl.present">
<or>
<and>
<isset property="javax.xml.transform.TransformerFactory"/>
<available classname="${javax.xml.transform.TransformerFactory}"
classpathref="classpath" />
</and>
<available resource="META-INF/services/javax.xml.transform.TransformerFactory"/>
</or>
</condition>
<available property="xslp.present"
classname="com.kvisco.xsl.XSLProcessor"
classpathref="classpath" />
@@ -378,10 +411,6 @@
<available property="commons.logging.present"
classname="org.apache.commons.logging.LogFactory"
classpathref="classpath"/>
<!-- this is just a way to check for a TraX implementation -->
<available property="trax.impl.present"
resource="META-INF/services/javax.xml.transform.TransformerFactory"
classpathref="classpath"/>
<available property="xalan.envcheck"
classname="org.apache.xalan.xslt.EnvironmentCheck"
classpathref="classpath" />
@@ -459,9 +488,13 @@
</and>
</condition>

<available property="swing.present"
classname="javax.swing.ImageIcon"
classpathref="classpath"/>
<condition property="swing.present">
<or>
<isset property="jdk1.2+" />
<available classname="javax.swing.ImageIcon"
classpathref="classpath"/>
</or>
</condition>

<condition property="wsdl.found">
<or>
@@ -681,6 +714,17 @@

</target>

<!-- Creates jar of test utility classes -->
<target name="test-jar"
depends="compile-tests"
description="--> creates the Apache Ant Test Utilties jar">

<jar destfile="${build.lib}/${name}-testutil.jar"
basedir="${build.tests}">
<patternset refid="useful.tests" />
</jar>
</target>

<!--
===================================================================
Create the essential distribution that can run Apache Ant
@@ -757,16 +801,12 @@
<copy todir="${dist.lib}" file="${lib.dir}/README"/>

<copy todir="${dist.docs}">
<fileset dir="${docs.dir}">
<exclude name="**/images/**"/>
</fileset>
<fileset dir="${docs.dir}" excludes="${unfiltered.files}"/>
<filterchain refid="ant.filters"/>
</copy>

<copy todir="${dist.docs}" filtering="false">
<fileset dir="${docs.dir}">
<include name="**/images/**"/>
</fileset>
<fileset dir="${docs.dir}" includes="${unfiltered.files}"/>
</copy>

<copy todir="${dist.dir}">
@@ -1037,6 +1077,12 @@
targetfile="${build.javadocs}/packages.html" >
<srcfiles dir= "${java.dir}" includes="**/*.java"/>
</uptodate>
<uptodate property="tests.javadoc.notrequired"
targetfile="${build.tests.javadocs}/packages.html" >
<srcfiles dir= "${tests.dir}">
<patternset refid="useful.tests" />
</srcfiles>
</uptodate>
</target>

<target name="javadocs" depends="prepare, javadoc_check"
@@ -1067,6 +1113,26 @@
</javadoc>
</target>

<target name="test-javadocs" depends="prepare, javadoc_check"
unless="tests.javadoc.notrequired"
description="--> creates the API documentation for test utilities">
<mkdir dir="${build.tests.javadocs}"/>
<javadoc useexternalfile="yes"
destdir="${build.tests.javadocs}"
author="true"
version="true"
locale="en"
windowtitle="${Name} Test Utilities"
doctitle="${Name}">

<fileset dir="${tests.dir}">
<patternset refid="useful.tests" />
</fileset>

<bottom>Copyright &#169; 2000-${year} Apache Software Foundation. All Rights Reserved.</bottom>
</javadoc>
</target>

<!--
===================================================================
Compile testcases
@@ -1171,6 +1237,7 @@
<exclude name="${regexp.package}/RegexpTest.java" />
<exclude name="${optional.package}/AbstractXSLTLiaisonTest.java" />
<exclude name="${ant.package}/types/AbstractFileSetTest.java" />
<exclude name="${ant.package}/types/selectors/BaseSelectorTest.java" />

<!-- helper classes, not testcases -->
<exclude name="org/example/**" />
@@ -1217,9 +1284,11 @@
<!-- these tests need to be localised before being ran???? -->
<exclude name="${optional.package}/PvcsTest.java" />

<!-- ehm, this is not really a TraX test but rather a xalan2 test..-->
<!-- These tests need a TraX implementation like xalan2 or saxon -->
<exclude name="${optional.package}/TraXLiaisonTest.java"
unless="xalan2.present"/>
unless="trax.impl.present"/>
<exclude name="${optional.package}/XsltTest.java"
unless="trax.impl.present"/>

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


+ 104
- 20
docs/ant_task_guidelines.html View File

@@ -12,6 +12,18 @@ writing tasks for personal use as the issues it addresses are still
there in such a case.


<h2>Don't break existing builds</h2>

Even if you find some really hideous problem with ant, one that is easy
to fix, if your fix breaks an existing build file then we have problems.
Making sure that every build file out there still works, is one of the
goals of all changes. As an example of this, Ant1.5 passes the single
dollar sign "$" through in strings; Ant1.4 and before would strip it. To
get this fix in we first had to write the test suite to expose current
behaviour, then change something so that singe $ was passed through, but
double "$$" got mapped to "$" for backwards compatibility.


<h2>Use built in helper classes</h2>

Ant includes helper tasks to simplify mauch of your work. Be warned that
@@ -33,9 +45,10 @@ When deriving tasks from this, it often benefits users to permit the
classpath to be specified, and for forking to be an optional attribute.


<h4>Project</h4>
<h4>Project and related classes</h4>

Project has some helper functions to touch a file, to
Project, FileUtils, JavaEnvUtils all have helper functions
to do things like touch a file, to
copy a file and the like. Use these instead of trying to code them
yourself -or trying to use tasks which may be less stable and fiddlier
to use.
@@ -67,13 +80,21 @@ which may be important.
One important rule is 'no tabs'. Use four spaces instead. Not two,
not eight, four. Even if your editor is configured to have a tab of four
spaces, lots of others aren't -spaces have more consistency across
editors and platforms.
editors and platforms. Some IDEs (JEdit) can highlight tabs, to stop you
accidentally inserting them

<h2>Recommended Names for attributes and elements</h2>
<h2>Attributes and elements</h2>

Use the Ant introspection based mapping of attributes into Java datatypes,
rather than implementing all your attributes as setFoo(String) and doing
the mapping to Int, bool or file yourself. This saves work on your part,
lets Java callers use you in a typesafe manner, and will let the Xdocs
documentation generator work out what the parameters are.
<p>
The ant1.x tasks are very inconsistent regarding naming of attributes
-some tasks use source, others src. Here is a list of preferred attribute
names.
-some tasks use <tt>source<tt>, others <tt>src</tt>tt>.
Here is a list of preferred attribute names.

<table>
<tr>
@@ -95,10 +116,41 @@ names.
destination directory for output
</td>
</tr>
<td>
destfile
</td>
<td>
destination file for output
</td>
</tr>
<tr>
<td>
srcdir
</td>
<td>
source directory
</td>
</tr>
<tr>
<td>
srcfile
</td>
<td>
source file
</td>
</tr>
</table>
Yes, this is a very short list. Try and be vaguely consistent with the core
tasks, at the very least.

<h2>Support classpaths</h2>

Try and make it possible for people to supply a classpath to your task,
if you need external libraries, rather than make them add everything to
the ANT_HOME\lib directory. This lets people keep the external libraries
in their ant-based project, rather than force all users to make changes
to their ant system configuration.

<h2>Design for controlled re-use</h2>

Keep member variables private. If read access by subclasses is required.
@@ -149,7 +201,7 @@ Java 1.4 adds a new optional change to the language itself, the
<tt>assert</tt> keyword, which is only enabled if the compiler is told
to compile 1.4 version source. Clearly with the 1.1 compatibility requirement,
Ant tasks can not use this keyword. They also need to move away from
using the JUnit <tt>assert()</tt> method and start calling <tt>assertTrue()</tt>
using the JUnit <tt>assert()</tt> method and call <tt>assertTrue()</tt>
instead.


@@ -188,23 +240,30 @@ and to fix it.
<p>

The test cases are a great way of testing your task during development.
A simple call to 'ant run-test' in the ant source tree will run all ant
A simple call to 'build run-test' in the ant source tree will run all ant
tests, to verify that your changes don't break anything.
To test a single task, use the one shot <code>ant run-single-test
-Dtestcase=${testname}</code> where ${testname} is the name of your test class.
-Dtestcase=${testname}</code> where <code>${testname}</code> is the name of your test class.


<p>

The test cases are also used by the committers to verify that changes
and patches do what they say. If you've got test cases it increases your
credibility significantly.
credibility significantly. To be precise, we hate submissions without
test cases, as it means we have to write them ourselves. This is
something that only gets done if we need the task or it is perceived as
utterly essential to many users.

<p>

Remember also that Ant 1.x is designed to compile and run on Java1.1, so
you should test on Java 1.1 as well as any later version which you use.
You can download an old SDK from Sun for this purpose.
<p>
Finally, run a full <code>build test</code> before and after you start
developing your project, to make sure you havent broken anything else by
accident.

<h2>Document</h2>

@@ -214,6 +273,11 @@ style to that of existing tasks. It should include a list of attributes
and elements, and at least one working example of the task. Many users
cut and paste the examples into their build files as a starting point,
so make the examples practical and test them too.
<p>
You can use the xdocs stuff in proposal/xdocs to autogenerate your
documentation page from the javadocs of the source; this makes life
easier and will make the transition to a full xdoclet generated
documentation build process trivial.

<h2>Licensing and Copyright</h2>

@@ -229,11 +293,9 @@ This is important.

The fairly laissez-faire license of Apache is not compabitible with
either the GPL or the Lesser GPL of the Free Software Foundation -the
Gnu project. Their license requires all changes to the source to be made
public, and give the licensee of any software the right to distribute
copies. It also requires derivative works to be made available under the
same license terms. None of these requirements are in the Apache Software
Foundation license, which permits people and organisations to build
Gnu project. These licenses have stricter terms, "copyleft", which are
not in the Apache Software Foundation license.
This permits people and organisations to build
commercial and closed source applications atop the Apache libraries and
source -but not use the Apache, Ant or Jakarta Project names without
permission.
@@ -249,10 +311,25 @@ will be politely and firmly rejected.
<p>

Once ant-2 adds better dynamic task incorporation, it may be possible to
provide a framework for supporting [L]GPL code, but still no tasks
direcely subject to the Gnu licenses will ever be included in the Ant
provide a framework for indirectly supporting [L]GPL code, but still no tasks
directly subject to the Gnu licenses can be included in the Ant
CVS tree.

<p>
If you link to a GPL or LGPL library, by <code>import</code> or
reflection, your task must be licensed under the same terms. So tasks
linking to (L)GPL code can't go into the Apache managed codebase.
Tasks calling such code can use the 'exec' or 'java' tasks to run the
programs, as you are just executing them at this point, not linking to
them.
<p>
Even if we cannot include your task into the Apache codebase, we can
still point to where you host it -just submit a diff to
xdocs/external.html pointing to your task.

If your task links directly to proprietary code, we have a differnt
problem: it is really hard to build the tasks. Please use reflection.

<h3>Dont re-invent the wheel</h3>

We've all done it: written and submitted a task only to discover it
@@ -302,6 +379,13 @@ zipped up. If your submission is bigger than that, why not break it up
into separate tasks.
<p>

We also like submissions to be added to
<a href="http://nagoya.apache.org/bugzilla/">bugzilla</a>, so that they
dont get lost. Please submit them by first filing the report with a
meaningful name, then adding files as attachments. Use CVS diff files
please!
<p>

If you hear nothing after a couple of weeks, remind the mailing list.
Sometimes really good submissions get lost in the noise of other issues.
This is particularly the case just prior to a new point release of
@@ -333,7 +417,7 @@ cases, while documentation helps sell the reason for a task.
<li>Message to ant-dev contains [PATCH], task name and patch reason in
subject.
<li>Message body contains a rationale for the patch.
<li>Message attachment contains the patch file(s).
<li>Message attachment contains the patch file(s).
</ul>

<h3>Checklist before submitting a new task</h3>
@@ -356,10 +440,10 @@ optionaltasklist.html to link to the new task page
<li>Message to ant-dev contains [SUBMIT] and task name in subject
<li>Message body contains a rationale for the task
<li>Message attachments contain the required files -source, documentation,
test and patches
test and patches zipped up to escape the HTML filter.
</ul>
<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>

</body></html>


+ 17
- 0
docs/antnews.html View File

@@ -98,6 +98,23 @@
</td>
<td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Ant 1.5Beta2"><strong>Ant 1.5Beta2</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<h3>June 1, 2002 - Ant 1.5 Beta2 Available!</h3>
<p>The second beta version of Ant 1.5 is now available for
<a href="http://jakarta.apache.org/builds/jakarta-ant/release/v1.5Beta2/">
download</a>. If you have any feedback on the beta feel free to join the
discussion on the ant-dev and ant-user mailing lists.
</p>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Ant 1.5Beta1"><strong>Ant 1.5Beta1</strong></a>


+ 56
- 0
docs/external.html View File

@@ -2359,6 +2359,62 @@
</table>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="WebSphere Studio Application Developer"><strong>WebSphere Studio Application Developer</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>WSAD features Ant integrate by virtue of being built on the Eclipse tools platform.</p>
<table>
<tr>
<td bgcolor="#039acc" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Compatibility:
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
bundles Ant 1.4.1
</font>
</td>
</tr>
<tr>
<td bgcolor="#039acc" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Article:
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
<a href="http://www7b.software.ibm.com/wsdd/library/techarticles/0203_searle/searle1.html">Ant Integration Part1</a>
</font>
</td>
</tr>
<tr>
<td bgcolor="#039acc" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
License:
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Commercial
</font>
</td>
</tr>
</table>
</blockquote>
</td></tr>
</table>
</blockquote>
</td></tr>


+ 4
- 4
docs/index.html View File

@@ -100,14 +100,14 @@
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Ant 1.5Beta1"><strong>Ant 1.5Beta1</strong></a>
<a name="Ant 1.5Beta2"><strong>Ant 1.5Beta2</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<h3>Apache Ant 1.5Beta1 Available !</h3>
<p>Version 1.5Beta1 of Ant has been released. It is available for download
<a href="http://jakarta.apache.org/builds/jakarta-ant/release/v1.5Beta1/">
<h3>Apache Ant 1.5Beta2 Available !</h3>
<p>Version 1.5Beta2 of Ant has been released. It is available for download
<a href="http://jakarta.apache.org/builds/jakarta-ant/release/v1.5Beta2/">
here</a>.
</p>
<p><a href="./antnews.html">Read more news about Ant</a></p>


+ 5
- 4
docs/manual/CoreTasks/ant.html View File

@@ -87,9 +87,10 @@ project.</p>
</tr>
</table>

<h3>Parameters specified as nested elements</h3>
<h4>property</h4>
<p>See the description of the <a href="property.html">property task</a>.</p>
<h3>Parameters specified as nested elements</h3> <h4>property</h4>
<p>See the description of the <a href="property.html">property
task</a>. Note that the <code>refid</code> attribute points to a
reference in the calling project, not in the new one.</p>

<h4><a name="reference">reference</a></h4>
<p>Used to chose references that shall be copied into the new project,
@@ -221,7 +222,7 @@ a <code>&lt;path&gt;</code> with the id <code>path1</code>, but
new project using the id <code>path2</code>.</p>

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

</body>


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

@@ -83,7 +83,7 @@ optionally changing their id.</p>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">toid</td>
<td valign="top">torefid</td>
<td valign="top">The id of the reference in the new project.</td>
<td valign="top" align="center">No, defaults to the value of refid.</td>
</tr>
@@ -112,7 +112,7 @@ optionally changing their id.</p>
<p>will copy the parent's definition of <code>path1</code> into the
new project using the id <code>path2</code>.</p>

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

</body>


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

@@ -36,7 +36,7 @@ listed as <code>#IMPLIED</code>.</p>
<blockquote><pre>
&lt;antstructure output=&quot;project.dtd&quot;/&gt;
</pre></blockquote>
<hr><p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -196,7 +196,7 @@ of all files separated by spaces.</p>
<code>.o</code>, replacing TARGETFILE with the absolute filename of
the <code>.o</code> and SOURCEFILE with the absolute name of the
<code>.c</code> file.</p>
<hr><p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -120,7 +120,7 @@ if the class <code>javax.xml.transform.Transformer</code> is found in the classp
<p>sets the <code>have.extras</code> property to the value &quot;true&quot;
if the resource-file <code>extratasks.properties</code> is found.
</p>
<hr><p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -102,7 +102,7 @@ below any directory named trial) writable for members of the same
group on a UNIX system. In addition all files belonging to a FileSet
with <code>id</code> <code>other.shared.sources</code> get the same
permissions.</p>
<hr><p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -93,6 +93,7 @@ the tests succeed.
<li>netware (for Novell NetWare)</li>
<li>os/2 (for OS/2)</li>
<li>win9x for Microsoft Windows 95 and 98</li>
<li>z/os for z/OS and OS/390</li>
</ul>

<h4>equals</h4>
@@ -150,7 +151,8 @@ ignored.</p>

<h4>http</h4>
<p>The <code>http</code> condition checks for a valid response from a
web server of the specified url.</p>
web server of the specified url. By default, HTTP responses errors
of 400 or greater are viewed as invalid.</p>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td width="12%" valign="top"><b>Attribute</b></td>
@@ -160,8 +162,13 @@ web server of the specified url.</p>
<tr>
<td valign="top">url</td>
<td valign="top">The full URL of the page to request. The web server must
return a status code of &lt;500..</td>
return a status code of &lt;<tt>errorsBeginAt</tt></td>
<td align="center">Yes.</td>
<td valign="top">errorsBeginAt</td>
<td valign="top">The lowest HTTP response code that signals an error;
by default '400'; server errors, not-authorized, not-found and the like
are detected</td>
<td align="center">No</td>
</tr>
</table>



+ 20
- 12
docs/manual/CoreTasks/copy.html View File

@@ -11,10 +11,10 @@
<h3>Description</h3>
<p>Copies a file or FileSet to a new file or directory. By default, files are
only copied if the source file is newer than the destination file,
or when the destination file does not exist. However, you can explicitly
or when the destination file does not exist. However, you can explicitly
overwrite files with the <code>overwrite</code> attribute.</p>
<p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select a
set of files to copy.
set of files to copy.
To use a <code>&lt;fileset&gt;</code>, the <code>todir</code> attribute
must be set.</p>
<h3>Parameters</h3>
@@ -27,7 +27,7 @@ must be set.</p>
<tr>
<td valign="top">file</td>
<td valign="top">The file to copy.</td>
<td valign="top" align="center">Yes, unless a nested
<td valign="top" align="center">Yes, unless a nested
<code>&lt;fileset&gt;</code> element is used.</td>
</tr>
<tr>
@@ -89,26 +89,34 @@ must be set.</p>
</td>
<td valign="top" align="center">No; defaults to true.</td>
</tr>
<tr>
<td valign="top">verbose</td>
<td valign="top">Log the files that are being copied.</td>
<td valign="top" align="center">No; defaults to false.</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>fileset</h4>
<p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select
sets of files to copy.
sets of files to copy.
To use a fileset, the <code>todir</code> attribute must be set.</p>
<h4>mapper</h4>
<p>You can define filename transformations by using a nested <a
href="../CoreTypes/mapper.html">mapper</a> element. The default mapper used by
<code>&lt;copy&gt;</code> is the <a
href="../CoreTypes/mapper.html#identity-mapper">identity mapper</a>.</p>
<h4>filterset</h4>
<p><a href="../CoreTypes/filterset.html">FilterSet</a>s are used to replace
tokens in files that are copied.
tokens in files that are copied.
To use a FilterSet, use the nested <code>&lt;filterset&gt;</code> element.</p>

<h4>filterchain</h4>
<p>The Copy task supports nested <a href="../CoreTypes/filterchain.html">
FilterChain</a>s.</p>

<h3>Examples</h3>
<p><b>Copy a single file</b></p>
<pre>
@@ -162,7 +170,7 @@ are copied; they end up with the default <code>UMASK</code> permissions
instead. This
is caused by the lack of any means to query or set file permissions in the
current Java runtimes. If you need a permission-preserving copy function,
use <code>&lt;exec executable="cp" ... &gt;</code> instead.
use <code>&lt;exec executable="cp" ... &gt;</code> instead.
</p>

<p><strong>Windows Note:</strong> If you copy a file to a directory
@@ -172,7 +180,7 @@ the copied file takes on the case of the original. The workaround is to
the file in the destination directory before you copy it.
</p>

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

</body>


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

@@ -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>
recursively. All java files are copied, except for the files under the <code>mypackage/test</code>
directory.</p>
<hr><p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -51,7 +51,7 @@ does not exist.</p>
<p><code>&lt;copyfile src=&quot;${src}/index.html&quot; dest=&quot;${dist}/help/index.html&quot;
/&gt;</code></p>
</blockquote>
<hr><p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -159,7 +159,7 @@ before the command, and any command options should appear after the command as i
above. See <a href="http://www.cvshome.org/docs/manual/index.html" target="_top">the cvs manual</a> for details,
specifically the <a href="http://www.cvshome.org/docs/manual/cvs_16.html" target="_top">Guide to CVS commands</a></p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software
<p align="center">Copyright &copy; 2000-2002 Apache Software
Foundation. All rights Reserved.</p>

</body>


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

@@ -149,7 +149,7 @@ and any subdirectories.</p>
</pre>
<p>deletes all files and subdirectories of <code>build</code>, including
<code>build</code> itself.</p>
<hr><p align="center">Copyright &copy; 2001-2002 Apache Software Foundation.
<hr><p align="center">Copyright &copy; 2000-2002 Apache Software Foundation.
All rights Reserved.</p>

</body>


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

@@ -32,7 +32,7 @@ subdirectories.</p>
<pre> &lt;deltree dir=&quot;${dist}&quot;/&gt;</pre>
<p>deletes the directory <code>${dist}</code>, including its files and
subdirectories.</p>
<hr><p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<hr><p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -83,7 +83,7 @@ Note the use of a double $ symbol to stop Ant
filtering out the single $ during variable expansion
<hr>

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

</body>


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

@@ -193,7 +193,7 @@ sub process is killed and a message printed to the log. The return
value of the execution will be "-1", which will halt the build if
<tt>failonerror=true</tt>, but be ignored otherwise.
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -59,7 +59,7 @@ build.xml:4: Something wrong here.
<p>will give the same result as above.</p>

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

</body>


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

@@ -55,7 +55,7 @@ will read all property entries from the <i>deploy_env.properties</i> file
and set these as filters.

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

</body>


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

@@ -267,7 +267,7 @@ EOF characters are left alone if run on
DOS systems, and are removed if run on Unix systems.
You never know what editor a user will use to browse README's.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -96,7 +96,7 @@
&lt;/genkey&gt;</code></pre>
</blockquote>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -98,7 +98,7 @@ for progress information.
Fetches some file from a server with access control. Because https is being used the
fact that basic auth sends passwords in plaintext is moot.
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 19
- 12
docs/manual/CoreTasks/jar.html View File

@@ -39,15 +39,15 @@ JAR file already exists. When set to <code>yes</code>, the JAR file is
updated with the files specified. When set to <code>no</code> (the
default) the JAR file is overwritten. An example use of this is
provided in the <a href="zip.html">Zip task documentation</a>.</p>
<p>(The Jar task is a shortcut for specifying the manifest file of a JAR file.
<p>(The Jar task is a shortcut for specifying the manifest file of a JAR file.
The same thing can be accomplished by using the <i>fullpath</i>
attribute of a zipfileset in a Zip task. The one difference is that if the
<i>manifest</i> attribute is not specified, the Jar task will
<i>manifest</i> attribute is not specified, the Jar task will
include an empty one for you.)</p>

<p>Manifests are processed by the Jar task according to the
<p>Manifests are processed by the Jar task according to the
<a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html">Jar file specification.</a>
Note in particular that this may result in manifest lines greater than 72 bytes
Note in particular that this may result in manifest lines greater than 72 bytes
being wrapped and continued on the next line.
</p>

@@ -123,7 +123,14 @@ being wrapped and continued on the next line.
</tr>
<tr>
<td valign="top">filesetmanifest</td>
<td valign="top">behavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. Valid values are &quot;skip&quot;, &quot;merge&quot;, and &quot;mergewithoutmain&quot;. &quot;merge&quot; will merge all of manifests together, and merge this into any other specified manifests. &quot;mergewithoutmain&quot; merges everything but the Main section of the manifests. Default value is &quot;skip&quot;.
<td valign="top">behavior when a Manifest is found in a zipfileset or
zipgroupfileset file is found. Valid values are &quot;skip&quot;,
&quot;merge&quot;, and &quot;mergewithoutmain&quot;. &quot;merge&quot;
will merge all of manifests together, and merge this into any other
specified manifests. &quot;mergewithoutmain&quot; merges everything
but the Main section of the manifests. Default value is &quot;skip&quot;.
<b>Note:</b> if this attribute's value is not &quot;skip&quot;, the
created jar will not be readable by using java.util.jar.JarInputStream
</td>
<td valign="top" align="center">No</td>
</tr>
@@ -158,25 +165,25 @@ end up in the <code>META-INF</code> directory of the jar file. If this
fileset includes a file named <code>MANIFEST.MF</code>, the file is
ignored and you will get a warning.</p>

<h4>Manifest</h4>
<h4>manifest</h4>
<p>The manifest nested element allows the manifest for the Jar file to
be provided inline in the build file rather than in an external
file. This element is identical to the
file. This element is identical to the
<a href="manifest.html">manifest</a> task, but its file and mode
attributes will be ignored.</p>
<p>
If both an inline manifest and an external file are both specified, the
manifests are merged.
manifests are merged.
</p>

<p>When using inline manifests, the Jar task will check whether the build
file is more recent that the Jar file when deciding whether to rebuild the
Jar. This will not take into account property file changes which may affect
Jar. This will not take into account property file changes which may affect
the resulting Jar.
</p>

<h3>Examples</h3>
<pre> &lt;jar file=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre>
<pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre>
<p>jars all files in the <code>${build}/classes</code> directory into a file
called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p>
<pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot;
@@ -221,7 +228,7 @@ by Java).</p>
&lt;/jar&gt;</pre>
<p>
This is an example of an inline manifest specification. Note that the Built-By
attribute will take the value of the Ant property ${user.name}. The manifest
attribute will take the value of the Ant property ${user.name}. The manifest
produced by the above would look like this:
</p>
<pre><code>Manifest-Version: 1.0
@@ -232,7 +239,7 @@ Name: common/class1.class
Sealed: false</code></pre>

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

</body>


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

@@ -118,8 +118,8 @@ JVM.
<h3>Parameters specified as nested elements</h3>
<h4>arg and jvmarg</h4>
<p>Use nested <code>&lt;arg&gt;</code> and <code>&lt;jvmarg&gt;</code>
elements to specify arguments for the or the forked VM. See <a
href="../using.html#arg">Command line arguments</a>.</p>
elements to specify arguments for the Java class and the forked VM respectively.
See <a href="../using.html#arg">Command line arguments</a>.</p>
<h4>sysproperty</h4>
<p>Use nested <code>&lt;sysproperty&gt;</code>
elements to specify system properties required by the class.
@@ -175,7 +175,7 @@ and with a maximum memory of 128MB. Any non zero return code breaks the build.
JVM, as it takes different parameters for other JVMs,
That JVM can be started from &lt;exec&gt; if required.
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 22
- 3
docs/manual/CoreTasks/javac.html View File

@@ -229,8 +229,13 @@ invoking the compiler.</p>
</tr>
<tr>
<td valign="top">target</td>
<td valign="top">Generate class files for specific VM version (e.g.,
<code>1.1</code> or <code>1.2</code>).</td>
<td valign="top">Generate class files for specific VM version
(e.g., <code>1.1</code> or <code>1.2</code>). <b>Note that the
default value depends on the JVM that is running Ant. In
particular, if you use JDK 1.4 the generated classes will not be
usable for a 1.1 Java VM unless you explicitly set this attribute
to the value 1.1 (which is the default value for JDK 1.1 to
1.3).</b></td>
<td align="center" valign="top">No</td>
</tr>
<tr>
@@ -456,6 +461,20 @@ the property <code>src2</code>. This can also be represented using nested
&lt;exclude name=&quot;mypackage/p1/testpackage/**&quot;/&gt;
&lt;/javac&gt;</pre>

<p>If you want to run the javac compiler of a different JDK, you
should tell Ant, where to find the compiler and which version of JDK
you will be using so it can choose the correct command line switches.
The following example executes a JDK 1.1 javac in a new process and
uses the correct command line switches even when Ant is running in a
Java VM of a different version:</p>

<pre> &lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
fork=&quot;yes&quot;
executable=&quot;/opt/java/jdk1.1/bin/javac&quot;
compiler=&quot;javac1.1&quot;
/&gt;</pre>

<p><a name="srcdirnote"><b>Note:</b></a>
If you wish to compile only source files located in certain packages below a
common root, use the <code>include</code>/<code>exclude</code> attributes
@@ -543,7 +562,7 @@ while all others are <code>false</code>.</p>
</p>

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

</body>


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

@@ -724,7 +724,7 @@ respectively.</p>
&lt/javadoc&gt;</pre>

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

</body>


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

@@ -71,7 +71,7 @@ Load a file, don't fail if it is missing (a message is printed, though)
srcFile="recipientlist.txt"&gt;
&lt;filterchain&gt;
&lt;<a href="../CoreTypes/filterchain.html#striplinebreaks">striplinebreaks</a>/&gt;
&lt;/filterchaint&gt;
&lt;/filterchain&gt;
&lt;/loadfile&gt;
</pre>
Load a property which can be used as a parameter for another task (in this case mail),


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

@@ -179,7 +179,7 @@ inside the <code>&lt;message&gt;</code> element.</p>
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>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -30,7 +30,7 @@ necessary.</p>
<pre>&lt;mkdir dir=&quot;${dist}/lib&quot;/&gt;</pre>
<p>creates a directory <code>${dist}/lib</code>.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 7
- 4
docs/manual/CoreTasks/move.html View File

@@ -26,13 +26,13 @@ to move to the <var>todir</var> directory.</p>
<tr>
<td valign="top">file</td>
<td valign="top">the file to move</td>
<td valign="top" align="center">One of <var>file</var> or
<td valign="top" align="center">One of <var>file</var> or
at least one nested fileset element</td>
</tr>
<tr>
<td valign="top">tofile</td>
<td valign="top">the file to move to</td>
<td valign="top" align="center" rowspan="2">With the <var>file</var> attribute,
<td valign="top" align="center" rowspan="2">With the <var>file</var> attribute,
either <var>tofile</var> or <var>todir</var> can be used. With nested filesets,
if the fileset size is greater than 1 or if the only entry in the fileset is a
directory or if the <var>file</var> attribute is already specified, only
@@ -59,7 +59,7 @@ to move to the <var>todir</var> directory.</p>
<td valign="top">flatten</td>
<td valign="top">ignore directory structure of source directory,
copy all files into a single directory, specified by the <var>todir</var>
attribute (default is &quot;false&quot;).Note that you can achieve the
attribute (default is &quot;false&quot;).Note that you can achieve the
same effect by using a <a href="../CoreTypes/mapper.html#flatten-mapper">flatten mapper</a></td>
<td valign="top" align="center">No</td>
</tr>
@@ -76,6 +76,9 @@ to move to the <var>todir</var> directory.</p>
href="../CoreTypes/mapper.html">mapper</a> element. The default mapper used by
<code>&lt;copy&gt;</code> is the <a
href="../CoreTypes/mapper.html#identity-mapper">identity</a>.</p>
<h4>filterchain</h4>
<p>The Move task supports nested <a href="../CoreTypes/filterchain.html">
FilterChain</a>s.</p>
<h3>Examples</h3>
<p><b>Move a single file (rename a file)</b></p>
<pre>
@@ -111,7 +114,7 @@ in a directory.</b></p>
&lt;/move&gt;
</pre>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -40,7 +40,7 @@ file is newer.</p>
/&gt;</code></p>
</blockquote>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -74,7 +74,7 @@ the diff output looked like</p>
</pre>
the leading <i>a/</i> will be stripped.
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -147,7 +147,7 @@ Two of the values are shown being echoed.
</p>

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


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

@@ -41,7 +41,7 @@
and <code>version</code> being predefined properties). If a file named <code>${name}-${version}.jar</code>
already exists, it will be removed prior to renaming <code>foo.jar</code>.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -177,7 +177,7 @@ token]]>&lt;/replacevalue&gt;
<p><b>Note:</b> It is possible to use either the <i>token</i>/<code>&lt;replacetoken&gt;</code> and <i>value</i>/<code>&lt;replacevalue&gt;</code> attributes/elements, the nested replacefilter elements, or both in the same operation.
</p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -234,7 +234,7 @@ files below <code>${build}/classes</code> whose classname starts with
<code>${build}/classes</code>.</p>

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

</body>


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

@@ -108,7 +108,7 @@ alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt;</code></p>
<p>signs the ant.jar with alias &quot;apache-group&quot; accessing the
keystore and private key via &quot;secret&quot; password.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -282,7 +282,7 @@ truncate table some_other_table;
</pre></blockquote>

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

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

@@ -27,8 +27,10 @@ inclusion/exclusion of files works, and how to write patterns.</p>
attributes of <code>&lt;fileset&gt;</code> (<code>dir</code> becomes <code>basedir</code>)
as well as the nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>
and <code>&lt;patternset&gt;</code> elements.</p>
<p>Style supports the use of a &lt;param&gt; element which is used to pass values
<p>This task supports the use of a nested &lt;param&gt; element which is used to pass values
to an &lt;xsl:param&gt; declaration.</p>
<p>This task supports the use of a nested <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
element which is used to perform Entity and URI resolution</p>
<p><i>&lt;style&gt; and &lt;xslt&gt; refer to the same Ant task and can be used interchangeably.</i></p>
<p>If you want to use Xalan-J 1 or XSL:P, you also need Ant's optional.jar</p>
<h3>Parameters</h3>
@@ -161,6 +163,9 @@ inclusion/exclusion of files works, and how to write patterns.</p>
<p>The classpath to load the processor from can be specified via a
nested <code>&lt;classpath&gt;</code>, as well - that is, a
<a href="../using.html#path">path</a>-like structure.</p>
<h4>xmlcatalog</h4>
<p>The <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
element is used to perform Entity and URI resolution.</p>
<h4>param</h4>
<p>Param is used to pass a parameter to the XSL stylesheet.</p>
<h4>Parameters</h4>
@@ -187,9 +192,23 @@ nested <code>&lt;classpath&gt;</code>, as well - that is, a
<pre>
&lt;style basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;/&gt;</pre>
<h4>Using XSL parameters</h4>
<h4>Using an xmlcatalog</h4>
<pre>&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt;
&lt;xmlcatalog refid=&quot;mycatalog&quot;/&gt;
&lt;/xslt&gt;

&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt;
&lt;xmlcatalog&gt;
&lt;dtd
publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot;
location=&quot;com/arielpartners/knowledgebase/dtd/article.dtd&quot;/&gt;
&lt;/xmlcatalog&gt;
&lt;/xslt&gt;</pre>
<h4>Using XSL parameters</h4>
<pre>&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt;
&lt;param name=&quot;date&quot; expression=&quot;07-01-2000&quot;/&gt;
&lt;/xslt&gt;</pre>

@@ -199,7 +218,7 @@ nested <code>&lt;classpath&gt;</code>, as well - that is, a
</p>
</blockquote>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -228,7 +228,7 @@ of a directory, so <code>${dist.name}</code> is a valid path relative
to <code>${dist.name}/..</code>.</p>

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

</body>


+ 8
- 1
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>
<td align="center" valign="top">No</td>
</tr>
<tr>
<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
allow multiple tasks/types to be loaded with the same loader, so they can call
each other. ( introduced in ant1.5 )</td>
<td align="center" valign="top">No</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>classpath</h4>
@@ -70,7 +77,7 @@ href="../using.html#path">PATH like structure</a> and can also be set via a nest
<p>makes a task called <code>myjavadoc</code> available to Ant. The class <code>com.mydomain.JavadocTask</code>
implements the task.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 195
- 0
docs/manual/CoreTasks/tempfile.html View File

@@ -0,0 +1,195 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Tempfile
Task</title>
</head>

<body bgcolor="#ffffff" text="#000000" link="#525D76"
alink="#525D76" vlink="#525D76">

<table border="0" width="100%" cellspacing="4">

<!-- PAGE HEADER -->
<tr>
<td>
<table border="0" width="100%"><tr>
<td valign="bottom">
<font size="+3" face="arial,helvetica,sanserif"><strong>Tempfile
Task</strong></font>
<br><font face="arial,helvetica,sanserif">This task sets a property to the name of a temporary file.</font>
</td>
<td>
<!-- PROJECT LOGO -->
<a href="http://jakarta.apache.org/ant/">
<img src="../../images/ant_logo_large.gif" align="right" alt="Apache Ant" border="0"/>
</a>
</td>
</tr></table>
</td>
</tr>

<!-- START RIGHT SIDE MAIN BODY -->
<tr>
<td valign="top" align="left">

<!-- Applying task/long-description -->
<!-- Start Description -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="description">
<strong>Description</strong></a></font>
</td></tr>

<tr><td><blockquote>
This task sets a property to the name of a temporary file.
Unlike the Java1.2 method to create a temporary file, this task
does work on Java1.1. Also, it does not actually create the
temporary file, but it does guarantee that the file did not
exist when the task was executed.
<p>
Examples
<pre>&lt;tempfile property="temp.file" /&gt;</pre>
create a temporary file
<pre>&lt;tempfile property="temp.file" suffix=".xml" /&gt;</pre>
create a temporary file with the .xml suffix.
<pre>&lt;tempfile property="temp.file" destDir="build"/&gt;</pre>
create a temp file in the build subdir
</blockquote></td></tr>

</table>
<!-- End Description -->

<!-- Start Attributes -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="attributes">
<strong>Parameters</strong></a></font>
</td></tr>

<tr><td><blockquote>
<table>
<tr>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Attribute</b></font>
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font>
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">destDir</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
destination directory. If null,
the parent directory is used instead
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">prefix</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
optional prefix string
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">property</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The property you wish to assign the temporary file to
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">suffix</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Suffix string for the temp file (optional)
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
</tr>

</table>
</blockquote></td></tr>

</table>
<!-- End Attributes -->

<!-- Start Elements -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="elements">
<strong>Parameters as nested elements</strong></a></font>
</td></tr>

<tr><td><blockquote>

</blockquote></td></tr>

</table>
<!-- End Elements -->


</td>
</tr>
<!-- END RIGHT SIDE MAIN BODY -->

<!-- FOOTER SEPARATOR -->
<tr>
<td>
<hr noshade="" size="1"/>
</td>
</tr>

<!-- PAGE FOOTER -->
<tr>
<td>
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 2000-2002, Apache Software Foundation
</em></font></div>
</td>
</tr>

</table>

</body>
</html>

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

@@ -57,7 +57,7 @@ hour times).</p>
<p>changes the modification time to Oct, 09 1974 4:30 pm of all files and directories
found in <code>src_dir</code>. </p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -12,7 +12,7 @@
<h3>Description</h3>
<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
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;month day year&quot;.</p>

@@ -137,7 +137,7 @@ Sets three properties with the standard formats, prefixed with "start.":


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

</body>
</html>


+ 8
- 1
docs/manual/CoreTasks/typedef.html View File

@@ -62,6 +62,13 @@ the project level and referenced via their ID attribute.</p>
use when looking up <code>classname</code>.</td> <td
align="center" valign="top">No</td>
</tr>
<tr>
<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
allow multiple tasks/types to be loaded with the same loader, so they can call
each other. ( introduced in ant1.5 )</td>
<td align="center" valign="top">No</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>classpath</h4>
@@ -73,7 +80,7 @@ via a nested <i>classpath</i> element.</p>
<p>makes a data type called <code>urlset</code> available to Ant. The
class <code>com.mydomain.URLSet</code> implements this type.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software
<p align="center">Copyright &copy; 2001-2002 Apache Software
Foundation. All rights Reserved.</p>

</body>


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

@@ -56,7 +56,7 @@ does not exist.</p>
subdir is a directory).</p>

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

</body>


+ 6
- 6
docs/manual/CoreTasks/unzip.html View File

@@ -71,8 +71,8 @@ to perform unarchival upon.
&lt;patternset&gt;
&lt;include name=&quot;**/*.java&quot;/&gt;
&lt;exclude name=&quot;**/Test*.java&quot;/&gt;
&lt;patternset/&gt;
&lt;unzip/&gt;
&lt;/patternset&gt;
&lt;/unzip&gt;
</pre></p>
</blockquote>
<blockquote>
@@ -81,16 +81,16 @@ to perform unarchival upon.
&lt;patternset&gt;
&lt;include name=&quot;**/*.java&quot;/&gt;
&lt;exclude name=&quot;**/Test*.java&quot;/&gt;
&lt;patternset/&gt;
&lt;/patternset&gt;
&lt;fileset dir=&quot;.&quot;&gt;
&lt;include name=&quot;**/*.zip&quot;/&gt;
&lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
&lt;fileset/&gt;
&lt;unzip/&gt;
&lt;/fileset&gt;
&lt;/unzip&gt;
</pre></p>
</blockquote>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -89,7 +89,7 @@ The <code>xmlBuild.notRequired</code> property can then be used in a
<code>&lt;target&gt;</code> tag's <code>unless</code> attribute to
conditionally run that target. For example, running the following target:</p>
<pre>
&lt;target name=&quot;xmlBuild&quot; depends="chkXmlBuild" unless="xmlBuild.notRequired&quot;&gt;
&lt;target name=&quot;xmlBuild&quot; depends=&quot;chkXmlBuild&quot; unless=&quot;xmlBuild.notRequired&quot;&gt;
...
&lt;/target&gt;
</pre>
@@ -113,7 +113,7 @@ if <code>/usr/local/bin/testit</code> is newer than
</p>

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

</body>


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

@@ -161,7 +161,7 @@ using Ant's default manifest file. The content of
<code>WEB-INF/web.xml</code> is identical to
<code>src/metadata/myapp.xml</code>.
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -212,7 +212,7 @@ The code
<p>
<p>zips all files in the <code>htdocs/manual</code> directory into the <code>docs/user-guide</code> directory in the archive and includes all the files in any file that maches <code>examples*.zip</code>, such as all files within <code>examples1.zip</code> or <code>examples_for_brian.zip</code>.
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 6
- 0
docs/manual/CoreTypes/dirset.html View File

@@ -63,6 +63,12 @@ elements of <code>&lt;patternset&gt;</code> directly, as well as
<code>false</code>|<code>no</code>|<code>off</code>).</td>
<td valign="top" align="center">No; defaults to true.</td>
</tr>
<tr>
<td valign="top">followsymlinks</td>
<td valign="top">Shall symbolic links be followed? Defaults to
true. See <a href="fileset.html#symlink">fileset's documentation</a>.</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<h4>Examples</h4>


+ 13
- 1
docs/manual/CoreTypes/fileset.html View File

@@ -68,8 +68,20 @@ attributes.</p>
Defaults to true.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">followsymlinks</td>
<td valign="top">Shall symbolic links be followed? Defaults to
true. See <a href="symlink">below</a>.</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<p><a name="symlink"><b>Note</b></a>: All files/directories for which
the canonical path is different from its path are considered symbolic
links. On Unix systems this usually means the file really is a
symbolic links but it may lead to false results on other
platforms.</p>

<h4>Examples</h4>
<blockquote><pre>
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot; &gt;
@@ -100,7 +112,7 @@ a PatternSet that can be referenced in other
same patterns as the above example.</p>

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

</body>


+ 147
- 2
docs/manual/CoreTypes/filterchain.html View File

@@ -239,6 +239,108 @@ Convenience method:
&lt;/loadfile&gt;
</PRE></BLOCKQUOTE>

<H3><a name="linecontains">LineContains</a></H3>

This filter includes only those lines that contain all the user-specified
strings.

<TABLE cellSpacing=0 cellPadding=2 border=1>
<TR>
<TD vAlign=top><B>Parameter Type</B></TD>
<TD vAlign=top><B>Parameter Value</B></TD>
<TD vAlign=top align="center"><B>Required</B></TD>
</TR>
<TR>
<TD vAlign=top>contains</TD>
<TD vAlign=top align="center">Substring to be searched for.</TD>
<TD vAlign=top align="center">Yes</TD>
</TR>
</TABLE>
<P>
<H4>Example:</H4>

This will include only those lines that contain <code>foo</code> and
<code>bar</code>.
<BLOCKQUOTE><PRE>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContains&quot;&gt;
&lt;param type=&quot;contains&quot; value=&quot;foo&quot;/&gt;
&lt;param type=&quot;contains&quot; value=&quot;bar&quot;/&gt;
&lt;/filterreader&gt;
</PRE></BLOCKQUOTE>

Convenience method:
<BLOCKQUOTE><PRE>
&lt;linecontains&gt;
&lt;contains value=&quot;foo&quot;&gt;
&lt;contains value=&quot;bar&quot;&gt;
&lt;/linecontains&gt;
</PRE></BLOCKQUOTE>

<H3><a name="linecontainsregexp">LineContainsRegExp</a></H3>

Filter which includes only those lines that contain the user-specified
regular expression matching strings.

<TABLE cellSpacing=0 cellPadding=2 border=1>
<TR>
<TD vAlign=top><B>Parameter Type</B></TD>
<TD vAlign=top><B>Parameter Value</B></TD>
<TD vAlign=top align="center"><B>Required</B></TD>
</TR>
<TR>
<TD vAlign=top>regexp</TD>
<TD vAlign=top align="center">Pattern of the substring to be searched for.</TD>
<TD vAlign=top align="center">Yes</TD>
</TR>
</TABLE>
<P>
<H4>Example:</H4>

This will fetch all those lines that contain the pattern <code>foo</code>
<BLOCKQUOTE><PRE>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContainsRegExp&quot;&gt;
&lt;param type=&quot;regexp&quot; value=&quot;foo*&quot;/&gt;
&lt;/filterreader&gt;
</PRE></BLOCKQUOTE>

Convenience method:
<BLOCKQUOTE><PRE>
&lt;linecontainsregexp&gt;
&lt;regexp pattern=&quot;foo*&quot;&gt;
&lt;/linecontainsregexp&gt;
</PRE></BLOCKQUOTE>

<H3><a name="prefixlines">PrefixLines</a></H3>

Attaches a prefix to every line.

<TABLE cellSpacing=0 cellPadding=2 border=1>
<TR>
<TD vAlign=top><B>Parameter Name</B></TD>
<TD vAlign=top><B>Parameter Value</B></TD>
<TD vAlign=top align="center"><B>Required</B></TD>
</TR>
<TR>
<TD vAlign=top>prefix</TD>
<TD vAlign=top align="center">Prefix to be attached to lines.</TD>
<TD vAlign=top align="center">Yes</TD>
</TR>
</TABLE>
<P>
<H4>Example:</H4>

This will attach the prefix <code>Foo</code> to all lines.
<BLOCKQUOTE><PRE>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.PrefixLines&quot;&gt;
&lt;param name=&quot;prefix&quot; value=&quot;Foo&quot;/&gt;
&lt;/filterreader&gt;
</PRE></BLOCKQUOTE>

Convenience method:
<BLOCKQUOTE><PRE>
&lt;prefixlines prefix=&quot;Foo&quot;/&gt;
</PRE></BLOCKQUOTE>

<H3><a name="replacetokens">ReplaceTokens</a></H3>

This filter reader replaces all strings that are
@@ -378,6 +480,49 @@ strips them.
&lt;/loadfile&gt;
</PRE></BLOCKQUOTE>

<H3><a name="striplinecomments">StripLineComments</a></H3>

This filter removes all those lines that begin with strings
that represent comments as specified by the user.

<TABLE cellSpacing=0 cellPadding=2 border=1>
<TR>
<TD vAlign=top><B>Parameter Type</B></TD>
<TD vAlign=top><B>Parameter Value</B></TD>
<TD vAlign=top align="center"><B>Required</B></TD>
</TR>
<TR>
<TD vAlign=top>comment</TD>
<TD vAlign=top align="center">Strings that identify a line as a comment
when they appear at the start of the line.</TD>
<TD vAlign=top align="center">Yes</TD>
</TR>
</TABLE>
<P>
<H4>Examples:</H4>

This removes all lines that begin with #, --, REM, rem and //
<BLOCKQUOTE><PRE>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineComments&quot;&gt;
&lt;param type=&quot;comment&quot; value="#&quot;/&gt;
&lt;param type=&quot;comment&quot; value=&quot;--&quot;/&gt;
&lt;param type=&quot;comment&quot; value=&quot;REM &quot;/&gt;
&lt;param type=&quot;comment&quot; value=&quot;rem &quot;/&gt;
&lt;param type=&quot;comment&quot; value=&quot;//&quot;/&gt;
&lt;/filterreader&gt;
</PRE></BLOCKQUOTE>

Convenience method:
<BLOCKQUOTE><PRE>
&lt;striplinecomments&gt;
&lt;comment value=&quot;#&quot;/&gt;
&lt;comment value=&quot;--&quot;/&gt;
&lt;comment value=&quot;REM &quot;/&gt;
&lt;comment value=&quot;rem &quot;/&gt;
&lt;comment value=&quot;//&quot;/&gt;
&lt;/striplinecomments&gt;
</PRE></BLOCKQUOTE>

<H3><a name="tabstospaces">TabsToSpaces</a></H3>

This filter replaces tabs with spaces
@@ -476,8 +621,8 @@ Convenience method:
<BLOCKQUOTE><PRE>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.mid}&quot;&gt;
&lt;filterchain&gt;
&lt;HeadFilter lines=&quot;15&quot;/&gt;
&lt;TailFilter lines=&quot;5&quot;/&gt;
&lt;headfilter lines=&quot;15&quot;/&gt;
&lt;tailfilter lines=&quot;5&quot;/&gt;
&lt;/filterchain&gt;
&lt;/loadfile&gt;
</PRE></BLOCKQUOTE>


+ 1
- 1
docs/manual/CoreTypes/mapper.html View File

@@ -367,7 +367,7 @@ with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
</table>

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

</body>


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

@@ -163,7 +163,7 @@ that it should be used only if a property is not set.</p>
<code>some-other-file</code> points to, if a property of that name has
been defined.</p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 124
- 0
docs/manual/CoreTypes/selectors-program.html View File

@@ -0,0 +1,124 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Programming Selectors in Ant</title>
</head>

<body>
<h2>Programming your own Selectors</h2>

<h3>Selector Programming API</h3>

<p>Want to define your own selectors? It's easy!</p>

<p>First, pick the type of selector that you want to define. There
are three types, and a recipe for each one follows. Chances are
you'll want to work with the first one, Custom Selectors.</p>

<ol>
<li>Custom Selectors

<p>This is the category that Ant provides specifically for you
to
define your own Selectors. Anywhere you want to use your selector
you use the <code>&lt;custom&gt;</code> element and specify
the class name of your selector within it. See the
<a href="selectors.html#customselect">Custom Selectors</a>
section of the Selector page for details. The
<code>&lt;custom&gt;</code> element can be used anywhere
the core selectors can be used. It can be contained within
<a href="selectors.html#selectcontainers">Selector Containers</a>,
for example.</p>

<p>To create a new Custom Selector, you have to create a class that
implements
<code>org.apache.tools.ant.types.selectors.ExtendFileSelector</code>.
The easiest way to do that is through the convenience base class
<code>org.apache.tools.ant.types.selectors.BaseExtendSelector</code>,
which provides all of the methods for supporting
<code>&lt;param&gt;</code> tags. First, override the
<code>isSelected()</code> method, and optionally the
<code>verifySettings()</code> method. If your custom
selector requires parameters to be set, you can also override
the <code>setParameters()</code> method and interpret the
parameters that are passed in any way you like. Several of the
core selectors demonstrate how to do that because they can
also be used as custom selectors.</p>

<li>Core Selectors

<p>These are the selectors used by Ant itself. To implement one of
these, you will have to alter some of the classes contained within
Ant.</p>

<ul>
<li><p>First, create a class that implements
<code>org.apache.tools.ant.types.selectors.FileSelector</code>.
You can either choose to implement all methods yourself from
scratch, or you can extend
<code>org.apache.tools.ant.types.selectors.BaseSelector</code>
instead, a convenience class that provides reasonable default
behaviour for many methods.</p>

<p>There is only one method required.
<code>public boolean isSelected(File basedir, String filename,
File file)</code>
is the real purpose of the whole exercise. It returns true
or false depending on whether the given file should be
selected from the list or not.</p>

<p>If you are using
<code>org.apache.tools.ant.types.selectors.BaseSelector</code>
there are also some predefined behaviours you can take advantage
of. Any time you encounter a problem when setting attributes or
adding tags, you can call setError(String errmsg) and the class
will know that there is a problem. Then, at the top of your
<code>isSelected()</code> method call <code>validate()</code> and
a BuildException will be thrown with the contents of your error
message. The <code>validate()</code> method also gives you a
last change to check your settings for consistency because it
calls <code>verifySettings()</code>. Override this method and
call <code>setError()</code> within it if you detect any
problems in how your selector is set up.</p>

<p>You may also want to override <code>toString()</code>.</p>

<li><p>Put an <code>add</code> method for your selector in
<code>org.apache.tools.ant.types.selectors.SelectorContainer</code>.
This is an interface, so you will also have to add an implementation
for the method in the classes which implement it, namely
<code>org.apache.tools.ant.types.AbstractFileSet</code> and
<code>org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>.
Once it is in there, it will be available everywhere that core
selectors are appropriate.</p>
</ul>

<li>Selector Containers
<p>Got an idea for a new Selector Container? Creating a new one is
no problem:</p>
<ul>
<li><p>Create a new class that implements
<code>org.apache.tools.ant.types.selectors.SelectorContainer</code>.
This will ensure that your new
Container can access any new selectors that come along. Again, there
is a convenience class available for you called
<code>org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>.
</p>
<li><p>Implement the
<code>public boolean isSelected(String filename, File file)</code>
method to do the right thing. Chances are you'll want to iterate
over the selectors under you, so use
<code>selectorElements()</code> to get an iterator that will do
that.</p>
<li><p>Again, put an <code>add</code> method for your container in
<code>org.apache.tools.ant.types.selectors.SelectorContainer</code>
and its implementations
<code>org.apache.tools.ant.types.AbstractFileSet</code> and
<code>org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>.
</p>
</ul>
</ol>

</body>

</html>

+ 760
- 0
docs/manual/CoreTypes/selectors.html View File

@@ -0,0 +1,760 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Selectors in Ant</title>
</head>

<body>
<h2>Selectors</h2>

<p>Selectors are a mechanism whereby the files that make up a fileset
can be selected based on criteria other than filename as provided
by the <code>&lt;include&gt;</code> and <code>&lt;exclude&gt;</code>
tags.</p>

<h3>How to use a Selector</h3>

<p>A selector is an element of FileSet, and appears within it. It can
also be defined outside of any target by using the &lt;selector&gt; tag
and then using it as a reference.
</p>

<p>Different selectors have different attributes. Some selectors can
contain other selectors, and these are called
<a href="#selectcontainers"><code>Selector Containers</code></a>.
There is also a category of selectors that allow
user-defined extensions, called
<a href="#customselect"><code>Custom Selectors</code></a>.
The ones built in to Ant are called
<a href="#coreselect"><code>Core Selectors</code></a>.
</p>
<a name="coreselect"></a>
<h3>Core Selectors</h3>

<p>Core selectors are the ones that come standard
with Ant. They can be used within a fileset and can be contained
within Selector Containers.</p>
<p>The core selectors are:</p>
<ul>
<li><a href="#containsselect">&lt;contains&gt;</a> - Select
files that contain a particular text string
<li><a href="#dateselect">&lt;date&gt;</a> - Select files
that have been modified either before or after a particular date
and time
<li><a href="#dependselect">&lt;depend&gt;</a> - Select files
that have been modified more recently than equivalent files
elsewhere
<li><a href="#depthselect">&lt;depth&gt;</a> - Select files
that appear so many directories down in a directory tree
<li><a href="#filenameselect">&lt;filename&gt;</a> - Select
files whose name matches a particular pattern. Equivalent to
the include and exclude elements of a patternset.
<li><a href="#presentselect">&lt;present&gt;</a> - Select
files that either do or do not exist in some other location
<li><a href="#sizeselect">&lt;size&gt;</a> - Select files
that are larger or smaller than a particular number of bytes.
</ul>


<a name="containsselect"></a>
<h4>Contains Selector</h4>

<p>The <code>&lt;contains&gt;</code> tag in a FileSet limits
the files defined by that fileset to only those which contain the
string specified by the <code>text</code> attribute.
.</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">text</td>
<td valign="top">Specifies the text that every file must contain
</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">casesensitive</td>
<td valign="top">Whether to pay attention to case when looking
for the string in the <code>text</code> attribute. Default is
true.
</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is an example of how to use the Contains Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*.html&quot;&gt;
&lt;contains text=&quot;script&quot; casesensitive=&quot;no&quot;/&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the HTML files that contain the string
<code>script</code>.</p>


<a name="dateselect"></a>
<h4>Date Selector</h4>

<p>The <code>&lt;date&gt;</code> tag in a FileSet will put
a limit on the files specified by the include tag, so that tags
whose last modified date does not meet the date limits specified
by the selector will not end up being selected.</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">datetime</td>
<td valign="top">Specifies the date and time to test for using
a string of the format MM/DD/YYYY HH:MM AM_or_PM.
</td>
<td valign="top" align="center" rowspan="2">At least one of the two.</td>
</tr>
<tr>
<td valign="top">millis</td>
<td valign="top">The number of milliseconds since 1970 that should
be tested for. It is usually much easier to use the datetime
attribute.
</td>
</tr>
<tr>
<td valign="top">when</td>
<td valign="top">Indicates how to interpret the date, whether
the files to be selected are those whose last modified times should
be before, after, or equal to the specified value. Acceptable
values for this attribute are:
<ul>
<li>before - select files whose last modified date is before the indicated date
<li>after - select files whose last modified date is after the indicated date
<li>equal - select files whose last modified date is this exact date
</ul>
The default is before.
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is an example of how to use the Date Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${jar.path}&quot; includes=&quot;**/*.jar&quot;&gt;
&lt;date datetime=&quot;01/01/2001 12:00 AM&quot; when=&quot;before&quot;/&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all JAR files which were last modified before midnight
January 1, 2001.</p>


<a name="dependselect"></a>
<h4>Depend Selector</h4>

<p>The <code>&lt;depend&gt;</code> tag selects files
whose last modified date is later than another, equivalent file in
another location.</p>
<p>The <code>&lt;depend&gt;</code> tag supports the use of a
contained <a href="mapper.html"><code>&lt;mapper&gt;</code></a> element
to define the location of the file to be compared against. If no
<code>&lt;mapper&gt;</code> element is specified, the
<code>identity</code> type mapper is used.</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">targetdir</td>
<td valign="top">The base directory to look for the files to compare
against. The precise location depends on a combination of this
attribute and the <code>&lt;mapper&gt;</code> element, if any.
</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">granularity</td>
<td valign="top">The number of milliseconds leeway to give before
deciding a file is out of date. This is needed because not every
file system supports tracking the last modified time to the
millisecond level. Default is 0 milliseconds.
</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is an example of how to use the Depend Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt;
&lt;depend targetdir=&quot;${ant.1.4.1}/src/main&quot;/&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the Java source files which were modified in the
1.5 release.
</p>


<a name="depthselect"></a>
<h4>Depth Selector</h4>

<p>The <code>&lt;depth&gt;</code> tag selects files based on
how many directy levels deep they are in relation to the base
directory of the fileset.
</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">min</td>
<td valign="top">The minimum number of directory levels below
the base directory that a file must be in order to be selected.
Default is no limit.
</td>
<td valign="top" align="center" rowspan="2">At least one of the two.</td>
</tr>
<tr>
<td valign="top">max</td>
<td valign="top">The maximum number of directory levels below
the base directory that a file can be and still be selected.
Default is no limit.
</td>
</tr>
</table>

<p>Here is an example of how to use the Depth Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt;
&lt;depth max=&quot;1&quot;/&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all files in the base directory and one directory below
that.</p>


<a name="filenameselect"></a>
<h4>Filename Selector</h4>

<p>The <code>&lt;filename&gt;</code> tag acts like the
<code>&lt;include&gt;</code> and <code>&lt;exclude&gt;</code>
tags within a fileset. By using a selector instead, however,
one can combine it with all the other selectors using whatever
<a href="#selectcontainers">selector container</a> is desired.
</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">name</td>
<td valign="top">The name of files to select. The name parameter
can contain the standard Ant wildcard characters.
</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">casesensitive</td>
<td valign="top">Whether to pay attention to case when looking
at file names. Default is "true".
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">negate</td>
<td valign="top">Whether to reverse the effects of this filename
selection, therefore emulating an exclude rather than include
tag. Default is "false".
</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is an example of how to use the Filename Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt;
&lt;filename name=&quot;**/*.css&quot;/&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the cascading style sheet files.</p>


<a name="presentselect"></a>
<h4>Present Selector</h4>

<p>The <code>&lt;present&gt;</code> tag selects files
that have an equivalent file in another directory tree.</p>
<p>The <code>&lt;present&gt;</code> tag supports the use of a
contained <a href="mapper.html"><code>&lt;mapper&gt;</code></a> element
to define the location of the file to be tested against. If no
<code>&lt;mapper&gt;</code> element is specified, the
<code>identity</code> type mapper is used.</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">targetdir</td>
<td valign="top">The base directory to look for the files to compare
against. The precise location depends on a combination of this
attribute and the <code>&lt;mapper&gt;</code> element, if any.
</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">present</td>
<td valign="top">Whether we are requiring that a file is present in
the src directory tree only, or in both the src and the target
directory tree. Valid values are:
<ul>
<li>srconly - select files only if they are in the src
directory tree but not in the target directory tree
<li>both - select files only if they are present both in the
src and target directory trees
</ul>
Default is both.
</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is an example of how to use the Present Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt;
&lt;present targetdir=&quot;${ant.1.4.1}/src/main&quot;/&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the Java source files which are new in the
1.5 release.
</p>


<a name="sizeselect"></a>
<h4>Size Selector</h4>

<p>The <code>&lt;size&gt;</code> tag in a FileSet will put
a limit on the files specified by the include tag, so that tags
which do not meet the size limits specified by the selector will not
end up being selected.</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">value</td>
<td valign="top">The size of the file which should be tested for.
</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">units</td>
<td valign="top">The units that the <code>value</code> attribute
is expressed in. When using the standard single letter SI
designations, such as &quot;k&quot;,&quot;M&quot;, or
&quot;G&quot;, multiples of 1000 are used. If you want to use
power of 2 units, use the IEC standard: &quot;Ki&quot; for 1024,
&quot;Mi&quot; for 1048576, and so on. The default is no units,
which means the <code>value</code> attribute expresses the exact
number of bytes.
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">when</td>
<td valign="top">Indicates how to interpret the size, whether
the files to be selected should be larger, smaller, or equal to
that value. Acceptable values for this attribute are:
<ul>
<li>less - select files less than the indicated size
<li>more - select files greater than the indicated size
<li>equal - select files this exact size
</ul>
The default is less.
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is an example of how to use the Size Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${jar.path}&quot;&gt;
&lt;patternset&gt;
&lt;include name=&quot;**/*.jar&quot;/&gt;
&lt;/patternset&gt;
&lt;size value=&quot;4&quot; units=&quot;Ki&quot; when=&quot;more&quot;/&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all JAR files that are larger than 4096 bytes.</p>


<a name="selectcontainers"></a>
<h3>Selector Containers</h3>

<p>To create more complex selections, a variety of selectors that
contain other selectors are available for your use. They combine the
selections of their child selectors in various ways.</p>

<p>The selector containers are:</p>

<ul>
<li><a href="#andselect">&lt;and&gt;</a> - select a file only if all
the contained selectors select it.
<li><a href="#majorityselect">&lt;majority&gt;</a> - select a file
if a majority of its selectors select it.
<li><a href="#noneselect">&lt;none&gt;</a> - select a file only if
none of the contained selectors select it.
<li><a href="#notselect">&lt;not&gt;</a> - can contain only one
selector, and reverses what it selects and doesn't select.
<li><a href="#orselect">&lt;or&gt;</a> - selects a file if any one
of the contained selectors selects it.
<li><a href="#selectorselect">&lt;selector&gt;</a> - contains only one
selector and forwards all requests to it without alteration. This
is the selector to use if you want to define a reference. It is
usable as an element of <code>&lt;project&gt;</code>.
</ul>

<p>All selector containers can contain any other selector, including
other containers, as an element. Using containers, the selector tags
can be arbitrarily deep. Here is a complete list of allowable
selector elements within a container:</P>

<ul>
<li>&lt;and&gt;
<li>&lt;contains&gt;
<li>&lt;custom&gt;
<li>&lt;date&gt;
<li>&lt;depend&gt;
<li>&lt;depth&gt;
<li>&lt;filename&gt;
<li>&lt;majority&gt;
<li>&lt;none&gt;
<li>&lt;not&gt;
<li>&lt;or&gt;
<li>&lt;present&gt;
<li>&lt;selector&gt;
<li>&lt;size&gt;
</ul>

<a name="andselect"></a>
<h4>And Selector</h4>

<p>The <code>&lt;and&gt;</code> tag selects files that are
selected by all of the elements it contains. It returns as
soon as it finds a selector that does not select the file,
so it is not guaranteed to check every selector.
</p>
<p>Here is an example of how to use the And Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${dist}&quot; includes=&quot;**/*.jar&quot;&gt;
&lt;and&gt;
&lt;size value=&quot;4&quot; units=&quot;Ki&quot; when=&quot;more&quot;/&gt;
&lt;date datetime=&quot;01/01/2001 12:00 AM&quot; when=&quot;before&quot;/&gt;
&lt;/and&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the JAR file larger than 4096 bytes which haven't been update
since the last millenium.
</p>


<a name="majorityselect"></a>
<h4>Majority Selector</h4>

<p>The <code>&lt;majority&gt;</code> tag selects files provided
that a majority of the contained elements also select it. Ties are
dealt with as specified by the <code>allowtie</code> attribute.
</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">allowtie</td>
<td valign="top">Whether files should be selected if there
are an even number of selectors selecting them as are
not selecting them. Default is true.
</td>
<td valign="top" align="center">No</td>
</tr>
</table>


<p>Here is an example of how to use the Majority Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${docs}&quot; includes=&quot;**/*.html&quot;&gt;
&lt;majority&gt;
&lt;contains text=&quot;project&quot; casesensitive="false"/&gt;
&lt;contains text=&quot;taskdef&quot; casesensitive="false"/&gt;
&lt;contains text=&quot;IntrospectionHelper&quot; casesensitive="true"/&gt;
&lt;/majority&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the HTML files which contain at least two of the three
phrases "project", "taskdef", and "IntrospectionHelper" (this last phrase must
match case exactly).
</p>


<a name="noneselect"></a>
<h4>None Selector</h4>

<p>The <code>&lt;none&gt;</code> tag selects files that are
not selected by any of the elements it contains. It returns as
soon as it finds a selector that selects the file,
so it is not guaranteed to check every selector.
</p>
<p>Here is an example of how to use the None Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${src}&quot; includes=&quot;**/*.java&quot;&gt;
&lt;none&gt;
&lt;present targetdir=&quot;${dest}&quot;/&gt;
&lt;present targetdir=&quot;${dest}&quot;&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;*.java&quot; to=&quot;*.class&quot;/&gt;
&lt;/present&gt;
&lt;/none&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects only Java files which do not have equivalent java or
class files in the dest directory.
</p>


<a name="notselect"></a>
<h4>Not Selector</h4>

<p>The <code>&lt;not&gt;</code> tag reverses the meaning of the
single selector it contains.
</p>
<p>Here is an example of how to use the Not Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${src}&quot; includes=&quot;**/*.java&quot;&gt;
&lt;not&gt;
&lt;contains text=&quot;test&quot;/&gt;
&lt;/not&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the files in the src directory that do not contain the
string "test".
</p>


<a name="orselect"></a>
<h4>Or Selector</h4>

<p>The <code>&lt;or&gt;</code> tag selects files that are
selected by any one of the elements it contains. It returns as
soon as it finds a selector that selects the file,
so it is not guaranteed to check every selector.
</p>
<p>Here is an example of how to use the Or Selector:</p>

<blockquote><pre>
&lt;fileset dir=&quot;${basedir}&quot;&gt;
&lt;or&gt;
&lt;depth max=&quot;0&quot;/&gt;
&lt;filename name="*.png"/&gt;
&lt;filename name="*.gif"/&gt;
&lt;filename name="*.jpg"/&gt;
&lt;/or&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all the files in the top directory along with all the
image files below it.
</p>


<a name="selectorselect"></a>
<h4>Selector Reference</h4>

<p>The <code>&lt;selector&gt;</code> tag is used to create selectors
that can be reused through references. It should be used outside of
any target, as an element of the <code>&lt;project&gt;</code> tag. It
can contain only one other selector, but of course that selector can
be a container.
</p>

<p>Here is an example of how to use the Selector Reference:</p>

<blockquote><pre>
&lt;project default=&quot;all&quot; basedir=&quot;./jakarta-ant&quot;&gt;

&lt;selector id=&quot;completed&quot;&gt;
&lt;none&gt;
&lt;depend targetdir=&quot;build/classes&quot;&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;*.java&quot; to=&quot;*.class&quot;/&gt;
&lt;/depend&gt;
&lt;depend targetdir=&quot;docs/manual/api&quot;&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;*.java&quot; to=&quot;*.html&quot;/&gt;
&lt;/depend&gt;
&lt;/none&gt;
&lt;/selector&gt;

&lt;target&gt;
&lt;zip&gt;
&lt;fileset dir=&quot;src/main&quot; includes=&quot;**/*.java&quot;&gt;
&lt;selector refid=&quot;completed&quot;/&gt;
&lt;/fileset&gt;
&lt;/zip&gt;
&lt;/target&gt;
&lt;/project&gt;
</pre></blockquote>

<p>Zips up all the Java files which have an up-to-date equivalent
class file and javadoc file associated with them.
</p>



<a name="customselect"></a>
<h3>Custom Selectors</h3>

<p>You can write your own selectors and use them within the selector
containers by specifying them within the &lt;custom&gt; tag.</p>

<p>First, you have to write your selector class in Java. The only
requirement it must meet in order to be a selector is that it implements
the <code>org.apache.tools.ant.types.selectors.FileSelector</code>
interface, which contains a single method. See
<a href="selectors-program.html">Programming Selectors in Ant</a> for
more information.</p>

<p>Once that is written, you include it in your build file by using
the <code>&lt;custom&gt;</code> tag.
</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">classname</td>
<td valign="top">The name of your class that implements
<code>org.apache.tools.ant.types.selectors.FileSelector</code>.
</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">classpath</td>
<td valign="top">The classpath to use in order to load the
custom selector class. If neither this classpath nor the
classpathref are specified, the class will be
loaded from the classpath that Ant uses.
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">classpathref</td>
<td valign="top">A reference to a classpath previously
defined. If neither this reference nor the
classpath above are specified, the class will be
loaded from the classpath that Ant uses.
</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is how you use <code>&lt;custom&gt;</code> to
use your class as a selector:
</p>

<blockquote><pre>
&lt;fileset dir=&quot;${mydir}&quot; includes=&quot;**/*&quot;&gt;
&lt;custom classname=&quot;com.mydomain.MySelector&quot;&gt;
&lt;param name=&quot;myattribute&quot; value=&quot;myvalue&quot;/&gt;
&lt;/custom&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>A number of core selectors can also be used as custom selectors
by specifying their attributes using &lt;param&gt; elements. These
are</p>

<ul>
<li><a href="#containsselect">Contains Selector</a> with
classname <code>org.apache.tools.ant.types.selectors.ContainsSelector</code>
<li><a href="#dateselect">Date Selector</a> with
classname <code>org.apache.tools.ant.types.selectors.DateSelector</code>
<li><a href="#depthselect">Depth Selector</a> with
classname <code>org.apache.tools.ant.types.selectors.DepthSelector</code>
<li><a href="#filenameselect">Filename Selector</a> with
classname <code>org.apache.tools.ant.types.selectors.FilenameSelector</code>
<li><a href="#sizeselect">Size Selector</a> with
classname <code>org.apache.tools.ant.types.selectors.SizeSelector</code>
</ul>

<p>Here is the example from the Depth Selector section rewritten
to use the selector through <code>&lt;custom&gt;</code>.</p>

<blockquote><pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt;
&lt;custom classname=&quot;org.apache.tools.ant.types.selectors.DepthSelector&quot;&gt;
&lt;param name=&quot;max&quot; value=&quot;1&quot;/&gt;
&lt;/custom&gt;
&lt;/fileset&gt;
</pre></blockquote>

<p>Selects all files in the base directory and one directory below
that.</p>

<p>For more details concerning writing your own selectors, consult
<a href="selectors-program.html">Programming Selectors in Ant</a>.</p>

</body>

</html>





+ 127
- 31
docs/manual/CoreTypes/xmlcatalog.html View File

@@ -8,38 +8,112 @@
<body>

<h2><a name="XMLCatalog">XMLCatalog</a></h2>
<p>An XMLCatalog is a catalog of public resources such as DTDs or entities
that
are referenced in an XML document and are available locally.</p>
<p>This allows the XML Parser, XSL Processor or other consumer of XML

<p>An XMLCatalog is a catalog of public resources such as DTDs or
entities that are referenced in an XML document. Catalogs are
typically used to make web references to resources point to a locally
cached copy of the resource.</p>

<p>This allows the XML Parser, XSLT Processor or other consumer of XML
documents
to efficiently allow a local substitution for a resource available on the
web.
</p>
<p>This data type provides a catalog of resource locations based
on the <a
href="http://oasis-open.org/committees/entity/spec-2001-08-06.html">
OASIS "Open Catalog" standard</a>. The catalog entries are used
both for Entity resolution and URI resolution, in accordance with
the <code>org.xml.sax.EntityResolver</code> and <code>
javax.xml.transform.URIResolver</code> interfaces as defined
in the <a href="http://java.sun.com/xml/jaxp">Java API for XML
Processing (JAXP) Specification</a>.</p>
<p>For example, in a <code>web.xml</code> file, the DTD is referenced as:
<pre>
&lt;!DOCTYPE web-app
PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN&quot;
&lt;!DOCTYPE web-app PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&quot;
&quot;http://java.sun.com/j2ee/dtds/web-app_2_2.dtd&quot;&gt;
</pre>
The XML processor, without XMLCatalog support, would need to retrieve the
DTD from
the URL specified whenever validation of the document was required.
</p>
<p>This can be very time consuming during the build process, especially
where
network throughput is limited.</p>
<p>This can be very time consuming during the build process,
especially where network throughput is limited. Alternatively, you
can do the following:
<ol>
<li>Copy <code>web-app_2_2.dtd</code> onto your local disk somewhere (either in the
filesystem or even embedded inside a jar or zip file on the classpath).</li>
<li>Create an <code>&lt;xmlcatalog&gt;</code> with a <code>&lt;dtd&gt;</code>
element whose <code>location</code> attribute points to the file.</li>
<li>Success! The XML processor will now use the local copy instead of calling out
to the internet.</li>
</ol>
</p>
<p>XMLCatalogs can appear inside tasks
that support this feature or at the same level as <code>target</code>
- i.e., as children of <code>project</code> for reuse across different
tasks,
e.g. XML Validation and XSL Translation.</p>
e.g. XML Validation and XSLT Transformation. The XML Validate task
uses XMLCatalogs for entity resolution. The XSLT Transformation
task uses XMLCatalogs for both entity and URI resolution.</p>
<p>XMLCatalogs are specified as either a reference to another XMLCatalog,
defined
previously in a build file, or as a list of <code>dtd</code> or
<code>entity</code> locations.</p>
<code>entity</code> locations. A separate classpath for entity resolution
may be specified inline via nested <code>classpath</code> elements;
otherwise the system classpath is used for this as well.</p>
<p>XMLCatalogs can also be nested inside other XMLCatalogs. For
example, a "superset" XMLCatalog could be made by including several
nested XMLCatalogs that referred to other, previously defined
XMLCatalogs.</p>
<p>Currently, only <code>&lt;dtd&gt;</code> and
<code>&lt;entity&gt;</code> elements may be specified inline; these
roughly correspond to OASIS catalog entry types <code>PUBLIC</code> and
<code>URI</code> respectively.</p>
<h3><a name="ResolverAlgorithm">Entity/DTD/URI Resolution Algorithm</a></h3>

When an entity, DTD, or URI is looked up by the XML processor, the
XMLCatalog searches its list of entries to see if any match. That is,
it attempts to match the <code>publicId</code> attribute of each entry
with the PublicID or URI of the entity to be resolved. Assuming a
matching entry is found, XMLCatalog then executes the following steps:

<h4>1. Filesystem lookup</h4>

<p>The <code>location</code> is first looked up in the filesystem. If
the <code>location</code> is a relative path, the ant project basedir
attribute is used as the base directory. If the <code>location</code>
specifies an absolute path, it is used as is. Once we have an
absolute path in hand, we check to see if a valid and readable file
exists at that path. If so, we are done. If not, we proceed to the
next step.</p>

<h4>2. Classpath lookup</h4>

<p>The <code>location</code> is next looked up in the classpath.
Recall that jar files are merely fancy zip files. For classpath
lookup, the <code>location</code> is used as is (no base is
prepended). We use a Classloader to attempt to load the resource from
the classpath. For example, if hello.jar is in the classpath and it
contains <code>foo/bar/blat.dtd</code> it will resolve an entity whose
<code>location</code> is <code>foo/bar/blat.dtd</code>. Of course, it
will <em>not</em> resolve an entity whose <code>location</code> is
<code>blat.dtd</code>.


<h4>3. URL-space lookup</h4>

<p>Finally, we attempt to make a URL out of the <code>location</code>.
At first this may seem like this would defeat the purpose of
XMLCatalogs -- why go back out to the internet? But in fact, this can
be used to (in a sense) implement HTTP redirects, substituting one URL
for another. The mapped-to URL might also be served by a local web
server. If the URL resolves to a valid and readable resource, we are
done. Otherwise, we give up. In this case, the XML processor will
perform its normal resolution algorithm. Depending on the processor
configuration, further resolution failures may or may not result in
fatal (i.e. build-ending) errors.</p>

<h3>XMLCatalog attributes</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
@@ -64,6 +138,7 @@ contents
</table>

<h3>XMLCatalog nested elements</h3>
<h4>dtd/entity</h4>
<p>The <code>dtd</code> and <code>entity</code> elements used to specify
XMLCatalogs are identical in their structure</p>
<table border="1" cellpadding="2" cellspacing="0">
@@ -84,46 +159,67 @@ entity,
<tr>
<td valign="top">location</td>
<td valign="top">The location of the local replacement to be used for
the
public identifier specified. This may be specified as a file name,
resource
name found on the classpath, or a URL
the public identifier specified. This may be specified as a file name,
resource name found on the classpath, or a URL. Relative paths will
be resolved according to the base, which by default is the Ant project
basedir.
</td>
<td valign="top" align="center">Yes</td>
</tr>
</table>
<h3>Examples</h4>
<h4>classpath</h4>
<p>The classpath to use for <a href="#ResolverAlgorithm">entity
resolution</a>. The nested <code>&lt;classpath&gt;</code> is a
<a href="../using.html#path">path</a>-like structure.</p>
<h3>Examples</h3>
<p>Set up an XMLCatalog with a single dtd referenced locally in a user's
home
directory:</p>
<blockquote><pre>
&lt;xmlcatalog&gt;
&lt;dtd publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;
location=&quot;/home/dion/downloads/docbook/docbookx.dtd&quot;/&gt;
&lt;dtd
publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;
location=&quot;/home/dion/downloads/docbook/docbookx.dtd&quot;/&gt;
&lt;/xmlcatalog&gt;
</pre></blockquote>
<p>Set up an XMLCatalog with a multiple dtds referenced locally in a
user's home
directory:</p>
<p>Set up an XMLCatalog with a multiple dtds to be found either in the
filesystem (relative to the Ant project basedir) or in the classpath:
</p>
<blockquote><pre>
&lt;xmlcatalog id=&quot;commonDTDs&quot;&gt;
&lt;dtd publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;
location=&quot;/home/dion/downloads/docbook/docbookx.dtd&quot;/&gt;
&lt;dtd publicId=&quot;-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN&quot;
location=&quot;/home/dion/web-app_2_2.dtd&quot;/&gt;
&lt;dtd
publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;
location=&quot;docbook/docbookx.dtd&quot;/&gt;
&lt;dtd
publicId=&quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&quot;
location=&quot;web-app_2_2.dtd&quot;/&gt;
&lt;/xmlcatalog&gt;
</pre></blockquote>

<p>Set up an XMLCatalog with a combination of DTDs and entities as
well as a nested XMLCatalog:</p>

<blockquote><pre>
&lt;xmlcatalog id=&quot;allcatalogs&quot;&gt;
&lt;dtd
publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot;
location=&quot;com/arielpartners/knowledgebase/dtd/article.dtd&quot;/&gt;
&lt;entity
publicId=&quot;LargeLogo&quot;
location=&quot;com/arielpartners/images/ariel-logo-large.gif&quot;/&gt;
&lt;xmlcatalog refid="commonDTDs"/&gt;
&lt;/xmlcatalog&gt;
</pre></blockquote>
<p>To reference the above xmlcatalog in a style task:<p>
<p>To reference the above XMLCatalog in an <code>xslt</code> task:<p>
<blockquote><pre>
&lt;style basedir="${source.doc}"
&lt;xslt basedir="${source.doc}"
destdir="${dest.xdocs}"
extension=".xml"
style="${source.xsl.converter.docbook}"
includes="**/*.xml"
force="true"&gt;
&lt;xmlcatalog refid=&quot;commonDTDs&quot;/&gt;
&lt;/style&gt;
&lt;xmlcatalog refid=&quot;allcatalogs&quot;/&gt;
&lt;/xslt&gt;
</pre></blockquote>

<hr>


+ 10
- 6
docs/manual/OptionalTasks/BorlandEJBTasks.html View File

@@ -53,17 +53,21 @@
<tr>
<td valign="top" width="63">basdtd</td>
<td valign="top" width="915"><b>Deprecated</b>. Defines the location of the
weblogic-ejb-jar DTD which covers the Borland specific deployment descriptors.
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 &lt;dtd&gt; element, described above</td>
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>
<td align="center" valign="middle" width="62">no</td>
</tr>
<tr>
<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 weblogic class hierarchy. This should not be necessary
if you have weblogic in your classpath. If you do not, you should use a
nested &lt;dtd&gt; element, described above. </td>
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
documentation. </td>
<td align="center" valign="middle" width="62">no</td>
</tr>
<tr>
@@ -92,7 +96,7 @@ The verify phase is turned on and the generate client phase as well.
</pre>

<h3>&nbsp;</h3>
<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>

</body>


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

@@ -105,7 +105,7 @@ href="../using.html#arg">Command line arguments</a>.</p>
</p>
<hr>

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

</body>


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

@@ -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
output.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 1
- 1
docs/manual/OptionalTasks/clearcase.html View File

@@ -254,7 +254,7 @@ A graphical dialog will be displayed. The output will be logged to
time will be set to the current time.</p>

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



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

@@ -776,7 +776,7 @@ three nested elements. </p>
to be set. It is useful when setting the classpath from a reference path. In all
other respects the behaviour is the same as the classpath attribute.</p>

<h4>dtd</h4>
<a name="ejbjar-dtd"><h4>dtd</h4></a>

<p>The &lt;dtd&gt; element is used to specify the local location of DTDs to be
used when parsing the EJB deployment descriptor. Using a local DTD is much
@@ -1692,7 +1692,7 @@ deployment descriptor directory.&nbsp;</p>
</pre>

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




+ 1
- 1
docs/manual/OptionalTasks/ftp.html View File

@@ -263,7 +263,7 @@ remotedir attribute.</p>
directory. As with all other actions, the directory separator character must be correct
according to the desires of the FTP server.</p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 1
- 1
docs/manual/OptionalTasks/javacc.html View File

@@ -172,7 +172,7 @@
</p>
<hr>

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



+ 21
- 7
docs/manual/OptionalTasks/jlink.html View File

@@ -98,9 +98,9 @@ mergefiles or addfiles</td>

<h3>Examples</h3>

The following will merge the entries in mergefoo.jar and mergebar.jar
<p>The following will merge the entries in mergefoo.jar and mergebar.jar
into out.jar.
mac.jar and pc.jar will be added as single entries to out.jar.
mac.jar and pc.jar will be added as single entries to out.jar.</p>
<pre>
&lt;jlink compress=&quot;false&quot; outfile=&quot;out.jar&quot;&gt;
&lt;mergefiles&gt;
@@ -114,11 +114,25 @@ mac.jar and pc.jar will be added as single entries to out.jar.
&lt;/jlink&gt;
</pre>

Suppose the file foo.jar contains two entries: bar.class and
<p><b>Non-deprecated alternative to the above:</b></p>
<pre>
&lt;jar compress=&quot;false&quot; destfile=&quot;out.jar&quot;&gt;
&lt;zipgroupfileset dir=&quot;${build.dir}&quot;&gt;
&lt;include name=&quot;mergefoo.jar&quot;/&gt;
&lt;include name=&quot;mergebar.jar&quot;/&gt;
&lt;/zipgroupfileset&gt;
&lt;fileset dir=&quot;${build.dir}&quot;&gt;
&lt;include name=&quot;mac.jar&quot;/&gt;
&lt;include name=&quot;pc.jar&quot;/&gt;
&lt;/fileset&gt;
&lt;/jar&gt;
</pre>

<p>Suppose the file foo.jar contains two entries: bar.class and
barnone/myClass.zip.
Suppose the path for file foo.jar is build/tempbuild/foo.jar. The
following example
will provide the entry tempbuild/foo.jar in the out.jar.
will provide the entry tempbuild/foo.jar in the out.jar.</p>
<pre>
&lt;jlink compress=&quot;false&quot; outfile=&quot;out.jar&quot;&gt;
&lt;mergefiles&gt;
@@ -127,8 +141,8 @@ will provide the entry tempbuild/foo.jar in the out.jar.
&lt;/jlink&gt;
</pre>

However, the next example would result in two top-level entries in out.jar,
namely bar.class and barnone/myClass.zip
<p>However, the next example would result in two top-level entries in out.jar,
namely bar.class and barnone/myClass.zip</p>
<pre>
&lt;jlink compress=&quot;false&quot; outfile=&quot;out.jar&quot;&gt;
&lt;mergefiles&gt;
@@ -138,7 +152,7 @@ namely bar.class and barnone/myClass.zip
</pre>

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



+ 1
- 1
docs/manual/OptionalTasks/junit.html View File

@@ -479,7 +479,7 @@ aborted. Results are collected in files named
<code>${reports.tests}</code>.</p>

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

+ 1
- 1
docs/manual/OptionalTasks/junitreport.html View File

@@ -19,7 +19,7 @@ or <a href="http://xml.apache.org/dist/xalan-j/old/xalan-j_1_2_2.zip">Xalan 1.2.
<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 crimson). It is *highly* recommended to use Xalan2 instead
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.
</i></p>
<h3>Parameters</h3>


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

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

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

@@ -307,7 +307,7 @@ or from the command line as<br>
</p>
</blockquote>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2001 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 5
- 3
docs/manual/OptionalTasks/perforce.html View File

@@ -202,8 +202,10 @@ available from the <a href="http://www.perforce.com/" target="_top">Perforce web
</tr>
<tr>
<td valign="top">force</td>
<td valign="top">force a refresh of files</td>
<td valign="top" align="center">no</td>
<td valign="top">force a refresh of files, if this attribute has
been set.</td>
<td valign="top" align="center">no - if ommitted, it will be off,
otherwise a refresh will be forced.</td>
</tr>
<tr>
<td valign="top">label</td>
@@ -213,7 +215,7 @@ available from the <a href="http://www.perforce.com/" target="_top">Perforce web
</table>

<h3>Examples</h3>
<pre>&lt;p4sync label=&quot;nightlybuild-0.0123&quot; force=&quot;yes&quot; /&gt;
<pre>&lt;p4sync label=&quot;nightlybuild-0.0123&quot; force=&quot;foo&quot; /&gt;
&lt;p4sync view=&quot;//depot/projects/projectfoo/main/src/...&quot; /&gt;
</pre>
<hr>


+ 1
- 1
docs/manual/OptionalTasks/propertyfile.html View File

@@ -185,7 +185,7 @@ Concatenation of strings :</p>
<p>Each time called, a &quot;.&quot; will be appended to &quot;progress&quot;
</p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>
</body>
</html>

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

@@ -100,7 +100,7 @@ supports all attributes of <code>&lt;fileset&gt;</code>
</blockquote>

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

</body>


+ 9
- 2
docs/manual/OptionalTasks/script.html View File

@@ -15,7 +15,14 @@
See <a href="../install.html#librarydependencies">Library Dependencies</a> for more information.</p>
<p>All items (tasks, targets, etc) of the running project are
accessible from the script, using either their <code>name</code> or
<code>id</code> attributes. The name "project" is a pre-defined reference to the Project, which can be used instead of the project name.</p>
<code>id</code> attributes (as long as their names are considered
valid Java identifiers, that is).
The name "project" is a pre-defined reference to the Project, which can be
used instead of the project name.</p>
<p><b>BeanShell users:</b> This task now natively supports the BeanShell
scripting language, using language="beanshell". The BeanShell engine is
still required.
</p>
<p>Scripts can do almost anything a task written in Java could do.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
@@ -115,7 +122,7 @@ BUILD SUCCESSFUL
</pre></blockquote>

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

</body>


+ 219
- 0
docs/manual/OptionalTasks/setproxy.html View File

@@ -0,0 +1,219 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Setproxy
Task</title>
</head>

<body bgcolor="#ffffff" text="#000000" link="#525D76"
alink="#525D76" vlink="#525D76">

<table border="0" width="100%" cellspacing="4">

<!-- PAGE HEADER -->
<tr>
<td>
<table border="0" width="100%"><tr>
<td valign="bottom">
<font size="+3" face="arial,helvetica,sanserif"><strong>Setproxy
Task</strong></font>
<br><font face="arial,helvetica,sanserif">Sets Java's web proxy properties, so that tasks and code run in the same JVM can have through-the-firewall access to remote web sites, and remote ftp sites.</font>
</td>
<td>
<!-- PROJECT LOGO -->
<a href="http://jakarta.apache.org/ant/">
<img src="../../images/ant_logo_large.gif" align="right" alt="Apache Ant" border="0"/>
</a>
</td>
</tr></table>
</td>
</tr>

<!-- START RIGHT SIDE MAIN BODY -->
<tr>
<td valign="top" align="left">

<!-- Applying task/long-description -->
<!-- Start Description -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="description">
<strong>Description</strong></a></font>
</td></tr>

<tr><td><blockquote>
Sets Java's web proxy properties, so that tasks and code run in
the same JVM can have through-the-firewall access to remote web sites,
and remote ftp sites.
You can nominate an http and ftp proxy, or a socks server, reset the server
settings, or do nothing at all.
<p>
Examples
<pre>&lt;setproxy/&gt;</pre>
do nothing
<pre>&lt;setproxy proxyhost="firewall"/&gt;</pre>
set the proxy to firewall:80
<pre>&lt;setproxy proxyhost="firewall" proxyport="81"/&gt;</pre>
set the proxy to firewall:81
<pre>&lt;setproxy proxyhost=""/&gt;</pre>
stop using the http proxy; don't change the socks settings
<pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre>
use socks via socksy:1080
<pre>&lt;setproxy socksproxyhost=""/&gt;</pre>
stop using the socks server
</blockquote></td></tr>

</table>
<!-- End Description -->

<!-- Start Attributes -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="attributes">
<strong>Parameters</strong></a></font>
</td></tr>

<tr><td><blockquote>
<table>
<tr>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Attribute</b></font>
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font>
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">nonProxyHosts</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
A list of hosts to bypass the proxy on. These should be separated
with the vertical bar character '|'. Only in Java 1.4 does ftp use
this list.
e.g. fozbot.corp.sun.com|*.eng.sun.com.
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyHost</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
the HTTP/ftp proxy host. Set this to "" for the http proxy
option to be disabled
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyPort</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
the HTTP/ftp proxy port number; default is 80
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">int</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">socksProxyHost</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The name of a Socks server. Set to "" to turn socks
proxying off.
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">socksProxyPort</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Set the ProxyPort for socks connections. The default value is 1080
</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">int</font>
</td>
</tr>

</table>
</blockquote></td></tr>

</table>
<!-- End Attributes -->

<!-- Start Elements -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="elements">
<strong>Parameters as nested elements</strong></a></font>
</td></tr>

<tr><td><blockquote>

</blockquote></td></tr>

</table>
<!-- End Elements -->


</td>
</tr>
<!-- END RIGHT SIDE MAIN BODY -->

<!-- FOOTER SEPARATOR -->
<tr>
<td>
<hr noshade="" size="1"/>
</td>
</tr>

<!-- PAGE FOOTER -->
<tr>
<td>
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 2000-2002, Apache Software Foundation
</em></font></div>
</td>
</tr>

</table>

</body>
</html>

+ 1
- 1
docs/manual/OptionalTasks/telnet.html View File

@@ -132,7 +132,7 @@ This can be done in the Telnet Server Admin app:
select "display/change registry settings", then "NTLM", then set the value of NTLM to 1.
</p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -728,7 +728,7 @@ directory (see vsscp).</p>
<hr>

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

+ 21
- 0
docs/manual/OptionalTasks/xmlvalidate.html View File

@@ -14,6 +14,10 @@ task uses the SAX2 parser implementation provided by JAXP by default
(probably the one that is used by Ant itself), but one can specify any
SAX1/2 parser if needed.</p>

<p>This task supports the use of nested <a
href="../CoreTypes/xmlcatalog.html">xmlcatalog</a> elements and/or nested
&lt;dtd&gt; elements which are used to resolve DTDs and entities.</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
@@ -77,6 +81,9 @@ SAX1/2 parser if needed.</p>
<td align="center" valign="top">Yes</td>
</tr>
</table>
<h4>xmlcatalog</h4>
<p>The <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
element is used to perform Entity resolution.</p>


<h3>Examples</h3>
@@ -93,6 +100,20 @@ SAX1/2 parser if needed.</p>
&lt;dtd publicId="-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
location="struts-config_1_0.dtd"/&gt;
&lt;/xmlvalidate&gt;

&lt;xmlvalidate failonerror="no"&gt;
&lt;fileset dir="${project.dir}" includes="**/*.xml"/&gt;
&lt;xmlcatalog refid="mycatalog"/&gt;
&lt;/xmlvalidate&gt;

&lt;xmlvalidate failonerror="no"&gt;
&lt;fileset dir="${project.dir}" includes="**/*.xml"/&gt;
&lt;xmlcatalog&gt;
&lt;dtd
publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot;
location=&quot;com/arielpartners/knowledgebase/dtd/article.dtd&quot;/&gt;
&lt;/xmlcatalog&gt;
&lt;/xmlvalidate&gt;
</pre></blockquote>
<hr>



+ 145
- 0
docs/manual/antexternal.html View File

@@ -0,0 +1,145 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>InputHandler</title>
</head>

<body>
<h1>Using Ant Tasks Outside of Ant</h1>

<h2>Rationale</h2>

<p>Ant provides a rich set of tasks for buildfile creators and
administrators. But what about programmers? Can the functionality
provided by Ant tasks be used in java programs?</p>

<p>Yes, and its quite easy. Before getting into the details, however,
we should mention the pros and cons of this approach:

<h3>Pros</h3>

<table cellpadding="0" margin="0" border="1">
<tr>
<td><b>Robust</b></td>
<td>
Ant tasks are very robust. They have been banged on by many people.
Ant tasks have been used in many different contexts, and have
therefore been instrumented to take care of a great many boundary
conditions and potentially obscure errors.
</td>
</tr>
<tr>
<td><b>Cross Platform</b></td>
<td>
Ant tasks are cross platform. They have been tested on all of the
volume platforms, and several rather unusual ones (Netware and OS/390, to
name a few).
</td>
</tr>
<tr>
<td><b>Community Support</b></td>
<td>
Using Ant tasks means you have less of your own code to support. Ant
code is supported by the entire jakarta-ant community.
</td>
</tr>
</table>

<h3>Cons</h3>

<table cellpadding="0" margin="0" border="1">
<tr>
<td><b>Dependency on Ant Libraries</b></td>
<td>
Obviously, if you use an Ant task in your code, you will have to add
"ant.jar" to your path. Of course, you could use a code optimizer to
remove the unnecessary classes, but you will still probably require a
chunk of the Ant core.
</td>
</tr>
<tr>
<td><b>Loss of Flexibility</b></td>
<td>
At some point, if you find yourself having to modify the Ant code, it
probably makes more sense to "roll your own." Of course, you can
still steal some code snippets and good ideas. This is the beauty of
open source!
</td>
</tr>
</table>


<h2>Example</h2>

<p>Let's say you want to unzip a zip file programmatically from java
into a certain directory. Of course you could write your own routine
to do this, but why not use the Ant task that has already been written?</p>

<p>In my example, I wanted to be able to unzip a file from within an
XSLT Transformation. XSLT Transformers can be extended by plugging in
static methods in java. I therefore need a function something like
this:</p>

<pre>
/**
* Unzip a zip file into a given directory.
*
* @param zipFilepath A pathname representing a local zip file
* @param destinationDir where to unzip the archive to
*/
static public void unzip(String zipFilepath, String destinationDir)
</pre>

<p>
The Ant task to perform this function is
<code>org.apache.tools.ant.taskdefs.Expand</code>. All we have to do
is create a dummy Ant <code>Project</code> and <code>Target</code>,
set the <code>Task</code> parameters that would normally be set in a
buildfile, and call <code>execute()</code>.</p>

<p>First, let's make sure we have the proper includes:</p>

<pre>
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Target;
import org.apache.tools.ant.taskdefs.Expand;
import java.io.File;
</pre>

<p>The function call is actually quite simple:</p>

<pre>
static public void unzip(String zipFilepath, String destinationDir) {

final class Expander extends Expand {
public Expander() {
project = new Project();
project.init();
taskType = "unzip";
taskName = "unzip";
target = new Target();
}
}
Expander expander = new Expander();
expander.setSrc(new File(zipfile));
expander.setDest(new File(destdir));
expander.execute();
</pre>

<p>In actual practice, you will probably want to add your own error
handling code and you may not want to use a local inner class.
However, the point of the example is to show how an Ant task can be
called programmatically in relatively few lines of code.</p>

<p>The question you are probably asking yourself at this point is:
<i>How would I know which classes and methods have to be called in
order to set up a dummy Project and Target?</i> The answer is: you
don't. Ultimately, you have to be willing to get your feet wet and
read the source code. The above example is merely designed to whet
your appetite and get you started. Go for it!</p>

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

+ 2
- 0
docs/manual/anttaskslist.html View File

@@ -15,6 +15,8 @@
<a href="tasksoverview.html" target="mainFrame">Overview of Ant Tasks</a><br>
<a href="coretasklist.html" target="navFrame">Core Tasks</a><br>
<a href="optionaltasklist.html" target="navFrame">Optional Tasks</a><br>
&nbsp;&nbsp;<a href="install.html#librarydependencies" target="mainFrame">
Library Dependencies</a><br>

</body>
</html>

+ 87
- 0
docs/manual/base_task_classes.html View File

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

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Tasks Desinged for Extension</title>
</head>

<body>
<h1>Tasks Desgined for Extension</h1>
These classes are desgined to be extended. Always start here when writting your own task.

<table border="1">
<thead>
<tr>
<th>
Class
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="api/org/apache/tools/ant/Task.html">Task</a>
</td>
<td>
Base class for all tasks.
</td>
</tr>

<tr>
<td>
<a href="api/org/apache/tools/ant/taskdefs/AbstractCvsTask.html">AbstractCvsTask</a>
</td>
<td>
Another task can extend this with some customized output processing
</td>
</tr>

<tr>
<td>
<a href="api/org/apache/tools/ant/taskdefs/JDBCTask.html">JDBCTask</a>
</td>
<td>
Handles JDBC configuration needed by SQL type tasks.
</td>
</tr>

<tr>
<td>
<a href="api/org/apache/tools/ant/taskdefs/MatchingTask.html">MatchingTask</a>
</td>
<td>
This is an abstract task that should be used by all those tasks that require to include or exclude files based on pattern matching.
</td>
</tr>

<tr>
<td>
<a href="api/org/apache/tools/ant/taskdefs/Pack.html">Pack</a>
</td>
<td>
Abstract Base class for pack tasks.
</td>
</tr>


<tr>
<td>
<a href="api/org/apache/tools/ant/taskdefs/Unpack.html">Unpack</a>
</td>
<td>
Abstract Base class for unpack tasks.
</td>
</tr>

</tbody>
</table>

<hr>
<p align="center">Copyright &copy; 2001-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/filterset.html">FilterSet</a><br>
<a href="CoreTypes/patternset.html">PatternSet</a><br>
<a href="CoreTypes/selectors.html">Selectors</a><br>
<a href="CoreTypes/xmlcatalog.html">XMLCatalog</a><br>

<h3>Optional Types</h3>


+ 2
- 1
docs/manual/coretasklist.html View File

@@ -71,6 +71,7 @@
<a href="CoreTasks/signjar.html">SignJar</a><br>
<a href="CoreTasks/sleep.html">Sleep</a><br>
<a href="CoreTasks/sql.html">Sql</a><br>
<a href="CoreTasks/style.html">Style</a><br>
<a href="CoreTasks/tar.html">Tar</a><br>
<a href="CoreTasks/taskdef.html">Taskdef</a><br>
<a href="CoreTasks/touch.html">Touch</a><br>
@@ -84,7 +85,7 @@
<a href="CoreTasks/waitfor.html">Waitfor</a><br>
<a href="CoreTasks/war.html">War</a><br>
<a href="CoreTasks/xmlproperty.html">XmlProperty</a><br>
<a href="CoreTasks/style.html">Xslt/Style</a><br>
<a href="CoreTasks/style.html">Xslt</a><br>
<a href="CoreTasks/zip.html">Zip</a><br>
</body>
</html>

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

@@ -20,7 +20,7 @@
<p>&nbsp;</p>
</div>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -36,6 +36,7 @@
<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>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>
</ul>

<center>
@@ -43,7 +44,7 @@
$Id$</p>
</center>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 3
- 2
docs/manual/develop.html View File

@@ -11,7 +11,8 @@
<h2><a name="writingowntask">Writing Your Own Task</a></h2>
<p>It is very easy to write your own task:</p>
<ol>
<li>Create a Java class that extends <code>org.apache.tools.ant.Task</code>.</li>
<li>Create a Java class that extends <code>org.apache.tools.ant.Task</code>
or <a href="base_task_classes.html">another class</a> that was desgined to be extended.</li>
<li>For each attribute, write a <i>setter</i> method. The setter method must be a
<code>public void</code> method that takes a single argument. The
name of the method must begin with <code>set</code>, followed by the
@@ -355,7 +356,7 @@ which provides some advice to people developing and testing tasks. Even if you i
keep your tasks to yourself, you should still read this as it should be informative.

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

</body>


+ 2
- 0
docs/manual/developlist.html View File

@@ -13,9 +13,11 @@
<h3>Developing with Ant</h3>

<a href="develop.html#writingowntask">Writing Your Own Task</a><br>
<a href="base_task_classes.html">Tasks Designed for Extensiton</a><br>
<a href="develop.html#buildevents">Build Events</a><br>
<a href="develop.html#integration">Source-code Integration</a><br>
<a href="inputhandler.html">InputHandler</a><br>
<a href="antexternal.html">Using Ant Tasks Outside of Ant</a><br>

</body>
</html>


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

@@ -165,7 +165,7 @@ They are:</p>
<p>If you do not want these default excludes applied, you may disable them with the
<code>defaultexcludes=&quot;no&quot;</code> attribute.</p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -52,7 +52,7 @@ href="http://marc.theaimsgroup.com" target="_top">http://marc.theaimsgroup.com</
you know of any additional archive sites, please report them to the
lists.</p>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 17
- 2
docs/manual/ide.html View File

@@ -11,6 +11,8 @@
<h2><a href="toc.html" target="navFrame">Table of Contents</a></h2>

<h3>IDE Integration</h3>
All the modern Java IDEs support Ant almost out the box, with the
notable exception of JBuilder.<br><br>
<a href="Integration/Antidote.html">
Antidote<br>(in development)</a><br><br>
<a href="http://www.dieter-bogdoll.de/java/AntRunner/">
@@ -23,9 +25,22 @@ errors. Installation: built-in JDE 2.2.8 or later. Configuration: through
customize menu "Jde Build Function"<br><br>
<a href="http://www.intellij.com/idea/">IDEA</a> has built-in GUI ANT integration: GUI
selection of targets, execution, hyperlink to compilation errors<br><br>
<a href="http://ant.netbeans.org/">NetBeans <br>Forte for Java <br>(unbundled)</a><br><br>
<a href="Integration/VAJAntTool.html">VisualAge for Java</a><br><br>
<a href="http://www.netbeans.org/">NetBeans</a>
NetBeans 3.3 has very good Ant integration indeed.
</a><br><br>

<a href="http://jedit.org/">jEdit</a>
jEdit is an open source java IDE with some great plugins for Java dev, a
good XML editor and the Antfarm plugin to execute targets in a build
file.
<br><br>
<a href="http://eclipse.org/">Eclipse</a>
Eclipse is IBM's counterpoint to Netbeans; an open source IDE with Java and ant
support.
<br><br>
<a href="Integration/VAJAntTool.html">VisualAge for Java</a><br><br>
<a href="http://www7b.software.ibm.com/wsdd/library/techarticles/0203_searle/searle1.html">
WebSphere Studio Application Developer</a><br><br>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p>


+ 9
- 4
docs/manual/install.html View File

@@ -41,12 +41,12 @@ To build and use Ant, you must have a JAXP-compliant XML parser installed and
available on your classpath.</p>
<p>
The binary distribution of Ant includes the latest version of the
<a href="http://xml.apache.org/crimson/index.html">Apache Crimson</a> XML parser.
<a href="http://xml.apache.org/xerces2-j/index.html">Apache Xerces2</a> XML parser.
Please see
<a href="http://java.sun.com/xml/" target="_top">http://java.sun.com/xml/</a>
for more information about JAXP.
If you wish to use a different JAXP-compliant parser, you should remove
<code>jaxp.jar</code> and <code>crimson.jar</code>
<code>xercesImpl.jar</code> and <code>xmlParserAPIs.jar</code>
from Ant's <code>lib</code> directory.

You can then either put the jars from your preferred parser into Ant's
@@ -319,7 +319,7 @@ Installing Ant / Optional Tasks</a> section above.</p>
www2.hursley.ibm.com/netrexx</a></td>
</tr>
<tr>
<td>rhino.jar</td>
<td>js.jar</td>
<td>javascript with script task</td>
<td><a href="http://www.mozilla.org/rhino/" target="_top">www.mozilla.org/rhino</a></td>
</tr>
@@ -333,6 +333,11 @@ Installing Ant / Optional Tasks</a> section above.</p>
<td>TCL with script task</td>
<td><a href="http://www.scriptics.com/java" target="_top">www.scriptics.com/java</a></td>
</tr>
<tr>
<td>BeanShell JAR(s)</td>
<td>BeanShell with script task</td>
<td><a href="http://www.beanshell.org" target="_top">www.beanshell.org</a></td>
</tr>
<tr>
<td>netcomponents.jar</td>
<td>ftp and telnet tasks</td>
@@ -368,7 +373,7 @@ Installing Ant / Optional Tasks</a> section above.</p>
</table>
<br>
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
Reserved.</p>

</body>


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

@@ -46,7 +46,7 @@ allows different commands to be executed based on the OS it is executing
on.</p>

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

</body>


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

Loading…
Cancel
Save