diff -Nru ant-1.9.10/build.xml ant-1.10.3/build.xml --- ant-1.9.10/build.xml 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/build.xml 2018-03-24 12:37:12.000000000 +0000 @@ -31,12 +31,12 @@ --> - + - + - - + + @@ -45,7 +45,7 @@ - + @@ -60,14 +60,13 @@ - - - + - - - + + + + + - - + + - - + + @@ -121,7 +120,6 @@ - + + + + + + + + @@ -293,6 +305,13 @@ + + + + + + + @@ -317,8 +336,10 @@ + + @@ -337,7 +358,7 @@ - + @@ -374,9 +395,6 @@ - - - @@ -402,6 +420,15 @@ + + + @@ -444,15 +471,9 @@ - - - - - - - + @@ -511,30 +532,19 @@ + - + - - - - - - - - - + @@ -556,7 +566,7 @@ Build the code =================================================================== --> - @@ -576,17 +586,19 @@ - + + + - + @@ -595,6 +607,7 @@ + @@ -624,6 +637,8 @@ + + @@ -647,28 +662,8 @@ - - -
- - - - - - - -
-
- @@ -681,8 +676,7 @@ @@ -690,10 +684,10 @@ - +
- @@ -717,7 +711,6 @@ @@ -725,8 +718,8 @@ - + + @@ -734,14 +727,31 @@ + +
+ + + + + + + +
+
@@ -749,6 +759,7 @@ + @@ -765,6 +776,7 @@ + @@ -776,7 +788,7 @@ We cannot build the test jar unless JUnit is present, as JUnit is needed to compile the test classes. - @@ -841,6 +853,7 @@ + @@ -857,6 +870,7 @@ + @@ -909,18 +923,23 @@ - - - + + + + + + + - + @@ -957,9 +976,9 @@ - + - + @@ -1020,18 +1039,23 @@ - - - + + + + + + + - + @@ -1135,18 +1159,26 @@ - - - + + + + + + + + + - - - + + + - + @@ -1196,10 +1228,28 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1229,6 +1279,8 @@ src="${dist.base.binaries}/${dist.name}-bin.tar"/> + @@ -1282,19 +1334,19 @@ src="${dist.base.manual}/${dist.name}-manual.tar"/> + - - @@ -1333,12 +1385,13 @@ src="${dist.base.source}/${dist.name}-src.tar"/> + - @@ -1373,8 +1426,10 @@ description="--> cleans up everything"> - - + + + + - + + targetfile="${build.javadocs}/packages.html"> + targetfile="${build.tests.javadocs}/packages.html"> + + + - + - + + + + + @@ -1626,6 +1690,11 @@ + + + + @@ -1763,8 +1832,7 @@ - + @@ -1936,6 +2004,9 @@ + + + diff -Nru ant-1.9.10/CONTRIBUTORS ant-1.10.3/CONTRIBUTORS --- ant-1.9.10/CONTRIBUTORS 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/CONTRIBUTORS 2018-03-24 12:37:12.000000000 +0000 @@ -287,6 +287,7 @@ Nigel Magnay Oliver Merkel Oliver Rossmueller +Olivier Parent Ondra Medek Omer Shapira Oystein Gisnas diff -Nru ant-1.9.10/contributors.xml ant-1.10.3/contributors.xml --- ant-1.9.10/contributors.xml 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/contributors.xml 2018-03-24 12:37:12.000000000 +0000 @@ -40,6 +40,10 @@ Adam + Retter + + + Adam Sotona @@ -1169,6 +1173,10 @@ Rossmueller + Olivier + Parent + + Omer Shapira diff -Nru ant-1.9.10/debian/ant-optional.poms ant-1.10.3/debian/ant-optional.poms --- ant-1.9.10/debian/ant-optional.poms 2018-02-23 10:48:52.000000000 +0000 +++ ant-1.10.3/debian/ant-optional.poms 2018-03-27 23:41:26.000000000 +0000 @@ -16,3 +16,4 @@ src/etc/poms/ant-junit4/pom.xml src/etc/poms/ant-swing/pom.xml src/etc/poms/ant-testutil/pom.xml +src/etc/poms/ant-xz/pom.xml diff -Nru ant-1.9.10/debian/ant.properties ant-1.10.3/debian/ant.properties --- ant-1.9.10/debian/ant.properties 2018-02-23 10:48:52.000000000 +0000 +++ ant-1.10.3/debian/ant.properties 2018-03-27 23:41:26.000000000 +0000 @@ -1,5 +1,5 @@ base64.present=true sunuue.present=true offline=true -javac.target=1.5 -javac.source=1.5 +javac.target=1.8 +javac.source=1.8 diff -Nru ant-1.9.10/debian/changelog ant-1.10.3/debian/changelog --- ant-1.9.10/debian/changelog 2018-03-19 09:04:26.000000000 +0000 +++ ant-1.10.3/debian/changelog 2018-03-29 07:35:04.000000000 +0000 @@ -1,3 +1,19 @@ +ant (1.10.3-1) unstable; urgency=medium + + * New upstream release + - Refreshed the patches + - Changed the source/target level to 1.8 when building Ant + - Build the new optional ant-xz module + - Require Java 8 or higher to run Ant + * Don't use the javadoc --ignore-source-errors option when using + a custom doclet (Closes: #893547) + * Adjust the source/target level to 1.7 in anticipation of the 1.6 removal + in Java 11 + * Added activation.jar to the build classpath to fix the empty ant-javamail + jar with Java 9 + + -- Emmanuel Bourg Thu, 29 Mar 2018 09:35:04 +0200 + ant (1.9.10-2) unstable; urgency=medium * Non maintainer upload. diff -Nru ant-1.9.10/debian/control ant-1.10.3/debian/control --- ant-1.9.10/debian/control 2018-03-19 09:04:26.000000000 +0000 +++ ant-1.10.3/debian/control 2018-03-27 23:58:06.000000000 +0000 @@ -10,6 +10,7 @@ default-jdk, junit, junit4 (>= 4.11), + libactivation-java, libbcel-java (>= 5.0), libbsf-java (>= 2.3.0rc1), libcommons-logging-java, @@ -22,6 +23,7 @@ libregexp-java, libxalan2-java (>= 2.4.0), libxml-commons-resolver1.1-java (>= 1.2-7~), + libxz-java, maven-repo-helper (>> 1.0) Standards-Version: 4.1.3 Vcs-Git: https://anonscm.debian.org/git/pkg-java/ant.git @@ -30,7 +32,7 @@ Package: ant Architecture: all -Depends: default-jre-headless | java5-runtime-headless | java6-runtime-headless | java7-runtime-headless, +Depends: default-jre-headless (>= 2:1.8) | java8-runtime-headless, ${misc:Depends} Recommends: ant-optional Suggests: ant-doc, default-jdk | java-compiler | java-sdk @@ -54,6 +56,7 @@ junit, junit4, jython, + libactivation-java, libbcel-java (>= 5.0), libbsf-java, libcommons-logging-java, @@ -66,7 +69,8 @@ liboro-java, libregexp-java, libxalan2-java (>= 2.4.0-1), - libxml-commons-resolver1.1-java + libxml-commons-resolver1.1-java, + libxz-java Description: Java based build tool like make - optional libraries Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent diff -Nru ant-1.9.10/debian/patches/0009-reproducible-timestamp-task.patch ant-1.10.3/debian/patches/0009-reproducible-timestamp-task.patch --- ant-1.9.10/debian/patches/0009-reproducible-timestamp-task.patch 2018-02-23 14:03:13.000000000 +0000 +++ ant-1.10.3/debian/patches/0009-reproducible-timestamp-task.patch 2018-03-27 23:41:26.000000000 +0000 @@ -1,18 +1,13 @@ -From: Emmanuel Bourg -Date: Mon, 28 Mar 2016 01:45:52 +0200 -Subject: Add support for the SOURCE_DATE_EPOCH variable in the Tstamp task - +Description: Add support for the SOURCE_DATE_EPOCH variable in the Tstamp task +Author: Emmanuel Bourg Forwarded: no ---- - src/main/org/apache/tools/ant/taskdefs/Tstamp.java | 39 ++++++++++++++++++++++ - 1 file changed, 39 insertions(+) - --- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java +++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java -@@ -71,20 +71,51 @@ +@@ -76,16 +76,49 @@ try { Date d = getNow(); +- customFormats.forEach(cts -> cts.execute(getProject(), d, getLocation())); + boolean reproducibleBuild = false; + + if (System.getenv("SOURCE_DATE_EPOCH") != null) { @@ -27,9 +22,7 @@ + } + } + - Enumeration i = customFormats.elements(); - while (i.hasMoreElements()) { - CustomFormat cts = (CustomFormat) i.nextElement(); ++ for (CustomFormat cts : customFormats) { + if (reproducibleBuild) { + if (cts.getTimezone() == null) { + cts.setTimezone("UTC"); @@ -38,8 +31,8 @@ + cts.setLocale("en_US"); + } + } - cts.execute(getProject(), d, getLocation()); - } ++ cts.execute(getProject(), d, getLocation()); ++ } SimpleDateFormat dstamp = new SimpleDateFormat("yyyyMMdd"); + if (reproducibleBuild) { @@ -61,7 +54,7 @@ setProperty("TODAY", today.format(d)); } catch (Exception e) { -@@ -200,6 +231,10 @@ +@@ -220,6 +253,10 @@ } } @@ -72,7 +65,7 @@ /** * The timezone to use for displaying time. * The values are as defined by the Java TimeZone class. -@@ -210,6 +245,10 @@ +@@ -230,6 +267,10 @@ timeZone = TimeZone.getTimeZone(id); } diff -Nru ant-1.9.10/debian/patches/0010-reproducible-javadoc-task.patch ant-1.10.3/debian/patches/0010-reproducible-javadoc-task.patch --- ant-1.9.10/debian/patches/0010-reproducible-javadoc-task.patch 2018-02-23 14:03:13.000000000 +0000 +++ ant-1.10.3/debian/patches/0010-reproducible-javadoc-task.patch 2018-03-27 23:41:26.000000000 +0000 @@ -1,17 +1,11 @@ -From: Emmanuel Bourg -Date: Mon, 28 Mar 2016 02:00:16 +0200 -Subject: Improves the reproducibility of the javadoc task for the Debian +Description: Improves the reproducibility of the javadoc task for the Debian builds by setting the locale to 'en' and the encoding to UTF-8 if none was specified and SOURCE_DATE_EPOCH is set. - +Author: Emmanuel Bourg Forwarded: no ---- - src/main/org/apache/tools/ant/taskdefs/Javadoc.java | 10 ++++++++++ - 1 file changed, 10 insertions(+) - --- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java -@@ -1707,6 +1707,16 @@ +@@ -1700,6 +1700,16 @@ */ @Override public void execute() throws BuildException { @@ -27,4 +21,4 @@ + checkTaskName(); - final Vector packagesToDoc = new Vector(); + final List packagesToDoc = new Vector<>(); diff -Nru ant-1.9.10/debian/patches/0011-reproducible-propertyfile-task.patch ant-1.10.3/debian/patches/0011-reproducible-propertyfile-task.patch --- ant-1.9.10/debian/patches/0011-reproducible-propertyfile-task.patch 2018-02-23 14:03:13.000000000 +0000 +++ ant-1.10.3/debian/patches/0011-reproducible-propertyfile-task.patch 2018-03-27 23:41:26.000000000 +0000 @@ -1,14 +1,8 @@ -From: Emmanuel Bourg -Date: Tue, 24 May 2016 00:22:11 +0200 -Subject: Improves the reproducibility of the propertyfile task for the Debian +Description: Improves the reproducibility of the propertyfile task for the Debian builds by using the date specified by the SOURCE_DATE_EPOCH variable in the header of the .properties file generated - +Author: Emmanuel Bourg Forwarded: no ---- - src/main/org/apache/tools/ant/util/DateUtils.java | 5 +++++ - 1 file changed, 5 insertions(+) - --- a/src/main/org/apache/tools/ant/util/DateUtils.java +++ b/src/main/org/apache/tools/ant/util/DateUtils.java @@ -238,6 +238,10 @@ diff -Nru ant-1.9.10/debian/patches/0013-auto-adjust-target.patch ant-1.10.3/debian/patches/0013-auto-adjust-target.patch --- ant-1.9.10/debian/patches/0013-auto-adjust-target.patch 2018-02-23 14:03:13.000000000 +0000 +++ ant-1.10.3/debian/patches/0013-auto-adjust-target.patch 2018-03-29 07:19:33.000000000 +0000 @@ -1,19 +1,9 @@ -From: "ebourg@apache.org" -Date: Fri, 30 Jun 2017 00:35:44 +0200 -Subject: Adjust the source compatibility automatically for Debian builds with - Java 9 - +Description: Adjust the source compatibility automatically for Debian builds with Java 9 +Author: Emmanuel Bourg Forwarded: no ---- - src/main/org/apache/tools/ant/taskdefs/Javac.java | 13 ++++- - .../org/apache/tools/ant/taskdefs/Javadoc.java | 7 ++- - .../apache/tools/ant/taskdefs/LanguageLevel.java | 62 ++++++++++++++++++++++ - 3 files changed, 79 insertions(+), 3 deletions(-) - create mode 100644 src/main/org/apache/tools/ant/taskdefs/LanguageLevel.java - --- a/src/main/org/apache/tools/ant/taskdefs/Javac.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java -@@ -210,7 +210,10 @@ +@@ -213,7 +213,10 @@ */ public String getSource() { return source != null @@ -25,7 +15,7 @@ } /** -@@ -789,7 +792,10 @@ +@@ -792,7 +795,10 @@ public String getTarget() { return targetAttribute != null ? targetAttribute @@ -37,7 +27,7 @@ } /** -@@ -1118,6 +1124,9 @@ +@@ -1121,6 +1127,9 @@ checkParameters(); resetFileLists(); @@ -49,17 +39,12 @@ if (hasPath(src)) { --- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java -@@ -2207,7 +2207,12 @@ +@@ -2174,7 +2174,7 @@ : getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE); if (sourceArg != null) { toExecute.createArgument().setValue("-source"); - toExecute.createArgument().setValue(sourceArg); + toExecute.createArgument().setValue(LanguageLevel.adjust(sourceArg, "javadoc -source", this)); -+ } -+ -+ if (LanguageLevel.isDebianBuild() && !LanguageLevel.isPreJava9()) { -+ toExecute.createArgument().setValue("--ignore-source-errors"); -+ log("Debian build on Java >=9: Adding --ignore-source-errors."); } if (linksource && doclet == null) { @@ -77,10 +62,10 @@ +class LanguageLevel { + + /** The minimum language level supported by the current javac */ -+ private static final String MIN_LEVEL = "1.6"; ++ private static final String MIN_LEVEL = "1.7"; + + /** The list of language levels no longer supported by the current javac */ -+ private static final List UNSUPPORTED_LEVELS = Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5"}); ++ private static final List UNSUPPORTED_LEVELS = Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6"}); + + /** Detect if a Debian build is in process */ + static boolean isDebianBuild() { diff -Nru ant-1.9.10/debian/patches/0014-remove-java-activation-module.patch ant-1.10.3/debian/patches/0014-remove-java-activation-module.patch --- ant-1.9.10/debian/patches/0014-remove-java-activation-module.patch 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/debian/patches/0014-remove-java-activation-module.patch 2018-03-27 23:55:42.000000000 +0000 @@ -0,0 +1,13 @@ +Description: Don't add the java.activation module when building the Javadoc, this breaks the build, probably because JAF is already on the classpath +Author: Emmanuel Bourg +Forwarded: no +--- a/build.xml ++++ b/build.xml +@@ -1502,7 +1502,6 @@ + + + +- + + + diff -Nru ant-1.9.10/debian/patches/0015-javadoc-ignore-source-errors.patch ant-1.10.3/debian/patches/0015-javadoc-ignore-source-errors.patch --- ant-1.9.10/debian/patches/0015-javadoc-ignore-source-errors.patch 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/debian/patches/0015-javadoc-ignore-source-errors.patch 2018-03-29 07:24:08.000000000 +0000 @@ -0,0 +1,17 @@ +Description: Ignore source errors when using the default doclet with Java 9 +Author: Emmanuel Bourg +Forwarded: no +--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java ++++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java +@@ -2177,6 +2177,11 @@ + toExecute.createArgument().setValue(LanguageLevel.adjust(sourceArg, "javadoc -source", this)); + } + ++ if (doclet == null && LanguageLevel.isDebianBuild() && !LanguageLevel.isPreJava9()) { ++ toExecute.createArgument().setValue("--ignore-source-errors"); ++ log("Debian build on Java 9+ detected: Adding the --ignore-source-errors option"); ++ } ++ + if (linksource && doclet == null) { + toExecute.createArgument().setValue("-linksource"); + } diff -Nru ant-1.9.10/debian/patches/series ant-1.10.3/debian/patches/series --- ant-1.9.10/debian/patches/series 2018-02-23 10:48:52.000000000 +0000 +++ ant-1.10.3/debian/patches/series 2018-03-29 07:20:10.000000000 +0000 @@ -2,3 +2,5 @@ 0010-reproducible-javadoc-task.patch 0011-reproducible-propertyfile-task.patch 0013-auto-adjust-target.patch +0015-javadoc-ignore-source-errors.patch +0014-remove-java-activation-module.patch diff -Nru ant-1.9.10/debian/rules ant-1.10.3/debian/rules --- ant-1.9.10/debian/rules 2018-03-19 09:04:24.000000000 +0000 +++ ant-1.10.3/debian/rules 2018-03-27 23:41:26.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/make -f -DEPENDENCIES := antlr bcel bsf commons-logging javax.mail jdepend junit junit4 hamcrest-core log4j-1.2 oro regexp xalan2 serializer xml-resolver-1.2 commons-net jsch +DEPENDENCIES := antlr bcel bsf commons-logging javax.activation javax.mail jdepend junit junit4 hamcrest-core log4j-1.2 oro regexp xalan2 serializer xml-resolver-1.2 commons-net jsch xz %: dh $@ --with maven-repo-helper @@ -31,7 +31,7 @@ mh_installpoms -pant-optional for MODULE in antlr apache-bcel apache-bsf apache-log4j apache-oro apache-regexp apache-resolver apache-xalan2 \ - commons-logging commons-net javamail jdepend jmf jsch junit junit4 swing testutil; do \ + commons-logging commons-net javamail jdepend jmf jsch junit junit4 swing testutil xz; do \ mh_installjar -pant-optional -l src/etc/poms/ant-$$MODULE/pom.xml build/lib/ant-$$MODULE.jar /usr/share/ant/lib/ant-$$MODULE.jar; \ done @@ -48,10 +48,6 @@ override_dh_compress: dh_compress -XWHATSNEW -# Hardening -export AOT_GCJFLAGS=$(shell dpkg-buildflags --get CFLAGS) -export AOT_LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) - override_dh_auto_clean: rm -Rf bin build bootstrap lib/optional/*.jar diff -Nru ant-1.9.10/fetch.xml ant-1.10.3/fetch.xml --- ant-1.9.10/fetch.xml 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/fetch.xml 2018-03-24 12:37:12.000000000 +0000 @@ -109,6 +109,7 @@ + Unknown archive @{archive} -no property @{archive}.version defined in ${lib.dir}/libraries.properties. @@ -118,7 +119,6 @@ - + @@ -231,6 +232,24 @@ + + + + + + + + + + + + @@ -261,7 +280,7 @@ - + - - - @@ -359,8 +377,14 @@ dest="${temp.dir}/NetRexx.zip" skipexisting="true"/> + + + + - + depends="antunit,ivy,logging,junit,junitlauncher,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script, + javamail,jspc,jai,xz,netrexx,junit-engine-vintage,junit-engine-jupiter"/> diff -Nru ant-1.9.10/lib/libraries.properties ant-1.10.3/lib/libraries.properties --- ant-1.9.10/lib/libraries.properties 2018-02-03 16:12:24.000000000 +0000 +++ ant-1.10.3/lib/libraries.properties 2018-03-24 12:37:12.000000000 +0000 @@ -31,15 +31,13 @@ # Versions of different libraries. Please keep in alphabetical order, except # when a specific dependency forces them to be out-of-order ivy.version=2.4.0 -activation.version=1.1.1 ant-antunit.version=1.3 antlr.version=2.7.7 -bcel.version=5.1 +bcel.version=6.2 bsf.version=2.4.0 bsh.version=2.0b4 bsh-core.version=${bsh.version} -# Later versions are built with Java 6 -commons-net.version=2.2 +commons-net.version=3.6 commons-logging.version=1.1 commons-logging-api.version=${commons-logging.version} hamcrest-core.version=1.3 @@ -50,16 +48,18 @@ # Later versions of Tomcat provide a jspc task jasper-compiler.version=4.1.36 jasper-runtime.version=${jasper-compiler.version} -# Later versions are built with Java 7 -javax.mail-api.version=1.5.6 +javax.mail-api.version=1.6.0 jdepend.version=2.9.1 -# Later versions are built with Java 7 jruby.version=1.6.8 junit.version=4.12 -# Later versions are built with Java 6 -rhino.version=1.7R5 +rhino.version=1.7.8 +junit-platform-launcher.version=1.1.0 +# Only used for internal tests in Ant project +junit-vintage-engine.version=5.1.0 +# Only used for internal tests in Ant project +junit-jupiter-engine.version=5.1.0 jsch.version=0.1.54 -jython.version=2.5.3 +jython.version=2.7.0 # log4j 1.2.15 requires JMS and a few other Sun jars that are not in the m2 repo log4j.version=1.2.14 oro.version=2.0.8 @@ -67,6 +67,7 @@ which.version=1.0 xalan.version=2.7.2 xml-resolver.version=1.2 +xz.version=1.8 # paired jacl.version=1.2.6 tcljava.version=${jacl.version} diff -Nru ant-1.9.10/manual/antexternal.html ant-1.10.3/manual/antexternal.html --- ant-1.9.10/manual/antexternal.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/antexternal.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -29,16 +28,16 @@

Apache 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?

+provided by Ant tasks be used in Java programs?

-

Yes, and its quite easy. Before getting into the details, however, +

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

Pros

- +
- + - + - +
RobustRobust Ant tasks are very robust. They have been banged on by many people. Ant tasks have been used in many different contexts, and have @@ -47,7 +46,7 @@
Cross PlatformCross Platform 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 @@ -55,7 +54,7 @@
Community SupportCommunity Support Using Ant tasks means you have less of your own code to support. Ant code is supported by the entire Apache Ant community. @@ -65,18 +64,18 @@

Cons

- +
- + - +
Dependency on Ant LibrariesDependency on Ant Libraries 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 +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.
Loss of FlexibilityLoss of Flexibility 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 @@ -86,7 +85,6 @@
-

Example

Let's say you want to unzip a zip file programmatically from java @@ -109,8 +107,8 @@

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

@@ -121,8 +119,7 @@ import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; import org.apache.tools.ant.taskdefs.Expand; -import java.io.File; - +import java.io.File;

The function call is actually quite simple:

@@ -131,30 +128,30 @@ final class Expander extends Expand { public Expander() { - project = new Project(); - project.init(); - taskType = "unzip"; - taskName = "unzip"; - target = new Target(); - } + 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(); - +}

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.

-

The question you are probably asking yourself at this point is: -How would I know which classes and methods have to be called in -order to set up a dummy Project and Target? The answer is: you +

The question you are probably asking yourself at this point +is: How would I know which classes and methods have to be called in +order to set up a dummy Project and Target? 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!

- + diff -Nru ant-1.9.10/manual/anttaskslist.html ant-1.10.3/manual/anttaskslist.html --- ant-1.9.10/manual/anttaskslist.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/anttaskslist.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,16 +25,13 @@ -

Table of Contents

Apache Ant Tasks

diff -Nru ant-1.9.10/manual/argumentprocessor.html ant-1.10.3/manual/argumentprocessor.html --- ant-1.9.10/manual/argumentprocessor.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/argumentprocessor.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,52 +25,45 @@

The Command Line Processor Plugin: ArgumentProcessor

-

What is an ArgumentProcessor?

+

What is an ArgumentProcessor?

-An ArgumentProcessor is a parser of command line argument which is -then call before and after the build file is being parsed. Third party -libraries may then be able to have custom argument line argument which modify -Ant behaviour. +An ArgumentProcessor is a parser of command line argument which is then +call before and after the build file is being parsed. Third party libraries may then be able to have +custom argument line argument which modify Ant behaviour.

-An ArgumentProcessor is called each time Ant parse an unknown -argument, an ArgumentProcessor doesn't take precedence over Ant to -parse already suported options. It is then recommended to third party -ArgumentProcessor implementation to chose specific 'enough' -argument name, avoiding for instance one letter arguments. +An ArgumentProcessor is called each time Ant parse an unknown argument, +an ArgumentProcessor doesn't take precedence over Ant to parse already +supported options. It is then recommended to third party ArgumentProcessor +implementation to chose specific 'enough' argument name, avoiding for instance one letter arguments.

-It is also called at the different phases so different behaviour can be -implemented. It is called just after every arguments are parsed, just -before the project is being configured (the build file being parsed), -and just after. Some of the methods to be implemented return a boolean: -if true is returned, Ant will terminate immediately, without -error. +It is also called at the different phases so different behaviour can be implemented. It is called +just after every arguments are parsed, just before the project is being configured (the build file +being parsed), and just after. Some of the methods to be implemented return a boolean: +if true is returned, Ant will terminate immediately, without error.

-Being called during all these phases, an ArgumentProcessor -can just print some specific system properties and quit (like --diagnose), or print some specific properties of a project after -being parsed and quit (like -projectHelp), or just set some +Being called during all these phases, an ArgumentProcessor can just print +some specific system properties and quit (like -diagnose), or print some specific +properties of a project after being parsed and quit (like -projectHelp), or just set some custom properties on the project and let it run.

-

How to register it's own ArgumentProcessor

+

How to register it's own ArgumentProcessor

-

First, the ArgumentProcessor must be an implementation of -org.apache.tools.ant.ArgumentProcessor. +

First, the ArgumentProcessor must be an implementation +of org.apache.tools.ant.ArgumentProcessor.

-

Then to decare it: create a file -META-INF/services/org.apache.tools.ant.ArgumentProcessor which -contains only one line the fully qualified name of the class of the -implementation. This file together with the implementation class need then to -be found in Ant's classpath. +

Then to declare it: create a +file META-INF/services/org.apache.tools.ant.ArgumentProcessor which contains only one +line the fully qualified name of the class of the implementation. This file together with the +implementation class need then to be found in Ant's classpath.

- diff -Nru ant-1.9.10/manual/base_task_classes.html ant-1.10.3/manual/base_task_classes.html --- ant-1.9.10/manual/base_task_classes.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/base_task_classes.html 2018-03-24 12:37:12.000000000 +0000 @@ -29,15 +29,11 @@

The links will not work in the online version of this document.

- +
- - + + @@ -55,7 +51,7 @@ AbstractCvsTask @@ -86,7 +82,6 @@ - -
-Class - -Description -ClassDescription
-Another task can extend this with some customized output processing +Another task can extend this with some customized output processing.
Unpack @@ -104,11 +99,8 @@ Abstract Base class for tasks that may have multiple actions.
- - diff -Nru ant-1.9.10/manual/clonevm.html ant-1.10.3/manual/clonevm.html --- ant-1.9.10/manual/clonevm.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/clonevm.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,29 +24,26 @@ -

ant.build.clonevm

+

ant.build.clonevm

Since Apache Ant 1.7

-

The value of the ant.build.clonevm system property controls how Ant -instruments forked Java Virtual Machines. The java and junit tasks support clonevm -attributes to control the VMs on a task-by-task basis while the system -property applies to all forked Java VMs.

- -

If the value of the property is true, then all system properties of -the forked Java Virtual Machine will be the same as those of the Java -VM running Ant. In addition, if you set ant.build.clonevm to true and build.sysclasspath has not been set, the -bootclasspath of forked Java VMs gets constructed as if -build.sysclasspath had the value "last".

+

The value of the ant.build.clonevm system property +controls how Ant instruments forked JVMs. The java +and junit tasks support clonevm +attributes to control JVMs on a task-by-task basis while the system +property applies to all forked JVMs.

+ +

If the value of the property is true, then all system properties of +the forked JVM will be the same as those of the JVM running Ant. In +addition, if you set ant.build.clonevm to true +and build.sysclasspath has not been +set, the bootclasspath of forked JVMs gets constructed as +if build.sysclasspath had the value last.

Note that this has to be a system property, so it cannot be -specified on the Ant command line. Use the ANT_OPTS environment -variable instead.

- +specified on the Ant command line. Use the ANT_OPTS +environment variable instead.

- diff -Nru ant-1.9.10/manual/cover.html ant-1.10.3/manual/cover.html --- ant-1.9.10/manual/cover.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/cover.html 2018-03-24 12:37:12.000000000 +0000 @@ -19,35 +19,26 @@ -Apache Ant 1.9.10 User Manual +Apache Ant 1.10.3 User Manual - -
-

-

Apache Ant™ 1.9.10 Manual

-

This is the manual for version 1.9.10 of - Apache Ant. - If your version - of Ant (as verified with ant -version) is older or newer than this - version then this is not the correct manual set. Please use the documentation - appropriate to your current version. Also, if you are using a version - older than the most recent release, we recommend an upgrade to fix bugs - as well as provide new functionality.

-

 

+ +

+

Apache Ant™ 1.10.3 Manual

+

This is the manual for version 1.10.3 of Apache Ant. If your + version of Ant (as verified with ant -version) is older or newer than this version then this is not the + correct manual set. Please use the documentation appropriate to your current version. Also, if you are using a + version older than the most recent release, we recommend an upgrade to fix bugs as well as provide new + functionality.

-

Ant's manual and API documentation is part of - the binary - distributions or available as a - separate archive. - Manuals for older releases are available for - download - as - well.

- -

Apache Ant, Apache Ivy, Ant, Ivy, Apache, the Apache feather logo, and the Apache Ant project logos are trademarks of The Apache Software Foundation.

-
+

Ant's manual and API documentation is part of the binary distributions or available as a + separate archive. Manuals for older releases + are available for download as + well.

+

Apache Ant, Apache Ivy, Ant, Ivy, Apache, the Apache feather logo, and the Apache Ant project logos + are trademarks of The Apache Software Foundation.

diff -Nru ant-1.9.10/manual/credits.html ant-1.10.3/manual/credits.html --- ant-1.9.10/manual/credits.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/credits.html 2018-03-24 12:37:12.000000000 +0000 @@ -18,16 +18,16 @@ - -Apache Ant User Manual - Credits + +Apache Ant User Manual—Credits -
-

Apache Ant User Manual

-

by

-
+

Apache Ant User Manual

+ +

by

+ -
-

Version: 1.9.10

-
- +

Version: 1.10.3

diff -Nru ant-1.9.10/manual/develop.html ant-1.10.3/manual/develop.html --- ant-1.9.10/manual/develop.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/develop.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,258 +25,210 @@

Developing with Apache Ant

-

Writing Your Own Task

+

Writing Your Own Task

It is very easy to write your own task:

    -
  1. Create a Java class that extends org.apache.tools.ant.Task - or another class that was designed to be extended.
  2. +
  3. Create a Java class that extends org.apache.tools.ant.Task + or another class that was designed to be extended.
  4. -
  5. For each attribute, write a setter method. The setter method must be a - public void method that takes a single argument. The - name of the method must begin with set, followed by the - attribute name, with the first character of the name in uppercase, and the rest in - lowercase*. That is, to support an attribute named - file you create a method setFile. - Depending on the type of the argument, Ant will perform some - conversions for you, see below.
  6. - -
  7. If your task shall contain other tasks as nested elements (like - parallel), your - class must implement the interface - org.apache.tools.ant.TaskContainer. If you do so, your - task can not support any other nested elements. See - below.
  8. - -
  9. If the task should support character data (text nested between the - start end end tags), write a public void addText(String) - method. Note that Ant does not expand properties on - the text it passes to the task.
  10. - -
  11. For each nested element, write a create, add or - addConfigured method. A create method must be a - public method that takes no arguments and returns an - Object type. The name of the create method must begin - with create, followed by the element name. An add (or - addConfigured) method must be a public void method that - takes a single argument of an Object type with a - no-argument constructor. The name of the add (addConfigured) method - must begin with add (addConfigured), - followed by the element name. For a more complete discussion see - below.
  12. - -
  13. Write a public void execute method, with no arguments, that - throws a BuildException. This method implements the task - itself.
  14. +
  15. For each attribute, write a setter method. The setter method + must be a public void method that takes a single argument. The name of the method + must begin with set, followed by the attribute name, with the first character of + the name in uppercase, and the rest in lowercase*. That is, to + support an attribute named file you create a + method setFile. Depending on the type of the argument, Ant will + perform some conversions for you, see below.
  16. + +
  17. If your task shall contain other tasks as nested elements + (like parallel), your class must implement the + interface org.apache.tools.ant.TaskContainer. If you do so, your task + can not support any other nested elements. See below.
  18. + +
  19. If the task should support character data (text nested between the start and end tags), write + a public void addText(String) method. Note that Ant + does not expand properties on the text it passes to the task.
  20. + +
  21. For each nested element, write a create, add or addConfigured + method. A create method must be a public method that takes no arguments and + returns an Object type. The name of the create method must begin + with create, followed by the element name. An add (or addConfigured) method must be + a public void method that takes a single argument of an Object type + with a no-argument constructor. The name of the add (addConfigured) method must begin + with add (addConfigured), followed by the element name. For a more + complete discussion see below.
  22. + +
  23. Write a public void execute() method, with no arguments, that throws + a BuildException. This method implements the task itself.
-
-

* Actually the case of the letters after -the first one doesn't really matter to Ant, using all lower case is a -good convention, though.

+
+

* Actually the case of the letters after the first +one doesn't really matter to Ant, using all lower case is a good convention, though.

The Life-cycle of a Task

    -
  1. - The xml element that contains the tag corresponding to the - task gets converted to an UnknownElement at parser time. - This UnknownElement gets placed in a list within a target - object, or recursively within another UnknownElement. +
  2. The xml element that contains the tag corresponding to the task gets converted to + an UnknownElement at parse time. + This UnknownElement gets placed in a list within a target object, or + recursively within another UnknownElement.
  3. -
  4. - When the target is executed, each UnknownElement is invoked - using an perform() method. This instantiates - the task. This means that tasks only gets - instantiated at run time. + +
  5. When the target is executed, each UnknownElement is invoked using + an perform() method. This instantiates the task. This means that tasks + only gets instantiated at run time.
  6. -
  7. The task gets references to its project and location inside the - buildfile via its inherited project and - location variables.
  8. - -
  9. If the user specified an id attribute to this task, - the project - registers a reference to this newly created task, at run - time.
  10. - -
  11. The task gets a reference to the target it belongs to via its - inherited target variable.
  12. - -
  13. init() is called at run time.
  14. - -
  15. All child elements of the XML element corresponding to this task - are created via this task's createXXX() methods or - instantiated and added to this task via its addXXX() - methods, at run time. Child elements corresponding - to addConfiguredXXX() are created at this point but - the actual addCondifgired method is not called.
  16. - -
  17. All attributes of this task get set via their corresponding - setXXX methods, at runtime.
  18. - -
  19. The content character data sections inside the XML element - corresponding to this task is added to the task via its - addText method, at runtime.
  20. - -
  21. All attributes of all child elements get set via their corresponding - setXXX methods, at runtime.
  22. - -
  23. If child elements of the XML element corresponding to this task - have been created for addConfiguredXXX() methods, - those methods get invoked now.
  24. - -
  25. execute() is called at runtime. - If target1 and target2 both depend - on target3, then running - 'ant target1 target2' will run all tasks in - target3 twice.
  26. -
+
  • The task gets references to its project and location inside the buildfile via its + inherited project and location variables.
  • -

    Conversions Ant will perform for attributes

    +
  • If the user specified an id attribute to this task, the project registers a + reference to this newly created task, at run time.
  • -

    Ant will always expand properties before it passes the value of an -attribute to the corresponding setter method. Since Ant 1.8, it is -possible to extend Ant's property handling -such that a non-string Object may be the result of the evaluation of a string -containing a single property reference. These will be assigned directly via -setter methods of matching type. Since it requires some beyond-the-basics -intervention to enable this behavior, it may be a good idea to flag attributes -intended to permit this usage paradigm. -

    - -

    The most common way to write an attribute setter is to use a -java.lang.String argument. In this case Ant will pass -the literal value (after property expansion) to your task. But there -is more! If the argument of you setter method is

    +
  • The task gets a reference to the target it belongs to via its inherited target + variable.
  • -
      +
    • init() is called at run time.
    • -
    • boolean, your method will be passed the value - true if the value specified in the build file is one of - true, yes, or on and - false otherwise.
    • - -
    • char or java.lang.Character, your - method will be passed the first character of the value specified in - the build file.
    • - -
    • any other primitive type (int, short - and so on), Ant will convert the value of the attribute into this - type, thus making sure that you'll never receive input that is not a - number for that attribute.
    • - -
    • java.io.File, Ant will first determine whether the - value given in the build file represents an absolute path name. If - not, Ant will interpret the value as a path name relative to the - project's basedir.
    • - -
    • org.apache.tools.ant.types.Resource - org.apache.tools.ant.types.Resource, Ant will - resolve the string as a java.io.File as above, then - pass in as a org.apache.tools.ant.types.resources.FileResource. - Since Ant 1.8 -
    • +
    • All child elements of the XML element corresponding to this task are created via this + task's createXXX() methods or instantiated and added to this task via + its addXXX() methods, at run time. Child elements corresponding + to addConfiguredXXX() are created at this point but the + actual addConfigured method is not called.
    • -
    • org.apache.tools.ant.types.Path, Ant will tokenize - the value specified in the build file, accepting : and - ; as path separators. Relative path names will be - interpreted as relative to the project's basedir.
    • - -
    • java.lang.Class, Ant will interpret the value - given in the build file as a Java class name and load the named - class from the system class loader.
    • - -
    • any other type that has a constructor with a single - String argument, Ant will use this constructor to - create a new instance from the value given in the build file.
    • - -
    • A subclass of - org.apache.tools.ant.types.EnumeratedAttribute, Ant - will invoke this classes setValue method. Use this if - your task should support enumerated attributes (attributes with - values that must be part of a predefined set of values). See - org/apache/tools/ant/taskdefs/FixCRLF.java and the - inner AddAsisRemove class used in setCr - for an example.
    • - -
    • A (Java 5) enumeration. Ant will call the setter with the enum constant - matching the value given in the build file. This is easier than using - EnumeratedAttribute and can result in cleaner code, but of course - your task will not run on JDK 1.4 or earlier. Note that any override of - toString() in the enumeration is ignored; the build file must use - the declared name (see Enum.getName()). You may wish to use lowercase - enum constant names, in contrast to usual Java style, to look better in build files. - As of Ant 1.7.0.
    • +
    • All attributes of this task get set via their corresponding setXXX() + methods, at run time.
    • + +
    • The content character data sections inside the XML element corresponding to this task is added + to the task via its addText() method, at run time.
    • + +
    • All attributes of all child elements get set via their + corresponding setXXX() methods, at run time.
    • + +
    • If child elements of the XML element corresponding to this task have been created + for addConfiguredXXX() methods, those methods get invoked now.
    • + +
    • execute() is called at run time. If target1 + and target2 both depend on target3, then running ant target1 target2 + will run all tasks in target3 twice.
    • + +

      Conversions Ant will perform for attributes

      + +

      Ant will always expand properties before it passes the value of an attribute to the corresponding +setter method. Since Ant 1.8, it is possible to extend +Ant's property handling such that a non-string Object may be the result of the evaluation of a +string containing a single property reference. These will be assigned directly via setter methods of +matching type. Since it requires some beyond-the-basics intervention to enable this behavior, it may +be a good idea to flag attributes intended to permit this usage paradigm.

      + +

      The most common way to write an attribute setter is to use +a java.lang.String argument. In this case Ant will pass the literal value +(after property expansion) to your task. But there is more! If the argument of you setter method +is

      + +
        +
      • boolean, your method will be passed the value true if the value specified + in the build file is one of true, yes, or on and false + otherwise.
      • + +
      • char or java.lang.Character, your method will be passed + the first character of the value specified in the build file.
      • + +
      • any other primitive type (int, short and + so on), Ant will convert the value of the attribute into this type, thus making sure that you'll + never receive input that is not a number for that attribute.
      • + +
      • java.io.File, Ant will first determine whether the value given in + the build file represents an absolute path name. If not, Ant will interpret the value as a path + name relative to the project's basedir.
      • + +
      • org.apache.tools.ant.types.Resource, Ant will resolve the string as + a java.io.File as above, then pass in as + a org.apache.tools.ant.types.resources.FileResource. Since Ant + 1.8
      • + +
      • org.apache.tools.ant.types.Path, Ant will tokenize the value + specified in the build file, accepting : and ; as path separators. Relative path + names will be interpreted as relative to the project's basedir.
      • + +
      • java.lang.Class, Ant will interpret the value given in the build + file as a Java class name and load the named class from the system class loader.
      • + +
      • any other type that has a constructor with a single String argument, + Ant will use this constructor to create a new instance from the value given in the build + file.
      • + +
      • A subclass of org.apache.tools.ant.types.EnumeratedAttribute, Ant + will invoke this class's setValue method. Use this if your task + should support enumerated attributes (attributes with values that must be part of a predefined + set of values). See org/apache/tools/ant/taskdefs/FixCRLF.java and the + inner AddAsisRemove class used in setCr for + an example.
      • + +
      • A (Java 5) enumeration, Ant will call the setter with the enum constant matching the value + given in the build file. This is easier than using EnumeratedAttribute + and can result in cleaner code, but of course your task will not run on JDK 1.4 or earlier. Note + that any override of toString() in the enumeration is ignored; the + build file must use the declared name (see Enum.getName()). You may wish to use + lowercase enum constant names, in contrast to usual Java style, to look better in build + files. Since Ant 1.7.0
      -

      What happens if more than one setter method is present for a given -attribute? A method taking a String argument will always -lose against the more specific methods. If there are still more -setters Ant could chose from, only one of them will be called, but we -don't know which, this depends on the implementation of your Java -virtual machine.

      - -

      Supporting nested elements

      - -

      Let's assume your task shall support nested elements with the name -inner. First of all, you need a class that represents -this nested element. Often you simply want to use one of Ant's -classes like org.apache.tools.ant.types.FileSet to -support nested fileset elements.

      - -

      Attributes of the nested elements or nested child elements of them -will be handled using the same mechanism used for tasks (i.e. setter -methods for attributes, addText for nested text and -create/add/addConfigured methods for child elements).

      - -

      Now you have a class NestedElement that is supposed to -be used for your nested <inner> elements, you have -three options:

      +

      What happens if more than one setter method is present for a given attribute? A method taking +a String argument will always lose against the more specific methods. If +there are still more setters Ant could chose from, only one of them will be called, but we don't +know which, this depends on the implementation of your Java virtual machine.

      + +

      Supporting nested elements

      + +

      Let's assume your task shall support nested elements with the name inner. First of +all, you need a class that represents this nested element. Often you simply want to use one of +Ant's classes like org.apache.tools.ant.types.FileSet to support +nested fileset elements.

      + +

      Attributes of the nested elements or nested child elements of them will be handled using the same +mechanism used for tasks (i.e. setter methods for +attributes, addText() for nested text +and create/add/addConfigured methods for child elements).

      + +

      Now you have a class NestedElement that is supposed to be used for your +nested <inner> elements, you have three options:

        -
      1. public NestedElement createInner()
      2. -
      3. public void addInner(NestedElement anInner)
      4. -
      5. public void addConfiguredInner(NestedElement anInner)
      6. +
      7. public NestedElement createInner()
      8. +
      9. public void addInner(NestedElement anInner)
      10. +
      11. public void addConfiguredInner(NestedElement anInner)

      What is the difference?

      -

      Option 1 makes the task create the instance of -NestedElement, there are no restrictions on the type. -For the options 2 and 3, Ant has to create an instance of -NestedInner before it can pass it to the task, this -means, NestedInner must have a public no-arg - constructor or a public one-arg constructor - taking a Project class as a parameter. -This is the only difference between options 1 and 2.

      - -

      The difference between 2 and 3 is what Ant has done to the object -before it passes it to the method. addInner will receive -an object directly after the constructor has been called, while -addConfiguredInner gets the object after the -attributes and nested children for this new object have been -handled.

      - -

      What happens if you use more than one of the options? Only one of -the methods will be called, but we don't know which, this depends on -the implementation of your Java virtual machine.

      - -

      Nested Types

      -If your task needs to nest an arbitrary type that has been defined - using <typedef> you have two options. -
        -
      1. public void add(Type type)
      2. -
      3. public void addConfigured(Type type)
      4. -
      - The difference between 1 and 2 is the same as between 2 and 3 in the - previous section. -

      - For example suppose one wanted to handle objects object of type - org.apache.tools.ant.taskdefs.condition.Condition, one may - have a class: -

      -
      -
      +

      Option 1 makes the task create the instance of NestedElement, there are +no restrictions on the type. For the options 2 and 3, Ant has to create an instance +of NestedInner before it can pass it to the task, this +means, NestedInner must have a public no-arg constructor or +a public one-arg constructor taking a Project class as a +parameter. This is the only difference between options 1 and 2.

      + +

      The difference between 2 and 3 is what Ant has done to the object before it passes it to the +method. addInner() will receive an object directly after the constructor +has been called, while addConfiguredInner() gets the object after +the attributes and nested children for this new object have been handled.

      + +

      What happens if you use more than one of the options? Only one of the methods will be called, +but we don't know which, this depends on the implementation of your JVM.

      + +

      Nested Types

      +

      If your task needs to nest an arbitrary type that has been defined +using <typedef> you have two options.

      +
        +
      1. public void add(Type type)
      2. +
      3. public void addConfigured(Type type)
      4. +
      +

      The difference between 1 and 2 is the same as between 2 and 3 in the previous section.

      +

      For example suppose one wanted to handle objects object of +type org.apache.tools.ant.taskdefs.condition.Condition, one may have a +class:

      +
       public class MyTask extends Task {
           private List conditions = new ArrayList();
           public void add(Condition c) {
      @@ -285,27 +237,17 @@
           public void execute() {
            // iterator over the conditions
           }
      -}
      -  
      -
      -

      - One may define and use this class like this: -

      -
      -
      +}
      +

      One may define and use this class like this:

      +
       <taskdef name="mytask" classname="MyTask" classpath="classes"/>
       <typedef name="condition.equals"
                classname="org.apache.tools.ant.taskdefs.conditions.Equals"/>
       <mytask>
           <condition.equals arg1="${debug}" arg2="true"/>
      -</mytask>
      -    
      -
      -

      - A more complicated example follows: -

      -
      -
      +</mytask>
      +

      A more complicated example follows:

      +
       public class Sample {
           public static class MyFileSelector implements FileSelector {
                public void setAttrA(int a) {}
      @@ -318,13 +260,13 @@
       
           interface MyInterface {
               void setVerbose(boolean val);
      -    }        
      +    }
       
           public static class BuildPath extends Path {
               public BuildPath(Project project) {
                   super(project);
               }
      -        
      +
               public void add(MyInterface inter) {}
               public void setUrl(String url) {}
           }
      @@ -333,16 +275,11 @@
               public void setVerbose(boolean x) {}
               public void setCount(int c) {}
           }
      -}
      -    
      -
      -

      - This class defines a number of static classes that implement/extend - Path, MyFileSelector and MyInterface. These may be defined and used - as follows: -

      -
      -    
      +}
      +

      This class defines a number of static classes that +implement/extend Path, MyFileSelector +and MyInterface. These may be defined and used as follows:

      +
       <typedef name="myfileselector" classname="Sample$MyFileSelector"
                classpath="classes" loaderref="classes"/>
       <typedef name="buildpath" classname="Sample$BuildPath"
      @@ -358,33 +295,28 @@
                </buildpath>
             </myfileselector>
          </fileset>
      -</copy>
      -    
      -  
      - -

      TaskContainer

      - -

      The TaskContainer consists of a single method, -addTask that basically is the same as an add method for nested elements. The task -instances will be configured (their attributes and nested elements -have been handled) when your task's execute method gets -invoked, but not before that.

      - -

      When we said execute would be -called, we lied ;-). In fact, Ant will call the perform -method in org.apache.tools.ant.Task, which in turn calls -execute. This method makes sure that Build Events will be triggered. If you -execute the task instances nested into your task, you should also -invoke perform on these instances instead of -execute.

      +</copy> + +

      TaskContainer

      + +

      The TaskContainer consists of a single +method, addTask that basically is the same as +an add method for nested elements. The task instances will be +configured (their attributes and nested elements have been handled) when your +task's execute method gets invoked, but not before that.

      + +

      When we said execute would be called, we lied +;-). In fact, Ant will call the perform method +in org.apache.tools.ant.Task, which in turn +calls execute. This method makes sure that Build +Events will be triggered. If you execute the task instances nested into your task, you should +also invoke perform on these instances instead +of execute.

      Example

      -

      Let's write our own task, which prints a message on the -System.out stream. -The task has one attribute, called message.

      -
      +

      Let's write our own task, which prints a message on the System.out stream. The task +has one attribute, called message.

      +
       package com.mydomain;
       
      @@ -403,21 +335,19 @@
           public void setMessage(String msg) {
               this.msg = msg;
           }
      -}
      -
      -
      +} +

      It's really this simple ;-)

      Adding your task to the system is rather simple too:

        -
      1. Make sure the class that implements your task is in the classpath when - starting Ant.
      2. -
      3. Add a <taskdef> element to your project. - This actually adds your task to the system.
      4. +
      5. Make sure the class that implements your task is in the classpath when starting Ant.
      6. +
      7. Add a <taskdef> element to your project. This actually adds your task to + the system.
      8. Use your task in the rest of the buildfile.

      Example

      -
      +
       <?xml version="1.0"?>
       
      @@ -427,17 +357,14 @@
         <target name="main">
           <mytask message="Hello World! MyVeryOwnTask works!"/>
         </target>
      -</project>
      -
      -
      +</project>

      Example 2

      -To use a task directly from the buildfile which created it, place the -<taskdef> declaration inside a target -after the compilation. Use the classpath attribute of -<taskdef> to point to where the code has just been -compiled. -
      +

      To use a task directly from the buildfile which created it, place +the <taskdef> declaration inside a target after the compilation. Use +the classpath attribute of <taskdef> to point to where the code has +just been compiled.

      +
       <?xml version="1.0"?>
       
      @@ -457,27 +384,23 @@
         <target name="main" depends="declare">
           <mytask message="Hello World! MyVeryOwnTask works!"/>
         </target>
      -</project>
      -
      -
      - -

      Another way to add a task (more permanently), is to add the task name and -implementing class name to the default.properties file in the -org.apache.tools.ant.taskdefs -package. Then you can use it as if it were a built-in task.

      +</project> +

      Another way to add a task (more permanently) is to add the task name and implementing class name +to the default.properties file in +the org.apache.tools.ant.taskdefs package. Then you can use it as if it +were a built-in task.

      - -
      -

      Build Events

      +
      +

      Build Events

      Ant is capable of generating build events as it performs the tasks necessary to build a project. -Listeners can be attached to Ant to receive these events. This capability could be used, for example, -to connect Ant to a GUI or to integrate Ant with an IDE. -

      -

      To use build events you need to create an ant Project object. You can then call the -addBuildListener method to add your listener to the project. Your listener must implement -the org.apache.tools.antBuildListener interface. The listener will receive BuildEvents -for the following events

      +Listeners can be attached to Ant to receive these events. This capability could be used, for +example, to connect Ant to a GUI or to integrate Ant with an IDE.

      +

      To use build events you need to create an ant Project object. You can +then call the addBuildListener method to add your listener to the +project. Your listener must implement +the org.apache.tools.antBuildListener interface. The listener will receive +BuildEvents for the following events

      • Build started
      • Build finished
      • @@ -488,55 +411,49 @@
      • Message logged
      -

      If the build file invokes another build file via -<ant> or -<subant> or uses -<antcall>, you are creating a -new Ant "project" that will send target and task level events of its -own but never sends build started/finished events. Ant 1.6.2 -introduces an extension of the BuildListener interface named -SubBuildListener that will receive two new events for

      +

      If the build file invokes another build file +via <ant> +or <subant> or +uses <antcall>, you are creating a new Ant +"project" that will send target and task level events of its own but never sends build +started/finished events. Since Ant 1.6.2, BuildListener interface +has an extension named SubBuildListener that will receive two new events +for

      • SubBuild started
      • SubBuild finished
      -

      If you are interested in those events, all you need to do is to -implement the new interface instead of BuildListener (and register the -listener, of course).

      - -

      If you wish to attach a listener from the command line you may use the --listener option. For example:

      -
      -
      ant -listener org.apache.tools.ant.XmlLogger
      -
      -

      will run Ant with a listener that generates an XML representation of the build progress. This -listener is included with Ant, as is the default listener, which generates the logging to standard output.

      - -

      Note: A listener must not access System.out and System.err directly since output on -these streams is redirected by Ant's core to the build event system. Accessing these -streams can cause an infinite loop in Ant. Depending on the version of Ant, this will -either cause the build to terminate or the Java VM to run out of Stack space. A logger, also, may -not access System.out and System.err directly. It must use the streams with which it has -been configured.

      - -

      Note2: All methods of a BuildListener except for the "Build - Started" and "Build Finished" events may occur on several threads - simultaneously - for example while Ant is executing - a <parallel> task.

      +

      If you are interested in those events, all you need to do is to implement the new interface +instead of BuildListener (and register the listener, of course).

      +

      If you wish to attach a listener from the command line you may use the -listener +option. For example:

      +
      ant -listener org.apache.tools.ant.XmlLogger
      +

      will run Ant with a listener that generates an XML representation of the build progress. This +listener is included with Ant, as is the default listener, which generates the logging to standard +output.

      +

      Note: A listener must not access System.out +and System.err directly since output on these streams is redirected by +Ant's core to the build event system. Accessing these streams can cause an infinite loop in +Ant. Depending on the version of Ant, this will either cause the build to terminate or the JVM to +run out of Stack space. A logger, also, may not access System.out +and System.err directly. It must use the streams with which it has been +configured.

      + +

      Note: All methods of a BuildListener except for the +"Build Started" and "Build Finished" events may occur on several threads simultaneously—for +example while Ant is executing a <parallel> task.

      Example

      -Writing an adapter to your favourite log library is very easy. -Just implent the BuildListener interface, instantiate your logger and delegate -the message to that instance.
      -When starting your build provide your adapter class and the log library to the -build classpath and activate your logger via -listener option as -described above. +

      Writing an adapter to your favourite log library is very easy. Just implement +the BuildListener interface, instantiate your logger and delegate the +message to that instance.

      +

      When starting your build provide your adapter class and the log library to the build classpath +and activate your logger via -listener option as described above.

      -
       public class MyLogAdapter implements BuildListener {
       
      @@ -561,29 +478,22 @@
           }
       
           // implement all methods in that way
      -}
      -
      -
      - +} +
      +

      Source code integration

      -
      -

      Source code integration

      - -

      The other way to extend Ant through Java is to make changes to existing tasks, which is positively encouraged. -Both changes to the existing source and new tasks can be incorporated back into the Ant codebase, which -benefits all users and spreads the maintenance load around.

      - -

      Please consult the -Getting Involved pages on the Apache web site -for details on how to fetch the latest source and how to submit changes for reincorporation into the -source tree.

      - -

      Ant also has some -task guidelines -which provides some advice to people developing and testing tasks. Even if you intend to -keep your tasks to yourself, you should still read this as it should be informative.

      +

      The other way to extend Ant through Java is to make changes to existing tasks, which is +positively encouraged. Both changes to the existing source and new tasks can be incorporated back +into the Ant codebase, which benefits all users and spreads the maintenance load around.

      + +

      Please consult the Getting Involved pages on the Apache web site for details on how to fetch the +latest source and how to submit changes for reincorporation into the source tree.

      + +

      Ant also has some task +guidelines which provides some advice to people developing and testing tasks. Even if you intend +to keep your tasks to yourself, you should still read this as it should be informative.

      - diff -Nru ant-1.9.10/manual/developlist.html ant-1.10.3/manual/developlist.html --- ant-1.9.10/manual/developlist.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/developlist.html 2018-03-24 12:37:12.000000000 +0000 @@ -30,8 +30,8 @@

      Developing with Apache Ant

      Tutorials

      diff -Nru ant-1.9.10/manual/dirtasks.html ant-1.10.3/manual/dirtasks.html --- ant-1.9.10/manual/dirtasks.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/dirtasks.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,44 +24,46 @@ -

      Directory-based Tasks

      +

      Directory-based Tasks

      Some tasks use directory trees for the actions they perform. For example, the javac task, which -compiles a directory tree with .java files into -.class files, is one of these directory-based tasks. Because +compiles a directory tree with .java files into +.class files, is one of these directory-based tasks. Because some of these tasks do so much work with a directory tree, the task itself can act as an implicit FileSet.

      +

      Whether the fileset is implicit or not, it can often be very useful to work on a subset of the directory tree. This section describes how you can select a subset of such a directory tree when using one of these directory-based tasks.

      -

      Apache Ant gives you two ways to create a subset of files in a fileset, both of -which can be used at the same time:

      + +

      Apache Ant gives you two ways to create a subset of files in a +fileset, both of which can be used at the same time:

      • Only include files and directories that match any - include patterns and do not match any - exclude patterns in a given + include patterns and do not match any + exclude patterns in a given PatternSet.
      • Select files based on selection criteria defined by a collection of selector nested elements.
      -

      Patternset

      +

      Patternset

      -

      We said that Directory-based tasks can sometimes act as an implicit -<fileset>, -but in addition to that, a FileSet acts as an implicit -<patternset>.

      +

      We said that Directory-based tasks can sometimes act as an +implicit <fileset>, +but in addition to that, a FileSet acts as an +implicit <patternset>.

      The inclusion and exclusion elements of the implicit PatternSet can be specified inside the directory-based task (or explicit fileset) via either:

        -
      • the attributes includes and - excludes.
      • +
      • the attributes includes and + excludes.
      • nested elements <include> and <exclude>.
      • external files specified with the attributes - includesfile and excludesfile.
      • + includesfile and excludesfile.
      • external files specified with the nested elements <includesfile> and <excludesfile>.
      • @@ -77,142 +79,139 @@ are assumed to match the include pattern (with the possible exception of the default excludes).

        -

        Patterns

        +

        Patterns

        As described earlier, patterns are used for the inclusion and exclusion of files. These patterns look very much like the patterns used in DOS and UNIX:

        -

        '*' matches zero or more characters, '?' matches one character.

        + +

        * matches zero or more characters, ? matches one character.

        In general, patterns are considered relative paths, relative to a -task dependent base directory (the dir attribute in the case of -<fileset>). Only files found below that base -directory are considered. So while a pattern like -../foo.java is possible, it will not match anything when -applied since the base directory's parent is never scanned for -files.

        +task dependent base directory (the dir attribute in the +case of <fileset>). Only files found below that base +directory are considered. So while a pattern +like ../foo.java is possible, it will not match +anything when applied since the base directory's parent is never +scanned for files.

        -

        Examples:

        +
        Examples

        -*.java  matches  .java, -x.java and FooBar.java, but -not FooBar.xml (does not end with .java).

        -

        -?.java  matches  x.java, -A.java, but not .java or xyz.java -(both don't have one character before .java).

        +*.java  matches  .java, +x.java and FooBar.java, but +not FooBar.xml (does not end with .java).

        +

        -Combinations of *'s and ?'s are allowed.

        +?.java  matches  x.java, +A.java, but not .java or xyz.java +(both don't have one character before .java).

        + +

        Combinations of *'s and ?'s are allowed.

        +

        Matching is done per-directory. This means that first the first directory in the pattern is matched against the first directory in the path to match. Then -the second directory is matched, and so on. For example, when we have the pattern -/?abc/*/*.java -and the path /xabc/foobar/test.java, -the first ?abc is matched with xabc, -then * is matched with foobar, -and finally *.java is matched with test.java. +the second directory is matched, and so on. For example, when we have +the pattern /?abc/*/*.java +and the path /xabc/foobar/test.java, +the first ?abc is matched with xabc, +then * is matched with foobar, +and finally *.java is matched with test.java. They all match, so the path matches the pattern.

        +

        To make things a bit more flexible, we add one extra feature, which makes it possible to match multiple directory levels. This can be used to match a complete directory tree, or a file anywhere in the directory tree. -To do this, ** -must be used as the name of a directory. -When ** is used as the name of a -directory in the pattern, it matches zero or more directories. -For example: -/test/** matches all files/directories under /test/, -such as /test/x.java, -or /test/foo/bar/xyz.html, but not /xyz.xml.

        -

        There is one "shorthand": if a pattern ends -with / -or \, then ** -is appended. -For example, mypackage/test/ is interpreted as if it were -mypackage/test/**.

        -

        Example patterns:

        - +To do this, ** must be used as the name of a +directory. When ** is used as the name of a directory in +the pattern, it matches zero or more directories. For +example: /test/** matches all files/directories +under /test/, such as /test/x.java, +or /test/foo/bar/xyz.html, but not /xyz.xml.

        + +

        There is one "shorthand": if a pattern ends with / +or \, then ** is appended. For +example, mypackage/test/ is interpreted as if it +were mypackage/test/**.

        + +
        Example patterns
        +
        - - + + + + + - - + +
        +org/apache/jakarta/tools/ant/docs/index.html
        +org/apache/jakarta/test.xml
        +
        +But not: +
        org/apache/xyz.java
        +(jakarta/ part is missing). - - + +
        +org/apache/CVS/Entries
        +org/apache/jakarta/tools/ant/CVS/Entries
        +But not: +
        org/apache/CVS/foo/bar/Entries
        +(foo/bar/ part does not match) - - + +
        **/CVS/*Matches all files in CVS + ExampleExplanation
        **/CVS/*Matches all files in CVS directories that can be located - anywhere in the directory tree.
        + anywhere in the directory tree.
        Matches: -
        -      CVS/Repository
        -      org/apache/CVS/Entries
        -      org/apache/jakarta/tools/ant/CVS/Entries
        -      
        - But not: -
        -      org/apache/CVS/foo/bar/Entries (foo/bar/
        -      part does not match)
        -      
        +
        +CVS/Repository
        +org/apache/CVS/Entries
        +org/apache/jakarta/tools/ant/CVS/Entries
        +But not: +
        org/apache/CVS/foo/bar/Entries
        +(foo/bar/ part does not match)
        org/apache/jakarta/**Matches all files in the org/apache/jakarta - directory tree.
        +
        org/apache/jakarta/**Matches all files in the org/apache/jakarta + directory tree.
        Matches: -
        -      org/apache/jakarta/tools/ant/docs/index.html
        -      org/apache/jakarta/test.xml
        -      
        - But not: -
        -      org/apache/xyz.java
        -      
        - (jakarta/ part is missing).
        org/apache/**/CVS/*Matches all files in CVS directories + org/apache/**/CVS/*Matches all files in CVS directories that are located anywhere in the directory tree under - org/apache.
        + org/apache.
        Matches: -
        -      org/apache/CVS/Entries
        -      org/apache/jakarta/tools/ant/CVS/Entries
        -      
        - But not: -
        -      org/apache/CVS/foo/bar/Entries
        -      
        - (foo/bar/ part does not match)
        **/test/**Matches all files that have a test - element in their path, including test as a filename.**/test/**Matches all files that have a test + element in their path, including test as a filename.

        When these patterns are used in inclusion and exclusion, you have a powerful way to select just the files you want.

        -

        Selectors

        +

        Selectors

        The <fileset>, -whether implicit or explicit in the -directory-based task, also acts as an -<and> +whether implicit or explicit in the directory-based task, also acts as +an <and> selector container. This can be used to create arbitrarily complicated -selection criteria for the files the task should work with. See the -Selector documentation for more -information.

        +selection criteria for the files the task should work with. See +the Selector documentation for +more information.

        -

        Standard Tasks/Filesets

        +

        Standard Tasks/FileSets

        Many of the standard tasks in ant take one or more filesets which follow the rules given here. This list, a subset of those, is a list of standard ant tasks that can act as an implicit fileset:

        -

        Examples

        +

        Examples

         <copy todir="${dist}">
           <fileset dir="${src}"
                    includes="**/images/*"
        -           excludes="**/*.gif"
        -  />
        +           excludes="**/*.gif"/>
         </copy>
        -

        This copies all files in directories called images that are -located in the directory tree defined by ${src} to the -destination directory defined by ${dist}, -but excludes all *.gif files from the copy.

        +

        This copies all files in directories called images that are +located in the directory tree defined by ${src} to the +destination directory defined by ${dist}, +but excludes all *.gif files from the copy.

         <copy todir="${dist}">
           <fileset dir="${src}">
             <include name="**/images/*"/>
             <exclude name="**/*.gif"/>
           </fileset>
        -</copy>
        -
        -

        The same as the example above, but expressed using nested elements.

        +</copy> +

        The same as the example above, but expressed using nested elements.

         <delete dir="${dist}">
        @@ -263,52 +258,46 @@
         

        Deleting the original set of files, the delete task can act as an implicit fileset.

        -

        Default Excludes

        +

        Default Excludes

        There are a set of definitions that are excluded by default from all -directory-based tasks. As of Ant 1.8.1 they are:

        +directory-based tasks. Since Ant 1.8.1 they are:

        -     **/*~
        -     **/#*#
        -     **/.#*
        -     **/%*%
        -     **/._*
        -     **/CVS
        -     **/CVS/**
        -     **/.cvsignore
        -     **/SCCS
        -     **/SCCS/**
        -     **/vssver.scc
        -     **/.svn
        -     **/.svn/**
        -     **/.DS_Store
        -
        -

        Ant 1.8.2 adds the following default excludes:

        +**/*~ +**/#*# +**/.#* +**/%*% +**/._* +**/CVS +**/CVS/** +**/.cvsignore +**/SCCS +**/SCCS/** +**/vssver.scc +**/.svn +**/.svn/** +**/.DS_Store
        +

        Since Ant 1.8.2, additional default excludes are:

        -     **/.git
        -     **/.git/**
        -     **/.gitattributes
        -     **/.gitignore
        -     **/.gitmodules
        -     **/.hg
        -     **/.hg/**
        -     **/.hgignore
        -     **/.hgsub
        -     **/.hgsubstate
        -     **/.hgtags
        -     **/.bzr
        -     **/.bzr/**
        -     **/.bzrignore
        -
        +**/.git +**/.git/** +**/.gitattributes +**/.gitignore +**/.gitmodules +**/.hg +**/.hg/** +**/.hgignore +**/.hgsub +**/.hgsubstate +**/.hgtags +**/.bzr +**/.bzr/** +**/.bzrignore

        If you do not want these default excludes applied, you may disable -them with the defaultexcludes="no" -attribute.

        +them with the defaultexcludes=no attribute.

        This is the default list; note that you can modify the list of -default excludes by using the defaultexcludes task.

        - - +default excludes by using +the defaultexcludes task.

        - diff -Nru ant-1.9.10/manual/feedback.html ant-1.10.3/manual/feedback.html --- ant-1.9.10/manual/feedback.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/feedback.html 2018-03-24 12:37:12.000000000 +0000 @@ -19,54 +19,50 @@ -Apache Ant User Manual - Feedback +Apache Ant User Manual—Feedback -

        Feedback and Troubleshooting

        -

        If things do not work, especially simple things like ant -version, - then something is wrong with your configuration. Before filing bug reports and - emailing all the Apache Ant mailing lists

        +

        Feedback and Troubleshooting

        +

        If things do not work, especially simple things like ant -version, then something is + wrong with your configuration. Before filing bug reports and emailing all the Apache Ant mailing + lists

          -
        1. Check your environment variables. Are ANT_HOME and JAVA_HOME correct? If - they have quotes or trailing slashes, remove them.
        2. -
        3. Unset CLASSPATH; if that is wrong things go horribly wrong. Ant does not - need the CLASSPATH variable defined to anything to work.
        4. -
        5. Make sure there are no versions of crimson.jar or other XML parsers in JRE/ext
        6. -
        7. Is your path correct? is Ant on it? What about JDK/bin? have you tested - this? If you are using Jikes, is it on the path? A createProcess error (especially - with ID=2 on windows) usually means executable not found on the path.
        8. -
        9. Which version of ant are you running? Other applications distribute a copy - -it may be being picked up by accident.
        10. -
        11. If a task is failing to run is optional.jar in ANT_HOME/lib? Are there any - libraries which it depends on missing?
        12. -
        13. If a task doesn't do what you expect, run ant -verbose or ant - -debug to see what is happening
        14. +
        15. Check your environment variables. Are ANT_HOME and JAVA_HOME + correct? If they have quotes or trailing slashes, remove them.
        16. +
        17. Unset CLASSPATH; if that is wrong things go horribly wrong. Ant does not need + the CLASSPATH variable defined to anything to work.
        18. +
        19. Make sure there are no versions of crimson.jar or other XML parsers + in JAVA_HOME/jre/lib/ext
        20. +
        21. Is your path correct? is Ant on it? What about JAVA_HOME/bin? have you tested + this? If you are using Jikes, is it on the path? A CreateProcess error (especially + with error=2) on Windows usually means executable not found on the path.
        22. +
        23. Which version of ant are you running? Other applications distribute a copy—it may be + being picked up by accident.
        24. +
        25. If a task failing to run is from optional.jar in ANT_HOME/lib? Are + there any libraries which it depends on missing?
        26. +
        27. If a task doesn't do what you expect, run ant -verbose or ant -debug + to see what is happening
        -

        If you can't fix your problem, start with the Ant - User Mailing List . These are other ant users who will help you learn to - use ant. If they cannot fix it then someone may suggest filing a bug report, - which will escalate the issue. Remember of course, that support, like all open - source development tasks, is voluntary. If you haven't invested time in helping - yourself by following the steps above, it is unlikely that anyone will invest - the time in helping you.

        -

        Also, if you don't understand something, the Ant - User Mailing List is the place to ask questions. Not the developer list, - nor the individuals whose names appears in the source and documentation. If - they answered all such emails, nobody would have any time to improve ant.

        -

        To provide feedback on this software, please subscribe to the Ant - User Mailing List

        - -

        If you want to contribute to Ant or stay current with the latest -development, join the -Ant Development Mailing List -

        -

        A searchable archive can be found at http://marc.theaimsgroup.com. -Other archives will be documented online at Mailing Lists Archives

        - +

        If you can't fix your problem, start with the Ant User Mailing List. These are other ant users who will help you learn to use + ant. If they cannot fix it then someone may suggest filing a bug report, which will escalate the + issue. Remember of course, that support, like all open source development tasks, is voluntary. If + you haven't invested time in helping yourself by following the steps above, it is unlikely that + anyone will invest the time in helping you.

        +

        Also, if you don't understand something, the Ant User Mailing List is the place to ask questions. Not the developer list, nor + the individuals whose names appears in the source and documentation. If they answered all such + emails, nobody would have any time to improve Ant.

        +

        To provide feedback on this software, please subscribe to + the Ant User Mailing List

        +

        If you want to contribute to Ant or stay current with the latest development, join + the Ant Development Mailing List

        +

        A searchable archive can be found at https://marc.info. Other archives will be documented online + at Mailing Lists + Archives

        - diff -Nru ant-1.9.10/manual/ide.html ant-1.10.3/manual/ide.html --- ant-1.9.10/manual/ide.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/ide.html 2018-03-24 12:37:12.000000000 +0000 @@ -34,72 +34,42 @@
        • - - AntRunner For JBuilder (unbundled) - + AntWork Plugin for the Jext Java Text Editor + (unbundled)
        • - - AntWork Plugin for the Jext Java Text Editor (unbundled) - + JDEE (Java Development Environment for + Emacs) has built-in text Ant integration: selection of target through text field, execution, + hyperlink to compilation errors. Installation: built-in JDEE 2.2.8 or later. Configuration: + through customize menu "Jde Build Function"
        • - - JDEE (Java Development Environment for Emacs) - has built-in text ANT integration: selection of target through text - field, execution, hyperlink to compilation errors. Installation: built-in - JDEE 2.2.8 or later. Configuration: through customize menu - "Jde Build Function" + IDEA has built-in GUI ANT + integration: GUI selection of targets, execution, hyperlink to compilation errors
        • - - IDEA - has built-in GUI ANT integration: GUI selection of targets, execution, - hyperlink to compilation errors + NetBeans IDE uses Ant as the basis for its + project system starting with the 4.0 release
        • - - NetBeans - - NetBeans IDE uses Ant as the basis for its project system starting with the 4.0 release. + 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
        • - - jEdit - - 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. + Eclipse is IBM's counterpoint to NetBeans; an + open source IDE with Java and Ant support
        • - - Eclipse - - Eclipse is IBM's counterpoint to NetBeans; an open source IDE with - Java and Ant support. + Virtual Ant GUI allows you + to work on a Virtual File System without dealing with the XML; plugs into Eclipse, Netbeans + & IntelliJ
        • - - Virtual Ant GUI allows you to work on a Virtual File System without dealing with the XML. Plugs into Eclipse, Netbeans & Intellij. -
        • -
        • - - WebSphere Studio Application Developer - -
        • -
        • - - JBuilder 9 Personal - - JBuilder supports Ant with the following features. Add Ant nodes to - projects and execute Ant targets from within JBuilder. Add custom Ant-based - build tasks with custom Ant libraries to run Ant from within JBuilder. - Rapid navigation from Ant build error messages to source files. - Customize build menu and toolbar with custom build targets. + WebSphere Studio + Application Developer
        - - diff -Nru ant-1.9.10/manual/ifunless.html ant-1.10.3/manual/ifunless.html --- ant-1.9.10/manual/ifunless.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/ifunless.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,30 +23,25 @@ -

        If And Unless

        +

        If And Unless

        -

        Since Ant 1.9.1 it is possible to add if and unless attributes on all tasks and nested elements using special namespaces.

        +

        Since Ant 1.9.1, it is possible to add if and unless attributes on all tasks and nested elements using special namespaces.

        In order to use this feature you need to add the following namespace declarations

        -
        -    xmlns:if="ant:if"
        -    xmlns:unless="ant:unless"
        -    
        -
        - -

        The if and unless namespaces support the following 3 conditions : -

          -
        • true
        • true if the value of the attribute evaluates to true -
        • blank
        • true if the value of the attribute is null or empty -
        • set
        • true if the specified property is set -

        - -
        -
        +  
        +xmlns:if="ant:if"
        +xmlns:unless="ant:unless"
        + +

        The if and unless namespaces support the following 3 conditions:

        +
        +
        true
        true if the value of the attribute evaluates to true
        +
        blank
        true if the value of the attribute is null or empty
        +
        set
        true if the specified property is set
        +
        +
         <project name="tryit"
          xmlns:if="ant:if"
        - xmlns:unless="ant:unless"
        ->
        + xmlns:unless="ant:unless">
          <exec executable="java">
            <arg line="-X" if:true="${showextendedparams}"/>
            <arg line="-version" unless:true="${showextendedparams}"/>
        @@ -56,9 +51,7 @@
          </condition>
          <echo if:set="onmac">running on MacOS</echo>
          <echo unless:set="onmac">not running on MacOS</echo>
        -</project>
        -
        -
        +</project> diff -Nru ant-1.9.10/manual/index.html ant-1.10.3/manual/index.html --- ant-1.9.10/manual/index.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/index.html 2018-03-24 12:37:12.000000000 +0000 @@ -27,7 +27,7 @@ -<H2>Apache Ant&trade; User Manual</H2> +<h2>Apache Ant&trade; User Manual</h2> <a href="toc.html">Apache Ant User Manual</a> diff -Nru ant-1.9.10/manual/inputhandler.html ant-1.10.3/manual/inputhandler.html --- ant-1.9.10/manual/inputhandler.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/inputhandler.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -27,90 +26,77 @@

        Overview

        -

        When a task wants to prompt a user for input, it doesn't simply -read the input from the console as this would make it impossible to -embed Apache Ant in an IDE. Instead it asks an implementation of the -org.apache.tools.ant.input.InputHandler interface to -prompt the user and hand the user input back to the task.

        - -

        To do this, the task creates an InputRequest object -and passes it to the InputHandler Such an -InputRequest may know whether a given user input is valid -and the InputHandler is supposed to reject all invalid -input.

        - -

        Exactly one InputHandler instance is associated with -every Ant process, users can specify the implementation using the --inputhandler command line switch.

        +

        When a task wants to prompt a user for input, it doesn't simply read the input from the console +as this would make it impossible to embed Apache Ant in an IDE. Instead it asks an implementation +of the org.apache.tools.ant.input.InputHandler interface to prompt the +user and hand the user input back to the task.

        + +

        To do this, the task creates an InputRequest object and passes it to +the InputHandler. Such an InputRequest may know +whether a given user input is valid and the InputHandler is supposed to +reject all invalid input.

        + +

        Exactly one InputHandler instance is associated with every Ant process, +users can specify the implementation using the -inputhandler command line switch.

        InputHandler

        -

        The InputHandler interface contains exactly one -method

        +

        The InputHandler interface contains exactly one method

        -    void handleInput(InputRequest request) 
        -        throws org.apache.tools.ant.BuildException;
        -
        - -

        with some pre- and postconditions. The main postcondition is that -this method must not return unless the request considers -the user input valid, it is allowed to throw an exception in this -situation.

        +void handleInput(InputRequest request) + throws org.apache.tools.ant.BuildException; + +

        with some pre- and postconditions. The main postcondition is that this method must not return +unless the request considers the user input valid; it is allowed to throw an exception +in this situation.

        Ant comes with three built-in implementations of this interface:

        -

        DefaultInputHandler

        +

        DefaultInputHandler

        -

        This is the implementation you get, when you don't use the --inputhandler command line switch at all. This -implementation will print the prompt encapsulated in the -request object to Ant's logging system and re-prompt for -input until the user enters something that is considered valid input -by the request object. Input will be read from the -console and the user will need to press the Return key.

        +

        This is the implementation you get, when you don't use the -inputhandler command line +switch at all. This implementation will print the prompt encapsulated in the request +object to Ant's logging system and re-prompt for input until the user enters something that is +considered valid input by the request object. Input will be read from the console and +the user will need to press the Return key.

        PropertyFileInputHandler

        -

        This implementation is useful if you want to run unattended build -processes. It reads all input from a properties file and makes the -build fail if it cannot find valid input in this file. The name of -the properties file must be specified in the Java system property -ant.input.properties.

        - -

        The prompt encapsulated in a request will be used as -the key when looking up the input inside the properties file. If no -input can be found, the input is considered invalid and an exception -will be thrown.

        - -

        Note that ant.input.properties must -be a Java system property, not an Ant property. I.e. you cannot -define it as a simple parameter to ant, but you can +

        This implementation is useful if you want to run unattended build processes. It reads all input +from a properties file and makes the build fail if it cannot find valid input in this file. The +name of the properties file must be specified in the Java system +property ant.input.properties.

        + +

        The prompt encapsulated in a request will be used as the key when looking up the +input inside the properties file. If no input can be found, the input is considered invalid and an +exception will be thrown.

        + +

        Note that ant.input.properties must be a Java system property, not +an Ant property. I.e. you cannot define it as a simple parameter to ant, but you can define it inside the ANT_OPTS environment variable.

        GreedyInputHandler

        - -

        Like the default implementation, this InputHandler reads from standard -input. However, it consumes all available input. This behavior is -useful for sending Ant input via an OS pipe. Since Ant 1.7.

        +

        Since Ant 1.7

        +

        Like the default implementation, this InputHandler reads from standard input. However, it +consumes all available input. This behavior is useful for sending Ant input via an OS +pipe.

        SecureInputHandler

        - -

        This InputHandler calls System.console().readPassword(), -available since Java 1.6. On earlier platforms it falls back to the -behavior of DefaultInputHandler. Since Ant 1.7.1.

        +

        Since Ant 1.7.1

        +

        This InputHandler calls System.console().readPassword(), available +since Java 6. On earlier platforms it falls back to the behavior +of DefaultInputHandler.

        InputRequest

        -

        Instances of org.apache.tools.ant.input.InputRequest -encapsulate the information necessary to ask a user for input and -validate this input.

        - -

        The instances of InputRequest itself will accept any -input, but subclasses may use stricter validations. -org.apache.tools.ant.input.MultipleChoiceInputRequest -should be used if the user input must be part of a predefined set of -choices.

        +

        Instances of org.apache.tools.ant.input.InputRequest encapsulate the +information necessary to ask a user for input and validate this input.

        +

        The instances of InputRequest itself will accept any input, but +subclasses may use stricter +validations. org.apache.tools.ant.input.MultipleChoiceInputRequest should +be used if the user input must be part of a predefined set of choices.

        + diff -Nru ant-1.9.10/manual/install.html ant-1.10.3/manual/install.html --- ant-1.9.10/manual/install.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/install.html 2018-03-24 12:37:12.000000000 +0000 @@ -31,18 +31,18 @@ To get up and running with the binary distribution of Ant quickly, follow these steps:

          -
        1. Make sure you have a Java environment installed, See System Requirements for +
        2. Make sure you have a Java environment installed. See System Requirements for details.
        3. Download Ant. See Binary Distribution for details.
        4. Uncompress the downloaded file into a directory.
        5. -
        6. Set environmental variables JAVA_HOME to your Java environment, ANT_HOME to the directory -you uncompressed Ant to, and add ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows) to +
        7. Set environmental variables: JAVA_HOME to your Java environment, ANT_HOME to the directory +you uncompressed Ant to, and add ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows) to your PATH. See Setup for details.
        8. -
        9. Optionally, from the ANT_HOME directory run ant -f fetch.xml -Ddest=system to get the +
        10. Optionally, from the ANT_HOME directory run ant -f fetch.xml -Ddest=system to get the library dependencies of most of the Ant tasks that require them. If you don't do this, many of the dependent Ant tasks will not be available. See Optional Tasks for details and other options for -the -Ddest parameter.
        11. -
        12. Optionally, add any desired Antlibs. See Ant +the -Ddest parameter.
        13. +
        14. Optionally, add any desired Antlibs. See Ant Libraries for a list.

        @@ -63,17 +63,17 @@

        Binary Distribution

        -The latest stable version of Ant is available from the Ant web page http://ant.apache.org/ +The latest stable version of Ant is available from the Ant web page https://ant.apache.org/

        The binary distribution of Ant is available as 3 different archives

          -
        1. .zip - Recommended compression format for Windows, can also be used on other platforms. Supported by many -programs and some operating systems natively.
        2. -
        3. .tar.gz - Using the tar program to gather files together, and gzip to compress and uncompress.
        4. -
        5. .tar.bz2 - Using the tar program to gather files together, and bzip2 to compress and uncompress.
        6. +
        7. .zip—Recommended compression format for Windows, can also be used on other platforms. Supported +by many programs and some operating systems natively.
        8. +
        9. .tar.gz—Using the tar program to gather files together, and gzip to compress and uncompress.
        10. +
        11. .tar.bz2—Using the tar program to gather files together, and bzip2 to compress and uncompress.

        Choose the format that is best supported for your platform. @@ -97,27 +97,29 @@ eliminate inconsistencies between command-line and IDE Ant.

        -

        Bundled in Java applications

        +

        Bundled in Java Applications

        Many Java applications, most particularly application servers, ship with a version of Ant. These are primarily for internal use by the application, using the Java APIs to delegate tasks such as JSP page compilation to the Ant runtime. Such distributions are usually unsupported by everyone. Particularly troublesome are those products that not -only ship with their own Ant release, they add their own version of ANT.BAT or ant.sh to the PATH. If Ant -starts behaving weirdly after installing something, try the diagnostics advice. +only ship with their own Ant release, they add their own version of ANT.BAT or ant.sh to +the PATH. If Ant starts behaving weirdly after installing something, try +the diagnostics advice.

        Source Distribution

        -If you prefer the source distribution, you can download the source for the latest Ant release from -http://ant.apache.org/srcdownload.cgi. +If you prefer the source distribution, you can download the source for the latest Ant release +from https://ant.apache.org/srcdownload.cgi.

        If you prefer the leading-edge code, you can access the code as it is being developed via Git. The Ant website has -details on accessing Git. All bug fixes will go in against -the HEAD of the source tree, and the first response to many bugreps will be "have you tried the latest version". Don't -be afraid to download and build a prerelease distribution, as everything other than new features are usually stable. +details on accessing Git. All bug fixes will go in against +the HEAD of the source tree, and the first response to many bug reports will be "have you tried the latest +version". Don't be afraid to download and build a prerelease distribution, as everything other than new features are +usually stable.

        See the section Building Ant on how to build Ant from the source code. You can also access @@ -127,8 +129,8 @@

        Archive Download Area Layout

        -Older versions of Ant are available in the archives at http://archive.apache.org/dist/ant/. The files are organized as follows. +Older versions of Ant are available in the archives at https://archive.apache.org/dist/ant/. The files are organized as follows.

        @@ -136,83 +138,82 @@ - + - + - + - + - + - + - + - + - + - + - +
        Description
        KEYSKEYS PGP keyfile. It contains the PGP keys of Ant developers so you can 'trust' the distribution.
        RELEASE-NOTES-{version}.htmlRELEASE-NOTES-{version}.html Release notes of the given version in HTML format. When upgrading your Ant installation you - should have a look at the Changes that could break older environments section. + should have a look at the Changes that could break older environments section.
        ant-current-bin.zipant-current-bin.zip - ZIP archive containing the compiled version of Ant in the last released version. It is recommended that - you do not download the latest version this way, as the standard way of downloading described above will - redirect you to a mirror closer to you, thus making the download faster for you and reducing the load - on Apache servers. + ZIP archive containing the compiled version of Ant in the last released version. It is recommended that you do not + download the latest version this way, as the standard way of downloading described above will redirect you to a + mirror closer to you, thus making the download faster for you and reducing the load on Apache servers.
        ant-current-src.zipant-current-src.zip - ZIP archive containing the sources of Ant. If you have this you can compile Ant. If you do not have the - required dependencies, the classes depending on them are just not built. Again, it is preferred to use the - standard way of getting the source package described above to make your download quicker and to reduce the load on - Apache servers. + ZIP archive containing the sources of Ant. If you have this you can compile Ant. If you do not have + the required dependencies, the classes depending on them are just not built. Again, it is preferred to use + the standard way of getting the source package described above to make your download quicker and to reduce the load + on Apache servers.
        ant-current-*.ascant-current-*.asc - Security file for checking the correctness of the zip file. This one is the - PGP signature. + Security file for checking the correctness of the zip file. This one is + the PGP signature.
        ant-current-*.md5ant-current-*.md5 - Security file for checking the correctness of the zip file. This one is the - MD5 checksum. + Security file for checking the correctness of the zip file. This one is + the MD5 checksum.
        ant-current-*.sha1ant-current-*.sha1 - Security file for checking the correctness of the zip file. This one is the - SHA1 checksum. + Security file for checking the correctness of the zip file. This one is + the SHA1 checksum.
        antlibs/antlibs/ This directory holds the Antlibs that are made of available by the Apache Ant project. Antlibs are bundles of Ant tasks that are not delivered as part of the Ant core but are available as optional downloads.
        binaries/binaries/ The binaries directory holds specific Ant releases bundled in both ZIP and tar.gz archive formats. The named - releases are in contrast to the ant-current-bin.zip file in the parent directory, which is always guaranteed to be - the most current release of Ant. + releases are in contrast to the ant-current-bin.zip file in the parent directory, which is always + guaranteed to be the most current release of Ant.
        common/common/ The common directory holds various files, such as the Apache License file that Ant is licensed under, that people may wish to examine without having to download the whole Ant distribution.
        source/source/ The source directory holds the source code for specific Ant releases bundled in both ZIP and tar.gz archive - formats. The named releases are in contrast to the ant-current-src.zip file in the parent directory, which is always - guaranteed to hold the source code for the most current release of Ant. + formats. The named releases are in contrast to the ant-current-src.zip file in the parent directory, + which is always guaranteed to hold the source code for the most current release of Ant.
        @@ -221,26 +222,26 @@

        System Requirements

        Ant has been used successfully on many platforms, including Linux, commercial flavours of Unix such as Solaris and -HP-UX, macOS, Windows NT descendants, OS/2 Warp, Novell Netware 6, OpenVMS. The platforms used most for development -are, in no particular order, Linux, macOS, Microsoft Windows and Unix; these are therefore that platforms that tend to -work best. As of Ant 1.7, Windows 9x is no longer supported. +HP-UX, macOS, Windows NT descendants, OS/2 Warp, Novell Netware 6, OpenVMS. The platforms used most for development are, +in no particular order, Linux, macOS, Microsoft Windows and Unix; these are therefore that platforms that tend to work +best. Since Ant 1.7, Windows 9x is no longer supported.

        -For the current version of Ant (1.9), you will also need a JDK installed on your system, version 1.5 or later required. +For the current version of Ant (1.10), you will also need a JDK installed on your system, version 8 or later required. The more up-to-date the version of Java, the more Ant tasks you get.

        -Note: If a JDK is not present, only the runtime (JRE), then many tasks will not work. +Note: If a JDK is not present, only the runtime (JRE), then many tasks will not work.

        - Note: - Ant 1.8.* works with JDK 1.4 and higher, Ant 1.7.* works with JDK 1.3 and higher, + Note: + Ant 1.9.* works with JDK 1.5 and higher, Ant 1.8.* works with JDK 1.4 and higher, Ant 1.7.* works with JDK 1.3 and higher, Ant 1.6.* works with JDK 1.2 and higher, Ant 1.2 to Ant 1.5.* work with JDK 1.1 and higher.

        Open Source Java Runtimes

        -The Ant team strongly supports users running Ant on OpenJDK and +The Ant team strongly supports users running Ant on OpenJDK and other open source Java runtimes, and so strives to have a product that works well on those platforms.

        @@ -256,63 +257,42 @@ | +--- lib // contains Ant JARs plus necessary dependencies | - +--- docs // contains documentation - | | - | +--- images // various logos for html documentation - | | - | +--- manual // Ant documentation (a must read ;-) + +--- manual // Ant documentation (a must read ;-) | +--- etc // contains xsl goodies to: // - create an enhanced report from xml output of various tasks. // - migrate your build files and get rid of 'deprecated' warning - // - ... and more ;-) - + // - ... and more ;-)

        -Only the bin and lib directories are required to run Ant. +Only the bin and lib directories are required to run Ant.

        -To install Ant, choose a directory and copy the distribution files there. This directory will be known as -ANT_HOME. +To install Ant, choose a directory and copy the distribution files there. This directory will be known +as ANT_HOME.

        - - - - - - - - - - - - -
        - Windows 95, Windows 98 & Windows ME Note: -
          - Note that current releases of Ant no longer support these systems. If you are using an older version of Ant, +

        Windows 95, Windows 98 & Windows ME Note

        +

        + Note that current releases of Ant no longer support these systems. If you are using an older version of Ant, however, the script used to launch Ant will have problems if ANT_HOME is a long filename (i.e. a filename which is not of the format known as "8.3"). This is due to limitations in the OS's handling of - the "for" batch file statement. It is recommended, therefore, that Ant be installed in a - short, 8.3 path, such as C:\Ant. -

          -

        + the "for" batch file statement. It is recommended, therefore, that Ant be installed in + a short, 8.3 path, such as C:\Ant. +

        +

        On these systems you will also need to configure more environment space to cater for the environment variables used - in the Ant launch script. To do this, you will need to add or update the following line in the - config.sys file -

        -

        - shell=c:\command.com c:\ /p /e:32768 -

        -
        + in the Ant launch script. To do this, you will need to add or update the following line in + the config.sys file +

        +
        shell=c:\command.com c:\ /p /e:32768

        Setup

        -Before you can run Ant there is some additional setup you will need to do unless you are installing the -RPM version from jpackage.org: +Before you can run Ant there is some additional setup you will need to do unless you are installing +the RPM Version from jpackage.org:

          -
        • Add the bin directory to your path.
        • +
        • Add the bin directory to your path.
        • Set the ANT_HOME environment variable to the directory where you installed Ant. On some operating systems, Ant's startup scripts can guess ANT_HOME (Unix dialects and Windows NT descendants), but it is better to not rely on this behavior.
        • @@ -320,47 +300,39 @@ below). This should be set to the directory where your JDK is installed.

        -Operating System-specific instructions for doing this from the command line are in the Windows, -Linux/Unix (bash), and Linux/Unix (csh) sections. Note that using this -method, the settings will only be valid for the command line session you run them in. +Operating System-specific instructions for doing this from the command line are in +the Windows, Linux/Unix (bash), and Linux/Unix (csh) +sections. Note that using this method, the settings will only be valid for the command line session you run them in.

        -Note: Do not install Ant's ant.jar file into the lib/ext directory of the +Note: Do not install Ant's ant.jar file into the lib/ext directory of the JDK/JRE. Ant is an application, whilst the extension directory is intended for JDK extensions. In particular there are security restrictions on the classes which may be loaded by an extension.

        - - - - - - - - -
        - Windows Note: -
          - The ant.bat script makes use of three environment variables - ANT_HOME, - CLASSPATH and JAVA_HOME. Ensure that ANT_HOME and - JAVA_HOME variables are set, and that they do not have quotes (either ' or ") and - they do not end with \ or with /. CLASSPATH should be unset or empty. -
        +

        Windows Note

        +

        + The ant.bat script makes use of three environment + variables—ANT_HOME, CLASSPATH and JAVA_HOME. Ensure + that ANT_HOME and JAVA_HOME variables are set, and that they do not have + quotes (either ' or ") and they do not end with \ or with /. CLASSPATH should be + unset or empty. +

        Check Installation

        -You can check the basic installation with opening a new shell and typing ant. You should get a message like +You can check the basic installation with opening a new shell and typing ant. You should get a message like this

        -
        +
         Buildfile: build.xml does not exist!
         Build failed
         

        -So Ant works. This message is there because you need to write a buildfile for your project. With a ant --version you should get an output like +So Ant works. This message is there because you need to write a buildfile for your project. With a ant +-version you should get an output like

        -
        +
         Apache Ant(TM) version 1.9.2 compiled on July 8 2013
         

        @@ -372,11 +344,11 @@

      • required: %PATH%=...maybe-other-entries...;%ANT_HOME%\bin;...maybe-other-entries...

      -ANT_HOME is used by the launcher script for finding the libraries. -JAVA_HOME is used by the launcher for finding the JDK/JRE to use. (JDK is recommended as some tasks require the -Java tools.) If not set, the launcher tries to find one via the %PATH% environment variable. -PATH is set for user convenience. With that set you can just start ant instead of always typing -the/complete/path/to/your/ant/installation/bin/ant. +ANT_HOME is used by the launcher script for finding the libraries. JAVA_HOME is used by the +launcher for finding the JDK/JRE to use. (JDK is recommended as some tasks require the Java tools.) If not set, the +launcher tries to find one via the %PATH% environment variable. PATH is set for user +convenience. With that set you can just start ant instead of always +typing the/complete/path/to/your/ant/installation/bin/ant.

      Optional Tasks

      @@ -398,28 +370,28 @@
    • -In ${user.home}/.ant/lib (as of Ant 1.6). This allows different users to add new libraries to Ant. All JAR -files added to this directory are available to command-line Ant. +In ${user.home}/.ant/lib (since Ant 1.6). This allows different users to add new libraries to +Ant. All JAR files added to this directory are available to command-line Ant.

    • -On the command line with a -lib parameter. This lets you add new JAR files on a case-by-case basis. +On the command line with a -lib parameter. This lets you add new JAR files on a case-by-case basis.

    • -In the CLASSPATH environment variable. Avoid this; it makes the JAR files visible to all Java +In the CLASSPATH environment variable. Avoid this; it makes the JAR files visible to all Java applications, and causes no end of support calls. See below for details.

    • -In some <classpath> accepted by the task itself. For example, as of Ant 1.7.0 you can run -the <junit> task without junit.jar in Ant's own classpath, so long as it is included +In some <classpath> accepted by the task itself. Since Ant 1.7.0, you can run +the <junit> task without junit.jar in Ant's own classpath, so long as it is included (along with your program and tests) in the classpath passed when running the task.

      @@ -433,7 +405,7 @@

      If you are using the binary distribution of Ant, or if you are working from source code, you can easily gather most of the dependencies and install them for use with your Ant tasks. In your ANT_HOME directory you should see a -file called fetch.xml. This is an Ant script that you can run to install almost all the dependencies that +file called fetch.xml. This is an Ant script that you can run to install almost all the dependencies that the optional Ant tasks need.

      @@ -441,17 +413,15 @@ To do so, change to the ANT_HOME directory and execute the command:

      -
      -
      ant -f fetch.xml -Ddest=[option]
      -
      +
      ant -f fetch.xml -Ddest=[option]

      where option is one of the following, as described above:

        -
      • system - store in Ant's lib directory (Recommended)
      • -
      • user - store in the user's home directory
      • -
      • optional - store in Ant's source code lib/optional directory, used when building Ant +
      • system—store in Ant's lib directory (Recommended)
      • +
      • user—store in the user's home directory
      • +
      • optional—store in Ant's source code lib/optional directory, used when building Ant source code
      @@ -460,18 +430,18 @@

      -Note that not all dependencies are gathered using fetch.xml. Tasks that depend on commercial software, in +Note that not all dependencies are gathered using fetch.xml. Tasks that depend on commercial software, in particular, will require you to have the commercial software installed in order to be used.

      The Apache Ant Project also provides additional tasks and types that are available as separately downloaded Ant -Libraries. You can see the the list of available Antlibs at the Ant Libraries page.

      -You can also find tasks and types provided by third-party projects at the External Tools and Tasks page.

      @@ -480,7 +450,7 @@ configuration dialog. Sometimes JAR files added to a project are automatically added to Ant's classpath.

      -

      The CLASSPATH environment variable

      +

      The CLASSPATH Environment Variable

      The CLASSPATH environment variable is a source of many Ant support queries. As the round trip time for diagnosis on the Ant user mailing list can be slow, and because filing bug reports complaining about 'ant.bat' not @@ -497,14 +467,14 @@ Ant's ability to quote the string. Again, this is not needed for the correct operation of the CLASSPATH environment variable, even if a DOS directory is to be added to the path.

    • -
    • You can stop Ant using the CLASSPATH environment variable by setting the -noclasspath +
    • You can stop Ant using the CLASSPATH environment variable by setting the -noclasspath option on the command line. This is an easy way to test for classpath-related problems.
    • -The usual symptom of CLASSPATH problems is that ant will not run with some error about not being able to -find org.apache.tools.ant.launch.Launcher, or, if you have got the quotes/backslashes wrong, some very -weird Java startup error. To see if this is the case, run ant -noclasspath or unset +The usual symptom of CLASSPATH problems is that Ant will not run with some error about not being able to +find org.apache.tools.ant.launch.Launcher, or, if you have got the quotes/backslashes wrong, +some very weird Java startup error. To see if this is the case, run ant -noclasspath or unset the CLASSPATH environment variable.

      @@ -533,16 +503,16 @@

        -
      • With Java 5 or above
        +
      • With Java 5 or above

        When you run Ant on Java 5 or above, you could try to use the automatic proxy setup mechanism -with -autoproxy. +with -autoproxy.

      • -
      • With explicit JVM properties.
        +
      • With explicit JVM properties.

        -These are documented in Java's Networking Properties, and control the proxy behaviour of the entire JVM. To set them in Ant, declare them in the ANT_OPTS environment variable. This is the best option for a non-mobile system. For a laptop, you have to change these settings as you roam. To set ANT_OPTS: @@ -551,29 +521,23 @@

        For csh/tcsh:

        -
        -    setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
        -
        +
        setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

        For bash:

        -
        -    export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
        -
        +
        export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

        For Windows, set the environment variable in the appropriate dialog box and open a new console or, by hand

        -
        -    set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
        -
        +
        set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
      • -
      • In the build file itself
        +
      • In the build file itself

        If you are writing a build file that is always to be used behind the firewall, the setproxy task lets you configure the proxy (which it does by setting the JVM -properties). If you do this, we strongly recommend using ant properties to define the proxy host, port, etc, so that +properties). If you do this, we strongly recommend using Ant properties to define the proxy host, port, etc, so that individuals can override the defaults.

      • @@ -582,11 +546,11 @@

        The Ant team acknowledges that this is unsatisfactory. Until the JVM automatic proxy setup works properly everywhere, explicit JVM options via ANT_ARGS are probably the best solution. Setting properties on Ant's command line -do not work, because those are Ant properties being set, not JVM options. This means the following does not set +do not work, because those are Ant properties being set, not JVM options. This means the following does not set up the command line:

        -
        ant -Dhttp.proxyHost=proxy -Dhttp.proxyPort=81
        +
        ant -Dhttp.proxyHost=proxy -Dhttp.proxyPort=81

        All it does is set up two Ant properties. @@ -599,21 +563,21 @@

        Windows and OS/2

        -

        Assume Ant is installed in c:\ant\. The following sets up the +

        Assume Ant is installed in c:\ant\. The following sets up the environment:

        -
        set ANT_HOME=c:\ant
        +
        set ANT_HOME=c:\ant
         set JAVA_HOME=c:\jdk1.7.0_51
         set PATH=%PATH%;%ANT_HOME%\bin

        Linux/Unix (bash)

        -

        Assume Ant is installed in /usr/local/ant. The following sets up +

        Assume Ant is installed in /usr/local/ant. The following sets up the environment:

        -
        export ANT_HOME=/usr/local/ant
        +
        export ANT_HOME=/usr/local/ant
         export JAVA_HOME=/usr/local/jdk1.7.0_51
         export PATH=${PATH}:${ANT_HOME}/bin

        Linux/Unix (csh)

        -
        setenv ANT_HOME /usr/local/ant
        +
        setenv ANT_HOME /usr/local/ant
         setenv JAVA_HOME /usr/local/jdk/jdk1.7.0_51
         set path=( $path $ANT_HOME/bin )
        @@ -623,18 +587,18 @@

        RPM version from jpackage.org

        The JPackage project distributes an RPM version of Ant. With this -version, it is not necessary to set JAVA_HOME or ANT_HOME environment variables and the RPM -installer will correctly place the Ant executable on your path. +version, it is not necessary to set JAVA_HOME or ANT_HOME environment variables and the RPM +installer will correctly place the ant executable on your path.

        -NOTE: Since Ant 1.7.0, if the ANT_HOME environment variable is set, the JPackage +Note: Since Ant 1.7.0, if the ANT_HOME environment variable is set, the JPackage distribution will be ignored.

        Optional JARs for the JPackage version are handled in two ways. The easiest, and best way is to get these external libraries from JPackage if JPackage has them available. (Note: for each such library, you will have to get both the -external package itself (e.g. oro-2.0.8-2jpp.noarch.rpm) and the small library that links Ant and the -external package (e.g. ant-apache-oro-1.6.2-3jpp.noarch.rpm). +external package itself (e.g. oro-2.0.8-2jpp.noarch.rpm) and the small library that links Ant and the +external package (e.g. ant-apache-oro-1.6.2-3jpp.noarch.rpm).

        However, JPackage does not package proprietary software, and since some of the optional packages depend on proprietary @@ -644,32 +608,32 @@

        1. Decide where you want to deploy the extra JARs. One option is in $ANT_HOME/lib, which, for JPackage is -usually /usr/share/ant/lib. Another, less messy option is to create an .ant/lib subdirectory +usually /usr/share/ant/lib. Another, less messy option is to create an .ant/lib subdirectory of your home directory and place your non-JPackage Ant JARs there, thereby avoiding mixing JPackage libraries with non-JPackage stuff in the same folder. More information on where Ant finds its libraries is -available here
        2. -
        3. Download a non-JPackage binary distribution from the regular here
        4. +
        5. Download a non-JPackage binary distribution from the regular Apache Ant site
        6. Unzip or untar the distribution into a temporary directory
        7. -
        8. Copy the linking JAR, in this case ant-jai.jar, into the library directory you chose in step 1 +
        9. Copy the linking JAR, in this case ant-jai.jar, into the library directory you chose in step 1 above.
        10. Copy the proprietary JAR itself into the same directory.
        Finally, if for some reason you are running on a system with both the JPackage and Apache versions of Ant available, if you should want to run the Apache version (which will have to be specified with an absolute file name, not found on the -path), you should use Ant's --noconfig command-line switch to avoid JPackage's classpath mechanism. +path), you should use Ant's --noconfig command-line switch to avoid JPackage's classpath mechanism.

        Advanced

        There are many different ways to run Ant. What you need is at least the following:

          -
        • The classpath for Ant must contain ant.jar and any JARs/classes needed for your chosen JAXP-compliant +
        • The classpath for Ant must contain ant.jar and any JARs/classes needed for your chosen JAXP-compliant XML parser.
        • When you need JDK functionality (such as for the javac task or -the rmic task), then tools.jar must be added. The scripts supplied with Ant, -in the bin directory, will add the required JDK classes automatically, if the JAVA_HOME +the rmic task), then tools.jar must be added. The scripts supplied with Ant, +in the bin directory, will add the required JDK classes automatically, if the JAVA_HOME environment variable is set.
        • When you are executing platform-specific applications, such as the exec task or the cvs task, the property ant.home must be set to the directory containing @@ -697,13 +661,13 @@

          -Note: The bootstrap process of Ant requires a greedy compiler like OpenJDK or Oracle's javac. It does not work -with gcj or kjc. +Note: The bootstrap process of Ant requires a greedy compiler like OpenJDK or +Oracle's javac. It does not work with gcj or kjc.

          Make sure you have downloaded any auxiliary JARs required to build tasks you are interested in. These should be added to -the lib/optional directory of the source tree. See Library Dependencies +the lib/optional directory of the source tree. See Library Dependencies for a list of JAR requirements for various features. Note that this will make the auxiliary JAR available for the building of Ant only. For running Ant you will still need to make the JARs available as described under Installing Ant. @@ -711,22 +675,22 @@

          You can also get most of the auxiliary JAR files (i.e. the JAR files that various optional Ant tasks depend on) by -running Ant on the fetch.xml build file. See Optional Tasks for instructions +running Ant on the fetch.xml build file. See Optional Tasks for instructions on how to do this.

          -As of version 1.7.0 Ant has a hard dependency on JUnit. The fetch.xml build script will download JUnit -automatically, but if you don't use this you must install it manually into lib/optional (download it -from JUnit.org) if you are using a source distribution of Ant. +Since Ant 1.7.0, Ant has a hard dependency on JUnit. The fetch.xml build script will download +JUnit automatically, but if you don't use this you must install it manually into lib/optional (download it +from JUnit.org) if you are using a source distribution of Ant.

          Your are now ready to build Ant:

          -

          build -Ddist.dir=<directory_to_contain_Ant_distribution> dist    (Windows)

          -

          sh build.sh -Ddist.dir=<directory_to_contain_Ant_distribution> dist    (Unix)

          +

          build -Ddist.dir=<directory-to-contain-Ant-distribution> dist    (Windows)

          +

          sh build.sh -Ddist.dir=<directory-to-contain-Ant-distribution> dist    (Unix)

          @@ -740,49 +704,49 @@

        • If necessary it will bootstrap the Ant code. Bootstrapping involves the manual compilation of enough Ant code to be able to run Ant. The bootstrapped Ant is used for the remainder of the build steps.
        • Invokes the bootstrapped Ant with the parameters passed to the build script. In this case, these parameters define -an Ant property value and specify the "dist" target in Ant's own build.xml file.
        • -
        • Create the ant.jar and ant-launcher.jar JAR files
        • +an Ant property value and specify the dist target in Ant's own build.xml file. +
        • Create the ant.jar and ant-launcher.jar JAR files
        • Create optional JARs for which the build had the relevant libraries. If a particular library is missing -from lib/optional, then the matching ant-library JAR file will not be created. For -example, ant-junit.jar is only built if there is a junit.jar in the lib/optional +from lib/optional, then the matching ant-library JAR file will not be created. For +example, ant-junit.jar is only built if there is a junit.jar in the lib/optional directory.

        On most occasions you will not need to explicitly bootstrap Ant since the build scripts do that for you. However, if the build file you are using makes use of features not yet compiled into the bootstrapped Ant, you will need to manually -bootstrap. Run bootstrap.bat (Windows) or bootstrap.sh (UNIX) to build a new bootstrap version +bootstrap. Run bootstrap.bat (Windows) or bootstrap.sh (UNIX) to build a new bootstrap version of Ant.

        If you wish to install the build into the current ANT_HOME directory, you can use:
        -

        build install    (Windows)

        -

        sh build.sh install    (Unix)

        +

        build install    (Windows)

        +

        sh build.sh install    (Unix)

        You can avoid the lengthy Javadoc step, if desired, with:
        -

        build install-lite    (Windows)

        -

        sh build.sh install-lite    (Unix)

        +

        build install-lite    (Windows)

        +

        sh build.sh install-lite    (Unix)

        -This will only install the bin and lib directories. +This will only install the bin and lib directories.

        -Both the install and install-lite targets will overwrite the current Ant version +Both the install and install-lite targets will overwrite the current Ant version in ANT_HOME.

        -Ant's build script will try to set executable flags for its shell scripts on Unix-like systems. There are various +Ant's build script will try to set executable flags for its shell scripts on Unix(-like) systems. There are various reasons why the chmod task might fail (like when you are running the build script as a different user than the one who installed Ant initially). In this case you can set the Ant property chmod.fail to false when starting the build like in

        -
        -

        sh build.sh install -Dchmod.fail=false

        -
        + +
        sh build.sh install -Dchmod.fail=false
        +

        and any error to change permission will not result in a build failure.

        @@ -794,33 +758,34 @@ The following libraries are needed in Ant's classpath if you are using the indicated feature. Note that only one of the regexp libraries is needed for use with the mappers (and Java includes a regexp implementation which Ant will find automatically). You will also need to install the particular Ant optional JAR containing the task definitions to make -these tasks available. Please refer to the Installing Ant / Optional Tasks section above. +these tasks available. Please refer to the Installing Ant / Optional Tasks section above.

        - +
        - - - + + + + java.util.regex) + target="_top">https://attic.apache.org/projects/jakarta-regexp.html + java.util.regex) or ftp task with commons-net 1.4.1 + target="_top">https://attic.apache.org/projects/jakarta-oro.html - - + + @@ -830,7 +795,7 @@ - + @@ -845,23 +810,20 @@ - + target="_top">https://www.ibm.com/software/awdtools/netrexx/library.html - - + + @@ -881,8 +843,8 @@ - + @@ -908,88 +870,103 @@ + reader and optionally used by ejbjar task for dependency determination - + and deprecatedmimemail task + - + - + and deprecatedmimemail task + - + - - + + + target="_top">https://xerces.apache.org/xml-commons/components/resolver/ - + - + + target="_top">https://download.java.net/media/jai/builds/release/1_1_3/INSTALL.html + + + + + + + + + +
        JAR NameNeeded ForAvailable AtJAR NameNeeded ForAvailable At
        jakarta-regexp-1.4.jar regexp type with mappers (if you do not wish to use - java.util.regex) https://attic.apache.org/projects/jakarta-regexp.html
        jakarta-oro-2.0.8.jar regexp type with mappers (if you do not wish to use - java.util.regex) or ftp task with commons-net 1.4.1 https://attic.apache.org/projects/jakarta-oro.html
        junit.jarjunit task (may be in classpath passed to task rather than Ant's classpath)http://junit.org/junit task (may be in classpath passed to task rather than + Ant's classpath)https://junit.org/
        xalan.jar
        antlr.jar antlr taskhttp://www.antlr.org/https://www.antlr.org/
        bsf.jarGroovy JARs Groovy Ant tasks with bindings or Groovy with script and scriptdef tasks - http://groovy-lang.org/
        - Use either groovy-ant for Groovy Ant tasks with bindings or groovy-bsf for Groovy with script and scriptdef tasks - (or groovy-all) +
        http://groovy-lang.org/
        Use either groovy-ant for + Groovy Ant tasks with bindings or groovy-bsf for Groovy with script and scriptdef tasks (or groovy-all)
        netrexx.jar netrexxc task, Rexx with script task https://www.ibm.com/software/awdtools/netrexx/library.html
        rhino.jar
        - (included in Java 7 runtime, replaced by Nashorn in Java 8 and later)
        JavaScript with script task
        - Note: Apache BSF 2.4.0 works only with Rhino 1.5R4 and later versions.
        rhino.jar
        (included in Java 7 runtime, replaced by Nashorn in Java 8 and later)
        JavaScript with script task
        Note: Apache BSF 2.4.0 works + only with Rhino 1.5R4 and later versions.
        https://www.mozilla.org/rhino/
        BeanShell JAR(s)BeanShell with script task.
        - Note: Ant requires BeanShell version 1.3 or later
        BeanShell with script task.
        Note: Ant requires BeanShell + version 1.3 or later
        http://www.beanshell.org/
        commons-net.jar ftp, rexec - and telnet tasks
        - A minimum version of commons-net of 1.4.0 is needed to compile Ant, earlier versions did not support the full range - of configuration options.
        - jakarta-oro 2.0.8 is required together with commons-net 1.4.x at run time.
        - Note: do not use commons-net 3.2 because - of performance issues + and telnet tasks
        A minimum version of commons-net of 1.4.0 is needed to + compile Ant, earlier versions did not support the full range of configuration options.
        jakarta-oro 2.0.8 is + required together with commons-net 1.4.x at run time.
        Note: do not use commons-net 3.2 + because of performance issues
        https://commons.apache.org/net/
        bcel.jar classfileset data type, JavaClassHelper used by the ClassConstants filter - reader and optionally used by ejbjar task for dependency determination https://commons.apache.org/bcel/
        javax.mail-api.jar mail task with MIME encoding, - and deprecated mimemail taskhttps://javaee.github.io/javamail/ https://javaee.github.io/javamail/
        activation.jar
        - (included in Java 6 and later runtime)
        activation.jar
        (included in Java 6 and later runtime)
        mail task with MIME encoding, - and deprecated mimemail taskhttp://www.oracle.com/technetwork/java/javase/jaf-135115.html https://www.oracle.com/technetwork/java/javase/jaf-135115.html
        jdepend.jar jdepend taskhttps://github.com/clarkware/jdependhttps://github.com/clarkware/jdepend
        resolver.jar 1.1 or laterxmlcatalog datatype only if support for external catalog files is - desiredresolver.jar 1.1 or laterxmlcatalog datatype only if support for external catalog files is + desired https://xerces.apache.org/xml-commons/components/resolver/
        jsch.jar 0.1.54 or laterjsch.jar 0.1.54 or later sshexec and scp tasks http://www.jcraft.com/jsch/
        JAI - Java Advanced ImagingJAI—Java Advanced Imaging image task https://download.java.net/media/jai/builds/release/1_1_3/INSTALL.html
        XZ—XZ for Java 1.6 or laterxz and unxz + tasks, xzresource, xz compression + in tar/untar taskshttps://www.tukaani.org/xz/java.html
        JUnit 5 Platform jars: +
          +
        • junit-platform-commons.jar
        • +
        • junit-platform-engine.jar
        • +
        • junit-platform-launcher.jar
        • +
        +
        junitlauncher task. Additional libraries maybe needed depending + on the selected test engines, details of which are available in that task's documentationhttps://junit.org/junit5/
        -
      • Which optional tasks are available. If a task is not listed as being available, either it is not present, or -libraries that it depends on are absent.
      • +

        Troubleshooting

        Diagnostics

        -Ant has a built in diagnostics feature. If you run ant -diagnostics ant will look at its internal state and -print it out. This code will check and print the following things. +Ant has a built in diagnostics feature. If you run ant -diagnostics, Ant will look at its internal state +and print it out. This code will check and print the following things.

        • Where Ant is running from. Sometimes you can be surprised.
        • -
        • The version of ant.jar and of the ant-*.jar containing the optional tasks - and whether they match
        • +
        • The version of ant.jar and of the ant-*.jar containing the optional tasks—and +whether they match
        • Which JAR files are in ANT_HOME/lib
        • -

          Troubleshooting

          +
        • Which optional tasks are available. If a task is not listed as being available, either it is not present, or +libraries that it depends on are absent.
        • XML Parser information
        • JVM system properties
        • -
        • The status of the temp directory. If this is not writable, or its clock is horribly wrong (possible if it is on a -network drive), a lot of tasks will fail with obscure error messages.
        • +
        • The status of the temp directory. If this is not writable, or its timestamp is horribly wrong (possible +if it is on a network drive), a lot of tasks may fail with obscure error messages.
        • The current time zone as Java sees it. If this is not what it should be for your location, then dependency logic may get confused.
        • @@ -997,7 +974,7 @@

        -Running ant -diagnostics is a good way to check that Ant is installed. It is also a first step towards +Running ant -diagnostics is a good way to check that Ant is installed. It is also a first step towards self-diagnosis of any problem. Any configuration problem reported to the user mailing list will probably result ins someone asking you to run the command and show the results, so save time by using it yourself.

        @@ -1008,7 +985,7 @@ what the XML parser and classpath is, etc.

        -

        user mailing list

        +

        User Mailing List

        If you cannot get Ant installed or working, the Ant user mailing list is the best place to start with any diff -Nru ant-1.9.10/manual/installlist.html ant-1.10.3/manual/installlist.html --- ant-1.9.10/manual/installlist.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/installlist.html 2018-03-24 12:37:12.000000000 +0000 @@ -41,4 +41,3 @@

      - diff -Nru ant-1.9.10/manual/Integration/jext-plugin.html ant-1.10.3/manual/Integration/jext-plugin.html --- ant-1.9.10/manual/Integration/jext-plugin.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Integration/jext-plugin.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,43 +14,40 @@ See the License for the specific language governing permissions and limitations under the License. --> - - Apache AntWork Plugin for the Jext Java Text Editor -

      AntWork Plugin for the Jext Java Text Editor

      - by
        -
      • Klaus Hartlage - (KHartlage@t-online.de)
      • +

        AntWork Plugin for the Jext Java Text Editor

        +by + -
        +
        -

        You can download the plugin at: ftp://jext.sourceforge.net/pub/jext/plugins/AntWork.zip

        +

        You can download the plugin +at: http://sourceforge.net/projects/jext/files/OldFiles/antwork_plugin.zip/download

        -

        Installation instructions from the Readme.txt:

        +

        Installation instructions from the Readme.txt

        You have to enable the Jext Console to see the Apache Ant output (menu: -Edit->Options... - General Panel), because the Ant messages are -redirected to the Jext console.

        +Edit→Options…–General Panel), because Ant messages are redirected to the Jext +console.

        -

        You can configure the Ant call in the Jext menu: Edit->Options... - -Plugin Options - Antwork Plugin Panel; here you can set the ant home -directory and the path to your build file.

        +

        You can configure the Ant call in the Jext menu: Edit→Options…– Plugin +Options–Antwork Plugin Panel; here you can set Ant home directory and the path to your build +file.

        -

        You can start AntWork in the menu: Plugins->Ant->Work Now! In the -appearing dialog box you can enter the target which you want to -compile.

        +

        You can start AntWork in the menu: Plugins→Ant→Work Now! In the appearing dialog box +you can enter the target which you want to compile.

        -

        If a javac error occurs in the ant run an error-list opens within -Jext. With a double-click on the error-message you jump to the error -in the specified java text file.

        +

        If a javac error occurs in the Ant run, an error list opens within Jext. With a +double click on the error message you jump to the error in the specified Java source file.

        - - + + diff -Nru ant-1.9.10/manual/intro.html ant-1.10.3/manual/intro.html --- ant-1.9.10/manual/intro.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/intro.html 2018-03-24 12:37:12.000000000 +0000 @@ -19,19 +19,19 @@ -Apache Ant User Manual - Introduction +Apache Ant User Manual—Introduction -

        Introduction

        +

        Introduction

        Apache Ant is a Java-based build tool. In theory, it is kind of like -make, without make's wrinkles.

        +make, without make's wrinkles.

        Why?

        Why another build tool when there is already -make, -gnumake, -nmake, -jam, +make, +gnumake, +nmake, +jam, and others? Because all those tools have limitations that Ant's original author couldn't live with when developing software across multiple platforms. @@ -54,16 +54,13 @@ Task interface.

        Granted, this removes some of the expressive power that is inherent in being able to construct a shell command such as -`find . -name foo -exec rm {}`, but it -gives you the ability to be cross-platform--to work anywhere and +`find . -name foo -exec rm {}`, but it +gives you the ability to be cross-platform—to work anywhere and everywhere. And hey, if you really need to execute a shell command, Ant has an <exec> task that allows different commands to be executed based on the OS it is executing on.

        - - - diff -Nru ant-1.9.10/manual/javacprops.html ant-1.10.3/manual/javacprops.html --- ant-1.9.10/manual/javacprops.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/javacprops.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,30 +24,29 @@ -

        The source and target attributes of <javac> -don't have any default values for historical reasons. Since the -underlying javac compiler's default depends on the JDK you use, you -may encounter build files that don't explicitly set those attributes -and that will no longer compile using a newer JDK. If you cannot -change the build file, Apache Ant provides two properties that help you -setting default values for these attributes. If the attributes have -been set explicitly, the properties listed here will be ignored.

        +

        The source and target attributes +of <javac> don't have any default values for +historical reasons. Since the underlying javac +compiler defaults depends on the JDK you use, you may encounter +build files that don't explicitly set those attributes and that will +no longer compile using a newer JDK. If you cannot change the build +file, Apache Ant provides two properties that help you setting +default values for these attributes. If the attributes have been +set explicitly, the properties listed here will be ignored.

        -

        ant.build.javac.source

        +

        ant.build.javac.source

        Since Ant 1.7

        -

        Provides a default value for <javac>'s and -<javadoc>'s source attribute.

        +

        Provides a default value for <javac>'s +and <javadoc>'s source attribute.

        -

        ant.build.javac.target

        +

        ant.build.javac.target

        Since Ant 1.7

        -

        Provides a default value for <javac>'s target -attribute.

        - +

        Provides a default value +for <javac>'s target attribute.

        - diff -Nru ant-1.9.10/manual/listeners.html ant-1.10.3/manual/listeners.html --- ant-1.9.10/manual/listeners.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/listeners.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,12 +25,12 @@

        Listeners & Loggers

        -

        Overview

        +

        Overview

        -

        Apache Ant has two related features to allow the build process to be monitored: -listeners and loggers.

        +

        Apache Ant has two related features to allow the build process to be monitored: listeners and +loggers.

        -

        Listeners

        +

        Listeners

        A listener is alerted of the following events:

        @@ -44,365 +44,326 @@
      • message logged
      -

      - These are used internally for various recording and housekeeping operations, - however new listeners may registered on the command line through the -listener - argument. -

      +

      These are used internally for various recording and housekeeping operations, however new +listeners may registered on the command line through the -listener argument.

      -

      Loggers

      +

      Loggers

      Loggers extend the capabilities of listeners and add the following features:

        -
      • Receives a handle to the standard output and error print streams and - therefore can log information to the console or the -logfile specified file.
      • -
      • Logging level (-quiet, -verbose, -debug) aware
      • +
      • Receives a handle to the standard output and error print streams and therefore can log + information to the console or the -logfile specified file.
      • +
      • Logging level (-quiet, -verbose, -debug) aware
      • Emacs-mode aware
      -

      Built-in Listeners/Loggers

      +

      Built-in Listeners/Loggers

      - +
      - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      ClassnameDescriptionTypeClassnameDescriptionType
      org.apache.tools.ant.DefaultLoggerThe logger used implicitly unless overridden with the - -logger command-line switch.BuildLoggerorg.apache.tools.ant.DefaultLoggerThe logger used implicitly unless overridden with the -logger command-line + switch.BuildLogger
      - org.apache.tools.ant.NoBannerLoggerThis logger omits output of empty target output.BuildLoggerorg.apache.tools.ant.NoBannerLoggerThis logger omits output of empty target output.BuildLogger
      - org.apache.tools.ant.listener.MailLoggerExtends DefaultLogger such that output is still generated - the same, and when the build is finished an e-mail can be sent.BuildLoggerorg.apache.tools.ant.listener.MailLoggerExtends DefaultLogger such that output is still generated the same, and when the build is + finished an e-mail can be sent.BuildLogger
      - org.apache.tools.ant.listener.AnsiColorLoggerColorifies the build output.BuildLoggerorg.apache.tools.ant.listener.AnsiColorLoggerColorifies the build output.BuildLogger
      - org.apache.tools.ant.listener.Log4jListener - Passes events to Apache Log4j for highly customizable logging.
      - Deprecated: Apache Log4j (1.x) is not developed any more. Last - release is 1.2.17 from 26-May-2012 and contains vulnerability issues. -
      BuildListenerorg.apache.tools.ant.listener.Log4jListenerPasses events to Apache Log4j for highly customizable + logging.
      Deprecated: Apache Log4j (1.x) is not developed any more. Last + release is 1.2.17 from 26 May 2012 and contains vulnerability issues.
      BuildListener
      org.apache.tools.ant.XmlLoggerWrites the build information to an XML file.BuildLoggerorg.apache.tools.ant.XmlLoggerWrites the build information to an XML file.BuildLogger
      org.apache.tools.ant.TimestampedLoggerPrints the time that a build finishedBuildLoggerorg.apache.tools.ant.TimestampedLoggerPrints the time that a build finishedBuildLogger
      org.apache.tools.ant.listener.BigProjectLoggerPrints the project name every targetBuildLoggerorg.apache.tools.ant.listener.BigProjectLoggerPrints the project name every targetBuildLogger
      org.apache.tools.ant.listener.SimpleBigProjectLoggerPrints the project name for subprojects only, otherwise like NoBannerLogger Since Ant 1.8.1BuildLoggerorg.apache.tools.ant.listener.SimpleBigProjectLoggerPrints the project name for subprojects only, otherwise like NoBannerLogger Since Ant + 1.8.1BuildLogger
      org.apache.tools.ant.listener.ProfileLoggerThe default logger, with start times, end times and - durations added for each task and target.BuildLoggerorg.apache.tools.ant.listener.ProfileLoggerThe default logger, with start times, end times and durations added for each task and + target.BuildLogger
      - - -

      DefaultLogger

      +

      DefaultLogger

      Simply run Ant normally, or:

      -
      -

      ant -logger org.apache.tools.ant.DefaultLogger

      -
      - +
      ant -logger org.apache.tools.ant.DefaultLogger
      -

      NoBannerLogger

      +

      NoBannerLogger

      Removes output of empty target output.

      -
      -

      ant -logger org.apache.tools.ant.NoBannerLogger

      -
      +
      ant -logger org.apache.tools.ant.NoBannerLogger
      - -

      MailLogger

      -

      The MailLogger captures all output logged through DefaultLogger (standard Ant -output) and will send success and failure messages to unique e-mail lists, with -control for turning off success or failure messages individually.

      +

      MailLogger

      +

      The MailLogger captures all output logged through DefaultLogger (standard Ant output) and will +send success and failure messages to unique e-mail lists, with control for turning off success or +failure messages individually.

      Properties controlling the operation of MailLogger:

      - +
      - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      PropertyDescriptionRequiredPropertyDescriptionRequired
      MailLogger.mailhost Mail server to useNo, default "localhost"MailLogger.mailhostMail server to useNo; default localhost
      MailLogger.port SMTP Port for the Mail serverNo, default "25"MailLogger.portSMTP Port for the Mail serverNo; default 25
      MailLogger.useruser name for SMTP authYes, if SMTP auth is required on your SMTP server
      - the email message will be then sent using Mime and requires JavaMail
      MailLogger.useruser name for SMTP authYes, if SMTP auth is required on your SMTP server
      the email message will be then sent + using MIME and requires JavaMail
      MailLogger.passwordpassword for SMTP authYes, if SMTP auth is required on your SMTP server
      - the email message will be then sent using Mime and requires JavaMail
      MailLogger.passwordpassword for SMTP authYes, if SMTP auth is required on your SMTP server
      the email message will be then sent + using MIME and requires JavaMail
      MailLogger.sslon or true if ssl is needed
      - This feature requires JavaMail
      - noMailLogger.sslon or true if SSL is needed
      This feature requires JavaMail
      No
      MailLogger.fromMail "from" addressYes, if mail needs to be sentMailLogger.fromMail from addressYes, if mail needs to be sent
      MailLogger.replytoMail "replyto" address(es), comma-separatedNoMailLogger.replytoMail replyto address(es), comma-separatedNo
      MailLogger.failure.notify Send build failure e-mails?No, default "true"MailLogger.failure.notifySend build failure e-mails?No; default true
      MailLogger.success.notify Send build success e-mails?No, default "true"MailLogger.success.notifySend build success e-mails?No; default true
      MailLogger.failure.to Address(es) to send failure messages to, comma-separatedYes, if failure mail is to be sentMailLogger.failure.toAddress(es) to send failure messages to, comma-separatedYes, if failure mail is to be sent
      MailLogger.success.to Address(es) to send success messages to, comma-separatedYes, if success mail is to be sentMailLogger.success.toAddress(es) to send success messages to, comma-separatedYes, if success mail is to be sent
      MailLogger.failure.cc Address(es) to send failure messages to carbon copy (cc), comma-separatedNoMailLogger.failure.ccAddress(es) to send failure messages to carbon copy (cc), comma-separatedNo
      MailLogger.success.cc Address(es) to send success messages to carbon copy (cc), comma-separatedNoMailLogger.success.ccAddress(es) to send success messages to carbon copy (cc), comma-separatedNo
      MailLogger.failure.bcc Address(es) to send failure messages to blind carbon copy (bcc), comma-separatedNoMailLogger.failure.bccAddress(es) to send failure messages to blind carbon copy (bcc), comma-separatedNo
      MailLogger.success.bcc Address(es) to send success messages to blind carbon copy (bcc), comma-separatedNoMailLogger.success.bccAddress(es) to send success messages to blind carbon copy (bcc), comma-separatedNo
      MailLogger.failure.subject Subject of failed buildNo, default "Build Failure"MailLogger.failure.subjectSubject of failed buildNo; default Build Failure
      MailLogger.success.subject Subject of successful buildNo, default "Build Success"MailLogger.success.subjectSubject of successful buildNo; default Build Success
      MailLogger.failure.bodyFixed body of the email for a failed - build. Since Ant 1.8.0No, default is to send the full log output.MailLogger.failure.bodyFixed body of the email for a failed build. Since Ant 1.8.0No; default is to send the full log output
      MailLogger.success.bodyFixed body of the email for a successful - build. Since Ant 1.8.0No, default is to send the full log output.MailLogger.success.bodyFixed body of the email for a successful build. Since Ant 1.8.0No; default is to send the full log output
      MailLogger.mimeTypeMIME-Type of the message. Since Ant 1.8.0No, default is text/plainMailLogger.mimeTypeMIME-Type of the message. Since Ant 1.8.0No; default is text/plain
      MailLogger.charsetCharacter set of the message. Since Ant 1.8.0NoMailLogger.charsetCharacter set of the message. Since Ant 1.8.0No
      MailLogger.starttls.enableon or true if STARTTLS should be supported - (requires JavaMail). Since Ant 1.8.0No, default is falseMailLogger.starttls.enableon or true if STARTTLS should be supported (requires JavaMail). Since Ant + 1.8.0No; default is false
      MailLogger.properties.file Filename of properties file that will override other values.NoMailLogger.properties.fileFilename of properties file that will override other values.No
      -
      -

      ant -logger org.apache.tools.ant.listener.MailLogger

      -
      - +
      ant -logger org.apache.tools.ant.listener.MailLogger
      +

      AnsiColorLogger

      -

      AnsiColorLogger

      - -

      The AnsiColorLogger adds color to the standard Ant output -by prefixing and suffixing ANSI color code escape sequences to -it. It is just an extension of DefaultLogger +

      The AnsiColorLogger adds color to the standard Ant output by prefixing and suffixing ANSI color +code escape sequences to it. It is just an extension of DefaultLogger and hence provides all features that DefaultLogger does.

      -

      AnsiColorLogger differentiates the output by assigning -different colors depending upon the type of the message.

      -

      If used with the -logfile option, the output file -will contain all the necessary escape codes to -display the text in colorized mode when displayed -in the console using applications like cat, more, etc.

      -

      This is designed to work on terminals that support ANSI -color codes. It works on XTerm, ETerm, Win9x Console -(with ANSI.SYS loaded.), etc.

      -

      NOTE: -It doesn't work on WinNT and successors, even when a COMMAND.COM console loaded with -ANSI.SYS is used.

      -

      If the user wishes to override the default colors -with custom ones, a file containing zero or more of the -custom color key-value pairs must be created. The recognized keys -and their default values are shown below:

      +

      AnsiColorLogger differentiates the output by assigning different colors depending upon the type +of the message.

      +

      If used with the -logfile option, the output file will contain all the necessary +escape codes to display the text in colorized mode when displayed in the console using applications +like cat, more, etc.

      +

      This is designed to work on terminals that support ANSI color codes. It works on XTerm, ETerm, +Win9x Console (with ANSI.SYS loaded.), etc.

      +

      Note: It doesn't work on WinNT and successors, even when +a COMMAND.COM console loaded with ANSI.SYS is used.

      +

      If the user wishes to override the default colors with custom ones, a file containing zero or +more of the custom color key-value pairs must be created. The recognized keys and their default +values are shown below:

      +
       AnsiColorLogger.ERROR_COLOR=2;31
       AnsiColorLogger.WARNING_COLOR=2;35
       AnsiColorLogger.INFO_COLOR=2;36
       AnsiColorLogger.VERBOSE_COLOR=2;32
      -AnsiColorLogger.DEBUG_COLOR=2;34
      -

      Each key takes as value a color combination defined as -Attribute;Foreground;Background. In the above example, background -value has not been used.

      +AnsiColorLogger.DEBUG_COLOR=2;34
      +

      Each key takes as value a color combination defined as Attribute;Foreground;Background. +In the above example, background value has not been used.

      This file must be specified as the value of a system variable -named ant.logger.defaults and passed as an argument using the -D -option to the java command that invokes the Ant application. -An easy way to achieve this is to add -Dant.logger.defaults= -/path/to/your/file to the ANT_OPTS environment variable. -Ant's launching script recognizes this flag and will pass it to -the java command appropriately.

      -

      Format:

      +named ant.logger.defaults and passed as an argument using the -D option to
      +the java command that invokes the Ant application. An easy way to achieve this is to
      +add -Dant.logger.defaults=/path/to/your/file to
      +the ANT_OPTS environment variable. Ant's launching script recognizes this flag and will
      +pass it to the java command appropriately.

      +

      Format:

      +
       AnsiColorLogger.*=Attribute;Foreground;Background
       
       Attribute is one of the following:
      -0 -> Reset All Attributes (return to normal mode)
      -1 -> Bright (Usually turns on BOLD)
      -2 -> Dim
      -3 -> Underline
      -5 -> link
      -7 -> Reverse
      -8 -> Hidden
      +0 → Reset All Attributes (return to normal mode)
      +1 → Bright (Usually turns on BOLD)
      +2 → Dim
      +3 → Underline
      +5 → link
      +7 → Reverse
      +8 → Hidden
       
       Foreground is one of the following:
      -30 -> Black
      -31 -> Red
      -32 -> Green
      -33 -> Yellow
      -34 -> Blue
      -35 -> Magenta
      -36 -> Cyan
      -37 -> White
      +30 → Black
      +31 → Red
      +32 → Green
      +33 → Yellow
      +34 → Blue
      +35 → Magenta
      +36 → Cyan
      +37 → White
       
       Background is one of the following:
      -40 -> Black
      -41 -> Red
      -42 -> Green
      -43 -> Yellow
      -44 -> Blue
      -45 -> Magenta
      -46 -> Cyan
      -47 -> White
      - -
      -

      ant -logger org.apache.tools.ant.listener.AnsiColorLogger

      -
      +40 → Black +41 → Red +42 → Green +43 → Yellow +44 → Blue +45 → Magenta +46 → Cyan +47 → White
      + +
      ant -logger org.apache.tools.ant.listener.AnsiColorLogger
      + +

      Log4jListener

      +

      Deprecated: Apache Log4j (1) is not developed any more. Last release is 1.2.17 +from 26 May 2012 and contains vulnerability issues.

      +

      Passes build events to Log4j, using the full classname's of the generator of each build event as +the category:

      +
        +
      • build started / build finished—org.apache.tools.ant.Project
      • +
      • target started / target finished—org.apache.tools.ant.Target
      • +
      • task started / task finished—the fully qualified classname of the task
      • +
      • message logged—the classname of one of the above, so if a task logs a message, its + classname is the category used, and so on.
      • +
      +

      All start events are logged as INFO. Finish events are either logged as INFO or ERROR depending +on whether the build failed during that stage. Message events are logged according to their Ant +logging level, mapping directly to a corresponding Log4j level.

      +
      ant -listener org.apache.tools.ant.listener.Log4jListener
      +

      To use Log4j you will need the Log4j JAR file and a log4j.properties configuration +file. Both should be placed somewhere in your Ant classpath. If the log4j.properties +is in your project root folder you can add this with -lib option:

      -

      Log4jListener

      -

      Deprecated: Apache Log4j (1) is not developed any more. Last -release is 1.2.17 from 26-May-2012 and contains vulnerability issues.

      -

      Passes build events to Log4j, using the full classname's of the generator of -each build event as the category:

      -
        -
      • build started / build finished - org.apache.tools.ant.Project
      • -
      • target started / target finished - org.apache.tools.ant.Target
      • -
      • task started / task finished - the fully qualified classname of the task
      • -
      • message logged - the classname of one of the above, so if a task logs a - message, its classname is the category used, and so on.
      • -
      -

      All start events are logged as INFO.  Finish events are either logged as -INFO or ERROR depending on whether the build failed during that stage. Message -events are logged according to their Ant logging level, mapping directly to a -corresponding Log4j level.

      - -
      -

      ant -listener org.apache.tools.ant.listener.Log4jListener

      -
      - -

      To use Log4j you will need the Log4j JAR file and a 'log4j.properties' -configuration file. Both should be placed somewhere in your Ant -classpath. If the log4j.properties is in your project root folder you can -add this with -lib option:

      - -
      -
      ant -listener org.apache.tools.ant.listener.Log4jListener -lib .
      -
      - -

      If, for example, you wanted to capture the same information output to the -console by the DefaultLogger and send it to a file named 'build.log', you -could use the following configuration:

      +
      ant -listener org.apache.tools.ant.listener.Log4jListener -lib .
      + +

      If, for example, you wanted to capture the same information output to the console by the +DefaultLogger and send it to a file named build.log, you could use the following +configuration:

      -
      -
      log4j.rootLogger=ERROR, LogFile
      +
      +log4j.rootLogger=ERROR, LogFile
       log4j.logger.org.apache.tools.ant.Project=INFO
       log4j.logger.org.apache.tools.ant.Target=INFO
       log4j.logger.org.apache.tools.ant.taskdefs=INFO
      @@ -411,28 +372,26 @@
       log4j.appender.LogFile=org.apache.log4j.FileAppender
       log4j.appender.LogFile.layout=org.apache.log4j.PatternLayout
       log4j.appender.LogFile.layout.ConversionPattern=[%6r] %8c{1} : %m%n
      -log4j.appender.LogFile.file=build.log
      -
      -
      +log4j.appender.LogFile.file=build.log -

      For more information about configuring Log4J see its -documentation page.

      +

      For more information about configuring Log4J see its documentation page.

      Using the Log4j 1.2 Bridge

      -You could use the Log4j Bridge -if your application is written against the Log4j (1.x) API, but you want to use the Log4j 2.x runtime. -For using the bridge with Ant you have to add +

      You could use the Log4j Bridge if your application is written against the Log4j (1.x) API, but you +want to use the Log4j 2.x runtime. For using the bridge with Ant you have to add

        -
      • log4j-1.2-api-${log4j.version}.jar
      • -
      • log4j-api-${log4j.version}.jar
      • -
      • log4j-core-${log4j.version}.jar
      • -
      • log4j2.xml
      • +
      • log4j-1.2-api-${log4j.version}.jar
      • +
      • log4j-api-${log4j.version}.jar
      • +
      • log4j-core-${log4j.version}.jar
      • +
      • log4j2.xml
      -to your classpath (e.g. via the -lib option). -(For using the bridge Ant 1.9.10/1.10.2 or higher is required.) -Translating the 1.x properties file into the 2.x xml syntax would result in -
      -
      <?xml version="1.0" encoding="UTF-8"?>
      +

      to your classpath, e.g. via the -lib option. (For using the bridge, Ant +1.9.10/1.10.2 or higher is required.) Translating the 1.x properties file into the 2.x XML syntax +would result in

      +
      +<?xml version="1.0" encoding="UTF-8"?>
       <Configuration status="WARN">
         <Appenders>
           <File name="file" fileName="build.log">
      @@ -450,55 +409,34 @@
           <Logger name="org.apache.tools.ant.taskdefs" level="INFO"/>
           <Logger name="org.apache.tools.ant.taskdefs.Echo" level="WARN"/>
         </Loggers>
      -</Configuration>
      -
      -
      - - +</Configuration> -

      XmlLogger

      -

      Writes all build information out to an XML file named log.xml, or the value -of the XmlLogger.file property if present, when used as a -listener. When used as a logger, it writes all output to either the -console or to the value of -logfile. Whether used as a listener -or logger, the output is not generated until the build is complete, as it -buffers the information in order to provide timing information for task, -targets, and the project.

      -

      By default the XML file creates a reference to an XSLT file "log.xsl" in the current directory; -look in ANT_HOME/etc for one of these. You can set the property -ant.XmlLogger.stylesheet.uri to provide a uri to a style sheet. -this can be a relative or absolute file path, or an http URL. -If you set the property to the empty string, "", no XSLT transform -is declared at all.

      - -
      -

      ant -listener org.apache.tools.ant.XmlLogger
      -ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml

      -
      - - - -

      TimestampedLogger

      -

      - Acts like the default logger, except that the final success/failure message also includes - the time that the build completed. For example: -

      -
      -  BUILD SUCCESSFUL - at 16/08/05 16:24
      -
      +

      XmlLogger

      +

      Writes all build information out to an XML file named log.xml, or the value of +the XmlLogger.file property if present, when used as a listener. When used as a logger, +it writes all output to either the console or to the value of -logfile. Whether used as +a listener or logger, the output is not generated until the build is complete, as it buffers the +information in order to provide timing information for task, targets, and the project.

      +

      By default the XML file creates a reference to an XSLT file log.xsl in the current +directory; look in ANT_HOME/etc for one of these. You can set the +property ant.XmlLogger.stylesheet.uri to provide a URI to a style sheet. This can be a +relative or absolute file path, or an HTTP URL. If you set the property to the empty +string, , no XSLT transform is declared at all.

      + +
      ant -listener org.apache.tools.ant.XmlLogger
      +ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml
      + +

      TimestampedLogger

      +

      Acts like the default logger, except that the final success/failure message also includes the +time that the build completed. For example:

      +
      BUILD SUCCESSFUL - at 16/08/05 16:24

      To use this listener, use the command:

      -
      -ant -logger org.apache.tools.ant.listener.TimestampedLogger -
      +
      ant -logger org.apache.tools.ant.listener.TimestampedLogger
      - - -

      BigProjectLogger

      -

      - This logger is designed to make examining the logs of a big build easier, - especially those run under continuous integration tools. It -

      +

      BigProjectLogger

      +

      This logger is designed to make examining the logs of a big build easier, especially those run +under continuous integration tools. It

      1. When entering a child project, prints its name and directory
      2. When exiting a child project, prints its name
      3. @@ -506,14 +444,10 @@
      4. Omits logging the names of all targets that have no direct task output
      5. Includes the build finished timestamp of the TimeStamp logger
      -

      - This is useful when using <subant> to build a large project - from many smaller projects -the output shows which particular - project is building. Here is an example in which "clean" is being called - on all a number of child projects, only some of which perform work: -

      -
      -
      +

      This is useful when using <subant> to build a large project from many smaller +projects—the output shows which particular project is building. Here is an example in which +"clean" is being called on all a number of child projects, only some of which perform work:

      +
       ======================================================================
       Entering project "xunit"
       In /home/ant/components/xunit
      @@ -534,25 +468,19 @@
       
       ======================================================================
       Exiting project "junit"
      -======================================================================
      -
      +======================================================================
      -

      - The entry and exit messages are very verbose in this example, but in - a big project compiling or testing many child components, the messages - are reduced to becoming clear delimiters of where different projects - are in charge -or more importantly, which project is failing. -

      +

      The entry and exit messages are very verbose in this example, but in a big project compiling or +testing many child components, the messages are reduced to becoming clear delimiters of where +different projects are in charge—or, more importantly, which project is failing.

      To use this listener, use the command:

      -
      -ant -logger org.apache.tools.ant.listener.BigProjectLogger -
      - -

      SimpleBigProjectLogger

      -

      Like BigProjectLogger, project-qualified target names are printed, -useful for big builds with subprojects. -Otherwise it is as quiet as NoBannerLogger:

      -
      +
      ant -logger org.apache.tools.ant.listener.BigProjectLogger
      + +

      SimpleBigProjectLogger

      +

      Since Ant 1.8.1

      +

      Like BigProjectLogger, project-qualified target names are printed, useful for big +builds with subprojects. Otherwise it is as quiet as NoBannerLogger:

      +
       Buildfile: /sources/myapp/build.xml
       
       myapp-lib.compile:
      @@ -570,20 +498,16 @@
       Building jar: /sources/myapp/build/myapp.jar
       
       BUILD SUCCESSFUL
      -Total time: 1 second
      -
      -

      since Ant 1.8.1

      +Total time: 1 second

      To use this listener, use the command:

      -
      -ant -logger org.apache.tools.ant.listener.SimpleBigProjectLogger -
      +
      ant -logger org.apache.tools.ant.listener.SimpleBigProjectLogger
      -

      ProfileLogger

      -

      This logger stores the time needed for executing a task, target and the whole build and prints -these information. The output contains a timestamp when entering the build, target or task and a timestamp and the needed time when exiting. -

      +

      ProfileLogger

      -

      since Ant 1.8.0

      +

      Since Ant 1.8.0

      +

      This logger stores the time needed for executing a task, target and the whole build and prints +these information. The output contains a timestamp when entering the build, target or task and a +timestamp and the needed time when exiting.

      Example

      Having that buildfile
      @@ -597,10 +521,10 @@
           <target name="anotherTarget" depends="aTarget">
               <echo>another-echo-task</echo>
           </target>
      -</project>
      -
      -and executing with ant -logger org.apache.tools.ant.listener.ProfileLogger anotherTarget gives that output (with other timestamps and duration of course ;) : -
      +</project>
      +

      and executing with ant -logger org.apache.tools.ant.listener.ProfileLogger +anotherTarget gives that output (with other timestamps and duration of course ;-):

      +
       Buildfile: ...\build.xml
       
       Target aTarget: started Thu Jan 22 09:01:00 CET 2009
      @@ -627,36 +551,34 @@
       Target anotherTarget: finished Thu Jan 22 09:01:01 CET 2009 (0ms)
       
       BUILD SUCCESSFUL
      -Total time: 2 seconds
      -
      - - +Total time: 2 seconds -

      Writing your own

      +

      Writing your own

      -

      See the Build Events section for -developers.

      +

      See the Build Events section for developers.

      Notes:

      • - A listener or logger should not write to standard output or error in the messageLogged() method; - Ant captures these internally and it will trigger an infinite loop. + A listener or logger should not write to standard output or error in + the messageLogged() method; Ant captures these internally and it will + trigger an infinite loop.
      • - Logging is synchronous; all listeners and loggers are called one after the other, with the build blocking until - the output is processed. Slow logging means a slow build. + Logging is synchronous; all listeners and loggers are called one after the other, with the build + blocking until the output is processed. Slow logging means a slow build.
      • -
      • When a build is started, and BuildListener.buildStarted(BuildEvent event) is called, - the project is not fully functional. The build has started, yes, and the event.getProject() method call - returns the Project instance, but that project is initialized with JVM and ant properties, nor has it - parsed the build file yet. You cannot call Project.getProperty() for property lookup, or - Project.getName() to get the project name (it will return null). +
      • When a build is started, and BuildListener.buildStarted(BuildEvent + event) is called, the project is not fully functional. The build has started, yes, and + the event.getProject() method call returns the Project instance, but + that project is initialized with JVM and Ant properties, nor has it parsed the build file + yet. You cannot call Project.getProperty() for property lookup, or + Project.getName() to get the project name (it will return null).
      • - Classes that implement org.apache.tools.ant.SubBuildListener receive notifications when child projects - start and stop. + Classes that implement org.apache.tools.ant.SubBuildListener receive + notifications when child projects start and stop.
      diff -Nru ant-1.9.10/manual/platform.html ant-1.10.3/manual/platform.html --- ant-1.9.10/manual/platform.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/platform.html 2018-03-24 12:37:12.000000000 +0000 @@ -15,114 +15,99 @@ limitations under the License. --> - Platform Issues +

      Platform Issues

      Java versions

      -

      Java 1.5

      - -You may need a bigger stack than default, especially if you are using the built in -XSLT engine. We recommend you use Apache Xalan; indeed, some tasks (JUnit report in XML, -for example) may not work against the shipping XSL engine. +

      Java 5

      +

      +You may need a bigger stack than default, especially if you are using the built in XSLT engine. We +recommend you use Apache Xalan; indeed, some tasks (JUnit report in XML, for example) may not work +against the shipping XSL engine. +

      Unix and Linux

      -
        -
      • You should use a GNU version of tar to untar the Apache -Ant source tree, if you have downloaded this as a tar file. If you get -weird errors about missing files, this is the problem. -
      • -
      • Ant does not preserve file permissions when a file is copied, moved or -archived, because Java does not let it read or write the permissions. - Use <chmod> to set permissions, and when creating a -tar archive, use the mode attribute of <tarfileset> -to set the permissions in the tar file, or <apply> the real tar program. -
      • -
      • Ant is not symbolic link aware in moves, deletes and when recursing down a tree -of directories to build up a list of files. Unexpected things can happen. -
      • -
      • Linux on IA-64: apparently you need a larger heap than the default -one (64M) to compile big projects. If you get out of heap -errors, either increase the heap or use a forking javac. Better yet, -use jikes for extra compilation speed. -
      • - +
      • You should use a GNU version of tar to untar the Apache Ant source tree, if you have +downloaded this as a tar file. If you get weird errors about missing files, this is the +problem.
      • +
      • Ant does not preserve file permissions when a file is copied, moved or archived, because Java +does not let it read or write the permissions. Use <chmod> to set permissions, +and when creating a tar archive, use the mode attribute +of <tarfileset> to set the permissions in the tar file, +or <apply> the real tar program.
      • +
      • Ant is not symbolic link aware in moves, deletes and when recursing down a tree of directories +to build up a list of files. Unexpected things can happen.
      • +
      • Linux on IA-64: apparently you need a larger heap than the default one (64M) to compile big +projects. If you get out of heap errors, either increase the heap or use a +forking <javac>. Better yet, use jikes for extra compilation +speed.
      -

      Microsoft Windows

      -Windows 9x (win95, win98, win98SE and winME) are not supported in Ant1.7, +Windows 9x (win95, win98, win98SE and winME) are not supported since Ant 1.7.

      -

      -The Ant team has retired support for these products because they are outdated and -can expose customers to security risks. We recommend that customers who are -still running Windows 98 or Windows Me upgrade to a newer, more secure -operating system, as soon as possible. +The Ant team has retired support for these products because they are outdated and can expose +customers to security risks. We recommend that customers who are still running Windows 98 or Windows +ME upgrade to a newer, more secure operating system, as soon as possible.

      -Customers who upgrade to Linux report improved security, richer -functionality, and increased productivity. +Customers who upgrade to Linux report improved security, richer functionality, and increased +productivity.

      -

      Microsoft Windows 2K, XP and Server 2K03

      +

      Microsoft Windows 2K, XP and Server 2K03

      -Windows 9x (win95, win98, win98SE and winME) has a batch file system which -does not work fully with long file names, so we recommend that ant and the JDK -are installed into directories without spaces, and with 8.3 filenames. -The Perl and Python launcher scripts do not suffer from this limitation. +Windows 9x (win95, win98, win98SE and winME) has a batch file system which does not work fully with +long file names, so we recommend that Ant and JDK are installed into directories without spaces, and +with 8.3 filenames. The Perl and Python launcher scripts do not suffer from this limitation.

      -All versions of windows are usually case insensitive, although mounted -file systems (Unix drives, Clearcase views) can be case sensitive underneath, -confusing patternsets. +All versions of Windows are usually case insensitive, although mounted file systems (Unix drives, +ClearCase views) can be case sensitive underneath, confusing patternsets.

      -Ant can often not delete a directory which is open in an Explorer window. -There is nothing we can do about this short of spawning a program to kill -the shell before deleting directories. -Nor can files that are in use be overwritten. +Ant can often not delete a directory which is open in an Explorer window. There is nothing we can +do about this short of spawning a program to kill the shell before deleting directories. Nor can +files that are in use be overwritten.

      - Finally, if any Ant task fails with an IOError=2, it means that whatever - native program Ant is trying to run, it is not on the path. +Finally, if any Ant task fails with an error=2, it means that whatever native program +Ant is trying to run, it is not on the Path.

      Microsoft Windows Vista

      - There are reports of problems with Windows Vista security bringing up - dialog boxes asking if the user wants to run an untrusted executable - during an ant run, such as when the <signjar> task runs the jarsigner.exe - program. This is beyond Ant's control, and stems from the OS trying to provide - some illusion of security by being reluctant to run unsigned native executables. - The latest Java versions appear to resolve this problem by having signed - binaries. +There are reports of problems with Windows Vista security bringing up dialog boxes asking if the +user wants to run an untrusted executable during an Ant run, such as when +the <signjar> task runs the jarsigner.exe program. This is beyond +Ant's control, and stems from the OS trying to provide some illusion of security by being reluctant +to run unsigned native executables. The latest Java versions appear to resolve this problem by +having signed binaries.

      -

      Cygwin

      - -Cygwin is not an operating system; rather it is an application suite -running under Windows and providing some UNIX like functionality. Sun has -not created any specific Java Development Kit or Java Runtime Environment for -cygwin. See this link : -http://www.inonit.com/cygwin/faq/ . -Only Windows path -names are supported by JDK and JRE tools under Windows or cygwin. Relative path -names such as "src/org/apache/tools" are supported, but Java tools do not -understand /cygdrive/c to mean c:\. -

      -The utility cygpath (used industrially in the ant script to support cygwin) can -convert cygwin path names to Windows. -You can use the <exec> task in ant to convert cygwin paths to Windows path, for -instance like that : +

      +Cygwin is not an operating system; rather it is an application suite running under Windows and +providing some UNIX like functionality. Sun has not created any specific Java Development Kit or +Java Runtime Environment for cygwin. See this link: http://www.inonit.com/cygwin/faq/. Only Windows path names are supported by JDK +and JRE tools under Windows or cygwin. Relative path names such as src/org/apache/tools +are supported, but Java tools do not understand /cygdrive/c to mean c:\. +

      +

      +The utility cygpath (used industrially in the ant script to support +cygwin) can convert cygwin path names to Windows. You can use the <exec> task in +Ant to convert cygwin paths to Windows path, for instance like that: +

       <property name="some.cygwin.path" value="/cygdrive/h/somepath"/>
       <exec executable="cygpath" outputproperty="windows.pathname">
      @@ -131,48 +116,62 @@
       </exec>
       <echo message="${windows.pathname}"/>
       
      +

      +We get lots of support calls from Cygwin users. Either it is incredibly popular, or it is +trouble. If you do use it, remember that Java is a Windows application, so Ant is running in a +Windows process, not a Cygwin one. This will save us having to mark your bug reports as invalid. +

      -We get lots of support calls from Cygwin users. Either it is incredibly -popular, or it is trouble. If you do use it, remember that Java is a -Windows application, so Ant is running in a Windows process, not a -Cygwin one. This will save us having to mark your bug reports as invalid. - -

      Apple MacOS X

      - -MacOS X is the first of the Apple platforms that Ant supports completely; -it is treated like any other Unix. +

      Apple MacOS X/macOS

      +

      +MacOS X a.k.a. macOS is the first of the Apple platforms that Ant supports completely; it is treated +like any other Unix. +

      Novell Netware

      +

      +To give the same level of sophisticated control as Ant's startup scripts on other platforms, it was +decided to make the main ant startup on NetWare be via a Perl Script, runant.pl. This +is found in the bin directory (for instance—bootstrap\bin +or dist\bin). +

      -

      To give the same level of sophisticated control as Ant's startup scripts on other platforms, it was decided to make the main ant startup on NetWare be via a Perl Script, "runant.pl". This is found in the bin directory (for instance - bootstrap\bin or dist\bin).

      - -

      One important item of note is that you need to set up the following to run ant:

      -
      • CLASSPATH - put ant.jar and any other needed jars on the system classpath.
      • -
      • ANT_OPTS - On NetWare, ANT_OPTS needs to include a parameter of the form, "-envCWD=ANT_HOME", with ANT_HOME being the fully expanded location of Ant, not an environment variable. This is due to the fact that the NetWare System Console has no notion of a current working directory.
      • +

        One important item of note is that you need to set up the following to run Ant:

        +
          +
        • CLASSPATH—put ant.jar and any other needed jars on the system + classpath.
        • +
        • ANT_OPTS—On NetWare, ANT_OPTS needs to include a parameter of + the form, -envCWD=ANT_HOME, with ANT_HOME being the + fully expanded location of Ant, not an environment variable. This is due to + the fact that the NetWare System Console has no notion of a current working directory.
        -

        It is suggested that you create up an ant.ncf that sets up these parameters, and calls perl ANT_HOME/dist/bin/runant.pl

        -

        The following is an example of such an NCF file(assuming ant is installed in 'sys:/apache-ant/'):

        - -    envset CLASSPATH=SYS:/apache-ant/bootstrap/lib/ant.jar
        -    envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/lib/optional/junit.jar
        -    envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/bootstrap/lib/optional.jar
        -
        -    setenv ANT_OPTS=-envCWD=sys:/apache-ant
        -    envset ANT_OPTS=-envCWD=sys:/apache-ant
        -    setenv ANT_HOME=sys:/apache-ant/dist/lib
        -    envset ANT_HOME=sys:/apache-ant/dist/lib
        -
        -    perl sys:/apache-ant/dist/bin/runant.pl
        -
        - -

        Ant works on JVM version 1.3 or higher. You may have some luck running it on JVM 1.2, but serious problems have been found running Ant on JVM 1.1.7B. These problems are caused by JVM bugs that will not be fixed.

        +

        It is suggested that you create up an ant.ncf that sets up these parameters, and +calls perl ANT_HOME/dist/bin/runant.pl

        +

        The following is an example of such an NCF file (assuming Ant is installed +in sys:/apache-ant/):

        +
        +envset CLASSPATH=sys:/apache-ant/bootstrap/lib/ant.jar
        +envset CLASSPATH=$CLASSPATH;sys:/apache-ant/lib/optional/junit.jar
        +envset CLASSPATH=$CLASSPATH;sys:/apache-ant/bootstrap/lib/optional.jar
        +
        +setenv ANT_OPTS=-envCWD=sys:/apache-ant
        +envset ANT_OPTS=-envCWD=sys:/apache-ant
        +setenv ANT_HOME=sys:/apache-ant/dist/lib
        +envset ANT_HOME=sys:/apache-ant/dist/lib
        +
        +perl sys:/apache-ant/dist/bin/runant.pl
        + +

        Ant works on JVM version 1.3 or higher. You may have some luck running it on JVM 1.2, but +serious problems have been found running Ant on JVM 1.1.7B. These problems are caused by JVM bugs +that will not be fixed.

        JVM 1.3 is supported on Novell NetWare versions 5.1 and higher.

        -

        Other platforms

        -Support for other platforms is not guaranteed to be complete, as certain -techniques to hide platform details from build files need to be written and -tested on every particular platform. Contributions in this area are welcome. - +

        +Support for other platforms is not guaranteed to be complete, as certain techniques to hide platform +details from build files need to be written and tested on every particular platform. Contributions +in this area are welcome. +

        + diff -Nru ant-1.9.10/manual/projecthelper.html ant-1.10.3/manual/projecthelper.html --- ant-1.9.10/manual/projecthelper.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/projecthelper.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,126 +25,118 @@

        The Apache Ant frontend: ProjectHelper

        -

        What is a ProjectHelper?

        +

        What is a ProjectHelper?

        -The ProjectHelper in Apache Ant is responsible for parsing the build file -and creating java instances representing the build workflow. It also signals which -kind of file it can parse, and which file name it expects as default input file. +The ProjectHelper in Apache Ant is responsible for parsing the build file +and creating Java instances representing the build workflow. It also signals which kind of file it +can parse, and which file name it expects as default input file.

        -Ant' default ProjectHelper -(org.apache.tools.ant.helper.ProjectHelper2) parses the -usual build.xml files. And if no build file is specified on the command line, it -will expect to find a file named build.xml. +Ant's default ProjectHelper +(org.apache.tools.ant.helper.ProjectHelper2) parses the +usual build.xml files. And if no build file is specified on the command line, it will +expect to find a file named build.xml.

        -The immediate benefit of a such abstraction it that it is possible to make Ant -understand other kind of descriptive languages than XML. Some experiments have -been done around a pure java frontend, and a groovy one too (ask the dev mailing -list for further info about these). +The immediate benefit of a such abstraction it that it is possible to make Ant understand other kind +of descriptive languages than XML. Some experiments have been done around a pure Java frontend, and +a Groovy one too (ask the dev mailing list for further info about these).

        -

        Since Ant 1.8.2, the import task will also -try to use the proper helper to parse the imported file. So it is possible to -write different build files in different languages and have them import each -other. +

        +Since Ant 1.8.2, the import task will also try to use the +proper helper to parse the imported file. So it is possible to write different build files in +different languages and have them import each other.

        -

        How is Ant is selecting the proper ProjectHelper

        +

        How is Ant is selecting the proper ProjectHelper

        -Ant knows about several implementations of ProjectHelper -and has to decide which to use for each build file. +Ant knows about several implementations of ProjectHelper and has to decide +which to use for each build file.

        -

        At startup Ant lists the all implementations found and keeps them -in the same order they've been found in an internal 'repository': +

        +At startup Ant lists the all implementations found and keeps them in the same order they've been +found in an internal 'repository': +

          -
        • the first to be searched for is the one declared by the system property - org.apache.tools.ant.ProjectHelper (see - Java System Properties);
        • -
        • then it searches with its class loader for a ProjectHelper - service declarations in the META-INF: it searches in the classpath for a - file META-INF/services/org.apache.tools.ant.ProjectHelper. - This file will just contain the fully qualified name of the - implementation of ProjectHelper to instantiate;
        • -
        • it will also search with the system class loader for - ProjectHelper service declarations in the META-INF;
        • -
        • last but not least it will add its default ProjectHelper - that can parse classical build.xml files.
        • +
        • the first to be searched for is the one declared by the system + property org.apache.tools.ant.ProjectHelper + (see Java System Properties);
        • +
        • then it searches with its class loader for a ProjectHelper service declarations + in the META-INF: it searches in the classpath for a + file META-INF/services/org.apache.tools.ant.ProjectHelper. This file will just + contain the fully qualified name of the implementation + of ProjectHelper to instantiate;
        • +
        • it will also search with the system class loader for ProjectHelper + service declarations in the META-INF;
        • +
        • last but not least it will add its default ProjectHelper that can + parse classical build.xml files.
        -In case of an error while trying to instantiate a ProjectHelper, Ant -will log an error but won't stop. If you want further debugging -info about the ProjectHelper internal 'repository', use the system -property ant.project-helper-repo.debug and set it to -true; the full stack trace will then also be printed. +

        +In case of an error while trying to instantiate a ProjectHelper, Ant will +log an error but won't stop. If you want further debugging info about +the ProjectHelper internal 'repository', use the system +property ant.project-helper-repo.debug and set it to true; the full stack trace +will then also be printed.

        -When Ant is expected to parse a file, it will ask the -ProjectHelper repository to find an implementation that will be -able to parse the input file. Actually it will just iterate over the ordered list -and the first implementation that returns true to -supportsBuildFile(File buildFile) will be selected. +When Ant is expected to parse a file, it will ask the ProjectHelper +repository to find an implementation that will be able to parse the input file. Actually it will +just iterate over the ordered list and the first implementation that returns true +to supportsBuildFile(File buildFile) will be selected.

        -When Ant is started and no input file has been specified, it will search for -a default input file. It will iterate over list of ProjectHelpers -and will select the first one that expects a default file that actually exist. +When Ant is started and no input file has been specified, it will search for a default input +file. It will iterate over list of ProjectHelpers and will select the +first one that expects a default file that actually exist.

        -

        Writing your own ProjectHelper

        +

        Writing your own ProjectHelper

        -The class org.apache.tools.ant.ProjectHelper is the API expected to -be implemented. So write your own ProjectHelper by extending that -abstract class. You are then expected to implement at least the function -parse(Project project, Object source). Note also that your -implementation will be instantiated by Ant, and it is expecting a default -constructor with no arguments. +The class org.apache.tools.ant.ProjectHelper is the API expected to be +implemented. So write your own ProjectHelper by extending that abstract +class. You are then expected to implement at least the function parse(Project +project, Object source). Note also that your implementation will be instantiated by Ant, and +it is expecting a default constructor with no arguments.

        -There are some functions that will help you define what your helper is -capable of and what is is expecting: +There are some functions that will help you define what your helper is capable of and what is is +expecting: +

          -
        • getDefaultBuildFile(): defines which file name is expected if - none provided
        • -
        • supportsBuildFile(File buildFile): defines if your parser - can parse the input file
        • - -
        • canParseAntlibDescriptor(URL url): whether your - implementation is capable of parsing a given Antlib - descriptor. The base class returns false
        • -
        • parseAntlibDescriptor(Project containingProject, URL - source): invoked to actually parse the Antlib - descriptor if your implementation returned true - for the previous method.
        • +
        • getDefaultBuildFile(): defines which file name is expected if none + provided
        • +
        • supportsBuildFile(File buildFile): defines if your parser can parse + the input file
        • +
        • canParseAntlibDescriptor(URL url): whether your implementation is + capable of parsing a given Antlib descriptor. The base class returns false
        • +
        • parseAntlibDescriptor(Project containingProject, URL source): + invoked to actually parse the Antlib descriptor if your implementation returned true for + the previous method.
        -

        -Now that you have your implementation ready, you have to declare it to Ant. Three -solutions here: +Now that you have your implementation ready, you have to declare it to Ant. Three solutions here: +

          -
        • use the system property org.apache.tools.ant.ProjectHelper - (see also the Java System Properties);
        • -
        • use the service file in META-INF: in the jar you will build with your - implementation, add a file - META-INF/services/org.apache.tools.ant.ProjectHelper. - And then in this file just put the fully qualified name of your - implementation
        • -
        • use the projecthelper task (since - Ant 1.8.2) which will install dynamically an helper in the internal helper - 'repository'. Then your helper can be used on the next call to the - import task.
        • +
        • use the system property org.apache.tools.ant.ProjectHelper (see also + the Java System Properties);
        • +
        • use the service file in META-INF: in the jar you will build with your + implementation, add a file META-INF/services/org.apache.tools.ant.ProjectHelper. + And then in this file just put the fully qualified name of your implementation
        • +
        • use the projecthelper task (since Ant 1.8.2) + which will install dynamically a helper in the internal helper 'repository'. Then your helper + can be used on the next call to the import task.
        -

        - diff -Nru ant-1.9.10/manual/properties.html ant-1.10.3/manual/properties.html --- ant-1.9.10/manual/properties.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/properties.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,152 +25,139 @@

        Properties

        -

        Properties are key-value-pairs where Apache Ant tries to - expand ${key} to value at runtime.

        +

        Properties are key-value pairs where Apache Ant tries to expand ${key} + to value at run time.

        -

        There are many tasks that can set properties, the most common one - is the property task. In - addition properties can be defined - via command line arguments or similar - mechanisms from outside of Ant.

        - -

        Normally property values can not be changed, once a property is - set, most tasks will not allow its value to be modified. In - general properties are of global scope, i.e. once they have been - defined they are available for any task or target invoked - subsequently - it is not possible to set a property in a child - build process created via - the ant, antcall or subant tasks - and make it available to the calling build process, though.

        - -

        Starting with Ant 1.8.0 - the local task can be used to - create properties that are locally scoped to a target or - a sequential element like - the one of the macrodef - task.

        - -

        Built-in Properties

        - -

        Ant provides access to all system properties as if they had been - defined using a <property> task. For - example, ${os.name} expands to the name of the - operating system.

        -

        For a list of system properties see - the Javadoc of System.getProperties. +

        There are many tasks that can set properties, the most common one is + the property task. In addition properties can be defined + via command line arguments or similar mechanisms from outside of + Ant.

        + +

        Normally property values can not be changed, once a property is set, most tasks will not allow + its value to be modified. In general properties are of global scope, i.e. once they have been + defined they are available for any task or target invoked subsequently—it is not possible + to set a property in a child build process created via + the ant, antcall + or subant tasks and make it available to the calling build + process, though.

        + +

        Since Ant 1.8.0 the local task can be used to create + properties that are locally scoped to a target or + a sequential element like the one of + the macrodef task.

        + +

        Built-in Properties

        + +

        Ant provides access to all system properties as if they had been defined using + a <property> task. For example, ${os.name} expands to the name + of the operating system.

        + +

        For a list of system properties, + see the javadoc of System.getProperties.

        In addition, Ant has some built-in properties:

        -
        
        -basedir             the absolute path of the project's basedir (as set
        -                    with the basedir attribute of <project>).
        -ant.file            the absolute path of the buildfile.
        -ant.version         the version of Ant
        -ant.project.name    the name of the project that is currently executing;
        -                    it is set in the name attribute of <project>.
        -ant.project.default-target
        -                    the name of the currently executing project's
        -                    default target;  it is set via the default
        -                    attribute of <project>.
        -ant.project.invoked-targets
        -                    a comma separated list of the targets that have
        -                    been specified on the command line (the IDE,
        -                    an <ant> task ...) when invoking the current
        -                    project.
        -                    This property is set properly when the first target is executed.
        -                    If you use it in the implicit target (directly
        -                    under the <project> tag) the list will be
        -                    empty if no target has been specified while it
        -                    will contain the project's default target in this
        -                    case for tasks nested into targets..
        -ant.java.version    the JVM version Ant detected; currently it can hold
        -                    the values "9", "1.8",
        -                    "1.7", "1.6", "1.5",
        -                    "1.4", "1.3" and
        -                    "1.2".
        -ant.core.lib        the absolute path of the ant.jar file.
        -
        +
        +
        basedir
        +
        the absolute path of the project's basedir (as set with + the basedir attribute + of <project>).
        +
        ant.file
        +
        the absolute path of the buildfile.
        +
        ant.version
        +
        the version of Ant
        +
        ant.project.name
        +
        the name of the project that is currently executing; it is set in the name + attribute of <project>.
        +
        ant.project.default-target
        +
        the name of the currently executing project's default target; it is set via + the default attribute of <project>.
        +
        ant.project.invoked-targets
        +
        a comma separated list of the targets that have been specified on the command line (the IDE, + an <ant> task ...) when invoking the current project.
        This property + is set properly when the first target is executed. If you use it in the implicit target + (directly under the <project> tag) the list will be empty if no target has + been specified while it will contain the project's default target in this case for tasks + nested into targets.
        +
        ant.java.version
        +
        the JVM version Ant detected; currently it can hold the + values 9, 1.8, 1.7, 1.6, 1.5, 1.4, 1.3 + and 1.2.
        +
        ant.core.lib
        +
        the absolute path of the ant.jar file.
        +
        + +

        There is also another property, but this is set by the launcher script and therefore maybe not + set inside IDEs:

        +
        +
        ant.home
        +
        home directory of Ant
        +
        + +

        The following property is only set if Ant is started via the Launcher class (which means it may + not be set inside IDEs either):

        +
        +
        ant.library.dir
        +
        the directory that has been used to load Ant's jars from. In most cases this + is ANT_HOME/lib.
        +
        + +

        PropertyHelpers

        + +

        Ant's property handling is accomplished by an instance + of org.apache.tools.ant.PropertyHelper associated with the current + Project. You can learn more about this class by examining Ant's Java API. In Ant 1.8 the + PropertyHelper class was much reworked and now itself employs a number + of helper classes (actually instances of + the org.apache.tools.ant.PropertyHelper$Delegate marker interface) to + take care of discrete tasks such as property setting, retrieval, parsing, etc. This makes Ant's + property handling highly extensible; also of interest is the + new propertyhelper task used to manipulate the + PropertyHelper and its delegates from the context of the Ant buildfile.

        -

        There is also another property, but this is set by the launcher - script and therefore maybe not set inside IDEs:

        -
        -ant.home            home directory of Ant
        -
        - -

        The following property is only set if Ant is started via the - Launcher class (which means it may not be set inside IDEs - either):

        -
        -ant.library.dir     the directory that has been used to load Ant's
        -                    jars from.  In most cases this is ANT_HOME/lib.
        -
        - -

        PropertyHelpers

        - -

        Ant's property handling is accomplished by an instance of - org.apache.tools.ant.PropertyHelper associated with - the current Project. You can learn more about this class by - examining Ant's Java API. In Ant 1.8 the PropertyHelper class was - much reworked and now itself employs a number of helper classes - (actually instances of - the org.apache.tools.ant.PropertyHelper$Delegate - marker interface) to take care of discrete tasks such as property - setting, retrieval, parsing, etc. This makes Ant's property - handling highly extensible; also of interest is the - new propertyhelper - task used to manipulate the PropertyHelper and its delegates from - the context of the Ant buildfile. - -

        There are three sub-interfaces of Delegate that may be - useful to implement.

        +

        There are three sub-interfaces of Delegate that may be useful to + implement.

          -
        • org.apache.tools.ant.property.PropertyExpander is - responsible for finding the property name inside a string in the - first place (the default extracts foo - from ${foo}). - -

          This is the interface you'd implement if you wanted to invent - your own property syntax - or allow nested property expansions - since the default implementation doesn't balance braces - (see NestedPropertyExpander - in the "props" Antlib for an example).

          +
        • org.apache.tools.ant.property.PropertyExpander is responsible for finding the + property name inside a string in the first place (the default extracts foo + from ${foo}). + +

          This is the interface you'd implement if you wanted to invent your own property + syntax—or allow nested property expansions since the default implementation doesn't + balance braces + (see NestedPropertyExpander in the props Antlib for + an example).

        • -
        • org.apache.tools.ant.PropertyHelper$PropertyEvaluator - is used to expand ${some-string} into - an Object. - -

          This is the interface you'd implement if you want to provide - your own storage independent of Ant's project instance - the - interface represents the reading end. An example for this - would - be org.apache.tools.ant.property.LocalProperties - which implements storage - for local properties.

          - -

          Another reason to implement this interface is if you wanted - to provide your own "property protocol" like - expanding toString:foo by looking up the project - reference foo and invoking toString() on it - (which is already implemented in Ant, see below).

          +
        • org.apache.tools.ant.PropertyHelper$PropertyEvaluator is used to + expand ${some-string} into an Object. + +

          This is the interface you'd implement if you want to provide your own storage independent + of Ant's project instance—the interface represents the reading end. An example for + this would be org.apache.tools.ant.property.LocalProperties which + implements storage for local properties.

          + +

          Another reason to implement this interface is if you wanted to provide your own "property + protocol" like expanding toString:foo by looking up the project + reference foo and invoking toString() on it (which is + already implemented in Ant, see below).

        • -
        • org.apache.tools.ant.PropertyHelper$PropertySetter - is responsible for setting properties. +
        • org.apache.tools.ant.PropertyHelper$PropertySetter is responsible + for setting properties. -

          This is the interface you'd implement if you want to provide - your own storage independent of Ant's project instance - the - interface represents the reading end. An example for this - would - be org.apache.tools.ant.property.LocalProperties - which implements storage - for local properties.

          +

          This is the interface you'd implement if you want to provide your own storage independent + of Ant's project instance—the interface represents the reading end. An example for + this would be org.apache.tools.ant.property.LocalProperties which + implements storage for local properties.

        -

        The default PropertyExpander looks similar to:

        +

        The default PropertyExpander looks similar to:

         public class DefaultExpander implements PropertyExpander {
        @@ -188,13 +175,12 @@
                 }
                 return null;
             }
        -}
        -
        +} -

        The logic that replaces ${toString:some-id} with the - stringified representation of the object with - id some-id inside the current build is contained in a - PropertyEvaluator similar to the following code:

        +

        The logic that replaces ${toString:some-id} with the stringified + representation of the object with id some-id inside the current + build is contained in a PropertyEvaluator similar to the following + code:

         public class ToStringEvaluator implements PropertyHelper.PropertyEvaluator {
        @@ -207,198 +193,163 @@
                 }
                 return o == null ? null : o.toString();
             }
        -}
        -
        - +}

        Property Expansion

        -

        When Ant encounters a construct ${some-text} the - exact parsing semantics are subject to the configured property - helper delegates.

        +

        When Ant encounters a construct ${some-text} the exact parsing semantics are + subject to the configured property helper delegates.

        $$ Expansion

        -

        In its default configuration Ant will expand the - text $$ to a single $ and suppress the - normal property expansion mechanism for the text immediately - following it, i.e. $${key} expands - to ${key} and not value even though a - property named key was defined and had the - value value. This can be used to escape - literal $ characters and is useful in constructs that - only look like property expansions or when you want to provide - diagnostic output like in

        - -
          <echo>$${builddir}=${builddir}</echo>
        - -

        which will echo this message:

        - -
          ${builddir}=build/classes
        - -

        if the property builddir has the - value build/classes.

        - -

        In order to maintain backward compatibility with older Ant - releases, a single '$' character encountered apart from a - property-like construct (including a matched pair of french - braces) will be interpreted literally; that is, as '$'. The - "correct" way to specify this literal character, however, is by - using the escaping mechanism unconditionally, so that "$$" is - obtained by specifying "$$$$". Mixing the two approaches yields - unpredictable results, as "$$$" results in "$$".

        +

        In its default configuration Ant will expand the text $$ to a single $ and + suppress the normal property expansion mechanism for the text immediately following it, + i.e. $${key} expands to ${key} and not value even though + a property named key was defined and had the value value. This can be + used to escape literal $ characters and is useful in constructs that only look like + property expansions or when you want to provide diagnostic output like in

        + +
        <echo>$${builddir}=${builddir}</echo>
        + +

        which will echo this message:

        + +
        ${builddir}=build/classes
        + +

        if the property builddir has the value build/classes.

        + +

        In order to maintain backward compatibility with older Ant releases, a single $ + character encountered apart from a property-like construct (including a matched pair of french + braces) will be interpreted literally; that is, as $. The "correct" way to specify this + literal character, however, is by using the escaping mechanism unconditionally, so + that $$ is obtained by specifying $$$$. Mixing the two approaches yields + unpredictable results, as $$$ results in $$.

        Nesting of Braces

        -

        In its default configuration Ant will not try to balance braces - in property expansions, it will only consume the text up to the - first closing brace when creating a property name. I.e. when - expanding something like ${a${b}} it will be - translated into two parts:

        +

        In its default configuration Ant will not try to balance braces in property expansions, it will + only consume the text up to the first closing brace when creating a property name. I.e. when + expanding something like ${a${b}} it will be translated into two parts:

          -
        1. the expansion of property a${b - likely nothing - useful.
        2. -
        3. the literal text } resulting from the second - closing brace
        4. +
        5. the expansion of property a${b—likely nothing useful.
        6. +
        7. the literal text } resulting from the second closing brace
        -

        This means you can't use easily expand properties whose names are - given by properties, but there - are some - workarounds for older versions of Ant. With Ant 1.8.0 and the - the props Antlib - you can configure Ant to use - the NestedPropertyExpander defined there if you need - such a feature.

        +

        This means you can't use easily expand properties whose names are given by properties, but + there are some workarounds for older versions of Ant. Since Ant 1.8.0 using + the props Antlib you can + configure Ant to use the NestedPropertyExpander defined there if you + need such a feature.

        Expanding a "Property Name"

        -

        In its most simple form ${key} is supposed to look - up a property named key and expand to the value of - the property. Additional PropertyEvaluators may - result in a different interpretation of key, - though.

        - -

        The props - Antlib provides a few interesting evaluators but there are - also a few built-in ones.

        - -

        Getting the value of a Reference with - ${toString:}

        - -

        Any Ant type which has been declared with a reference can also - its string value extracted by using the ${toString:} - operation, with the name of the reference listed after - the toString: text. The toString() - method of the Java class instance that is referenced is invoked - -all built in types strive to produce useful and relevant output - in such an instance.

        +

        In its most simple form ${key} is supposed to look up a property + named key and expand to the value of the property. + Additional PropertyEvaluators may result in a different interpretation + of key, though.

        + +

        The props Antlib provides a + few interesting evaluators but there are also a few built-in ones.

        + +

        Getting the value of a Reference with ${toString:}

        + +

        Any Ant type which has been declared with a reference can also its string value extracted by + using the ${toString:} operation, with the name of the reference listed after + the toString: text. The toString() method of the Java + class instance that is referenced is invoked—all built in types strive to produce useful + and relevant output in such an instance.

        For example, here is how to get a listing of the files in a fileset,

        -<fileset id="sourcefiles" dir="src" includes="**/*.java" />
        -<echo> sourcefiles = ${toString:sourcefiles} </echo>
        -
        - -

        There is no guarantee that external types provide meaningful - information in such a situation

        - -

        Getting the value of a Reference with - ${ant.refid:}

        - -

        Any Ant type which has been declared with a reference can also be - used as a property by using the ${ant.refid:} - operation, with the name of the reference listed after - the ant.refid: text. The difference between this - operation and ${toString:} is - that ${ant.refid:} will expand to the referenced - object itself. In most circumstances the toString method will be - invoked anyway, for example if the ${ant.refid:} is - surrounded by other text.

        - -

        This syntax is most useful when using a task with attribute - setters that accept objects other than String. For example if the - setter accepts a Resource object as in

        -
        -public void setAttr(Resource r) { ... }
        -
        +<fileset id="sourcefiles" dir="src" includes="**/*.java"/> +<echo> sourcefiles = ${toString:sourcefiles} </echo> -

        then the syntax can be used to pass in resource subclasses - previously defined as references like

        +

        There is no guarantee that external types provide meaningful information in such a + situation

        + +

        Getting the value of a Reference with ${ant.refid:}

        + +

        Any Ant type which has been declared with a reference can also be used as a property by using + the ${ant.refid:} operation, with the name of the reference listed after + the ant.refid: text. The difference between this operation + and ${toString:} is that ${ant.refid:} will + expand to the referenced object itself. In most circumstances + the toString() method will be invoked anyway, for example if + the ${ant.refid:} is surrounded by other text.

        + +

        This syntax is most useful when using a task with attribute setters that accept objects other + than String. For example, if the setter accepts + a Resource object as in

        + +
        public void setAttr(Resource r) { ... }
        + +

        then the syntax can be used to pass in resource subclasses previously defined as references + like

        -  <url url="http://ant.apache.org/" id="anturl"/>
        -  <my:task attr="${ant.refid:anturl}"/>
        -
        +<url url="http://ant.apache.org/" id="anturl"/> +<my:task attr="${ant.refid:anturl}"/> -

        If/Unless Attributes

        +

        If/Unless Attributes

        - The <target> element and various tasks (such as - <fail>) and task elements (such as <test> - in <junit>) support if and unless - attributes which can be used to control whether the item is run or otherwise - takes effect. + The <target> element and various tasks (such as <fail>) + and task elements (such as <test> in <junit>) + support if and unless attributes which can be used to control whether the + item is run or otherwise takes effect.

        - In Ant 1.7.1 and earlier, these attributes could only be property names. - The item was enabled if a property with that name was defined - even to be - the empty string or false - and disabled if the property was not - defined. For example, the following works but there is no way to override - the file existence check negatively (only positively): + In Ant 1.7.1 and earlier, these attributes could only be property names. The item was enabled + if a property with that name was defined—even to be the empty string + or false—and disabled if the property was not defined. For example, the following + works but there is no way to override the file existence check negatively (only positively):

        -<target name="-check-use-file">
        -    <available property="file.exists" file="some-file"/>
        -</target>
        -<target name="use-file" depends="-check-use-file" if="file.exists">
        -    <!-- do something requiring that file... -->
        +<target name="-check-use-file">
        +    <available property="file.exists" file="some-file"/>
        +</target>
        +<target name="use-file" depends="-check-use-file" if="file.exists">
        +    <!-- do something requiring that file... -->
         </target>
        -<target name="lots-of-stuff" depends="use-file,other-unconditional-stuff"/>
        -  
        +<target name="lots-of-stuff" depends="use-file,other-unconditional-stuff"/>

        - As of Ant 1.8.0, you may instead use property expansion; a value of - true (or on or yes) will enable the - item, while false (or off or no) will - disable it. Other values are still assumed to be property - names and so the item is enabled only if the named property is defined. + Since Ant 1.8.0, you may instead use property expansion; a value of true + (or on or yes) will enable the item, while false (or off + or no) will disable it. Other values are still assumed to be property names and so the + item is enabled only if the named property is defined.

        - Compared to the older style, this gives you additional flexibility, because - you can override the condition from the command line or parent scripts: + Compared to the older style, this gives you additional flexibility, because you can override the + condition from the command line or parent scripts:

        -<target name="-check-use-file" unless="file.exists">
        -    <available property="file.exists" file="some-file"/>
        +<target name="-check-use-file" unless="file.exists">
        +    <available property="file.exists" file="some-file"/>
         </target>
        -<target name="use-file" depends="-check-use-file" if="${file.exists}">
        -    <!-- do something requiring that file... -->
        +<target name="use-file" depends="-check-use-file" if="${file.exists}">
        +    <!-- do something requiring that file... -->
         </target>
        -<target name="lots-of-stuff" depends="use-file,other-unconditional-stuff"/>
        -  
        +<target name="lots-of-stuff" depends="use-file,other-unconditional-stuff"/>

        - Now ant -Dfile.exists=false lots-of-stuff will run - other-unconditional-stuff but not use-file, - as you might expect, and you can disable the condition from another script - too: + Now ant -Dfile.exists=false lots-of-stuff will run other-unconditional-stuff + but not use-file, as you might expect, and you can disable the condition from another + script too:

        -<antcall target="lots-of-stuff">
        -    <param name="file.exists" value="false"/>
        -</antcall>
        -  
        +<antcall target="lots-of-stuff"> + <param name="file.exists" value="false"/> +</antcall>

        - Similarly, an unless attribute disables the item if it is - either the name of property which is defined, or if it evaluates to a - true-like value. For example, the following allows you to define - skip.printing.message=true in my-prefs.properties with - the results you might expect: + Similarly, an unless attribute disables the item if it is either the name of property + which is defined, or if it evaluates to a true-like value. For example, the following + allows you to define skip.printing.message=true in my-prefs.properties + with the results you might expect:

        -<property file="my-prefs.properties"/>
        -<target name="print-message" unless="${skip.printing.message}">
        +<property file="my-prefs.properties"/>
        +<target name="print-message" unless="${skip.printing.message}">
             <echo>hello!</echo>
        -</target>
        -  
        +</target> + diff -Nru ant-1.9.10/manual/proxy.html ant-1.10.3/manual/proxy.html --- ant-1.9.10/manual/proxy.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/proxy.html 2018-03-24 12:37:12.000000000 +0000 @@ -26,84 +26,83 @@

        Proxy Configuration

        -This page discussing proxy issues on command-line Apache Ant. -Consult your IDE documentation for IDE-specific information upon proxy setup. + This page discussing proxy issues on command-line Apache Ant. + Consult your IDE documentation for IDE-specific information upon + proxy setup.

        - -All tasks and threads running in Ant's JVM share the same HTTP/FTP/Socks -proxy configuration. + All tasks and threads running in Ant's JVM share the same + HTTP/FTP/Socks proxy configuration.

        - When any task tries to retrieve content from an HTTP page, including the - <get> task, any automated URL retrieval in - an XML/XSL task, or any third-party task that uses the java.net.URL - classes, the proxy settings may make the difference between success and failure. + When any task tries to retrieve content from an HTTP page, including + the <get> task, any automated URL retrieval in an + XML/XSL task, or any third-party task that uses + the java.net.URL classes, the proxy settings may make + the difference between success and failure.

        - Anyone authoring a build file behind a blocking firewall will immediately appreciate - the problems and may want to write a build file to deal with the problem, but - users of third party build build files may find that the build file itself - does not work behind the firewall. + Anyone authoring a build file behind a blocking firewall will + immediately appreciate the problems and may want to write a build + file to deal with the problem, but users of third party build build + files may find that the build file itself does not work behind the + firewall.

        - This is a long standing problem with Java and Ant. The only way to fix - it is to explicitly configure Ant with the proxy settings, either - by passing down the proxy details as JVM properties, or to - tell Ant on a Java1.5+ system to have the JVM work it out for itself. - + This is a long standing problem with Java and Ant. The only way to + fix it is to explicitly configure Ant with the proxy settings, + either by passing down the proxy details as JVM properties, or to + tell Ant on a Java 5+ system to have the JVM work it out for itself.

        - - -

        Java1.5+ proxy support (new for Ant1.7)

        +

        Java 5+ proxy support

        +

        Since Ant 1.7

        - When Ant starts up, if the -autoproxy - command is supplied, Ant sets the - java.net.useSystemProxies system property. This tells - a Java1.5+ JVM to use the current set of property settings of the host - environment. Other JVMs, such as the Kaffe and Apache Harmony runtimes, - may also use this property in future. - It is ignored on the Java1.4 and earlier runtimes. + When Ant starts up, if the -autoproxy command is + supplied, Ant sets the java.net.useSystemProxies system + property. This tells a Java 5+ runtime to use the current set of + property settings of the host environment. Other JVMs, such as + Kaffe and Apache Harmony, may also use this property in + future. It is ignored on the Java 1.4 and earlier runtimes.

        - This property maybe enough to give command-line Ant - builds network access, although in practise the results - are inconsistent. + This property maybe enough to give command-line Ant builds network + access, although in practise the results are inconsistent.

        - It is has also been reported a breaking the IBM Java 5 JRE on AIX, - and does not always work on Linux (presumably due to missing gconf settings) - Other odd things can go wrong, like Oracle JDBC drivers or pure Java SVN clients. + It is has also been reported a breaking the IBM Java 5 runtime on AIX, + and does not always work on Linux (presumably due to + missing gconf settings) Other odd things can go wrong, + like Oracle JDBC drivers or pure Java SVN clients.

        -

        - To make the -autoproxy option the default, add it to the environment variable - ANT_ARGS, which contains a list of arguments to pass to Ant on every - command line run. + To make the -autoproxy option the default, add it to + the environment variable ANT_ARGS, which contains a + list of arguments to pass to Ant on every command line run.

        How Autoproxy works

        -The java.net.useSystemProxies is checked only -once, at startup time, the other checks (registry, gconf, system properties) are done -dynamically whenever needed (socket connection, URL connection etc..). + The java.net.useSystemProxies is checked only once, at + startup time, the other checks (registry, gconf, system + properties) are done dynamically whenever needed (socket connection, + URL connection etc..).

        -
        Windows
        +
        Windows

        -The JVM goes straight to the registry, bypassing WinInet, as it is not -present/consistent on all supported Windows platforms (it is part of IE, -really). Java 7 may use the Windows APIs on the platforms when it is present. + The JVM goes straight to the registry, bypassing WinInet, as it is + not present/consistent on all supported Windows platforms (it is + part of IE, really). Java 7 may use the Windows APIs on the + platforms when it is present.

        Linux
        -

        -The JVM uses the gconf library to look at specific entries. -The GConf-2 settings used are: + The JVM uses the gconf library to look at specific + entries. The GConf-2 settings used are:

          - /system/http_proxy/use_http_proxy            boolean
        @@ -124,168 +123,167 @@
          - /system/proxy/gopher_port                    int
         

        -If you are using KDE or another GUI than Gnome, you can still use the -gconf-editor tool to add these entries. + If you are using KDE or another GUI than Gnome, you can still use + the gconf-editor tool to add these entries.

        -

        Manual JVM options

        - Any JVM can have its proxy options explicitly configured by passing - the appropriate -D system property options to the runtime. - Ant can be configured through all its shell scripts via the - ANT_OPTS environment variable, which is a list of options to - supply to Ant's JVM: + Any JVM can have its proxy options explicitly configured by passing + the appropriate -D system property options to the + runtime. Ant can be configured through all its shell scripts via + the ANT_OPTS environment variable, which is a list of + options to supply to Ant's JVM:

        For bash: -

        -
        -    export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
        -
        - For csh/tcsh: -
        -    setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
        -
        +

        +
        export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

        -If you insert this line into the Ant shell script itself, it gets picked up -by all continuous integration tools running on the system that call Ant via the -command line. +For csh/tcsh:

        +
        setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

        - For Windows, set the ANT_OPTS environment variable in the appropriate "My Computer" - properties dialog box (winXP), "Computer" properties (Vista) + If you insert this line into the Ant shell script itself, it gets + picked up by all continuous integration tools running on the system + that call Ant via the command line.

        - This mechanism works across Java versions, is cross-platform and reliable. - Once set, all build files run via the command line will automatically have - their proxy setup correctly, without needing any build file changes. It also - apparently overrides Ant's automatic proxy settings options. + For Windows, set the ANT_OPTS environment variable in + the appropriate "My Computer" properties dialog box (XP), "Computer" + properties (Vista)

        -

        - It is limited in the following ways: -

        -
          -
        1. Does not work under IDEs. These need their own proxy settings changed
        2. -
        3. Not dynamic enough to deal with laptop configuration changes.
        4. -
        - - -

        SetProxy Task

        - The setproxy task can be used to - explicitly set a proxy in a build file. This manipulates the many proxy - configuration properties of a JVM, and controls the proxy settings for all - network operations in the same JVM from that moment. + This mechanism works across Java versions, is cross-platform and + reliable. Once set, all build files run via the command line will + automatically have their proxy setup correctly, without needing any + build file changes. It also apparently overrides Ant's automatic + proxy settings options.

        - If you have a build file that is only to be used in-house, behind a firewall, on - an older JVM, and you cannot change Ant's JVM proxy settings, then - this is your best option. It is ugly and brittle, because the build file now contains - system configuration information. It is also hard to get this right across - the many possible proxy options of different users (none, HTTP, SOCKS). + It is limited in the following ways:

        +
          +
        1. Does not work under IDEs. These need their own proxy settings changed
        2. +
        3. Not dynamic enough to deal with laptop configuration changes.
        4. +
        - +

        SetProxy Task

        - Note that proxy configurations set with this task will probably override - any set by other mechanisms. It can also be used with fancy tricks to - only set a proxy if the proxy is considered reachable: + The setproxy task can be used to + explicitly set a proxy in a build file. This manipulates the many + proxy configuration properties of a JVM, and controls the proxy + settings for all network operations in the same JVM from that + moment. +

        +

        + If you have a build file that is only to be used in-house, behind a + firewall, on an older JVM, and you cannot change Ant's JVM proxy + settings, then this is your best option. It is ugly and + brittle, because the build file now contains system configuration + information. It is also hard to get this right across the many + possible proxy options of different users (none, HTTP, SOCKS). +

        +

        + Note that proxy configurations set with this task will probably + override any set by other mechanisms. It can also be used with fancy + tricks to only set a proxy if the proxy is considered reachable:

        -  <target name="probe-proxy" depends="init">
        -    <condition property="proxy.enabled">
        -      <and>
        -        <isset property="proxy.host"/>
        -        <isreachable host="${proxy.host}"/>
        -      </and>
        -    </condition>
        -  </target>
        -
        -  <target name="proxy" depends="probe-proxy" if="proxy.enabled">
        -    <property name="proxy.port" value="80"/>
        -    <property name="proxy.user" value=""/>
        -    <property name="proxy.pass" value=""/>
        -    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
        -      proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
        -  </target>
        -
        +<target name="probe-proxy" depends="init"> + <condition property="proxy.enabled"> + <and> + <isset property="proxy.host"/> + <isreachable host="${proxy.host}"/> + </and> + </condition> +</target> + +<target name="proxy" depends="probe-proxy" if="proxy.enabled"> + <property name="proxy.port" value="80"/> + <property name="proxy.user" value=""/> + <property name="proxy.pass" value=""/> + <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" + proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/> +</target>

        Custom ProxySelector implementations

        - As Java lets developers write their own ProxySelector implementations, it - is theoretically possible for someone to write their own proxy selector class that uses - different policies to determine proxy settings. There is no explicit support - for this in Ant, and it has not, to the team's knowledge, been attempted. -

        -

        - This could be the most flexible of solutions, as one could easily imagine - an Ant-specific proxy selector that was driven off ant properties, rather - than system properties. Developers could set proxy options in their - custom build.properties files, and have this propagate. -

        -

        - One issue here is with concurrency: the default proxy selector is per-JVM, - not per-thread, and so the proxy settings will apply to all sockets opened - on all threads; we also have the problem of how to propagate options from - one build to the JVM-wide selector. + As Java lets developers write their own ProxySelector + implementations, it is theoretically possible for someone to write + their own proxy selector class that uses different policies to + determine proxy settings. There is no explicit support for this in + Ant, and it has not, to the team's knowledge, been attempted. +

        +

        + This could be the most flexible of solutions, as one could easily + imagine an Ant-specific proxy selector that was driven off ant + properties, rather than system properties. Developers could set + proxy options in their custom build.properties files, and have this + propagate. +

        +

        + One issue here is with concurrency: the default proxy selector is + per-JVM, not per-thread, and so the proxy settings will apply to all + sockets opened on all threads; we also have the problem of how to + propagate options from one build to the JVM-wide selector.

        Configuring the Proxy settings of Java programs under Ant

        - Any program that is executed with <java> without setting - fork="true" will pick up the Ant's settings. If you need - different values, set fork="false" and provide the values - in <sysproperty> elements. -

        - If you wish to have - a forked process pick up the Ant's settings, use the - <syspropertyset> - element to propagate the normal proxy settings. The following propertyset - is a datatype which can be referenced in a <java> task to - pass down the current values. - + Any program that is executed with <java> without + setting fork=true will pick up the Ant's + settings. If you need different values, + set fork=false and provide the values + in <sysproperty> elements. +

        +

        + If you wish to have a forked process pick up the Ant's settings, use + the <syspropertyset> + element to propagate the normal proxy settings. The following + propertyset is a datatype which can be referenced in + a <java> task to pass down the current values.

        -<propertyset id="proxy.properties">
        -  <propertyref prefix="java.net.useSystemProxies"/>
        -  <propertyref prefix="http."/>
        -  <propertyref prefix="https."/>
        -  <propertyref prefix="ftp."/>
        -  <propertyref prefix="socksProxy"/>
        -</propertyset>
        -
        +<propertyset id="proxy.properties"> + <propertyref prefix="java.net.useSystemProxies"/> + <propertyref prefix="http."/> + <propertyref prefix="https."/> + <propertyref prefix="ftp."/> + <propertyref prefix="socksProxy"/> +</propertyset>

        Summary and conclusions

        -There are four ways to set up proxies in Ant. + There are four ways to set up proxies in Ant.

          -
        1. With Ant1.7 and Java 1.5+ using the -autoproxy parameter.
        2. -
        3. Via JVM system properties -set these in the ANT_ARGS environment variable.
        4. -
        5. Via the <setproxy> task.
        6. -
        7. Custom ProxySelector implementations
        8. +
        9. With Ant 1.7 and Java 5+ using the -autoproxy parameter.
        10. +
        11. Via JVM system properties—set these in the ANT_ARGS environment variable.
        12. +
        13. Via the <setproxy> task.
        14. +
        15. Custom ProxySelector implementations

        -Proxy settings are automatically shared with Java programs started under Ant -that are not forked; to pass proxy settings down to subsidiary programs, use -a propertyset. + Proxy settings are automatically shared with Java programs started + under Ant that are not forked; to pass proxy settings down + to subsidiary programs, use a propertyset.

        -Over time, we expect the Java 5+ proxy features to stabilize, and for Java code -to adapt to them. However, given the fact that it currently does break some -builds, it will be some time before Ant enables the automatic proxy feature by -default. Until then, you have to enable the -autoproxy option or -use one of the alternate mechanisms to configure the JVM. + Over time, we expect the Java 5+ proxy features to stabilize, and + for Java code to adapt to them. However, given the fact that it + currently does break some builds, it will be some time before Ant + enables the automatic proxy feature by default. Until then, you have + to enable the -autoproxy option or use one of the + alternate mechanisms to configure the JVM. +

        Further reading

        diff -Nru ant-1.9.10/manual/running.html ant-1.10.3/manual/running.html --- ant-1.9.10/manual/running.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/running.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,80 +25,74 @@

        Running Apache Ant

        -

        Command Line

        -

        If you've installed Apache Ant as described in the - Installing Ant section, -running Ant from the command-line is simple: just type -ant.

        -

        When no arguments are specified, Ant looks for a build.xml -file in the current directory and, if found, uses that file as the -build file and runs the target specified in the default -attribute of the <project> tag. -To make Ant use -a build file other than build.xml, use the command-line -option -buildfile file, -where file is the name of the build file you want to use -(or a directory containing a build.xml file).

        -If you use the -find [file] option, -Ant will search for a build file first in the current directory, then in -the parent directory, and so on, until either a build file is found or the root -of the filesystem has been reached. By default, it will look for a build file -called build.xml. To have it search for a build file other -than build.xml, specify a file argument. -Note: If you include any other flags or arguments -on the command line after -the -find flag, you must include the file argument -for the -find flag, even if the name of the -build file you want to find is build.xml. - -

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

        - -

        Options that affect the amount of logging output by Ant are: --quiet, -which instructs Ant to print less -information to the console; --verbose, which causes Ant to print -additional information to the console; -debug, -which causes Ant to print considerably more additional information; and --silent which makes Ant print nothing but task -output and build failures (useful to capture Ant output by scripts). -

        - -

        It is also possible to specify one or more targets that should be executed. -When omitted, the target that is specified in the -default attribute of the -project tag is +

        Command Line

        + +

        If you've installed Apache Ant as described in +the Installing Ant section, running Ant +from the command-line is simple: just type ant.

        + +

        When no arguments are specified, Ant looks for +a build.xml file in the current directory and, if found, +uses that file as the build file and runs the target specified in +the default attribute of the <project> +tag. To make Ant use a build file other than build.xml, +use the command-line option -buildfile file, +where file is the name of the build file you want to use (or +a directory containing a build.xml file).

        + +

        If you use the -find [file] option, Ant will +search for a build file first in the current directory, then in the +parent directory, and so on, until either a build file is found or the +root of the filesystem has been reached. By default, it will look for +a build file called build.xml. To have it search for a +build file other than build.xml, specify a file +argument. Note: If you include any other flags or +arguments on the command line after the -find flag, you +must include the file argument for the -find flag, even +if the name of the build file you want to find +is build.xml.

        + +

        You can also set properties on +the command line. This can be done with +the -Dproperty=value option, +where property is the name of the property, +and value is the value for that property. If you specify a +property that is also set in the build file (see +the property task), the value +specified on the command line will override the value specified in the +build file. Defining properties on the command line can also be used +to pass in the value of environment variables; just +pass -DMYVAR=%MYVAR% (Windows) +or -DMYVAR=$MYVAR (Unix) to Ant. You can then access +these variables inside your build file as ${MYVAR}. You +can also access environment variables using +the property +task's environment attribute.

        + +

        Options that affect the amount of logging output by Ant +are: -quiet, which instructs Ant to print less +information to the console; -verbose, which causes Ant to +print additional information to the console; -debug, +which causes Ant to print considerably more additional information; +and -silent which makes Ant print nothing but task output +and build failures (useful to capture Ant output by scripts).

        + +

        It is also possible to specify one or more targets that should be +executed. When omitted, the target that is specified in +the default attribute of +the project tag is used.

        -

        The -projecthelp option prints out a list -of the build file's targets. Targets that include a -description attribute are listed as "Main targets", -those without a description are listed as -"Other targets", then the "Default" target is listed -("Other targets" are only displayed if there are no main -targets, or if Ant is invoked in -verbose or -debug mode). +

        The -projecthelp option prints out a list of the build +file's targets. Targets that include a description +attribute are listed as "Main targets", those without +a description are listed as "Other targets", then +the "Default" target is listed ("Other targets" are only +displayed if there are no main targets, or if Ant is invoked +in -verbose or -debug mode).

        -

        Command-line Options Summary

        -
        ant [options] [target [target2 [target3] ...]]
        +

        Command-line Options Summary

        +
        ant [options] [target [target2 [target3] ...]]
         Options:
           -help, -h              print this message and exit
           -projecthelp, -p       print project help information and exit
        @@ -131,400 +125,386 @@
                                  1 (lowest) to 10 (highest); 5 is the default
           -nouserlib             Run ant without using the jar files from ${user.home}/.ant/lib
           -noclasspath           Run ant without using CLASSPATH
        -  -autoproxy             Java 1.5+ : use the OS proxies
        +  -autoproxy             Java 5+ : use the OS proxies
           -main <class>          override Ant's normal entry point
         
        -

        For more information about -logger and --listener see -Loggers & Listeners. -

        For more information about -inputhandler see -InputHandler. -

        Easiest way of changing the exit-behaviour is subclassing the original main class: +

        For more information about -logger +and -listener see Loggers & +Listeners. +

        For more information about -inputhandler +see InputHandler. +

        Easiest way of changing the exit-behaviour is subclassing the +original main class:

         public class CustomExitCode extends org.apache.tools.ant.Main {
             protected void exit(int exitCode) {
                 // implement your own behaviour, e.g. NOT exiting the JVM
             }
         }
        -
        and starting Ant with access (-lib path-to-class) to this class. -

        +
        +

        and starting Ant with access (-lib path-to-class) +to this class.

        -

        Library Directories

        -

        -Prior to Ant 1.6, all jars in the ANT_HOME/lib would be added to the CLASSPATH -used to run Ant. This was done in the scripts that started Ant. From Ant 1.6, -two directories are scanned by default and more can be added as required. The -default directories scanned are ANT_HOME/lib and a user specific directory, -${user.home}/.ant/lib. This arrangement allows the Ant installation to be -shared by many users while still allowing each user to deploy additional jars. -Such additional jars could be support jars for Ant's optional tasks or jars -containing third-party tasks to be used in the build. It also allows the main Ant installation to be locked down which will please system administrators. -

        +

        Library Directories

        -

        -Additional directories to be searched may be added by using the -lib option. -The -lib option specifies a search path. Any jars or classes in the directories -of the path will be added to Ant's classloader. The order in which jars are -added to the classpath is as follows: -

        +

        Prior to Ant 1.6, all jars in the ANT_HOME/lib would +be added to the CLASSPATH used to run Ant. This was done +in the scripts that started Ant. Since Ant 1.6, two +directories are scanned by default and more can be added as +required. The default directories scanned +are ANT_HOME/lib and a user specific +directory, ${user.home}/.ant/lib. This arrangement allows +the Ant installation to be shared by many users while still allowing +each user to deploy additional jars. Such additional jars could be +support jars for Ant's optional tasks or jars containing third-party +tasks to be used in the build. It also allows the main Ant +installation to be locked down which will please system +administrators.

        + +

        Additional directories to be searched may be added by using +the -lib option. The -lib option specifies +a search path. Any jars or classes in the directories of the path will +be added to Ant's classloader. The order in which jars are added to +the classpath is as follows:

          -
        • -lib jars in the order specified by the -lib elements on the command line
        • -
        • jars from ${user.home}/.ant/lib (unless -nouserlib is set)
        • -
        • jars from ANT_HOME/lib
        • +
        • jars in the order specified by the -lib options on the command line
        • +
        • jars from ${user.home}/.ant/lib (unless -nouserlib is set)
        • +
        • jars from ANT_HOME/lib
        -

        -Note that the CLASSPATH environment variable is passed to Ant using a -lib -option. Ant itself is started with a very minimalistic classpath. -Ant should work perfectly well with an empty CLASSPATH environment variable, -something the the -noclasspath option actually enforces. We get many more support calls related to classpath problems (especially quoting problems) than -we like. - -

        - -

        -The location of ${user.home}/.ant/lib is somewhat dependent on the JVM. On Unix -systems ${user.home} maps to the user's home directory whilst on recent -versions of Windows it will be somewhere such as -C:\Documents and Settings\username\.ant\lib. You should consult your -JVM documentation for more details. -

        +

        Note that the CLASSPATH environment variable is passed +to Ant using a -lib option. Ant itself is started with a +very minimalistic classpath. Ant should work perfectly well with an +empty CLASSPATH environment variable, something the +the -noclasspath option actually enforces. We get many more +support calls related to classpath problems (especially quoting +problems) than we like.

        + +

        The location of ${user.home}/.ant/lib is somewhat +dependent on the JVM. On Unix systems ${user.home} maps +to the user's home directory whilst on recent versions of Windows it +will be somewhere such +as C:\Users\username\.ant\lib. You should consult +your JVM documentation for more details.

        Examples

        -
        -
        ant
        -
        -

        runs Ant using the build.xml file in the current directory, on -the default target.

        - -
        -
        ant -buildfile test.xml
        -
        -

        runs Ant using the test.xml file in the current directory, on -the default target.

        - -
        -
        ant -buildfile test.xml dist
        -
        -

        runs Ant using the test.xml file in the current directory, on -the target called dist.

        - -
        -
        ant -buildfile test.xml -Dbuild=build/classes dist
        -
        -

        runs Ant using the test.xml file in the current directory, on -the target called dist, setting the build property -to the value build/classes.

        - -
        -
        ant -lib /home/ant/extras
        -
        -

        runs Ant picking up additional task and support jars from the -/home/ant/extras location

        - -
        -
        ant -lib one.jar;another.jar
        -
        ant -lib one.jar -lib another.jar
        -
        -

        adds two jars to Ants classpath.

        +
        ant
        +

        runs Ant using the build.xml file in the current +directory, on the default target.

        + +
        ant -buildfile test.xml
        +

        runs Ant using the test.xml file in the current +directory, on the default target.

        + +
        ant -buildfile test.xml dist
        +

        runs Ant using the test.xml file in the current +directory, on the target called dist.

        + +
        ant -buildfile test.xml -Dbuild=build/classes dist
        +

        runs Ant using the test.xml file in the current +directory, on the target called dist, setting +the build property to the value build/classes.

        + +
        ant -lib /home/ant/extras
        +

        runs Ant picking up additional task and support jars from +the /home/ant/extras location

        +
        ant -lib one.jar;another.jar
        +
        ant -lib one.jar -lib another.jar
        +

        adds two jars to Ants classpath.

        -

        Files

        +

        Files

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

        +file ~/.antrc before it does anything. On Windows, the +Ant wrapper batch-file invokes %HOME%\antrc_pre.bat at +the start and %HOME%\antrc_post.bat at the end. You can +use these files, for example, to set/unset environment variables that +should only be visible during the execution of Ant. See the next +section for examples.

        -

        Environment Variables

        +

        Environment Variables

        -

        The wrapper scripts use the following environment variables (if -set):

        +

        The wrapper scripts use the following environment variables (if set):

          -
        • JAVACMD - full path of the Java executable. Use this - to invoke a different JVM than JAVA_HOME/bin/java(.exe).
        • +
        • JAVACMD—full path of the Java executable. Use this + to invoke a different JVM than JAVA_HOME/bin/java(.exe).
        • -
        • ANT_OPTS - command-line arguments that should be +
        • ANT_OPTS—command-line arguments that should be passed to the JVM. For example, you can define system properties or set the maximum Java heap size here.
        • -
        • ANT_ARGS - Ant command-line arguments. For example, +
        • ANT_ARGS—Ant command-line arguments. For example, set ANT_ARGS to point to a different logger, include a - listener, and to include the -find flag.
        • - Note: If you include -find + listener, and to include the -find flag.
          + Note: If you include -find in ANT_ARGS, you should include the name of the build file - to find, even if the file is called build.xml. + to find, even if the file is called build.xml.
        -

        Java System Properties

        +

        Java System Properties

        Some of Ant's core classes can be configured via system properties.

        -

        Here is the result of a search through the codebase. Because system properties are -available via Project instance, I searched for them with a -

        -    grep -r -n "getPropert" * > ..\grep.txt
        -
        -command. After that I filtered out the often-used but not-so-important values (most of them -read-only values): path.separator, ant.home, basedir, user.dir, os.name, -line.separator, java.home, java.version, java.version, user.home, java.class.path
        -And I filtered out the getPropertyHelper access.

        - +

        Here is the result of a search through the codebase. Because system +properties are available via Project instance, I searched for them with a

        +
        grep -r -n "getPropert" * > ..\grep.txt
        +

        command. After that I filtered out the often-used but +not-so-important values (most of them read-only +values): path.separator, ant.home, basedir, +user.dir, os.name, line.separator, +java.home, java.version, java.version, +user.home, java.class.path
        +And I filtered out the getPropertyHelper access.

        + +
        - + - + - + - - + + - - + - + - - + - - + + - - + - + - - - + + - + - - + + - + - + - - + + - + - - + + - + - - + + - - + + - - + + - + - - + + - + - + - + - + - - - + + - + - - + - - + + - - + + - - + + - + + + + +
        property namevalid values /default valuevalid values/default value description
        ant.build.javac.source Source-level version numberDefault source value for <javac>/<javadoc>Default source value + for <javac>/<javadoc>
        ant.build.javac.target Class-compatibility version numberDefault target value for <javac>Default target value for <javac>
        ant.executor.classclassname; default is org. apache. tools. ant. helper. DefaultExecutorSince Ant 1.6.3 Ant will delegate Target invocation to the -org.apache.tools.ant.Executor implementation specified here. - classname; default is org.apache.tools.ant.helper.DefaultExecutorSince Ant 1.6.3 Ant will delegate Target invocation to + the org.apache.tools.ant.Executor + implementation specified here.
        ant.file read only: full filename of the build fileThis is set to the name of the build file. In - - <import>-ed files, this is set to the containing build file. - This is set to the name of the build + file. In <import>-ed files, + this is set to the containing build file.
        ant.file.*read only: full filename of the build file of Ant projects - This is set to the name of a file by project; - this lets you determine the location of - <import>-ed files, - read only: full filename of the build file of Ant projectsThis is set to the name of a file by project; this lets you + determine the location + of <import>-ed files.
        ant.input.properties filename (required)Name of the file holding the values for the - PropertyFileInputHandler. - Name of the file holding the values for + the PropertyFileInputHandler.
        ant.logger.defaultsfilename (optional, default '/org/ apache/ tools/ ant/ listener/ defaults.properties')Name of the file holding the color mappings for the - AnsiColorLogger. - filename (optional, default /org/apache/tools/ant/listener/defaults.properties)Name of the file holding the color mappings for + the AnsiColorLogger.
        ant.netrexxc.* several formatsUse specified values as defaults for netrexxc. - Use specified values as defaults + for netrexxc.
        ant.PropertyHelperant-reference-name (optional)Specify the PropertyHelper to use. The object must be of the type - org.apache.tools.ant.PropertyHelper. If not defined an object of - org.apache.tools.ant.PropertyHelper will be used as PropertyHelper. - Ant reference name (optional)Specify the PropertyHelper to use. The object must be of the + type org.apache.tools.ant.PropertyHelper. By + default, an object + of org.apache.tools.ant.PropertyHelper + will be used as PropertyHelper.
        ant.regexp.regexpimpl classnameclassname for a RegExp implementation; if not set Ant uses JDK 1.4's implementation; - RegExp-Mapper - "Choice of regular expression implementation" - classname for a RegExp implementation; by default, JDK 1.4+ + implementation; RegExp + Mapper "Choice of regular expression implementation".
        ant.reuse.loader booleanallow to reuse classloaders - used in org.apache.tools.ant.util.ClasspathUtil - allow to reuse classloaders used + in org.apache.tools.ant.util.ClasspathUtil.
        ant.XmlLogger.stylesheet.urifilename (default 'log.xsl')Name for the stylesheet to include in the logfile by - XmlLogger. - filename (default log.xsl)Name for the stylesheet to include in the logfile + by XmlLogger.
        build.compiler nameSpecify the default compiler to use. - see javac, - EJB Tasks - (compiler attribute), - javah - Specify the default compiler to use; + see javac, EJB + Tasks (compiler + attribute), javah.
        build.compiler.emacsboolean (default false)Enable emacs-compatible error messages. - see javac "Jikes Notes" - boolean (default false)Enable emacs-compatible error messages; + see javac "Jikes Notes".
        build.compiler.fulldepend boolean (default false)Enable full dependency checking - see javac "Jikes Notes" - Enable full dependency checking; + see javac "Jikes Notes".
        build.compiler.jvc.extensionsboolean (default true)enable Microsoft extensions of their java compiler - see javac "Jvc Notes" - DeprecatedEnable Microsoft extensions of their Java compiler; + see javac "Jvc Notes".
        build.compiler.pedanticboolean (default false)Enable pedantic warnings. - see javac "Jikes Notes" - boolean (default false)Enable pedantic warnings; + see javac "Jikes Notes".
        build.compiler.warningsDeprecated flag see javac "Jikes Notes" DeprecatedSee javac "Jikes Notes"
        build.rmic namecontrol the rmic compiler Control the rmic compiler
        build.sysclasspathsee its dedicated page, no - default valuesee its dedicated pageNo default valueSee its dedicated page
        file.encoding name of a supported character set (e.g. UTF-8, ISO-8859-1, US-ASCII)use as default character set of email messages; use as default for source-, dest- and bundleencoding - in translate
        - see JavaDoc of java.nio.charset.Charset - for more information about character sets (not used in Ant, but has nice docs). -
        use as default character set of email messages; use as default + for srcencoding, destencoding + and bundleencoding + in translate
        see JavaDoc + of java.nio.charset.Charset for more information + about character sets (not used in Ant, but has nice docs).
        jikes.class.path pathThe specified path is added to the classpath if jikes is used as compiler.The specified path is added to the classpath if Jikes is used as compiler.
        MailLogger.properties.file, MailLogger.*MailLogger.properties.file, MailLogger.* filename (optional, defaults derived from Project instance)Name of the file holding properties for sending emails by the - MailLogger. Override properties set - inside the buildfile or via command line. - Name of the file holding properties for sending emails by + the MailLogger. Override + properties set inside the buildfile or via command line.
        org.apache.tools.ant.ProjectHelperclassname (optional, default 'org.apache.tools.ant.ProjectHelper2')specifies the classname to use as ProjectHelper. The class must extend - org.apache.tools.ant.ProjectHelper. - classname (optional, default org.apache.tools.ant.ProjectHelper2)specifies the classname to use as ProjectHelper. The class must + extend org.apache.tools.ant.ProjectHelper.
        org.apache.tools.ant.ArgumentProcessor classname (optional)specifies the classname to use as ArgumentProcessor. The class must extend - org.apache.tools.ant.ArgumentProcessor. - specifies the classname to use as ArgumentProcessor. The class + must extend org.apache.tools.ant.ArgumentProcessor.
        websphere.home pathPoints to home directory of websphere. - see EJB Tasks - Points to home directory of WebSphere; + see EJB Tasks
        XmlLogger.filefilename (default 'log.xml')Name for the logfile for MailLogger. - filename (default log.xml)Name for the logfile + for MailLogger.
        ant.project-helper-repo.debugboolean (default 'false')Set it to true to enable debugging with Ant's - ProjectHelper internal repository. - boolean (default false)Set it to true to enable debugging with + Ant's ProjectHelper internal + repository.
        ant.argument-processor-repo.debugboolean (default 'false')Set it to true to enable debugging with Ant's - ArgumentProcessor internal repository. - boolean (default false)Set it to true to enable debugging with + Ant's ArgumentProcessor + internal repository.
        ant.tstamp.now number, seconds since the epoch (midnight 1970-01-01)The value to use as current time and date for <tstamp>The value to use as current time and date + for <tstamp>
        ant.tstamp.now.isoISO-8601 timestamp string like 1972-04-17T08:07:00Z

        -If new properties get added (it happens), expect them to appear under the -"ant." and "org.apache.tools.ant" prefixes, unless the developers have a -very good reason to use another prefix. Accordingly, please avoid using -properties that begin with these prefixes. This protects you from future -Ant releases breaking your build file. +If new properties get added (it happens), expect them to appear under +the ant. and org.apache.tools.ant. prefixes, +unless the developers have a very good reason to use another +prefix. Accordingly, please avoid using properties that begin with +these prefixes. This protects you from future Ant releases breaking +your build file.

        return code

        -

        the ant start up scripts (in their Windows and Unix version) return -the return code of the java program. So a successful build returns 0, -failed builds return other values. -

        - -

        Cygwin Users

        -

        The Unix launch script that come with Ant works correctly with Cygwin. You -should not have any problems launching Ant from the Cygwin shell. It is -important to note, however, that once Ant is running it is part of the JDK -which operates as a native Windows application. The JDK is not a Cygwin -executable, and it therefore has no knowledge of Cygwin paths, etc. In -particular when using the <exec> task, executable names such -as "/bin/sh" will not work, even though these work from the Cygwin -shell from which Ant was launched. You can use an executable name such as -"sh" and rely on that command being available in the Windows path. -

        - -

        OS/2 Users

        -

        The OS/2 launch script was developed to perform complex tasks. It has two parts: -ant.cmd which calls Ant and antenv.cmd which sets the environment for Ant. -Most often you will just call ant.cmd using the same command line options as described -above. The behaviour can be modified by a number of ways explained below.

        +

        +Ant start up scripts (in their Windows and Unix version) return the +return code of the java program. So a successful build +returns 0, failed builds return other values. +

        -

        Script ant.cmd first verifies whether the Ant environment is set correctly. The -requirements are:

        +

        Cygwin Users

        +

        +Unix launch script that come with Ant works correctly with Cygwin. You +should not have any problems launching Ant from the Cygwin shell. It +is important to note, however, that once Ant is running it is part of +the JDK which operates as a native Windows application. The JDK is not +a Cygwin executable, and it therefore has no knowledge of Cygwin +paths, etc. In particular when using the <exec> +task, executable names such as /bin/sh will not work, even +though these work from the Cygwin shell from which Ant was +launched. You can use an executable name such as sh and rely on +that command being available in the Windows path. +

        + +

        OS/2 Users

        +

        +The OS/2 launch script was developed to perform complex tasks. It has +two parts: ant.cmd which calls Ant +and antenv.cmd which sets the environment for Ant. Most +often you will just call ant.cmd using the same command +line options as described above. The behaviour can be modified by a +number of ways explained below. +

        + +

        +Script ant.cmd first verifies whether the Ant environment +is set correctly. The requirements are: +

        1. Environment variable JAVA_HOME is set.
        2. Environment variable ANT_HOME is set.
        3. @@ -532,82 +512,94 @@ JAVA_HOME and at least one element from ANT_HOME.
        -

        If any of these conditions is violated, script antenv.cmd is called. This script -first invokes configuration scripts if there exist: the system-wide configuration -antconf.cmd from the %ETC% directory and then the user configuration -antrc.cmd from the %HOME% directory. At this moment both -JAVA_HOME and ANT_HOME must be defined because antenv.cmd -now adds classes.zip or tools.jar (depending on version of JVM) and -everything from %ANT_HOME%\lib except ant-*.jar to -CLASSPATH. Finally ant.cmd calls per-directory configuration -antrc.cmd. All settings made by ant.cmd are local and are undone when the -script ends. The settings made by antenv.cmd are persistent during the lifetime of the -shell (of course unless called automatically from ant.cmd). It is thus possible to call -antenv.cmd manually and modify some settings before calling ant.cmd.

        - -

        Scripts envset.cmd and runrc.cmd perform auxiliary tasks. All scripts -have some documentation inside.

        - -

        Running Ant as a background process on - Unix(-like) systems

        - -

        If you start Ant as a background process (like in ant - &) and the build process creates another process, Ant will - immediately try to read from standard input, which in turn will - most likely suspend the process. In order to avoid this, you must - redirect Ant's standard input or explicitly provide input to each - spawned process via the input related attributes of the - corresponding tasks.

        - -

        Tasks that create such new processes - include <exec>, <apply> - or <java> when the fork attribute is - true.

        - -

        Running Ant via Java

        -

        If you have installed Ant in the do-it-yourself way, Ant can be started -from one of two entry points:

        -
        -
        java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]
        -
        - -
        -
        java -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher [options] [target]
        -
        - -

        -The first method runs Ant's traditional entry point. The second method uses -the Ant Launcher introduced in Ant 1.6. The former method does not support -the -lib option and all required classes are loaded from the CLASSPATH. You must -ensure that all required jars are available. At a minimum the CLASSPATH should -include: +

        +If any of these conditions is violated, script antenv.cmd +is called. This script first invokes configuration scripts if there +exist: the system-wide configuration antconf.cmd from +the %ETC% directory and then the user +configuration antrc.cmd from the %HOME% +directory. At this moment both JAVA_HOME +and ANT_HOME must be defined +because antenv.cmd now adds classes.zip +or tools.jar (depending on version of JVM) and everything +from %ANT_HOME%\lib except ant-*.jar +to CLASSPATH. Finally ant.cmd calls +per-directory configuration antrc.cmd. All settings made +by ant.cmd are local and are undone when the script +ends. The settings made by antenv.cmd are persistent +during the lifetime of the shell (of course unless called +automatically from ant.cmd). It is thus possible to +call antenv.cmd manually and modify some settings before +calling ant.cmd. +

        + +

        +Scripts envset.cmd and runrc.cmd perform +auxiliary tasks. All scripts have some documentation inside. +

        + +

        Running Ant as a background process on Unix(-like) systems

        + +

        +If you start Ant as a background process (like in ant +&) and the build process creates another process, Ant will +immediately try to read from standard input, which in turn will most +likely suspend the process. In order to avoid this, you must redirect +Ant's standard input or explicitly provide input to each spawned +process via the input related attributes of the corresponding tasks. +

        + +

        +Tasks that create such new processes +include <exec>, <apply> +or <java> when the fork attribute +is true. +

        + +

        Running Ant via Java

        +

        +If you have installed Ant in the do-it-yourself way, Ant can be +started from one of two entry points: +

        + +
        java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]
        +
        java -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher [options] [target]
        + +

        +The first method runs Ant's traditional entry point. The second method +uses the Ant Launcher introduced in Ant 1.6. The former method does +not support the -lib option and all required classes are +loaded from the CLASSPATH. You must ensure that all +required jars are available. At a minimum the CLASSPATH +should include:

          -
        • ant.jar and ant-launcher.jar
        • +
        • ant.jar and ant-launcher.jar
        • jars/classes for your XML parser
        • the JDK's required jar/zip files

        -The latter method supports the -lib, -nouserlib, -noclasspath options and will - load jars from the specified ANT_HOME. You should start the latter with the most minimal -classpath possible, generally just the ant-launcher.jar. +The latter method supports +the -lib, -nouserlib, -noclasspath +options and will load jars from the +specified ANT_HOME. You should start the latter with the +most minimal classpath possible, generally just +the ant-launcher.jar.

        - - +

        Ant can be started in Ant via the <java> command. Here is an example: - +

        -<java
        -        classname="org.apache.tools.ant.launch.Launcher"
        -        fork="true"
        -        failonerror="true"
        -        dir="${sub.builddir}"
        -        timeout="4000000"
        -        taskname="startAnt">
        +<java classname="org.apache.tools.ant.launch.Launcher"
        +      fork="true"
        +      failonerror="true"
        +      dir="${sub.builddir}"
        +      timeout="4000000"
        +      taskname="startAnt">
             <classpath>
                 <pathelement location="${ant.home}/lib/ant-launcher.jar"/>
             </classpath>
        @@ -620,8 +612,6 @@
             <arg value="${sub.target}"/>
         </java>
         
        -
        - diff -Nru ant-1.9.10/manual/runninglist.html ant-1.10.3/manual/runninglist.html --- ant-1.9.10/manual/runninglist.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/runninglist.html 2018-03-24 12:37:12.000000000 +0000 @@ -29,18 +29,16 @@

        Running Apache Ant

        diff -Nru ant-1.9.10/manual/stylesheets/style.css ant-1.10.3/manual/stylesheets/style.css --- ant-1.9.10/manual/stylesheets/style.css 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/stylesheets/style.css 2018-03-24 12:37:12.000000000 +0000 @@ -15,53 +15,187 @@ * limitations under the License. * */ +body { + font-family: “Palatino Linotypeâ€, Palatino, Georgia, “Century Schoolbookâ€, serif; +} + h2 { font-size: 200%; - background-color: ffffff; + background-color: white; } h3 { font-size: 130%; - color: #ffffff; - background-color: #525D76; + color: white; + background-color: #525d76; } h4 { - color: #ffffff; - background-color: #828DA6; + color: white; + background-color: #828da6; } -td { - background-color: eeeeee; - color: 000000; +h5 { + font-size: 100%; + color: white; + background-color: #a6adbe; + margin-top: .5rem; + margin-bottom: .5rem; +} + +h6 { + font-size: 100%; + color: white; + background-color: #c1c5d1; + margin-top: .5rem; + margin-bottom: .5rem; +} + +h5 + p, h6 + p { + margin-top: .5rem; + margin-bottom: .5rem; +} + +h3 > a, h4 > a, h5 > a, h6 > a { + color: white; +} + +h3 > a:visited, h4 > a:visited, h5 > a:visited, h6 > a:visited, +h3 > a:hover, h4 > a:hover, h5 > a:hover, h6 > a:hover { + color: lightskyblue; +} + +var { + font-family: Verdana, Geneva, sans-serif; + font-size: 0.8rem; +} + +q { + font-family: "Lucida Console", Monaco, monospace; + font-size: 0.8rem; +} + +q.no-break { + white-space: nowrap; + hyphens: none; +} + +code, samp, kbd { + white-space: nowrap; + hyphens: none; + font-size: 1.125rem; } -/* first row */ -table tr:first-child td { - background-color: cccccc; - color: 000000; +h2 > code, h2 > samp { + font-size: 2rem; } -/* or th as first row */ -table th { - background-color: cccccc; - color: 000000; +h3 > code, h3 > samp { + font-size: 1.5rem; +} + +h3 > var { + font-size: 1.125rem; } pre { - background-color: efefef; + background-color: #efefef; + margin-right: 4rem; + margin-left: 4rem; + font-size: 1.125rem; +} + +pre var, code var { + font-size: 0.65rem; } /* code snippets in examples and tutorials */ -.code { - background: #EFEFEF; - margin-top: +.code { + background: #efefef; +} + +/* highlight console input */ +.input, kbd { + color: white; + background: darkseagreen; + overflow: hidden; + text-overflow: ellipsis; } /* highlight console output */ -.output { - color: #FFFFFF; - background: #837A67; +.output { + color: white; + background: #837a67; + overflow: hidden; + text-overflow: ellipsis; +} + +/* a workaround for invisible + (white on white) overflows */ +pre.input:hover, pre.output:hover { + margin-right: 0; + margin-left: 0; + overflow: scroll; + text-overflow: initial; +} + +td { + vertical-align: top; + background-color: #eeeeee; + color: black; +} + +tr:hover > td { + background-color: whitesmoke; +} + +th { + background-color: silver; + color: black; + vertical-align: middle; +} + +td pre { + margin: 0 0 0 0; + font-size: 1rem; +} + +thead.no-bold th { + font-weight: normal; + white-space: nowrap; +} + +table.attr { + width: 100%; +} + +table.attr td:first-child { + font-family: Verdana, Geneva, sans-serif; + font-size: 0.8rem; + font-style: italic; +} + +table.attr td:last-child { + text-align: center; +} + +table.attr td.center, h1.center, p.center { + text-align: center; +} + +table.attr td.left { + font-family: “Palatino Linotypeâ€, Palatino, Georgia, “Century Schoolbookâ€, serif; + font-size: 1rem; + font-style: normal; + text-align: left; +} + +table.attr td.var { + text-align: left; +} + +td[rowspan] { + vertical-align: middle; } ul.inlinelist { @@ -70,3 +204,60 @@ padding: 0; } +li.indent { + padding-left: 1rem; +} + +div.float { + margin-top: 0.5rem; + width: 100%; + min-height: 1.5rem; + line-height: 1.5rem; + background-color: silver; +} + +div.float + table { + width: 100%; + table-layout: fixed; +} + +div.float + table th:first-child { + width: 20%; + white-space: nowrap; +} + +div.float + table tr:first-child { + width: 20%; + white-space: nowrap; +} + +span.left { + float: left; + font-family: Verdana, Geneva, sans-serif; + font-weight: bold; +} + +span.right { + float: right; +} + +span.left, span.right { + vertical-align: middle; + background-color: silver; +} + +ol.refs { + counter-reset: refs; +} + +ol.refs > li { + list-style: none; + position: relative; +} + +ol.refs > li:before { + content: "[" counter(refs, decimal) "]"; + counter-increment: refs; + position: absolute; + left: -2rem; +} diff -Nru ant-1.9.10/manual/sysclasspath.html ant-1.10.3/manual/sysclasspath.html --- ant-1.9.10/manual/sysclasspath.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/sysclasspath.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,18 +24,18 @@ -

        build.sysclasspath

        -

        The value of the build.sysclasspath property +

        build.sysclasspath

        +

        The value of the build.sysclasspath property controls how the system classpath, i.e. the classpath in effect when Apache Ant is run, affects the behavior of classpaths in Ant. The default behavior varies from task to task.

        The values and their meanings are: - +
        - + - + - + - +
        valuemeaning
        onlyonly Only the system classpath is used and classpaths specified in build files, etc are ignored. This situation could be considered as the person running the build file knows more about the environment than the person writing the @@ -44,7 +44,7 @@
        ignoreignore The system classpath is ignored. This situation is the reverse of the above. The person running the build trusts the build file writer to get the @@ -53,7 +53,7 @@
        lastlast The classpath is concatenated to any specified classpaths at the end. This is a compromise, where the build file writer has priority. @@ -61,7 +61,7 @@
        firstfirst Any specified classpaths are concatenated to the system classpath. This is the other form of compromise where the build runner has priority. @@ -70,9 +70,9 @@

        Since Ant 1.7 the value of this property also affects the -bootclasspath settings--it combines the bootclasspath that has been -specified for a task with the bootclasspath of the Java VM running -Ant. If the property has not been set, it defaults to "ignore" in +bootclasspath settings—it combines the bootclasspath that has been +specified for a task with the bootclasspath of the JVM running +Ant. If the property has not been set, it defaults to ignore in this case.

        diff -Nru ant-1.9.10/manual/targets.html ant-1.10.3/manual/targets.html --- ant-1.9.10/manual/targets.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/targets.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,7 +23,7 @@ -

        Targets

        +

        Targets

        A target is a container of tasks that cooperate to reach a desired state during the build process.

        @@ -33,27 +33,25 @@ example you might have a target for compiling and a target for creating a distributable. You can only build a distributable when you have compiled first, so the distribute - target depends on the compile target.

        + target depends on the compile target.

        -

        Ant tries to execute the targets in the depends +

        Ant tries to execute the targets in the depends attribute in the order they appear (from left to right). Keep in mind that it is possible that a target can get executed earlier when an earlier target depends on it:

        -
        -
        <target name="A"/>
        +  
        <target name="A"/>
         <target name="B" depends="A"/>
         <target name="C" depends="B"/>
         <target name="D" depends="C,B,A"/>
        -

        Suppose we want to execute target D. From its - depends attribute, you might think that first target + depends attribute, you might think that first target C, then B and then A is executed. Wrong! C depends on B, and B depends on A, so first A is executed, then B, then C, and finally D.

        - -
        Call-Graph:  A --> B --> C --> D
        + +
        Call-Graph:  A → B → C → D

        In a chain of dependencies stretching back from a given target such as D above, each target gets executed only once, even when @@ -61,7 +59,7 @@ will first result in C being called, which in turn will first call B, which in turn will first call A. After A, then B, then C have executed, execution returns to the dependency list of D, which - will not call B and A, since they were already called in + will not call B and A, since they were already called in process of dependency resolution for C and B respectively as dependencies of D. Had no such dependencies been discovered in processing C and B, B and A would have been executed after C in @@ -70,9 +68,9 @@

        A target also has the ability to perform its execution if (or unless) a property has been set. This allows, for example, better control on the building process depending on the state of the - system (java version, OS, command-line property defines, etc.). - To make a target sense this property, you should add - the if (or unless) attribute with the + system (Java version, OS, command-line property defines, etc.). + To make a target sense this property, you should add + the if (or unless) attribute with the name of the property that the target should react to. Note: In the most simple case Ant will only check whether the property has been set, the value doesn't matter, @@ -81,22 +79,21 @@ the properties page for more details. For example:

        -
        <target name="build-module-A" if="module-A-present"/>
        <target name="build-own-fake-module-A" unless="module-A-present"/>
        -

        In the first example, if the module-A-present - property is set (to any value, e.g. false), the target will + property is set (to any value, e.g. false), the target will be run. In the second example, if the module-A-present property is set (again, to any value), the target will not be run.

        -

        Only one propertyname can be specified in the if/unless - clause. If you want to check multiple conditions, you can use a - dependent target for computing the result for the check:

        +

        Only one property name can be specified in + the if/unless attribute. If you want to + check multiple conditions, you can use a dependent target for + computing the result for the check:

        -
        +
         <target name="myTarget" depends="myTarget.check" if="myTarget.run">
             <echo>Files foo.txt and bar.txt are present.</echo>
         </target>
        @@ -108,162 +105,163 @@
                     <available file="bar.txt"/>
                 </and>
             </condition>
        -</target>
        -
        +</target> -
        Call-Graph:  myTarget.check --> maybe(myTarget)
        +
        Call-Graph:  myTarget.check → maybe(myTarget)
        -

        If no if and no unless attribute is +

        If no if and no unless attribute is present, the target will always be executed.

        -

        Important: the if and unless +

        Important: the if and unless attributes only enable or disable the target to which they are attached. They do not control whether or not targets that a conditional target depends upon get executed. In fact, they do not even get evaluated until the target is about to be executed, and all its predecessors have already run. -

        The optional description attribute can be used to +

        The optional description attribute can be used to provide a one-line description of this target, which is printed by - the -projecthelp command-line option. Targets without + the -projecthelp command-line option. Targets without such a description are deemed internal and will not be listed, - unless either the -verbose or -debug + unless either the -verbose or -debug option is used.

        It is a good practice to place your tstamp tasks in a - so-called initialization target, on which all other targets + so-called initialization target, on which all other targets depend. Make sure that target is always the first one in the depends list of the other targets. In this manual, most initialization targets have the name "init".

        -
        -    <project>
        -        <target name="init">
        -            <tstamp/>
        -        </target>
        -        <target name="otherTarget" depends="init">
        -            ...
        -        </target>
        -    </project>
        -    
        - -

        Especially if you only have a few tasks you also could place these - tasks directly under the project tag (since Ant 1.6.0):

        -
        -    <project>
        +    
        +<project>
        +    <target name="init">
                 <tstamp/>
        -    </project>
        -    
        + </target> + <target name="otherTarget" depends="init"> + ... + </target> +</project> -

        If the depends attribute and the if/unless attribute are set, the - depends attribute is executed first.

        +

        Especially if you only have a few tasks you also could place these + tasks directly under the project tag (since Ant 1.6.0):

        +
        +<project>
        +    <tstamp/>
        +</project>
        + +

        If the depends attribute and + the if/unless attribute are set, + the depends attribute is executed first.

        A target has the following attributes:

        - +
        - - - + + + - - - + + + - - + - + - - + - + true. + - - + - + false. + - - - + + + - - + - + since Ant 1.8.0. + - - + - +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        namethe name of the target.Yesnamethe name of the target.Yes
        dependsa comma-separated list of names of targets on + dependsa comma-separated list of names of targets on which this target depends.NoNo
        ifthe name of the property that must be set in + ifthe name of the property that must be set in order for this target to execute, or something evaluating to - true.NoNo
        unlessthe name of the property that must not be set + unlessthe name of the property that must not be set in order for this target to execute, or something evaluating to - false.NoNo
        descriptiona short description of this target's function.Nodescriptiona short description of this target's function.No
        extensionOfAdds the current target to the depends list of + extensionOfAdds the current target to the depends list of the named extension-point. - since Ant 1.8.0.NoNo
        onMissingExtensionPointWhat to do if this target tries to extend a + onMissingExtensionPointWhat to do if this target tries to extend a missing - extension-point. ("fail", - "warn", "ignore"). - since Ant 1.8.2.No. Not allowed unless - extensionOf is present. Defaults to fail. + extension-point. (fail, + warn, ignore). + since Ant 1.8.2.No; not allowed unless + extensionOf is present, defaults to fail.

        A target name can be any alphanumeric string valid in the - encoding of the XML file. The empty string "" is in this - set, as is comma "," and space " ". Please - avoid using these, as they will not be supported in future Ant - versions because of all the confusion they cause on command line and IDE. IDE support of - unusual target names, or any target name containing spaces, varies - with the IDE.

        - -

        Targets beginning with a hyphen such - as "-restart" are valid, and can be used to - name targets that should not be called directly from the command - line.
        - For Ants main class every option starting with hyphen is an - option for Ant itself and not a target. For that reason calling these - target from command line is not possible. On the other hand IDEs usually - don't use Ants main class as entry point and calling them from the IDE - is usually possible.

        - -

        Extension-Points

        - -

        since Ant 1.8.0.

        - -

        Extension-Points are similar to targets in that they have a name and - a depends list and can be executed from the command line. Just - like targets they represent a state during the build process.

        + encoding of the XML file. The empty string is in this set, + as is comma , and space  . Please avoid using + these, as they will not be supported in future Ant versions + because of all the confusion they cause on command line and + IDE. IDE support of unusual target names, or any target name + containing spaces, varies with the IDE.

        + +

        Targets beginning with a hyphen such as -restart are + valid, and can be used to name targets that should not be called + directly from the command line.
        + For Ant's main class every option starting with hyphen is an + option for Ant itself and not a target. For that reason calling + these targets from command line is not possible. On the other + hand, IDEs usually don't use Ant's main class as entry point and + calling them from the IDE is usually possible.

        + +

        Extension-Points

        + +

        Since Ant 1.8.0.

        + +

        Extension-Points are similar to targets in that they have a name + and a depends list and can be executed from the command + line. Just like targets they represent a state during the build + process.

        Unlike targets they don't contain any tasks, their main purpose is to collect targets that contribute to the desired state in - their depends list.

        + their depends list.

        -

        Targets can add themselves to an extension-points's depends list via - their extensionOf attribute. The targets that add themselves will be - added after the targets of the explicit depends-attribute of the - extension-point, if multiple targets add themselves, their relative - order is not defined.

        +

        Targets can add themselves to an + extension-point's depends list via + their extensionOf attribute. The targets that add + themselves will be added after the targets of the + explicit depends attribute of the extension-point, if + multiple targets add themselves, their relative order is not + defined.

        The main purpose of an extension-point is to act as an extension point for build files designed to be imported. In the imported - file an extension-point defines a state that must be reached and - targets from other build files can join the depends list of said - extension-point in order to contribute to that state.

        + file, an extension-point defines a state that must be reached and + targets from other build files can join the depends + list of said extension-point in order to contribute to that + state.

        For example your imported build file may need to compile code, it might look like:

        -
        +
         <target name="create-directory-layout">
            ...
         </target>
        @@ -271,30 +269,26 @@
                       depends="create-directory-layout"/>
         <target name="compile" depends="ready-to-compile">
            ...
        -</target>
        -
        - -
        Call-Graph:  create-directory-layout --> 'empty slot' --> compile
        +</target> +
        Call-Graph:  create-directory-layout → 'empty slot' → compile

        And you need to generate some source before compilation, then in your main build file you may use something like

        -
        +
         <target name="generate-sources"
                 extensionOf="ready-to-compile">
            ...
        -</target>
        -
        - -
        Call-Graph:  create-directory-layout --> generate-sources  --> compile
        +</target> +
        Call-Graph:  create-directory-layout → generate-sources  → compile
        -

        This will ensure that the generate-sources target is - executed before the compile target.

        +

        This will ensure that the generate-sources target is + executed before the compile target.

        Don't rely on the order of the depends list, - if generate-sources depends - on create-directory-layout then it must explicitly depend + if generate-sources depends + on create-directory-layout then it must explicitly depend on it via its own depends attribute.

        diff -Nru ant-1.9.10/manual/tasklist.html ant-1.10.3/manual/tasklist.html --- ant-1.9.10/manual/tasklist.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/tasklist.html 2018-03-24 12:37:12.000000000 +0000 @@ -34,162 +34,163 @@

        Tasks

        diff -Nru ant-1.9.10/manual/Tasks/antcall.html ant-1.10.3/manual/Tasks/antcall.html --- ant-1.9.10/manual/Tasks/antcall.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/antcall.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,156 +24,137 @@ -

        AntCall

        +

        AntCall

        Description

        -

        Call another target within the same buildfile optionally -specifying some properties (params in this context). This -task must not be used outside of a target.

        - -

        By default, all of the properties of the current project will be -available in the new project. Alternatively, you can -set the inheritAll attribute to false and only -"user" properties (i.e., those passed on the command-line) -will be passed to the new project. In either case, the set of -properties passed to the new project will override the properties that -are set in the new project (See also the property task).

        -

        You can also set properties in the new project from the old project -by using nested param tags. These properties are always passed -to the new project and any project created in that project -regardless of the setting of inheritAll. This allows you to -parameterize your subprojects. Properties defined on the command line -can not be overridden by nested <param> elements.

        - -

        When more than one nested <param> element - would set a property of the same name, the one declared last will - win. This is for backwards compatibility reasons even so it is - different from the way <property> tasks in build - files behave.

        - -

        Nested <reference>; elements can -be used to copy references from the calling project to the new -project, optionally under a different id. References taken from -nested elements will override existing references that have been -defined outside of targets in the new project - but not those defined -inside of targets.

        - -

        -When a target is invoked by antcall, all of its dependent targets will -also be called within the context of any new parameters. For example. if -the target "doSomethingElse" depended on the target "init", then the -antcall of "doSomethingElse" will call "init" during the call. -Of course, any properties defined in the antcall task or inherited from the calling target -will be fixed and not overridable in the init task--or indeed in the "doSomethingElse" task. -

        - -

        The called target(s) are run in a new project; be aware that this -means properties, references, etc. set by called targets will not -persist back to the calling project.

        +

        Call another target within the same buildfile optionally specifying some properties (params in +this context). This task must not be used outside of a target.

        -

        If the build file changes after you've started the build, the -behavior of this task is undefined.

        +

        By default, all of the properties of the current project will be available in the new project. +Alternatively, you can set the inheritAll attribute to false and only +"user" properties (i.e., those passed on the command-line) will be passed to the new +project. In either case, the set of properties passed to the new project will override the +properties that are set in the new project (see also the property +task).

        +

        You can also set properties in the new project from the old project by using +nested <param> tags. These properties are always passed to the new project and +any project created in that project regardless of the setting of inheritAll. This allows +you to parameterize your subprojects. Properties defined on the command line can not be overridden +by nested <param> elements.

        + +

        When more than one nested <param> element would set a property of the same +name, the one declared last will win. This is for backwards compatibility reasons even so it is +different from the way <property> tasks in build files behave.

        + +

        Nested <reference> elements can be used to copy +references from the calling project to the new project, optionally under a different id. +References taken from nested elements will override existing references that have been defined +outside of targets in the new project—but not those defined inside of targets.

        + +

        When a target is invoked by antcall, all of its dependent targets will also be +called within the context of any new parameters. For example. if the target doSomethingElse; +depended on the target init, then the antcall of doSomethingElse will +call init during the call. Of course, any properties defined in the antcall +task or inherited from the calling target will be fixed and not overridable in the init +target—or indeed in the doSomethingElse target.

        + +

        The called target(s) are run in a new project; be aware that this means properties, references, +etc. set by called targets will not persist back to the calling project.

        + +

        If the build file changes after you've started the build, the behavior of this task is +undefined.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        targetThe target to execute.YestargetThe target to execute.Yes
        inheritAllIf true, pass all properties to the new Apache Ant - project. Defaults to true. - NoinheritAllIf true, pass all properties to the new Apache Ant project.No; defaults to true
        inheritRefsIf true, pass all references to the - new Ant project. Defaults to false.NoinheritRefsIf true, pass all references to the new Ant project.No; defaults to false

        Note on inheritRefs

        -

        <antcall> will not override existing references, -even if you set inheritRefs to true. As the called build -files is the same build file as the calling one, this means it will -not override any reference set via an id attribute at -all. The only references that can be inherited by the child project -are those defined by nested <reference> elements or -references defined by tasks directly (not using the id -attribute).

        +

        <antcall> will not override existing references, even if you +set inheritRefs to true. As the called build files is the same build file as the calling +one, this means it will not override any reference set via an id attribute at all. The +only references that can be inherited by the child project are those defined by +nested <reference> elements or references defined by tasks directly (not using +the id attribute).

        Parameters specified as nested elements

        param

        -

        Specifies the properties to set before running the specified target. See property for usage guidelines.
        -These properties become equivalent to properties you define on -the command line. These are special properties and they will always get passed -down, even through additional <*ant*> tasks with inheritall set to -false (see above). -

        +

        Specifies the properties to set before running the specified +target. See property for usage guidelines.
        These properties become +equivalent to properties you define on the command line. These are special properties and they will +always get passed down, even through additional <*ant*> tasks +with inheritAll set to false (see above).

        -

        reference

        -

        Used to choose references that shall be copied into the new project, -optionally changing their id.

        +

        reference

        +

        Used to choose references that shall be copied into the new project, optionally changing +their id.

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        refidThe id of the reference in the calling project.YesrefidThe id of the reference in the calling project.Yes
        torefidThe id of the reference in the new project.No, defaults to the value of refid.torefidThe id of the reference in the new project.No; defaults to the value of refid

        propertyset

        -

        You can specify a set of properties to be copied into the new -project with propertysets.

        +

        Since Ant 1.6.

        -

        since Ant 1.6.

        +

        You can specify a set of properties to be copied into the new project +with propertysets.

        target

        +

        Since Ant 1.6.3.

        -

        You can specify multiple targets using nested <target> elements -instead of using the target attribute. These will be executed as if -Ant had been invoked with a single target whose dependencies are the -targets so specified, in the order specified.

        - - - - - +

        You can specify multiple targets using nested <target> elements instead of +using the target attribute. These will be executed as if Ant had been invoked with a +single target whose dependencies are the targets so specified, in the order specified.

        +
        AttributeDescriptionRequired
        + + + + - - - + + +
        AttributeDescriptionRequired
        nameThe name of the called target.YesnameThe name of the called target.Yes
        -

        since Ant 1.6.3.

        Examples

        -
        +
         <target name="default">
           <antcall target="doSomethingElse">
             <param name="param1" value="value"/>
        @@ -182,20 +163,16 @@
         
         <target name="doSomethingElse">
           <echo message="param1=${param1}"/>
        -</target>
        -
        -

        Will run the target 'doSomethingElse' and echo 'param1=value'.

        +</target> +

        Will run the target doSomethingElse and echo param1=value.

        -
        +
         <antcall ... >
           <reference refid="path1" torefid="path2"/>
        -</antcall>
        -
        - -

        will copy the parent's definition of path1 into the -new project using the id path2.

        - +</antcall> +

        will copy the parent's definition of path1 into the new project using +the id path2.

        diff -Nru ant-1.9.10/manual/Tasks/ant.html ant-1.10.3/manual/Tasks/ant.html --- ant-1.9.10/manual/Tasks/ant.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/ant.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,313 +24,276 @@ -

        Ant

        +

        Ant

        Description

        -

        Runs Apache Ant on a supplied buildfile. This can be used to build -subprojects. This task must not be used outside of a -target if it invokes the same build file it is part +

        Runs Apache Ant on a supplied buildfile. This can be used to build subprojects. This +task must not be used outside of a target if it invokes the same build file it is part of.

        -

        When the antfile attribute is omitted, the file "build.xml" -in the supplied directory (dir attribute) is used.

        -

        If no target attribute is supplied, the default target of the new project is -used.

        -

        By default, all of the properties of the current project will be -available in the new project. Alternatively, you can set the -inheritAll attribute to false and only -"user" properties (i.e., those passed on the command-line) -will be passed to the new project. In either case, the set of -properties passed to the new project will override the properties that -are set in the new project (See also the property task).

        - -

        You can also set properties in the new project from the old project -by using nested property tags. These properties are always passed -to the new project and any project created in that project -regardless of the setting of inheritAll. This allows you to -parameterize your subprojects.

        - -

        When more than one nested <property> element - would set a property of the same name, the one declared last will - win. This is for backwards compatibility reasons even so it is - different from the way <property> tasks in build - files behave.

        +

        When the antfile attribute is omitted, the file build.xml in the supplied +directory (dir attribute) is used.

        +

        If no target attribute is supplied, the default target of the new project is used.

        +

        By default, all of the properties of the current project will be available in the new project. +Alternatively, you can set the inheritAll attribute to false and only +"user" properties (i.e., those passed on the command-line) will be passed to the new +project. In either case, the set of properties passed to the new project will override the +properties that are set in the new project (See also the property +task).

        + +

        You can also set properties in the new project from the old project by using +nested property tags. These properties are always passed to the new project and any +project created in that project regardless of the setting of inheritAll. This allows you +to parameterize your subprojects.

        + +

        When more than one nested <property> element would set a property of the same +name, the one declared last will win. This is for backwards compatibility reasons even though it is +different from the way <property> tasks in build files behave.

        Properties defined on the command line cannot be overridden by - nested <property> elements. Since Ant - 1.8.0. the same is true for nested structures - of <ant> tasks: if a build file A - invokes B via an <ant> task setting a - property with a nested <property> element - and B contains an <ant> tasks - invoking C, C will see the value set - in A, even if B used a - nested <property> element as well.

        - -

        References to data types can also be passed to the new project, but -by default they are not. If you set the inheritrefs attribute to -true, all references will be copied, but they will not override -references defined in the new project.

        - -

        Nested <reference> elements -can also be used to copy references from the calling project to the -new project, optionally under a different id. References taken from -nested elements will override existing references that have been -defined outside of targets in the new project - but not those defined -inside of targets.

        +nested <property> elements. Since Ant 1.8.0, the same is true for +nested structures of <ant> tasks: if a build file A +invokes B via an <ant> task setting a property with a +nested <property> element and B contains an <ant> +tasks invoking C, C will see the value set in A, even +if B used a nested <property> element as well.

        + +

        References to data types can also be passed to the new project, but by default they are not. If +you set the inheritrefs attribute to true, all references will be copied, but they +will not override references defined in the new project.

        + +

        Nested <reference> elements can also be used to copy +references from the calling project to the new project, optionally under a different id. +References taken from nested elements will override existing references that have been defined +outside of targets in the new project—but not those defined inside of targets.

        Parameters

        - +
        - - - - - - - - - - - - + + + + + + + + + + + - + - - - + + + - - + - + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequired
        antfilethe buildfile to use. Defaults to - "build.xml". This file is expected to be a filename - relative to the dir attribute given.No
        dirthe directory to use as a basedir for the new Ant - project (unless useNativeBasedir is set to true). - Defaults to the current project's basedir, unless - inheritall has been set to false, in which case it doesn't - have a default value. This will override the basedir - setting of the called project.
        - Also serves as the directory to resolve the antfile and output - attribute's values (if any). +
        AttributeDescriptionRequired
        antfilethe buildfile to use. This file is expected to be a filename relative to the dir + attribute given.No; defaults to build.xml
        dirthe directory to use as a basedir for the new Ant project + (unless useNativeBasedir is set to true). This will override + the basedir setting of the called project.
        Also serves as the directory to + resolve the antfile and output attribute's values (if any).
        NoNo; defaults to the current project's basedir, unless inheritall has + been set to false, in which case it doesn't have a default value
        targetthe target of the new Ant project that should be executed. - Defaults to the new project's default target.Notargetthe target of the new Ant project that should be executed.No; defaults to the new project's default target
        outputFilename to write the ant output to. This is - relative to the value of the dir attribute if it has been set or - to the base directory of the current project otherwise. + outputFilename to write the Ant output to. This is relative to the value of the dir + attribute if it has been set or to the basedir of the current project otherwise. NoNo
        inheritAllIf true, pass all properties to the - new Ant project. Defaults to true.NoinheritAllIf true, pass all properties to the new Ant project.No; defaults to true
        inheritRefsIf true, pass all references to the - new Ant project. Defaults to false.NoinheritRefsIf true, pass all references to the new Ant project.No; defaults to false
        useNativeBasedirIf set to true, the child build will use the same - basedir as it would have used when run from the command line - (i.e. the basedir one would expect when looking at the child - build's buildfile). Defaults to false. since - Ant 1.8.0NouseNativeBasedirIf set to true, the child build will use the same basedir as it would have + used when run from the command line (i.e. the basedir one would expect when looking + at the child build's buildfile). Since Ant 1.8.0No; defaults to false

        Parameters specified as nested elements

        property

        -

        See the description of the property -task.
        -These properties become equivalent to properties you define on -the command line. These are special properties and they will always get passed -down, even through additional <*ant*> tasks with inheritall set to -false (see above).
        -Note that the refid attribute points to a -reference in the calling project, not in the new one.

        - -

        reference

        -

        Used to choose references that shall be copied into the new project, -optionally changing their id.

        - - - - - - - - - - - - - - - - +

        See the description of the property task.
        These properties +become equivalent to properties you define on the command line. These are special properties and +they will always get passed down, even through additional <*ant*> tasks +with inheritAll set to false (see above).
        Note that the refid +attribute points to a reference in the calling project, not in the new one.

        + +

        reference

        +

        Used to choose references that shall be copied into the new project, optionally changing +their id.

        + +
        AttributeDescriptionRequired
        refidThe id of the reference in the calling project.Yes
        torefidThe id of the reference in the new project.No, defaults to the value of refid.
        + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        refidThe id of the reference in the calling project.Yes
        torefidThe id of the reference in the new project.No; defaults to the value of refid

        propertyset

        -

        You can specify a set of properties to be copied into the new -project with propertysets.

        +

        Since Ant 1.6.

        -

        since Ant 1.6.

        +

        You can specify a set of properties to be copied into the new project +with propertysets.

        target

        +

        Since Ant 1.6.3.

        -

        You can specify multiple targets using nested <target> elements -instead of using the target attribute. These will be executed as if -Ant had been invoked with a single target whose dependencies are the -targets so specified, in the order specified.

        - - - - - +

        You can specify multiple targets using nested <target> elements instead of +using the target attribute. These will be executed as if Ant had been invoked with a +single target whose dependencies are the targets so specified, in the order specified.

        +
        AttributeDescriptionRequired
        + + + + - - - + + +
        AttributeDescriptionRequired
        nameThe name of the called target.YesnameThe name of the called target.Yes
        -

        since Ant 1.6.3.

        Basedir of the new project

        -

        If you set useNativeBasedir to true, the basedir of - the new project will be whatever the basedir attribute of - the <project> element of the new project says (or - the new project's directory if the there is no basedir attribute) - - no matter what any other attribute of this task says and no matter - how deeply nested into levels of - <ant> invocations this task lives.

        - -

        If you haven't set useNativeBasedir or set it to - false, the following rules apply:

        - -

        The basedir value of the new project is affected by the two - attributes dir and inheritall as well as - the <ant> task's history. The current behaviour - is known to be confusing but cannot be changed without breaking - backwards compatibility in subtle ways.

        - -

        If the <ant> task is in a "top level" build - file, i.e. the project containing the <ant> task - has not itself been invoked as part of a - different <ant> (or <antcall>) - task "higher up", the following table shows the details:

        - - - - - - - - - - - - - - - - - - - - - - - - - - +

        If you set useNativeBasedir to true, the basedir of the new project will be +whatever the basedir attribute of the <project> element of the new +project says (or the new project's directory if the there is no basedir +attribute)—no matter what any other attribute of this task says and no matter how deeply +nested into levels of <ant> invocations this task lives.

        + +

        If you haven't set useNativeBasedir or set it to false, the following rules +apply:

        + +

        The basedir value of the new project is affected by the two attributes, dir +and inheritall, as well as the <ant> task's history. The current +behaviour is known to be confusing but cannot be changed without breaking backwards compatibility in +subtle ways.

        + +

        If the <ant> task is in a "top level" build file, i.e. the project containing +the <ant> task has not itself been invoked as part of a +different <ant> (or <antcall>) task "higher up", the following +table shows the details:

        + +
        dir attributeinheritAll attributenew project's basedir
        value providedtruevalue of dir attribute
        value providedfalsevalue of dir attribute
        omittedtruebasedir of calling project (the one whose build - file contains the <ant> task).
        omittedfalsebasedir attribute of the <project> element - of the new project
        + + + + + + + + + + + + + + + + + + + + + + + +
        dir attributeinheritAll attributenew project's basedir
        value providedtruevalue of dir attribute
        value providedfalsevalue of dir attribute
        omittedtruebasedir of calling project (the one whose build + file contains the <ant> task).
        omittedfalsebasedir attribute of the <project> element + of the new project
        -

        If on the other hand the <ant> task is already - nested into another invocation, the parent invocation's settings - affect the outcome of the basedir value. The current task's dir - attribute will always win, but if the dir attribute has been omitted - an even more complex situation arises:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

        If on the other hand the <ant> task is already nested into another invocation, +the parent invocation's settings affect the outcome of the basedir value. The current +task's dir attribute will always win, but if the dir attribute has been +omitted an even more complex situation arises:

        + +
        parent dir attributeparent inheritAll attributecurrent inheritAll attributenew project's basedir
        value providedanyanyvalue of parent's dir attribute
        omittedtruetruebasedir of parent project (the one whose build - file called the build file that contains - the current <ant> task).
        omittedtruefalsebasedir of parent project (the one whose build - file called the build file that contains - the current <ant> task).
        omittedfalsetruebasedir of calling project (the one whose build - file contains the current <ant> task).
        omittedfalsefalsebasedir attribute of the <project> element - of the new project
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        parent dir attributeparent inheritAll attributecurrent inheritAll attributenew project's basedir
        value providedanyanyvalue of parent's dir attribute
        omittedtruetruebasedir of parent project (the one whose build file called the build file that + contains the current <ant> task).
        omittedtruefalsebasedir of parent project (the one whose build file called the build file that + contains the current <ant> task).
        omittedfalsetruebasedir of calling project (the one whose build file contains the + current <ant> task).
        omittedfalsefalsebasedir attribute of the <project> element of the new + project
        -

        If you add even deeper levels of nesting, things get even more - complicated and you need to apply the above table recursively.

        +

        If you add even deeper levels of nesting, things get even more complicated and you need to apply +the above table recursively.

        -

        If the basedir of the outer most build has been specified as a - property on the command line (i.e. -Dbasedir=some-value - or a -propertyfile argument) the value provided will - get an even higher priority. For any <ant> task - that doesn't specify a dir attribute, the new project's basedir will - be the value specified on the command line - no matter how deeply - nested into layers of build files the task may be.

        - -

        The same happens if the basedir is specified as a - nested <property> of an <ant> - task. The basedir of build files started at deeper levels will be - set to the specified value of the property element unless the - corresponding Ant tasks set the dir attribute explicitly.

        +

        If the basedir of the outermost build has been specified as a property on the command +line (i.e. -Dbasedir=some-value or a -propertyfile argument) the value +provided will get an even higher priority. For any <ant> task that doesn't +specify a dir attribute, the new project's basedir will be the value specified +on the command line—no matter how deeply nested into layers of build files the task may +be.

        + +

        The same happens if the basedir is specified as a nested <property> +of an <ant> task. The basedir of build files started at deeper levels +will be set to the specified value of the property element unless the corresponding Ant tasks set +the dir attribute explicitly.

        Examples

        -
        +
         <ant antfile="subproject/subbuild.xml" target="compile"/>
         
         <ant dir="subproject"/>
        @@ -342,72 +305,55 @@
         
         <ant inheritAll="false" antfile="subproject/subbuild.xml">
           <property name="output.type" value="html"/>
        -</ant>
        -
        +</ant>

        These lines invoke the same build file:

        -
        -<ant antfile="sub1/sub2/build.xml" />
        -<ant antfile="sub2/build.xml" dir="sub1" />
        -<ant antfile="build.xml" dir="sub1/sub2" />
        -
        +
        +<ant antfile="sub1/sub2/build.xml"/>
        +<ant antfile="sub2/build.xml" dir="sub1"/>
        +<ant antfile="build.xml" dir="sub1/sub2"/>
        -

        The build file of the calling project defines some -<path> elements like this:

        +

        The build file of the calling project defines some <path> elements like +this:

        -
        +
         <path id="path1">
             ...
         </path>
         <path id="path2">
             ...
        -</path>
        -
        +</path> + +

        and the called build file (subbuild.xml) also defines a <path> +with the id path1, but path2 is not defined:

        + +
        <ant antfile="subbuild.xml" inheritrefs="true"/>
        -

        and the called build file (subbuild.xml) also defines -a <path> with the id path1, but -path2 is not defined:

        - -
        -<ant antfile="subbuild.xml" inheritrefs="true"/>
        -
        - -

        will not override subbuild's definition of -path1, but make the parent's definition of -path2 available in the subbuild.

        - -
        -<ant antfile="subbuild.xml"/>
        -
        +

        will not override subbuild's definition of path1, but make the parent's +definition of path2 available in the subbuild.

        + +
        <ant antfile="subbuild.xml"/>

        as well as

        -
        -<ant antfile="subbuild.xml" inheritrefs="false"/>
        -
        +
        <ant antfile="subbuild.xml" inheritrefs="false"/>
        -

        will neither override path1 nor copy -path2.

        +

        will neither override path1 nor copy path2.

        -
        +
         <ant antfile="subbuild.xml" inheritrefs="false">
           <reference refid="path1"/>
        -</ant>
        -
        +</ant> -

        will override subbuild's definition of -path1.

        +

        will override subbuild's definition of path1.

        -
        +
         <ant antfile="subbuild.xml" inheritrefs="false">
           <reference refid="path1" torefid="path2"/>
        -</ant>
        -
        - -

        will copy the parent's definition of path1 into the -new project using the id path2.

        - +</ant> +

        will copy the parent's definition of path1 into the new project using +the id path2.

        diff -Nru ant-1.9.10/manual/Tasks/antlr.html ant-1.10.3/manual/Tasks/antlr.html --- ant-1.9.10/manual/Tasks/antlr.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/antlr.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,180 +24,125 @@ -

        ANTLR

        +

        ANTLR

        Description

        -

        - Invokes the ANTLR Translator generator - on a grammar file. -

        -

        - To use the ANTLR task, set the target attribute to the name of the - grammar file to process. Optionally, you can also set the - outputdirectory to write the generated file to a specific directory. - Otherwise ANTLR writes the generated files to the directory containing - the grammar file. -

        -

        - This task only invokes ANTLR if the grammar file (or the - supergrammar specified by the glib attribute) is newer than the - generated files. -

        -

        Note: This task depends on external libraries not -included in the Apache Ant distribution. See Library Dependencies -for more information.

        -

        Antlr 2.7.1 Note: - - To successfully run ANTLR, your best option is probably to build the whole - jar with the provided script mkalljar and drop the resulting jar (about 300KB) - into ${ant.home}/lib. Dropping the default jar (70KB) is probably not enough - for most needs and your only option will be to add ANTLR home directory - to your classpath as described in ANTLR install.html document. - -

        -

        Antlr 2.7.2 Note: - - Instead of the above, you will need antlrall.jar that can be created - by the antlr-all.jar target of the Makefile provided with the - download. - -

        +

        Invokes the ANTLR Translator generator on a +grammar file.

        +

        To use the ANTLR task, set the target attribute to the name of the grammar file to +process. Optionally, you can also set the outputdirectory to write the generated file to +a specific directory. Otherwise ANTLR writes the generated files to the directory containing the +grammar file.

        +

        This task only invokes ANTLR if the grammar file (or the supergrammar specified by +the glib attribute) is newer than the generated files.

        +

        Note: This task depends on external libraries not included in the Apache Ant +distribution. See Library Dependencies for more +information.

        +

        Antlr 2.7.2 Note: You will need antlrall.jar that can be created by +the antlr-all.jar target of the Makefile provided with the download.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        targetThe grammar file to process.YestargetThe grammar file to process.Yes
        outputdirectory - The directory to write the generated files to. If not set, the files - are written to the directory containing the grammar file. - NooutputdirectoryThe directory to write the generated files to.No; defaults to the directory containing the grammar file
        glib - An optional super grammar file that the target grammar overrides. This - feature is only needed for advanced vocabularies. - NoglibAn optional super grammar file that the target grammar overrides. This feature is only + needed for advanced vocabularies.No
        debug - When set to "yes", this flag adds code to the generated parser that will - launch the ParseView debugger upon invocation. The default is "no". -
        - Note: ParseView is a separate component that needs to be installed or your - grammar will have compilation errors. -
        NodebugWhen set to yes, this flag adds code to the generated parser that will launch the + ParseView debugger upon invocation.
        Note: ParseView is a separate component that needs + to be installed or your grammar will have compilation errors.
        No; default is no
        html - Emit an html version of the grammar with hyperlinked actions. - NohtmlEmit an HTML version of the grammar with hyperlinked actions if set to yes.No; default is no
        diagnostic - Generates a text file with debugging information based on the target grammar. - NodiagnosticGenerate a text file with debugging information based on the target grammar if set + to yes.No; default is no
        trace - Forces all rules to call traceIn/traceOut if set to "yes". - The default is "no". - NotraceForce all rules to call traceIn/traceOut if set to yes.No; default is no
        traceParser - Only forces parser rules to call traceIn/traceOut if set to "yes". - The default is "no". - NotraceParserOnly force parser rules to call traceIn/traceOut if set to yes.No; default is no
        traceLexer - Only forces lexer rules to call traceIn/traceOut if set to "yes". - The default is "no". - NotraceLexerOnly force lexer rules to call traceIn/traceOut if set to yes.No; default is no
        traceTreeWalker - Only forces tree walker rules to call traceIn/traceOut if set to - "yes". The default is "no". - NotraceTreeWalkerOnly force tree walker rules to call traceIn/traceOut if set to yes.No; default is no
        dirThe directory to invoke the VM in. NodirThe directory to invoke JVM in.No
        -

        Nested Elements

        +

        Parameters specified as nested elements

        -

        ANTLR supports a nested <classpath> -element, that represents a PATH like -structure. It is given as a convenience if you have to specify -the original ANTLR directory. In most cases, dropping the appropriate -ANTLR jar in the normal Ant lib repository will be enough.

        +

        The task supports a nested <classpath> element, that represents +a path-like structure. It is given as a convenience if you have to +specify the original ANTLR directory. In most cases, dropping the appropriate ANTLR jar in the +normal Ant lib repository will be enough.

        jvmarg

        -

        Additional parameters may be passed to the new -VM via nested <jvmarg> attributes, for example:

        +

        Additional parameters may be passed to the new JVM via +nested <jvmarg> attributes, for example:

         <antlr target="...">
           <jvmarg value="-Djava.compiler=NONE"/>
           ...
        -</antlr>
        -
        +</antlr> -

        would run ANTLR in a VM without JIT.

        +

        would run ANTLR in a JVM without JIT.

        -

        <jvmarg> allows all attributes described in Command line arguments.

        +

        <jvmarg> allows all attributes described +in Command line arguments.

        Example

        -
        +
         <antlr
             target="etc/java.g"
        -    outputdirectory="build/src"
        -/>
        -
        -

        - This invokes ANTLR on grammar file etc/java.g, writing the generated - files to build/src. -

        - + outputdirectory="build/src"/> +

        This invokes ANTLR on grammar file etc/java.g, writing the generated files +to build/src.

        - diff -Nru ant-1.9.10/manual/Tasks/antstructure.html ant-1.10.3/manual/Tasks/antstructure.html --- ant-1.9.10/manual/Tasks/antstructure.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/antstructure.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,55 +24,49 @@ -

        AntStructure

        -

        Description

        +

        AntStructure

        +

        Description

        -

        Generates an DTD for Apache Ant buildfiles which contains information -about all tasks currently known to Ant.

        +

        Generates an DTD for Apache Ant buildfiles which contains information about all tasks currently +known to Ant.

        -

        Actually the DTD will not be a real DTD for buildfiles since Ant's -usage of XML cannot be captured with a DTD. Several elements in Ant -can have different attribute lists depending on the element that -contains them. "fail" for example can be the task or the nested child element of the sound task. Don't consider the -generated DTD something to rely upon.

        - -

        Also note that the DTD generated by this task is incomplete, you can -always add XML entities using <taskdef> or <typedef>. See Actually the DTD will not be a real DTD for buildfiles since Ant's usage of XML cannot be +captured with a DTD. Several elements in Ant can have different attribute lists depending on the +element that contains them. <fail> for example can be a +task or a nested child element of the <sound> +task. Don't consider the generated DTD something to rely upon.

        + +

        Also note that the DTD generated by this task is incomplete, you can always add XML entities +using <taskdef> +or <typedef>. +See here for a way to get around this problem.

        -

        This task doesn't know about required attributes, all will be -listed as #IMPLIED.

        +

        This task doesn't know about required attributes, all will be listed +as #IMPLIED.

        -

        Since Ant 1.7 custom structure printers can be used -instead of the one that emits a DTD. In order to plug in your own -structure, you have to implement the interface -org.apache.tools.ant.taskdefs.AntStructure.StructurePrinter -and <typedef> your class and use the new type as a nested -element of this task - see the example below. +

        Since Ant 1.7 custom structure printers can be used instead of the one that emits a DTD. +In order to plug in your own structure, you have to implement the +interface org.apache.tools.ant.taskdefs.AntStructure.StructurePrinter +and <typedef> your class and use the new type as a nested element of this +task—see the example below.

        Parameters

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        outputfile to write the DTD to.Yesoutputfile to write the DTD to.Yes

        Examples

        -
        -<antstructure output="project.dtd" />
        -
        +
        <antstructure output="project.dtd"/>
        -

        Emitting your own structure instead of a DTD

        +

        Emitting your own structure instead of a DTD

        First you need to implement the interface

        @@ -81,20 +75,18 @@ import org.apache.tools.ant.taskdefs.AntStructure; public class MyPrinter implements AntStructure.StructurePrinter { ... -} - +}

        and then use it via typedef

        -  <typedef name="myprinter" classname="org.example.MyPrinter" />
        -  <antstructure output="project.my">
        -    <myprinter />
        -  </antstructure>
        -
        +<typedef name="myprinter" classname="org.example.MyPrinter"/> +<antstructure output="project.my"> + <myprinter/> +</antstructure> -

        Your own StructurePrinter can accept attributes and nested elements -just like any other Ant type or task.

        +

        Your own StructurePrinter can accept attributes and nested elements just like any other Ant type +or task.

        diff -Nru ant-1.9.10/manual/Tasks/antversion.html ant-1.10.3/manual/Tasks/antversion.html --- ant-1.9.10/manual/Tasks/antversion.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/antversion.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,72 +24,64 @@ -

        Antversion

        +

        Antversion

        +

        Since Ant 1.7.0

        Description

        -

        -Stores the Apache Ant version (when used as task) or checks for a specific Ant version -(when used as condition). -Since Ant 1.7.0 -

        +

        Stores the Apache Ant version (when used as task) or checks for a specific Ant version (when used +as condition).

        - +
        - - - - + + + - - - - + + - - - + + + + - - - - + + + + + + + + +
        AttributeDescriptionRequired (Task)Required (Condition)AttributeDescriptionRequired
        atleastThe version that this at least. - The format is major.minor.point.NoOne of these.TaskCondition
        exactlyThe version that this ant is exactly. - The format is major.minor.point.NoatleastThe version that this Ant is of at least. The format + is major.minor.point.NoExactly one of these
        propertyThe name of the property to set.YesNo (ignored)exactlyThe version that this Ant is of exactly. The format is major.minor.point.No
        propertyThe name of the property to set.YesIgnored
        -

        Examples

        -
        -<antversion property="antversion"/>
        -
        -

        Stores the current Ant version in the property antversion.

        - -
        -<antversion property="antversion" atleast="1.6"/>
        -
        -

        Stores the Ant version in the property antversion if the current Ant version is 1.6.0 -or higher. Otherwise the property remains unset.

        - -
        -<antversion property="ant-is-exact-7" exactly="1.7.0"/>
        -
        -

        Sets the property ant-is-exact-7 if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.0 +

        <antversion property="antversion"/>
        +

        Stores the current Ant version in the property antversion.

        + +
        <antversion property="antversion" atleast="1.6"/>
        +

        Stores the Ant version in the property antversion if the current Ant version is +1.6.0 or higher. Otherwise the property remains unset.

        + +
        <antversion property="ant-is-exact-7" exactly="1.7.0"/>
        +

        Sets the property ant-is-exact-7 if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.1 would match.

        -
        +
         <condition property="Ant17isOnline">
           <and>
             <antversion exactly="1.7.0"/>
             <http url="http://ant.apache.org"/>
           </and>
        -</condition>
        -
        -

        Sets Ant17isOnline if Ant 1.7.0 is running and can get a non-error-response from -the Ant homepage.

        +</condition> +

        Sets Ant17isOnline if Ant 1.7.0 is running and can get a non-error-response from the +Ant homepage.

        diff -Nru ant-1.9.10/manual/Tasks/apply.html ant-1.10.3/manual/Tasks/apply.html --- ant-1.9.10/manual/Tasks/apply.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/apply.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,383 +24,333 @@ -

        Apply/ExecOn

        -

        The name execon is deprecated and only kept for backwards -compatibility.

        +

        Apply

        +

        The name execon is deprecated and only kept for backwards +compatibility.

        Description

        -

        Executes a system command. When the os attribute is specified, then -the command is only executed when Apache Ant is run on one of the specified operating -systems.

        - -

        The files and/or directories of a number of Resource Collections -– including but not restricted to - FileSets, - DirSets - (since Ant 1.6) or - FileLists - (since Ant 1.6) -– - are passed as arguments to the system command.

        -

        If you specify a nested mapper, -the timestamp of each source file is compared to the timestamp of a -target file which is defined by the nested mapper element and searched -for in the given dest, if specified.

        -

        At least one fileset or filelist is required, -and you must not specify more than one mapper.

        - -

        Note that you cannot interact with the forked program, the only way -to send input to it is via the input and inputstring attributes.

        - -

        Running Ant as a background process on - Unix(-like) systems

        - -

        If you run Ant as a background process (like ant &) - and use the <apply> task with spawn - set to false, you must provide explicit input to the - forked process or Ant will be suspended because it tries to read - from the standard input.

        +

        Executes a system command. When the os attribute is specified, then the command is +only executed when Apache Ant is run on one of the specified operating systems.

        + +

        The files and/or directories of a number of Resource +Collections –- including but not restricted +to FileSets, DirSets +(since Ant 1.6) or FileLists (since Ant 1.6) +–- are passed as arguments to the system command.

        +

        If you specify a nested mapper, the timestamp of each source +file is compared to the timestamp of a target file which is defined by the +nested mapper element and searched for in the given dest, if specified.

        +

        At least one fileset or filelist is required, and you must not specify +more than one mapper.

        + +

        Note that you cannot interact with the forked program, the only way to send input to it is via +the input and inputstring attributes.

        + +

        Running Ant as a background process on Unix(-like) systems

        + +

        If you run Ant as a background process (like ant &) and use +the <apply> task with spawn set to false, you must provide +explicit input to the forked process or Ant will be suspended because it tries to read from the +standard input.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        executablethe command to execute without any command line - arguments.Yesexecutablethe command to execute without any command line arguments.Yes
        destthe directory where the command is expected to place - target files when it is executed. This attribute is valid only when used - in conjunction with a nested mapper; if omitted, the target filenames - returned by the mapper will be interpreted as absolute paths.Nodestthe directory where the command is expected to place target files when it is executed.No; ignored unless a nested mapper is specified; by default, the target filenames returned + by the mapper will be interpreted as absolute paths
        spawnwhether or not you want the commands to be spawned.
        - If you spawn a command, its output will not be logged by ant.
        - The input, output, error, and result property settings are not active when spawning a process.
        - since Ant 1.6 -
        No, default is falsespawnwhether or not you want the commands to be spawned.
        If you spawn a command, its output + will not be logged by Ant.
        The input, output, error, and result property settings are not + active when spawning a process.
        since Ant 1.6
        No; default is false
        dirthe directory in which the command should be executed.No.
        - Note: the default used when dir has not been - specified depends on the vmlauncher attribute. If - vmlauncher is true the task will use - the current working directory, otherwise it uses the project's basedir. -
        dirthe directory in which the command should be executed.No; if vmlauncher is true, defaults to the current working directory, + otherwise the project's basedir
        relativewhether the filenames should be passed on the - command line as relative pathnames (relative to the base directory - of the corresponding fileset/list for source files or the - dest attribute for target files).No, default is falserelativewhether the filenames should be passed on the command line as relative pathnames (relative + to the base directory of the corresponding fileset/list for source files or + the dest attribute for target files).No; default is false
        forwardslashwhether the file names should be passed - with forward slashes even if the operating system requires other - file separator. The option is ignored if the system file separator - is a forward slash.No, default is falseforwardslashwhether the file names should be passed with forward slashes even if the operating system + requires other file separator. The option is ignored if the system file separator is a forward + slash.No; default is false
        oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
        osfamilyOS family as used in the <os> condition. + osfamilyOS family as used in the <os> condition. since Ant 1.7NoNo
        outputthe file to which the output of the command - should be redirected. If the error stream is not also redirected - to a file or property, it will appear in this output.Nooutputthe file to which the output of the command should be redirected. If the error stream is + not also redirected to a file or property, it will appear in this output.No
        errorThe file to which the standard error of the - command should be redirected. since Ant 1.6NoerrorThe file to which the standard error of the command should be redirected. since Ant + 1.6No
        logErrorThis attribute is used when you wish to see error - output in Ant's log and you are redirecting output to a - file/property. The error output will not be included in the output - file/property. If you redirect error with the "error" or - "errorProperty" attributes, this will have no effect. - since Ant 1.6NologErrorThis attribute is used when you wish to see error output in Ant's log and you are + redirecting output to a file/property. The error output will not be included in the output + file/property. If you redirect error with the error or errorProperty + attributes, this will have no effect. since Ant 1.6No
        appendwhether output should be appended to or overwrite - an existing file. If you set parallel to false, you will probably - want to set this one to true.No, default is falseappendwhether output should be appended to or overwrite an existing file. If you + set parallel to false, you will probably want to set this one + to true.No; default is false
        outputpropertythe name of a property in which the output of the - command should be stored. Unless the error stream is redirected - to a separate file or stream, this property will include the error + outputpropertythe name of a property in which the output of the command should be stored. Unless the + error stream is redirected to a separate file or stream, this property will include the error output.NoNo
        errorpropertyThe name of a property in which the standard error of the - command should be stored. since Ant 1.6NoerrorpropertyThe name of a property in which the standard error of the command should be + stored. since Ant 1.6No
        inputA file from which the executed command's standard - input is taken. This attribute is mutually exclusive with the - inputstring attribute. since Ant 1.6NoinputA file from which the executed command's standard input is taken. This attribute is mutually + exclusive with the inputstring attribute. since Ant 1.6No
        inputstringA string which serves as the input stream for the - executed command. This attribute is mutually exclusive with the - input attribute. since Ant 1.6NoinputstringA string which serves as the input stream for the executed command. This attribute is + mutually exclusive with the input attribute. since Ant 1.6No
        resultpropertythe name of a property in which the return code - of the command should be stored. Only of interest if - failonerror=false. If you set parallel to false, only the result - of the first execution will be stored.Noresultpropertythe name of a property in which the return code of the command should be stored. Only of + interest if failonerror is false. If you set parallel + to false, only the result of the first execution will be stored.No
        timeoutStop the command if it doesn't finish within the - specified time (given in milliseconds).NotimeoutStop the command if it doesn't finish within the specified time (given in + milliseconds).No
        failonerrorStop the buildprocess if the command exits with a - returncode other than 0.NofailonerrorStop the build process if the command exits with a return code other than 0.No; defaults to false
        failifexecutionfailsStop the build if we can't start the program. - Defaults to true. NofailifexecutionfailsStop the build if we can't start the program.No; defaults to true
        skipemptyfilesetsDon't run the command, if no source files have - been found or are newer than their corresponding target - files. Despite its name, this attribute applies to filelists as + skipemptyfilesetsDon't run the command, if no source files have been found or are newer than their + corresponding target files. Despite its name, this attribute applies to filelists as well.No, default is falseNo; default is false
        parallelRun the command only once, appending all files as - arguments. If false, command will be executed once for every file.No, default is falseparallelRun the command only once, appending all files as arguments. If false, command will + be executed once for every file.No; default is false
        typeOne of file, dir or - both. If set to file, only the names of plain - files will be sent to the command. If set to dir, only - the names of directories are considered.
        - Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
        No, default is filetypeOne of file, dir or both. If set to file, only the names of + plain files will be sent to the command. If set to dir, only the names of directories + are considered.
        + Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
        No; default is file
        newenvironmentDo not propagate old environment when new environment - variables are specified.No, default is falsenewenvironmentDo not propagate old environment when new environment variables are specified.No; default is false
        vmlauncherRun command using the Java VM's execution facilities - where available. If set to false the underlying OS's shell, - either directly or through the antRun scripts, will be used. - Under some operating systems, this gives access to facilities - not normally available through the VM including, under Windows, - being able to execute scripts, rather than their associated - interpreter. If you want to specify the name of the - executable as a relative path to the directory given by the - dir attribute, it may become necessary to set vmlauncher to - false as well.No, default is truevmlauncherRun command using the JVM's execution facilities where available. If set to false the + underlying OS's shell, either directly or through the antRun scripts, will be + used. Under some operating systems, this gives access to facilities not normally available + through JVM including, under Windows, being able to execute scripts, rather than their + associated interpreter. If you want to specify the name of the executable as a relative path + to the directory given by the dir attribute, it may become necessary to + set vmlauncher to false as well.No; default is true
        resolveExecutableWhen this attribute is true, the name of the - executable if resolved firstly against the project basedir and if - that does not exist, against the execution directory if - specified. On Unix systems, if you only want to allow execution of - commands in the user's path, set this to false. - since Ant 1.6No, default is falseresolveExecutableWhen this attribute is true, the name of the executable if resolved firstly against + the project basedir and if that does not exist, against the execution directory if + specified. On Unix systems, if you only want to allow execution of commands in the user's + path, set this to false. + since Ant 1.6No; default is false
        maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Since Ant 1.6.No, unlimited by defaultmaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited. Since Ant 1.6.No, unlimited by default
        addsourcefileWhether source file names should be added to the - command automatically. Since Ant 1.6.No, default is trueaddsourcefileWhether source file names should be added to the command automatically. Since Ant + 1.6.No; default is true
        verboseWhether to print a summary after execution or not. - Since Ant 1.6.No, default falseverboseWhether to print a summary after execution or not. Since Ant 1.6.No; default is false
        ignoremissingWhether to ignore nonexistent files specified - via filelists. Since Ant 1.6.2.No, default is trueignoremissingWhether to ignore nonexistent files specified via filelists. Since Ant 1.6.2.No; default is true
        forceWhether to bypass timestamp comparisons - for target files. Since Ant 1.6.3.No, default is falseforceWhether to bypass timestamp comparisons for target files. Since Ant 1.6.3.No; default is false

        Parameters specified as nested elements

        fileset

        -

        You can use any number of nested <fileset> -elements to define the files for this task and refer to -<fileset>s defined elsewhere.

        +

        You can use any number of nested <fileset> elements to define the files for +this task and refer to <fileset>s defined elsewhere.

        +

        filelist

        -

        Since Ant 1.6

        -

        You can use any number of nested <filelist> -elements to define the files for this task and refer to -<filelist>s defined elsewhere.

        +

        Since Ant 1.6

        +

        You can use any number of nested <filelist> elements to define the files for +this task and refer to <filelist>s defined elsewhere.

        +

        dirset

        -

        Since Ant 1.6

        -

        You can use any number of nested <dirset> -elements to define the directories for this task and refer to -<dirset>s defined elsewhere.

        - -

        Any other Resource -Collection

        -

        since Ant 1.7

        +

        Since Ant 1.6

        +

        You can use any number of nested <dirset> elements to define the directories +for this task and refer to <dirset>s defined elsewhere.

        + +

        Any other resource collection

        +

        Since Ant 1.7

        You can use any number of nested resource collections.

        mapper

        -

        A single <mapper> specifies the target files relative -to the dest attribute for dependency checking. If the -dest attribute is specified it will be used as a base directory -for resolving relative pathnames returned by the mapper. At least one +

        A single <mapper> specifies the target files relative to the dest +attribute for dependency checking. If the dest attribute is specified it will be used as +a base directory for resolving relative pathnames returned by the mapper. At least one <fileset> or <filelist> is required.

        +

        arg

        -

        Command line arguments should be specified as nested -<arg> elements. See Command line arguments.

        +

        Command line arguments should be specified as nested <arg> +elements. See Command line arguments.

        +

        srcfile

        -

        By default the file names of the source files will be added to the -end of the command line (unless you set addsourcefile to -false). If you need to place it somewhere different, -use a nested <srcfile> element between your -<arg> elements to mark the insertion point.

        - - - - - - - - - - - - - - - +

        By default the file names of the source files will be added to the end of the command line +(unless you set addsourcefile to false). If you need to place it somewhere +different, use a nested <srcfile> element between your <arg> +elements to mark the insertion point.

        +
        AttributeDescriptionRequired
        prefixa prefix to place in front of the file name when - building the command line argument. Since Ant 1.8.0No.
        suffixa suffix to append to the file name when - building the command line argument. Since Ant 1.8.0No.
        + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        prefixa prefix to place in front of the file name when building the command line + argument. Since Ant 1.8.0No
        suffixa suffix to append to the file name when building the command line argument. Since Ant + 1.8.0No

        targetfile

        -

        <targetfile> is similar to -<srcfile> and marks the position of the target -filename on the command line. If omitted, the target filenames will -not be added to the command line at all. This element can only be -specified if you also define a nested mapper.

        - - - - - - - - - - - - - - - +

        <targetfile> is similar to <srcfile> and marks the position +of the target filename on the command line. If omitted, the target filenames will not be added to +the command line at all. This element can only be specified if you also define a nested mapper.

        +
        AttributeDescriptionRequired
        prefixa prefix to place in front of the file name when - building the command line argument. Since Ant 1.8.0No.
        suffixa suffix to append to the file name when - building the command line argument. Since Ant 1.8.0No.
        + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        prefixa prefix to place in front of the file name when building the command line + argument. Since Ant 1.8.0No
        suffixa suffix to append to the file name when building the command line argument. Since Ant + 1.8.0No

        env

        -

        It is possible to specify environment variables to pass to the -system command via nested <env> elements. See the -description in the section about exec

        +

        It is possible to specify environment variables to pass to the system command via +nested <env> elements. See the description in the section +about exec

        redirector

        -Since Ant 1.6.2 -

        A nested I/O Redirector -can be specified. <apply>'s behavior is like that of -exec with regard to -redirectors, with the exception that, in non-parallel mode, -file mapping will take place with each iteration. This grants the -user the capacity to receive input from, and send output to, different -files for each sourcefile. -

        -

        In parallel-mode the redirector will be reset for each batch - of executions (with maxparallel > 0) and null will be used - a source file just like it is in the case of exec.

        +Since Ant 1.6.2 +

        A nested I/O Redirector can be specified. <apply>'s +behavior is like that of exec with regard to redirectors, with +the exception that, in non-parallel mode, file mapping will take place with each +iteration. This grants the user the capacity to receive input from, and send output to, different +files for each sourcefile.

        +

        In parallel mode the redirector will be reset for each batch of executions +(with maxparallel > 0) and null will be used a source file just like it is in the case +of exec.

        Examples

        -
        +
         <apply executable="ls">
           <arg value="-l"/>
           <fileset dir="/tmp">
        @@ -409,26 +359,23 @@
             </patternset>
           </fileset>
           <fileset refid="other.files"/>
        -</apply>
        -
        -

        invokes ls -l, adding the absolute filenames of all -files below /tmp not ending in .txt and all -files of the FileSet with id other.files to -the command line.

        -
        +</apply>
        +

        invokes ls -l, adding the absolute filenames of all files below /tmp not +ending in .txt and all files of the FileSet with id other.files +to the command line.

        +
         <apply executable="somecommand" parallel="false">
           <arg value="arg1"/>
           <srcfile/>
           <arg value="arg2"/>
           <fileset dir="/tmp"/>
         </apply>
        -
        -

        invokes somecommand arg1 SOURCEFILENAME arg2 for each -file in /tmp replacing SOURCEFILENAME with the absolute -filename of each file in turn. If parallel had been set -to true, SOURCEFILENAME would be replaced with the absolute filenames -of all files separated by spaces.

        -
        +
        +

        invokes somecommand arg1 SOURCEFILENAME arg2 for each file in /tmp +replacing SOURCEFILENAME with the absolute filename of each file in +turn. If parallel had been set to true, SOURCEFILENAME would be replaced +with the absolute filenames of all files separated by spaces.

        +
         <apply executable="cc" dest="src/C" parallel="false">
           <arg value="-c"/>
           <arg value="-o"/>
        @@ -436,14 +383,12 @@
           <srcfile/>
           <fileset dir="src/C" includes="*.c"/>
           <mapper type="glob" from="*.c" to="*.o"/>
        -</apply>
        -
        -

        invokes cc -c -o TARGETFILE SOURCEFILE for each -.c file that is newer than the corresponding -.o, replacing TARGETFILE with the absolute filename of -the .o and SOURCEFILE with the absolute name of the -.c file.

        -
        +</apply>
        +

        invokes cc -c -o TARGETFILE SOURCEFILE for each .c file that is newer +than the corresponding .o, replacing TARGETFILE with the absolute filename +of the .o and SOURCEFILE with the absolute name of the .c +file.

        +
         <mapper id="out" type="glob"
                    from="src${file.separator}*.file"
                    to="dest${file.separator}*.out"/>
        @@ -454,30 +399,28 @@
           <redirector>
             <outputmapper refid="out"/>
           </redirector>
        -</apply>
        -
        -Applies the fictitious "processfile" executable to all -files matching *.file in the src directory. -The out <mapper> has been set up to map -*.file to *.out, then this <mapper> -is used to specify targetfiles for this <apply> -task. A reference to out is then used as an -<outputmapper> nested in a <redirector>, which in turn is -nested beneath this <apply> instance. This allows us to perform -dependency checking against output files--the target files in this case. -
        +</apply>
        +

        Applies the fictitious processfile executable to all files +matching *.file in the src directory. +The out <mapper> has been set up to map *.file +to *.out, then this <mapper> is used to +specify targetfiles for this <apply> task. A reference +to out is then used as an <outputmapper> nested in +a <redirector>, which in turn is nested beneath this <apply> +instance. This allows us to perform dependency checking against output files—the target files +in this case.

        +
         <apply executable="ls" parallel="true"
                force="true" dest="${basedir}" append="true" type="both">
           <path>
             <pathelement path="${env.PATH}"/>
           </path>
           <identitymapper/>
        -</apply>
        -
        -Applies the "ls" executable to all directories in the PATH, effectively -listing all executables that are available on the PATH. +</apply> +

        Applies the ls executable to all directories in the PATH, effectively +listing all executables that are available on the PATH.

        -
        +
         <apply executable="jsmin" addsourcefile="false">
             <!-- Collect the JS-files -->
             <fileset dir="src" includes="*.js"/>
        @@ -488,17 +431,10 @@
                 <!-- redirect STDOUT to file in dest-dir -->
                 <outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/>
             </redirector>
        -</apply>
        -
        -Conversion of the command jsmin < src/a.js > dest/a.js but for -all files in the src-directory. Because the filename itself should not be passed -to the jsmin program, the addsourcefile is set to -false. - - - - - +</apply> +

        Conversion of the command jsmin < src/a.js > dest/a.js but for all files in +the src directory. Because the filename itself should not be passed to +the jsmin program, the addsourcefile is set to false.

        diff -Nru ant-1.9.10/manual/Tasks/apt.html ant-1.10.3/manual/Tasks/apt.html --- ant-1.9.10/manual/Tasks/apt.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/apt.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ - - - -Apt Task - - - -

        Apt

        -

        Description

        -

        Runs the annotation processor tool (apt), and then optionally compiles - the original code, and any generated source code. -

        This task runs on Java 1.5 to Java 1.7.

        -

        Apt is deprecated in Java 1.6, which can run annotation - processors as part of javac, and removed from the distribution in Java 1.8. - The task will fire an exception when attempting to run under Java 1.8.

        - - -

        This task inherits from the Javac Task, and thus - supports nearly all of the same attributes, and subelements. - There is one special case, the fork attribute, which is present - but which can only be set to true. That is, apt only works as - a forked process. -

        -

        - In addition, it supports - the following addition items:

        - -

        Parameters

        - - - - - - - - - - - - - - - - - - - - - - - - - - -
        AttributeDescriptionRequired
        compileAfter running the Apt, should the code be compiled. (see the - -nocompile flag on the Apt executable)No, defaults to false.
        factoryThe fully qualified classname of the AnnotationProcessFactory to be used - to construct annotation processors. This represents the -factory - command line flag of the Apt executable.No
        factorypathrefThe reference id of the path used to find the classes needed by the - AnnotationProcessorFactory (and the location of the factory itself). - This represents the -factorypath flag on the Apt executable.No
        preprocessdirThe directory used for preprocessing. This is the directory where the - generated source code will be place. This represents the -s flag on - the Apt executable.No
        - -

        Parameters specified as nested elements

        - - -

        factorypath

        - -

        You can specify the path used to find the classes needed by the AnnotationProcessorFactory - at runtime, using this element. It is represents as a generic path like structure. This - represents the -factorypath flag on the Apt executable.

        - - -

        option

        - -

        Used to represent a generic option to pass to Apt. This represents the -A flag on the - Apt executable. You can specify zero or more <option> elements.

        - - - - - - - - - - - - - - - - - -
        AttributeDescriptionRequired
        nameThe name of the optionYes.
        valueThe value to set the option toYes.
        - -

        Examples

        -
        -<apt srcdir="${src}"
        -     destdir="${build}"
        -     classpath="xyz.jar"
        -     debug="on"
        -     compile="true"
        -     factory="com.mycom.MyAnnotationProcessorFactory"
        -     factorypathref="my.factorypath.id"
        -     preprocessdir="${preprocess.dir}">
        -</apt>
        -
        -

        compiles all .java files under the ${src} -directory, and stores -the .class files in the ${build} directory. -The classpath used includes xyz.jar, and compiling with -debug information is on. It also forces the generated source code to -be compiled. The generated source code will be placed in -${preprocess.dir} directory, using the class -com.mycom.MyAnnotationProcessorFactory to supply -AnnotationProcessor instances.

        - - -

        Notes

        - -

        -The inherited "fork" attribute is set to true by default; please do not change it. -

        - -

        -The inherited "compiler" attribute is ignored, as it is forced to use the Apt compiler -

        - -

        Using the Apt compiler with the "compile" option set to "true" - forces you to use Sun's Apt compiler, which will use the JDK's Javac compiler. - If you wish to use another compiler, you will first need run the Apt processor - with the "compile" flag set to "false", and then use a - <javac> task to compile first your original source code, and then the - generated source code:

        - -
        -<apt srcdir="${src}"
        -     destdir="${build}"
        -     classpath="xyz.jar"
        -     debug="true"
        -     compile="false"
        -     factory="com.mycom.MyAnnotationProcessorFactory"
        -     factorypathref="my.factorypath.id"
        -     preprocessdir="${preprocess.dir}">
        -</apt>
        -
        -<javac srcdir="${src}"
        -       destdir="${build}"
        -       classpath="xyz.jar"
        -       debug="on"/>
        -
        -<javac srcdir="${preprocess.dir}"
        -       destdir="${build}"
        -       classpath="xyz.jar"
        -       debug="true"/>
        -
        - -This may involve more build file coding, but the speedup gained from switching -to jikes may justify the effort. -

        -

        - - diff -Nru ant-1.9.10/manual/Tasks/attrib.html ant-1.10.3/manual/Tasks/attrib.html --- ant-1.9.10/manual/Tasks/attrib.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/attrib.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,24 +24,22 @@ -

        Attrib

        -

        Since Apache Ant 1.6.

        +

        Attrib

        +

        Since Apache Ant 1.6.

        Description

        -

        Changes the attributes of a file or all files inside specified -directories. Right now it has effect only under Windows. Each of the -4 possible permissions has its own attribute, matching the arguments -for the attrib command.

        - -

        FileSets, -DirSets or FileLists can be specified using -nested <fileset>, <dirset> and -<filelist> elements.

        - -

        Starting with Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

        +

        Changes the attributes of a file or all files inside specified directories. Right now it has +effect only under Windows. Each of the 4 possible permissions has its own attribute, matching the +arguments for the attrib command.

        + +

        FileSets, DirSets +or FileLists can be specified using +nested <fileset>, <dirset> and <filelist> +elements.

        + +

        Since Ant 1.7, this task supports +arbitrary resource collections as nested +elements.

        -

        By default this task won't do anything unless it detects it is - running on a Windows system. If you know for sure that you have a - "attrib" executable on your PATH that is command line compatible with - the Windows command, you can use the task's os attribute and set its - value to your current os.

        +

        By default this task won't do anything unless it detects it is running on a Windows system. If +you know for sure that you have a attrib executable on your PATH that is +command line compatible with the Windows command, you can use the task's os attribute and +set its value to your current OS.

        + +

        See the setpermissions task for a platform independent +alternative.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + - +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        filethe file or directory of which the permissions must be - changed.Yes or nested - <fileset/list> elements.filethe file or directory of which the permissions must be changed.Yes, or nested <fileset/list> elements
        readonlythe readonly permission.at least one of the four. readonlythe readonly permission.At least one of the four
        archivethe archive permission.archivethe archive permission.
        systemthe system permission.systemthe system permission.
        hiddenthe hidden permission.hiddenthe hidden permission.
        typeOne of file, dir or both. If set to - file, only the permissions of plain files are going to be changed. - If set to dir, only the directories are considered.
        - Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
        No, default is filetypeOne of file, dir or both. If set to file, only the permissions + of plain files are going to be changed. If set to dir, only the directories are + considered.
        + Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
        No; default is file
        verboseWhether to print a summary after execution or not. - Defaults to false.NoverboseWhether to print a summary after execution or not.No; defaults to false
        oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
        osfamilyOS family as used in - the <os> + osfamilyOS family as used in the <os> condition.No - defaults to "windows"No; defaults to windows

        Examples

        -
        +
        <attrib file="${dist}/run.bat" readonly="true" hidden="true"/>
        -
        -

        makes the "run.bat" file read-only and hidden.

        -
        -
        <attrib readonly="false">
        +

        makes the run.bat file read-only and hidden.

        + +
        <attrib readonly="false">
           <fileset dir="${meta.inf}" includes="**/*.xml"/>
        -</attrib>
        -
        -
        -

        makes all ".xml" files below ${meta.inf} readable.

        +</attrib> -
        -
        +

        makes all .xml files below ${meta.inf} readable.

        + +
         <attrib readonly="true" archive="true">
           <fileset dir="shared/sources1">
             <exclude name="**/trial/**"/>
           </fileset>
           <fileset refid="other.shared.sources"/>
        -</attrib>
        -
        -
        -

        makes all files below shared/sources1 (except those below any - directory named trial) read-only and archived. In addition all files belonging - to a FileSet with id other.shared.sources get the - same attributes.

        +</attrib> +

        makes all files below shared/sources1 (except those below any directory +named trial) read-only and archived. In addition all files belonging to a FileSet +with id other.shared.sources get the same attributes.

        - diff -Nru ant-1.9.10/manual/Tasks/augment.html ant-1.10.3/manual/Tasks/augment.html --- ant-1.9.10/manual/Tasks/augment.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/augment.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,59 +25,49 @@

        Augment

        - +

        Since Apache Ant 1.8.1

        Description

        -

        Modify an existing reference by adding nested elements or (re-)assigning properties -mapped as XML attributes. This is an unusual task that makes use of Ant's internal -processing mechanisms to reload a previously declared reference by means of the 'id' -attribute, then treats the declared augment element as though it were the -original element. -Since Apache Ant 1.8.1

        +

        Modify an existing reference by adding nested elements or (re-)assigning properties mapped as XML +attributes. This is an unusual task that makes use of Ant's internal processing mechanisms to reload +a previously declared reference by means of the id attribute, then treats the +declared augment element as though it were the original element.

        Parameters

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        idThe id of the reference to augment. If no such reference has - been declared a BuildException is generated.YesidThe id of the reference to augment. If no such reference has been declared + a BuildException is thrown.Yes
        -

        -Additional permissible attributes are dependent on the reference to be modified. -

        +

        Additional permissible attributes are dependent on the reference to be modified.

        Parameters specified as nested elements

        -

        -Permissible nested elements are dependent on the reference to be modified. -

        +

        Permissible nested elements are dependent on the reference to be modified.

        Examples

        -Given -
        -  <fileset id="input-fs" dir="${basedir}" />
        -
        +

        Given

        -
        -  <augment id="input-fs" excludes="foo" />
        -
        +
        <fileset id="input-fs" dir="${basedir}"/>
        + +
        <augment id="input-fs" excludes="foo"/>
        -

        Modifies the excludes attribute of input-fs.

        +

        modifies the excludes attribute of input-fs.

        -  <augment id="input-fs">
        -    <filename name="bar" />
        -  </augment>
        -
        +<augment id="input-fs"> + <filename name="bar"/> +</augment> -

        Adds a filename selector to input-fs.

        +

        Adds a filename selector to input-fs.

        diff -Nru ant-1.9.10/manual/Tasks/available.html ant-1.10.3/manual/Tasks/available.html --- ant-1.9.10/manual/Tasks/available.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/available.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,137 +24,126 @@ -

        Available

        +

        Available

        Description

        -

        Sets a property if a resource is available at runtime. This resource can be a -file, a directory, a class in the classpath, or a JVM system resource.

        -

        If the resource is present, the property value is set to true by -default; otherwise, the property is not set. You can set the value to -something other than the default by specifying the value attribute.

        -

        Normally, this task is used to set properties that are useful to avoid target -execution depending on system parameters.

        +

        Sets a property if a resource is available at run time. This resource can be a file, a directory, +a class in the classpath, or a JVM system resource.

        +

        If the resource is present, the property value is set to true by default; otherwise, the +property is not set. You can set the value to something other than the default by specifying +the value attribute.

        +

        Normally, this task is used to set properties that are useful to avoid target execution depending +on system parameters.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        propertyThe name of the property to set.YespropertyThe name of the property to set.Yes
        valueThe value to set the property to. Defaults to "true".NovalueThe value to set the property to.No; defaults to true
        classnameThe class to look for in the classpath.YesclassnameThe class to look for in the classpath.Exactly one of the three
        fileThe file to look for.fileThe file to look for.
        resourceThe resource to look for in the JVM.resourceThe resource to look for in the JVM.
        classpathThe classpath to use when looking up classname or resource.NoclasspathThe classpath to use when looking up classname or resource.No
        filepathThe path to use when looking up file.NofilepathThe path to use when looking up file.No
        classpathrefThe classpath to use, given as a reference to a path defined elsewhere.NoclasspathrefThe classpath to use, given as a reference to a path + defined elsewhere.No
        typeThe type of file to look for, either a directory (type="dir") or a file - (type="file"). If not set, the property will be set if the name specified in the file - attribute exists as either a file or a directory.NotypeThe type of file to look for, either a directory (type=dir) or + a file (type=file). If not set, the property will be set if the name specified + in the file attribute exists as either a file or a directory.No
        ignoresystemclassesIgnore Ant's runtime classes, using only the specified - classpath. Only affects the "classname" attribute. Defaults to "false"NoignoresystemclassesIgnore Ant's runtime classes, using only the specified classpath. Only affects + the classname attribute.No; defaults to false
        searchparentsThis contains the behaviour of the "file" type. - If true, the available task will, when - searching for a file, search not only the directories specified but - will also search the parent directories of those - specified. - If false, only the directories specified will be searched. - Defaults to "false". - Since Ant 1.7 - NosearchparentsThis contains the behaviour of the file type. If true, the task + will, when searching for a file, search not only the directories specified but will also search + the parent directories of those specified. If false, only the directories specified will + be searched. Since Ant 1.7No; defaults to false

        Parameters specified as nested elements

        classpath

        -

        Available's classpath attribute is a path-like structure and can also be set via a nested +

        Available's classpath attribute is +a path-like structure and can also be set via a nested <classpath> element.

        filepath

        -

        Available's filepath attribute is a path-like structure and can also be set via a nested -<filepath> element.

        +

        Available's filepath attribute is +a path-like structure and can also be set via a +nested <filepath> element.

        Examples

        -
        -<available classname="org.whatever.Myclass" property="Myclass.present"/>
        -
        -

        sets the Myclass.present property to the value "true" -if the class org.whatever.Myclass is found in Ant's classpath.

        -
        +
        <available classname="org.whatever.Myclass" property="Myclass.present"/>
        +

        sets the Myclass.present property to the value true if the +class org.whatever.Myclass is found in Ant's classpath.

        +
         <property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/>
        -<available file="${jaxp.jar}" property="jaxp.jar.present"/>
        -
        -

        sets the jaxp.jar.present property to the value "true" -if the file ./lib/jaxp11/jaxp.jar is found.

        -
        +<available file="${jaxp.jar}" property="jaxp.jar.present"/>
        +

        sets the jaxp.jar.present property to the value true if the +file ./lib/jaxp11/jaxp.jar is found.

        +
         <available file="/usr/local/lib" type="dir"
        -           property="local.lib.present"/>
        -
        -

        sets the local.lib.present property to the value "true" -if the directory /usr/local/lib is found.

        -
        +           property="local.lib.present"/>
        +

        sets the local.lib.present property to the value true if the +directory /usr/local/lib is found.

        +
         ...in project ...
         <property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/>
         <path id="jaxp" location="${jaxp.jar}"/>
         ...in target ...
         <available classname="javax.xml.transform.Transformer"
        -           classpathref="jaxp" property="jaxp11.present"/>
        -
        -

        sets the jaxp11.present property to the value "true" -if the class javax.xml.transform.Transformer is found in the classpath referenced by jaxp (in this case, ./lib/jaxp11/jaxp.jar). + classpathref="jaxp" property="jaxp11.present"/> +

        sets the jaxp11.present property to the value true if the +class javax.xml.transform.Transformer is found in the classpath referenced +by jaxp (in this case, ./lib/jaxp11/jaxp.jar).

        -
        +
         <available property="have.extras" resource="extratasks.properties">
           <classpath>
        -    <pathelement location="/usr/local/ant/extra.jar" />
        -  </classpath>
        -</available>
        -
        -

        sets the have.extras property to the value "true" -if the resource-file extratasks.properties is found. + <pathelement location="/usr/local/ant/extra.jar"/> + </classpath> +</available> +

        sets the have.extras property to the value true if the resource +file extratasks.properties is found.

        - - diff -Nru ant-1.9.10/manual/Tasks/basename.html ant-1.10.3/manual/Tasks/basename.html --- ant-1.9.10/manual/Tasks/basename.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/basename.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,69 +24,55 @@ -

        Basename

        +

        Basename

        +

        Description

        -

        -Task to determine the basename of a specified file, optionally minus a -specified suffix. -

        -

        -When this task executes, it will set the specified property to the -value of the last path element of the specified file. If file is a -directory, the basename will be the last directory element. If -file is a full-path, relative-path, or simple filename, -the basename will be the simple file name, without any directory elements. -

        -

        +

        Task to determine the basename of a specified file, optionally minus a specified suffix.

        +

        When this task executes, it will set the specified property to the value of the last path element +of the specified file. If file is a directory, the basename will be the last directory +element. If file is a full-path, relative-path, or simple filename, the basename will be +the simple file name, without any directory elements.

        +

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        fileThe path to take the basename of.YesfileThe path to take the basename of.Yes
        propertyThe name of the property to set.YespropertyThe name of the property to set.Yes
        suffixThe suffix to remove from the resulting basename - (specified either with or without the ".").NosuffixThe suffix to remove from the resulting basename (specified either with or without + the .).No

        Examples

        -
        -<basename property="jar.filename" file="${lib.jarfile}"/>
        -
        -will set jar.filename to -myjar.jar, if lib.jarfile is defined as either a -full-path filename (eg., /usr/local/lib/myjar.jar), -a relative-path filename (eg., lib/myjar.jar), -or a simple filename (eg., myjar.jar). -
        +
        <basename property="jar.filename" file="${lib.jarfile}"/>
        +

        will set jar.filename to myjar.jar, if lib.jarfile is +defined as either a full-path filename (eg., /usr/local/lib/myjar.jar), a relative-path +filename (eg., lib/myjar.jar), or a simple filename (eg., myjar.jar).

        +
         <basename property="cmdname" file="D:/usr/local/foo.exe"
        -          suffix=".exe"/>
        -
        -will set cmdname to foo. -
        +          suffix=".exe"/>
        +

        will set cmdname to foo.

        +
         <property environment="env"/>
         <basename property="temp.dirname" file="${env.TEMP}"/>
        -
        - -will set temp.dirname to the last directory element of -the path defined for the TEMP environment variable.

        - - + +

        will set temp.dirname to the last directory element of the path defined for +the TEMP environment variable.

        - diff -Nru ant-1.9.10/manual/Tasks/bindtargets.html ant-1.10.3/manual/Tasks/bindtargets.html --- ant-1.9.10/manual/Tasks/bindtargets.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/bindtargets.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,69 +24,59 @@ -

        Bindtargets

        +

        Bindtargets

        +

        Since Apache Ant 1.8.2

        Description

        -

        Make some target the extension of some defined -extension point. It will make the -list of targets dependencies of the extension point.

        - -

        This target is useful when you want to have a target participate to another -build workflow, build workflow which explicitly expose an extension point for -that kind of insertion. But the target to bind and the extension point to -bind to are both declared in some imported build files. Modifying directly the -target dependency graph of these external build files may have a side effect -on some other project which import them. This task helps then to modify the -target dependencies but only in your context. -

        - -

        Note: this task is quite equivalent to the definition of an intermediate -target which will be the bridge between the target to bind and the extension -point. For instance: -

        -
        <bindtargets targets="jar,javadoc" extensionPoint="dist" />
        -is quite equivalent to: -
        <target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist" />
        -

        -This task basically avoid the creation of a target. -

        - -

        The bindtargets task may only be used as a top-level task. This means that -it may not be used in a target. This is making the target dependency graph static -and predictable as soon as every build file is loaded.

        - -

        Since Apache Ant 1.8.2

        +

        Make some target the extension of some +defined extension point. It will make the list of +targets dependencies of the extension point.

        + +

        This target is useful when you want to have a target to participate in another build workflow +which explicitly exposes an extension point for that kind of insertion. Thus the target to bind and +the extension point to bind to are both declared in some imported build files. But directly +modifying the target dependency graph of these external build files may have a side effect on some +other project which imports them. This task helps to modify the target dependencies but only in your +context.

        + +

        Note: this task is quite equivalent to the definition of an intermediate target +which will be the bridge between the target to bind and the extension point. For instance:

        +
        <bindtargets targets="jar,javadoc" extensionPoint="dist"/>
        +

        is quite equivalent to:

        +
        <target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist"/>
        +

        This task basically avoids the creation of a target.

        + +

        The bindtargets task may only be used as a top-level task. This means that it may +not be used in a target. This is making the target dependency graph static and predictable as soon +as every build file is loaded.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        targetsa comma separated list of target names to bind.Yestargetsa comma separated list of target names to bind.Yes
        extensionPointthe name of the extension point to bind the targets to.YesextensionPointthe name of the extension point to bind the targets to.Yes
        onMissingExtensionPointWhat to do if this target tries to extend a missing - extension-point. ("fail", - "warn", "ignore").No. Defaults to failonMissingExtensionPointWhat to do if this target tries to extend a + missing extension-point: fail, warn, ignore.No; defaults to fail

        Examples

        -
        -<bindtargets targets="build-jar,build-src-jar" extensionPoint="dist" />
        -
        +
        <bindtargets targets="build-jar,build-src-jar" extensionPoint="dist"/>
        diff -Nru ant-1.9.10/manual/Tasks/BorlandEJBTasks.html ant-1.10.3/manual/Tasks/BorlandEJBTasks.html --- ant-1.9.10/manual/Tasks/BorlandEJBTasks.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/BorlandEJBTasks.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,120 +24,113 @@ -

        BorlandDeployTool

        +

        BorlandDeployTool

        by Benoit Moussaud (benoit.moussaud@criltelecom.com)

        Description

        The BorlandDeployTool is a vendor specific nested element for the Ejbjar optional task.

        -

        BorlandDeploymentTool is dedicated to the Borland Application Server 4.5.x and Borland - Enterprise Server 5.x. It generates and compiles the stubs and skeletons for all ejb described into the - Deployment Descriptor, builds the jar file including the support files and - verify whether the produced jar is valid or not.

        - -

        Benoit Moussaud maintains a separate FAQ for this task at -his homepage.

        +

        BorlandDeployTool is dedicated to the Borland Application Server 4.5.x and Borland Enterprise +Server 5.x. It generates and compiles the stubs and skeletons for all EJBs described in the +Deployment Descriptor, builds the jar file including the support files and verifies whether the +produced jar is valid or not.

        + +

        Benoit Moussaud maintains a +separate FAQ for this task at his homepage.

        Borland element

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        destdirThe base directory into which the generated borland - ready jar files are depositedyesdestdirThe base directory in which the generated Borland ready jar files are storedYes
        debugIf true, turn on the debug mode for each borland - tools (java2iiop, iastool ...) default = falsenodebugIf true, turn on the debug mode for each Borland tools + (java2iiop, iastool, ...)No; default false
        verifyIf true, turn on the verification at the end - of the jar production (default = false)noverifyIf true, turn on the verification at the end of the jar production.No; default false
        verifyargsextra parameter for verify commandnoverifyargsextra parameter for verify commandNo
        suffixString value appended to the basename of the - deployment descriptor to create the filename of the Borland EJB jar file.No, defaults to '-ejb.jar'.suffixString value appended to the basename of the deployment descriptor to create the filename of + the Borland EJB jar file.No; defaults to -ejb.jar
        basdtdDeprecated. Defines the location of the - DTD which covers the Borland specific deployment descriptors. - This should not be necessary if you have borland in your classpath. If you - do not, you should use a nested + basdtdDeprecated. Defines the location of the DTD which covers the Borland + specific deployment descriptors. This should not be necessary if you have borland in your + classpath. If you do not, you should use a nested <dtd> element, described in the ejbjar task documentation.noNo
        ejbdtdDeprecated. Defines the location of the - ejb-jar DTD in the class hierarchy. This should not be necessary - if you have borland in your classpath. If you do not, you should use a - nested <dtd> element, - described in the ejbjar task - documentation. no
        generateclient If true, turn on the generation of the corresponding - ejbjar (default = false)no
        versionset the Borland Application Version. -
          -
        • 4 means B.A.S (Borland Application Server) 4.x, target will add ejb-inprise.xml file
        • -
        • 5 means B.E.S (Borland Application Server) 5.x, target will add ejb-borland.xml file
        • -
        -
        No, defaults to 4
        java2iiopParams If filled, the params are added to the java2iiop command (ex: -no_warn_missing_define)noejbdtdDeprecated. Defines the location of the ejb-jar DTD in the class + hierarchy. This should not be necessary if you have borland in your classpath. If you do not, + you should use a nested <dtd> element, + described in the ejbjar task documentation.No
        generateclientIf true, turn on the generation of the corresponding EJB jar.No; default false
        versionset the Borland Application Version. +
          +
        • 4 means B.A.S (Borland Application Server) 4.x, target will add ejb-inprise.xml file
        • +
        • 5 means B.E.S (Borland Application Server) 5.x, target will add ejb-borland.xml file
        • +
        +
        No; defaults to 4
        java2iiopParamsIf filled, the params are added to the java2iiop command + (ex: -no_warn_missing_define)No

        Examples

        -

        The following build.xml snippet is an example of how to use Borland element - into the ejbjar task

        -
            <ejbjar srcdir="${build.classes}" basejarname="vsmp" descriptordir="${rsc.dir}/hrmanager">
        -        <borland destdir="lib" verify="on" generateclient="on" version="5">
        -          <classpath refid="classpath"/>
        -        </borland>
        -        <include name="**\ejb-jar.xml"/>
        -        <support dir="${build.classes}">
        -          <include name="demo\*.class"/>
        -          <include name="demo\helper\*.class"/>
        -         </support>
        -     </ejbjar>
        -
        The borland element will generate into the lib dir an ejb jar file using the deployment descriptor placed into the ${rsc.dir}/hrmanager directory.
        -The verify phase is turned on and the generate client phase as well.
        -
        - -

         

        +

        The following build.xml snippet is an example of how to use Borland element in +the ejbjar task

        +
        +<ejbjar srcdir="${build.classes}" basejarname="vsmp" descriptordir="${rsc.dir}/hrmanager">
        +    <borland destdir="lib" verify="on" generateclient="on" version="5">
        +        <classpath refid="classpath"/>
        +    </borland>
        +    <include name="**\ejb-jar.xml"/>
        +    <support dir="${build.classes}">
        +        <include name="demo\*.class"/>
        +        <include name="demo\helper\*.class"/>
        +    </support>
        +</ejbjar>
        +

        The borland element will generate into the lib directory an EJB jar +file using the deployment descriptor placed into the ${rsc.dir}/hrmanager directory. +The verify phase is turned on and the generate client phase as well.

        - diff -Nru ant-1.9.10/manual/Tasks/BorlandGenerateClient.html ant-1.10.3/manual/Tasks/BorlandGenerateClient.html --- ant-1.9.10/manual/Tasks/BorlandGenerateClient.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/BorlandGenerateClient.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,67 +24,64 @@ -

        BorlandGenerateClient

        +

        BorlandGenerateClient

        by Benoit Moussaud (benoit.moussaud@criltelecom.com)

        Description

        -

        The BorlandGenerateClient is a task dedicated to Borland Application Server - v 4.5. It offers to generate the client jar file corresponding to an ejb jar - file.

        +

        The BorlandGenerateClient is a task dedicated to Borland Application Server v 4.5. It offers to +generate the client jar file corresponding to an EJB jar file.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        ejbjarejb jar fileyesejbjarEJB jar fileyes
        debugIf true, turn on the debug mode for each borland - tools (java2iiop, iastool ...) default = falsenodebugIf true, turn on the debug mode for each Borland tool + (java2iiop, iastool, ...)no; default false
        clientjarclient jar file name. If missing the client jar - file name is build using the ejbjar file name: ejbjar = hellobean-ejb.jar - => hellobean-ejbclient.jarnoclientjarclient jar file name. If missing the client jar file name is build using + the ejbjar file name: ejbjar=hellobean-ejb.jar + ⇒ hellobean-ejbclient.jarno
        modechoose the command launching mode. Two values: - java or fork. default = fork. java is not supported for version=5.Possibility to specify a classpath.nomodechoose the command launching mode. Two values: java or fork + (default). java is not supported for version=5. Possibility to + specify a classpath.no
        versionset the Borland Application Version. -
          -
        • 4 means B.A.S (Borland Application Server 4.x)
        • -
        • 5 means B.E.S (Borland Application Server 5.x)
        • -
        -
        No, defaults to 4versionset the Borland Application Version. +
          +
        • 4 means B.A.S (Borland Application Server 4.x)
        • +
        • 5 means B.E.S (Borland Application Server 5.x)
        • +
        +
        No; defaults to 4

        Examples

        -

        The following build.xml snippet is an example of how to use Borland element - into the ejbjar task using the java mode.

        +

        The following build.xml snippet is an example of how to use Borland element in +the ejbjar task using the fork mode.

        -<blgenclient ejbjar="lib/secutest-ejb.jar" clientjar="lib/client.jar" debug="true" mode="fork"> version="5">
        +<blgenclient ejbjar="lib/secutest-ejb.jar" clientjar="lib/client.jar" debug="true" mode="fork" version="5">
             <classpath>
                 <pathelement location="mymodule.jar"/>
             </classpath>
        -</blgenclient>
        -
        -
         
        +</blgenclient> - diff -Nru ant-1.9.10/manual/Tasks/buildnumber.html ant-1.10.3/manual/Tasks/buildnumber.html --- ant-1.9.10/manual/Tasks/buildnumber.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/buildnumber.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,51 +24,37 @@ -

        BuildNumber

        +

        BuildNumber

        Description

        This is a basic task that can be used to track build numbers.

        -

        It will first attempt to read a build number from a file (by default, -build.number in the current directory), then -set the property build.number to the value that was read in -(or to 0, if no such value). It will then increment the -number by one and write it back out to the file. -(See the -PropertyFile task -if you need finer control over things such as the property name or -the number format.) -

        +

        It will first attempt to read a build number from a file (by default, build.number +in the current directory), then set the property build.number to the value that was +read in (or to 0, if no such value). It will then increment the number by one and write it +back out to the file. (See the PropertyFile task if you +need finer control over things such as the property name or the number format.)

        Parameters

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        fileThe file to read and write the build number from/to.No; defaults to "build.number"fileThe file to read and write the build number from/to.No; defaults to build.number

        Examples

        -
        -<buildnumber/>
        -
        - -

        Read, increment, and write a build number to the default file, -build.number.

        - -
        -<buildnumber file="mybuild.number"/>
        -
        +
        <buildnumber/>
        -

        Read, increment, and write a build number to the file -mybuild.number.

        +

        Read, increment, and write a build number to the default file, build.number.

        +
        <buildnumber file="mybuild.number"/>
        +

        Read, increment, and write a build number to the file mybuild.number.

        - diff -Nru ant-1.9.10/manual/Tasks/cab.html ant-1.10.3/manual/Tasks/cab.html --- ant-1.9.10/manual/Tasks/cab.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/cab.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,144 +24,120 @@ -

        Cab

        +

        Cab

        Description

        -

        The cab task creates Microsoft cab archive files. It is invoked -similar to the jar or zip tasks. -This task will work on Windows using the external cabarc tool (provided by Microsoft) -which must be located in your executable path.

        -

        To use this task on other platforms you need to download and compile libcabinet from - -http://trill.cis.fordham.edu/~barbacha/cabinet_library/.

        -

        See the section on directory based -tasks, on how the inclusion/exclusion of files works, and how to -write patterns.

        -

        This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes basedir) as well as the nested -<include>, <exclude> and -<patternset> elements.

        +

        The cab task creates Microsoft cabinet archive files. It is invoked similar to +the jar or zip tasks. This task +will work on Windows using the external cabarc tool (provided by Microsoft) which must +be located in your executable path.

        +

        To use this task on other platforms you need to download and compile libcabinet +from https://www.freshports.org/archivers/libcabinet/.

        +

        See the section on directory based tasks, on +how the inclusion/exclusion of files works, and how to write patterns.

        +

        This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes basedir) as well as +the nested <include>, <exclude> +and <patternset> elements.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        cabfilethe name of the cab file to create.Yescabfilethe name of the cab file to create.Yes
        basedirthe directory to start archiving files from.Nobasedirthe directory to start archiving files from.No
        verboseset to "yes" if you want to see the output from - the cabarc tool. defaults to "no".Noverboseset to yes if you want to see the output from the cabarc tool.No; defaults to no
        compressset to "no" to store files without compressing. - defaults to "yes".Nocompressset to no to store files without compressing.No; defaults to yes
        optionsuse to set additional command-line options for - the cabarc tool. should not normally be necessary.Nooptionsset additional command-line options for the cabarc tool. Should not + normally be necessary.No
        includescomma- or space-separated list of patterns of files that - must be included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
        includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
        excludescomma- or space-separated list of patterns of files that - must be excluded. No files (except default excludes) are excluded - when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
        excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
        defaultexcludesindicates whether default excludes should be used - or not ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes

        Parameters specified as nested elements

        fileset

        -

        The cab task supports one nested <fileset> -element to specify the files to be included in the archive. - If this is specified, the "basedir" attribute cannot be used. -

        +

        The cab task supports one nested <fileset> +element to specify the files to be included in the archive. If this is specified, +the basedir attribute cannot be used.

        Examples

        -
        +
         <cab cabfile="${dist}/manual.cab"
        -     basedir="htdocs/manual"
        -  />
        -
        -

        cabs all files in the htdocs/manual directory into a file called -manual.cab in the ${dist} directory.

        -
        +     basedir="htdocs/manual"/>
        +

        cabs all files in the htdocs/manual directory into a file +called manual.cab in the ${dist} directory.

        +
         <cab cabfile="${dist}/manual.cab"
              basedir="htdocs/manual"
        -     excludes="mydocs/**, **/todo.html"
        -  />
        -
        -

        cabs all files in the htdocs/manual directory into a file called -manual.cab in the ${dist} directory. Files in the directory mydocs, -or files with the name todo.html are excluded.

        -
        +     excludes="mydocs/**, **/todo.html"/>
        +

        cabs all files in the htdocs/manual directory into a file +called manual.cab in the ${dist} directory. Files in the +directory mydocs, or files with the name todo.html are excluded.

        +
         <cab cabfile="${dist}/manual.cab"
              basedir="htdocs/manual"
              includes="api/**/*.html"
              excludes="**/todo.html"
        -     verbose="yes"
        -  />
        -
        -

        Cab all files in the htdocs/manual directory into a file called -manual.cab in the ${dist} directory. Only html files under the -directory api are archived, and files with the name todo.html are -excluded. Output from the cabarc tool is displayed in the build -output.

        + verbose="yes"/> +

        Cab all files in the htdocs/manual directory into a file +called manual.cab in the ${dist} directory. Only .html files +under the directory api are archived, and files with the name todo.html +are excluded. Output from the cabarc tool is displayed in the build output.

        -
        +
         <cab cabfile="${dist}/manual.cab"
              verbose="yes">
           <fileset
                dir="htdocs/manual"
                includes="api/**/*.html"
        -       excludes="**/todo.html"
        -  />
        -</cab>
        -
        + excludes="**/todo.html"/> +</cab>

        is equivalent to the example above.

        - - - diff -Nru ant-1.9.10/manual/Tasks/ccm.html ant-1.10.3/manual/Tasks/ccm.html --- ant-1.9.10/manual/Tasks/ccm.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/ccm.html 2018-03-24 12:37:12.000000000 +0000 @@ -33,14 +33,18 @@
      • CCMCreateTask
      -

      These Apache Ant tasks are wrappers around Continuus Source Manager. They have been tested - against versions 5.1/6.2 on Windows 2000, but should work on other platforms with ccm installed.

      -
      -

      CCMCheckin

      +

      These Apache Ant tasks are wrappers +around Continuus Source +Manager. They have been tested against versions 5.1/6.2 on Windows 2000, but should work on +other platforms with ccm installed.

      + +
      + +

      CCMCheckin

      Description

      -Task to checkin a file +

      Check in a file to Continuus

      Parameters

      - +
      @@ -53,35 +57,37 @@ - - + + - + - +
      Attribute Values
      commentSpecify a comment. Default is "Checkin" plus the dateNoSpecify a comment.No; default is Checkin plus the date
      taskSpecify the task number used to check in the file (may use 'default')Specify the task number used to check in the file (may use default) No
      ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No

      Examples

      -
      -
      <ccmcheckin file="c:/wa/com/foo/MyFile.java"
      -        comment="mycomment"/>
      -
      -
      -

      Checks in the file c:/wa/com/foo/MyFile.java. - Comment attribute mycomment is added as a task comment. The task - used is the one set as the default.

      -
      -

      CCMCheckout

      + +
      +<ccmcheckin file="c:/wa/com/foo/MyFile.java"
      +            comment="mycomment"/>
      + +

      Checks in the file c:/wa/com/foo/MyFile.java. Text mycomment is added +as a comment. The task used is the one set as the default.

      + +
      + +

      CCMCheckout

      Description

      -Task to perform a Checkout command to Continuus +

      Run a Continuus checkout command

      Parameters

      - +
      @@ -90,59 +96,57 @@ - + - + - + - + - +
      Attribute Values
      file Path to the file that the command will operate onYes (file|fileset)Exactly one of the two
      filesetfileset containing the file to be checked outfileset containing the file to be checked out
      commentSpecify a comment.Specify a comment No
      taskSpecify the task number used to checkin the file (may use - 'default')Specify the task number used to checkin the file (may use default) No
      ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No

      Examples

      -
      -
      <ccmcheckout file="c:/wa/com/foo/MyFile.java"
      -        comment="mycomment"/>
      -
      -
      -

      Check out the file c:/wa/com/foo/MyFile.java. - Comment attribute mycomment is added as a task comment - The used task is the one set as the default.

      -
      -
      <ccmcheckout  comment="mycomment">
      +
      +
      +<ccmcheckout file="c:/wa/com/foo/MyFile.java"
      +             comment="mycomment"/>
      + +

      Check out the file c:/wa/com/foo/MyFile.java. Comment +attribute mycomment is added as a task comment The used task is the one set as the +default.

      + +
      +<ccmcheckout comment="mycomment">
         <fileset dir="lib" >
           <include name="**/*.jar"/>
         </fileset>
      -</ccmcheckout >
      -  
      -
      - -

      Check out all the files in the lib directory having the .jar extension. - Comment attribute mycomment is added as a task comment - The used task is the one set as the default.

      +</ccmcheckout > +

      Check out all the files in the lib directory having the .jar extension. +Comment attribute mycomment is added as a task comment The used task is the one set as +the default.

      +
      -
      -

      CCMCheckinTask

      +

      CCMCheckinTask

      Description

      -Task to perform a check in default task command to Continuus +

      Run a Continuus command to checkin default task

      Parameters

      - +
      @@ -155,27 +159,29 @@ - + - +
      Attribute Values
      taskSpecify the task number used to check in the file (may use 'default')Specify the task number used to check in the file (may use default) No
      ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No
      -

      Examples

      -
      -
      <ccmcheckintask comment="blahblah/>
      -
      -
      +

      Examples

      + +
      <ccmcheckintask comment="blahblah/>
      +

      Does a Checkin default task on all the checked out files in the current task.

      -
      -

      CCMReconfigure

      + +
      + +

      CCMReconfigure

      Description

      -Task to perform an reconfigure command to Continuus. +

      Run a Continuus reconfigure/update command

      Parameters

      - +
      @@ -183,13 +189,13 @@ - - + + - - + + @@ -198,24 +204,26 @@ - +
      Attribute Values
      recurserecurse on subproject (default false)Norecurse on subprojectNo; default is false
      verbosedo a verbose reconfigure operation (default false)Nodo a verbose reconfigure operationNo; default is false
      ccmproject
      ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No

      Examples

      -
      -
      <ccmreconfigure ccmproject="ANTCCM_TEST#BMO_1"
      -         verbose="true"/>
      -
      -
      -

      Does a Continuus reconfigure on the project ANTCCM_TEST#BMO_1. -

      -
      -

      CCMCreateTask

      + +
      +<ccmreconfigure ccmproject="ANTCCM_TEST#BMO_1"
      +                verbose="true"/>
      + +

      Does a Continuus reconfigure on the project ANTCCM_TEST#BMO_1.

      + +
      + +

      CCMCreateTask

      Description

      -Create a Continuus task. +

      Create a Continuus task.

      Parameters

      - +
      @@ -223,7 +231,7 @@ - + @@ -233,7 +241,8 @@ - + @@ -253,20 +262,18 @@ - +
      Attribute Values
      commentSpecify a comment.Specify a comment No
      ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No
      taskSpecify the task number used to checkin the file (may use 'default')Specify the task number used to checkin the file (may use default) No

      Examples

      -
      -
      <ccmcreatetask resolver="${user.name}"
      -            release="ANTCCM_TEST" comment="blahblah"/>
      -
      -
      -

      Creates a task for the release ANTCCM_TEST with the - current user as the resolver for this task.

      +
      +<ccmcreatetask resolver="${user.name}"
      +               release="ANTCCM_TEST" comment="blahblah"/>
      - +

      Creates a task for the release ANTCCM_TEST with the current user as the resolver for +this task.

      + diff -Nru ant-1.9.10/manual/Tasks/changelog.html ant-1.10.3/manual/Tasks/changelog.html --- ant-1.9.10/manual/Tasks/changelog.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/changelog.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,249 +24,229 @@ -

      CvsChangeLog

      +

      CvsChangeLog

      Description

      -

      Generates an XML-formatted report file of the change logs recorded in a -CVS repository.

      -

      Important: This task needs "cvs" on the path. If it isn't, you will get -an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe -from the command line in the target directory in which you are working. -Also note that this task assumes that the cvs executable is compatible -with the Unix version from cvshome.org, this is not completely true -for certain other cvs clients - like CVSNT for example - and some -operation may fail when using such an incompatible client. -

      +

      Generates an XML-formatted report file of the change logs recorded in +a CVS repository.

      +

      Important: This task needs cvs on the path. If it isn't, you will get +an error (such as error=2 on Windows). If <cvs> doesn't work, try to +execute cvs.exe from the command line in the target directory in which you are working. +Also note that this task assumes that the cvs executable is compatible with the Unix +version, this is not completely true for certain other CVS clients—like CVSNT for +example—and some operation may fail when using such an incompatible client.

      Parameters

      - +
      - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - included in the report. - Since Ant 1.8.0 - + + +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      Attributes from parent Cvs task which are meaningful here
      - Since Apache Ant 1.6.1
      Attributes from parent <cvs> task which are + meaningful here
      Since Apache Ant 1.6.1
      cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
      cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
      packagethe package/module to check out. Note: - multiple attributes can be split using spaces. Use a nested - <module> element if you want to specify a module with - spaces in its name.Nopackagethe package/module to check out. Note: multiple attributes can be split + using spaces. Use a nested <module> element if you want to specify a + module with spaces in its name.No
      portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; defaults to 2401
      passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; defaults to ~/.cvspass
      failonerrorStop the build process if the command exits with a - return code other than 0. Defaults to falseNofailonerrorStop the build process if the command exits with a return code other than 0No; defaults to false
      tagquery the changelog for a specific branch.Notagquery the changelog for a specific branch.No
      Specific attributesSpecific attributes
      dirThe directory from which to run the CVS log - command.No; defaults to ${basedir}.dirThe directory from which to run the cvs log command.No; defaults to ${basedir}
      destfileThe file in which to write the change log report.YesdestfileThe file in which to write the change log report.Yes
      usersfileProperty file that contains name-value pairs mapping - user IDs and names that should be used in the report in place of - the user ID.NousersfileProperty file that contains name-value pairs mapping user IDs and names that should be used + in the report in place of the user ID.No
      daysinpastSets the number of days into the past for which the - change log information should be retrieved.NodaysinpastSets the number of days into the past for which the change log information should be + retrieved.No
      startThe earliest date from which change logs are to be - included in the report.NostartThe earliest date from which change logs are to be included in the report.No
      endThe latest date to which change logs are to be - included in the report.NoendThe latest date to which change logs are to be included in the report.No
      remoteIf set to true, works against the repository - (using rlog) without a working copy. Default is - false. Since Ant 1.8.0NoremoteIf set to true, works against the repository (using cvs rlog) without a working + copy. Since Ant 1.8.0No; default is false
      startTagThe start of a tag range. If endTag is also - specified, they must both be on the same branch. If endTag is not - specified, the end of the range will be the latest on the same - branch on which startTag lives. Since Ant 1.8.0NostartTagThe start of a tag range. If endTag is also specified, they must both be on the + same branch. If endTag is not specified, the end of the range will be the latest on + the same branch on which startTag lives. Since Ant 1.8.0No
      endTagThe end of a tag range. If startTag is also - specified, they must both be on the same branch. If startTag is - not specified, the start of the range will be the top of the - branch on which endTag lives.NoendTagThe end of a tag range. If startTag is also specified, they must both be on the + same branch. If startTag is not specified, the start of the range will be the top + of the branch on which endTag lives. Since Ant 1.8.0No

      Parameters specified as nested elements

      -

      user

      -

      The nested <user> element allows you to specify a -mapping between a user ID as it appears on the CVS server and a name to -include in the formatted report. -Anytime the specified user ID has made a change in the repository, the -<author> tag in the report file will include -the name specified in displayname rather than the user ID. -

      +

      user

      +

      The nested <user> element allows you to specify a mapping between a user ID as +it appears on the CVS server and a name to include in the formatted report. Anytime the specified +user ID has made a change in the repository, the <author> tag in the report file +will include the name specified in displayname rather than the user ID.

      - +
      - - - + + + - - - + + + - - + - +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      displaynameThe name to be used in the CVS change log report.YesdisplaynameThe name to be used in the CVS change log report.Yes
      useridThe userid of the person as it exists on the CVS server. + useridThe user ID of the person as it exists on the CVS server. YesYes

      module

      -

      Specifies a package/module to work on, unlike the package attribute - modules specified using this attribute can contain spaces in their - name.

      +

      Specifies a package/module to work on, unlike the package attribute modules specified using this +attribute can contain spaces in their name.

      - +
      - - - + + + - - - + + +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      nameThe module's/package's name.Yes.nameThe module's/package's name.Yes

      Examples

      -
        <cvschangelog dir="dve/network"
      -                destfile="changelog.xml"
      -  />
      - -

      Generates a change log report for all the changes that have been made -under the dve/network directory. -It writes these changes into the file changelog.xml.

      - -
        <cvschangelog dir="dve/network"
      -                destfile="changelog.xml"
      -                daysinpast="10"
      -  />
      - -

      Generates a change log report for any changes that were made -under the dve/network directory in the past 10 days. -It writes these changes into the file changelog.xml.

      - -
        <cvschangelog dir="dve/network"
      -                destfile="changelog.xml"
      -                start="20 Feb 2002"
      -                end="20 Mar 2002"
      -  />
      - -

      Generates a change log report for any changes that were made -between February 20, 2002 and March 20, 2002 -under the dve/network directory. -It writes these changes into the file changelog.xml.

      - -
        <cvschangelog dir="dve/network"
      -                destfile="changelog.xml"
      -                start="20 Feb 2002"
      -  />
      - -

      Generates a change log report for any changes that were made -after February 20, 2002 under the dve/network directory. -It writes these changes into the file changelog.xml.

      - -
        <cvschangelog dir="dve/network"
      -                destfile="changelog.xml">
      -       <user displayname="Peter Donald" userid="donaldp"/>
      -  </cvschangelog>
      - -

      Generates a change log report for all the changes that were made -under the dve/network directory, substituting the name -"Peter Donald" in the <author> tags -anytime it encounters a change made by the user ID "donaldp". -It writes these changes into the file changelog.xml.

      +
      +<cvschangelog dir="dve/network"
      +              destfile="changelog.xml"/>
      + +

      Generates a change log report for all the changes that have been made under +the dve/network directory. It writes these changes into the +file changelog.xml.

      + +
      +<cvschangelog dir="dve/network"
      +              destfile="changelog.xml"
      +              daysinpast="10"/>
      + +

      Generates a change log report for any changes that were made under the dve/network +directory in the past 10 days. It writes these changes into the +file changelog.xml.

      + +
      +<cvschangelog dir="dve/network"
      +              destfile="changelog.xml"
      +              start="20 Feb 2002"
      +              end="20 Mar 2002"/>
      + +

      Generates a change log report for any changes that were made between February 20, 2002 and March +20, 2002 under the dve/network directory. It writes these changes into the +file changelog.xml.

      + +
      +<cvschangelog dir="dve/network"
      +              destfile="changelog.xml"
      +              start="20 Feb 2002"/>
      + +

      Generates a change log report for any changes that were made after February 20, 2002 under +the dve/network directory. It writes these changes into the +file changelog.xml.

      + +
      +<cvschangelog dir="dve/network"
      +              destfile="changelog.xml">
      +    <user displayname="Peter Donald" userid="donaldp"/>
      +</cvschangelog>
      + +

      Generates a change log report for all the changes that were made under +the dve/network directory, substituting the name Peter Donald in +the <author> tags anytime it encounters a change made by the user +ID donaldp. It writes these changes into the file changelog.xml.

      Generates a change log report on the ANT_16_BRANCH.

      - <cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass"
      -                destfile="changelogant.xml" tag="ANT_16_BRANCH"/>
      -
      +<cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass" + destfile="changelogant.xml" tag="ANT_16_BRANCH"/>

      Generate Report

      -

      Ant includes a basic XSLT stylesheet that you can use to generate -a HTML report based on the xml output. The following example illustrates -how to generate a HTML report from the XML report.

      +

      Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the xml +output. The following example illustrates how to generate a HTML report from the XML report.

      -        <style in="changelog.xml" 
      -               out="changelog.html" 
      -               style="${ant.home}/etc/changelog.xsl">
      -          <param name="title" expression="Ant ChangeLog"/>
      -          <param name="module" expression="ant"/>
      -          <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
      -        </style>
      -
      +<style in="changelog.xml" + out="changelog.html" + style="${ant.home}/etc/changelog.xsl"> + <param name="title" expression="Ant ChangeLog"/> + <param name="module" expression="ant"/> + <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/> +</style>

      Sample Output

      @@ -284,11 +264,7 @@
       
       This allows templates to be stored inside jar]]></msg>
         </entry>
      -</changelog>
      -
      - - +</changelog> - diff -Nru ant-1.9.10/manual/Tasks/checksum.html ant-1.10.3/manual/Tasks/checksum.html --- ant-1.9.10/manual/Tasks/checksum.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/checksum.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,246 +24,214 @@ -

      Checksum

      +

      Checksum

      Description

      -

      -Generates checksum for files. This task can also be used to -perform checksum verifications. -

      - -

      Note that many popular message digest functions - including MD5 and -SHA-1 - have been broken recently. If you are going to use the task -to create checksums used in an environment where security is -important, please take some time to investigate the algorithms offered -by your JCE provider. Note also that some JCE providers like the one -by The Legion of the Bouncy -Castle, the GNU -project or the -Technical University Graz offer more digest algorithms than those -built-in into your JDK.

      - -

      -Warning: the case of the extension is that of the algorithm used. -If you ask for "SHA1", you get a .SHA1 extension; if you ask for "sha1", you -get a file ending in .sha1. The Java Crypto Engines are case-insensitive -in matching algorithms, so choose a name to match your desired output extension, -or set the fileext attribute. The names of common hashing algorithms can be located on the -Cryptography Architecture Standard Algorithm Name Documentation -

      +

      Generates checksum for files. This task can also be used to perform checksum verifications.

      + +

      Note that many popular message digest functions—including MD5 and SHA-1—have been +broken recently. If you are going to use the task to create checksums used in an environment where +security is important, please take some time to investigate the algorithms offered by your JCE +provider. Note also that some JCE providers like the one by The Legion of the Bouncy Castle, +the GNU Crypto project +or the Technical University Graz +offer more digest algorithms than those built-in into your JDK.

      + +

      Warning: the case of the extension is that of the algorithm used. If you ask +for SHA1, you get a .SHA1 extension; if you ask for sha1, you +get a file ending in .sha1. The Java Crypto Engines are case-insensitive in matching +algorithms, so choose a name to match your desired output extension, or set the fileext +attribute. The names of common hashing algorithms can be located on +the Cryptography Architecture Standard Algorithm Name Documentation

      Parameters

      - +
      - - - + + + - - - + + + - - - + + - - + - + - - - + + + - - + - + - - + - + + + + + + - - - - - - - - + - + - + - + - + - - - + + + - - - + + - - + +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      fileThe file to generate checksum for.One of either file or - at least one nested (filesystem-only) resource collection.fileThe file to generate checksum for.Yes, unless at least one nested (filesystem-only) resource collection is specified.
      todirThe root directory where checksums should be written.No. If not specified, checksum files - will be written to the same directory as the files themselves. - since Apache Ant 1.6 + todirThe root directory where checksums should be written.No; by default, checksum files will be written to the same directory as the original + files. since Apache Ant 1.6
      algorithmSpecifies the algorithm to be used to - compute the checksum. Defaults to "MD5". - Other popular algorithms like "SHA" or "SHA-512" may be used - as well. + algorithmSpecifies the algorithm to be used to compute the checksum. Please check + the documentation for available algorithm names, like SHA-1 + or SHA-512. NoNo; defaults to MD5
      providerSpecifies the provider of the algorithm.NoproviderSpecifies the provider of the algorithm.No
      fileextThe generated checksum file's name will be the - original filename with the fileext added to it. - Defaults to a "." and the algorithm name being used. + fileextThe generated checksum file's name will be the original filename with the fileext + added to it. NoNo; defaults to a . and the algorithm name being used
      propertyThis attribute can mean two different things, it - depends on the presence of the verifyproperty attribute.
      - If you don't set the verifyproperty attribute, property - specifies the name of the property to be set with the generated - checksum value.
      - If you set the verifyproperty attribute, property specifies - the checksum you expect to be generated (the checksum itself, not - a name of a property containing the checksum).
      - This cannot be specified when fileext is being used or when the - number of files for which checksums is to be generated is greater - than 1. +
      propertyThis attribute can mean two different things, it depends on the presence of + the verifyproperty attribute.
      If you don't set + the verifyproperty attribute, property specifies the name of the property to be set + with the generated checksum value.
      If you set + the verifyproperty attribute, property specifies the checksum you expect to be + generated (the checksum itself, not a name of a property containing the checksum).
      This + cannot be specified when fileext is being used or when the number of files for + which checksums are to be generated is greater than 1.
      NoNo
      patternSpecifies the pattern to use as a pattern suitable + for MessageFormat where {0} is replaced with the checksum + and {1} with the file name. Since Ant 1.7.0
      Since Ant + 1.8.2 {2} is replaced by the path of the file relative to the checksum file + being written, {3} with the path of the file relative to the + project's basedir and {4} with the absolute path of the file.
      No; default is {0}
      patternSpecifies the pattern to use as a pattern - suitable - for MessageFormat - where {0} is replaced with the checksum and - {1} with the file name. Since Ant - 1.7.0
      - starting with Ant 1.8.2 {2} is replaced by - the path of the file relative to the checksum file being - written, {3} with tha path of the file relative to - the project's basedir and {4} with the absolute - path of the file.
      No - default is "{0}".
      formatSpecifies the pattern to use as one of a - well-known format. Supported values are - + + - + Since Ant 1.7.0 + - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + +
      formatSpecifies the pattern to use as one of a well-known format. Supported values are + - - - + + + - - - + + + - - - + + +
      name pattern description
      CHECKSUM {0}only the checksum itself CHECKSUM{0}only the checksum itself
      MD5SUM {0} *{1}the format of GNU textutils md5sumMD5SUM{0} *{1}the format of GNU textutils md5sum
      SVF MD5 ({1}) = {0}the format of BSDs md5 command SVFMD5 ({1}) = {0}the format of BSD md5 command
      - Since Ant 1.7.0 -
      No - default is "CHECKSUM".No; default is CHECKSUM
      totalpropertyIf specified, this attribute specifies the name of - the property that will hold a checksum of all the checksums and - file paths. The individual checksums and the relative paths to the files - within the resource collections in which they are defined will be used to - compute this checksum. (The file separators in the paths will be - converted to '/' before computation to ensure platform portability). - since Ant 1.6 - NototalpropertyIf specified, this attribute specifies the name of the property that will hold a checksum of + all the checksums and file paths. The individual checksums and the relative paths to the files + within the resource collections in which they are defined will be used to compute this + checksum. (The file separators in the paths will be converted to / before computation + to ensure platform portability). since Ant 1.6No
      forceoverwriteOverwrite existing files even if the destination files are newer.No; defaults to no
      forceoverwriteOverwrite existing files even if the destination - files are newer. Defaults to "no".No
      verifypropertySpecifies the name of the property to be set - with "true" or "false" depending upon whether - the generated checksum matches the existing checksum. When - this is set, the generated checksum is not written to a file or - property, but rather, the content of the file or property is used to - check against the generated checksum. - No
      readbuffersizeThe size of the buffer (in bytes) to use when - reading a file. Defaults to "8192" - you may get a - better performance on big files if you increase this value.NoverifypropertySpecifies the name of the property to be set with true or false depending upon + whether the generated checksum matches the existing checksum. When this is set, the generated + checksum is not written to a file or property, but rather, the content of the file or property + is used to check against the generated checksum.No
      readbuffersizeThe size of the buffer (in bytes) to use when reading a file.No; defaults to 8192—you may get a better performance on big files if you + increase this value

      Parameters specified as nested elements

      -

      resource collection

      -

      - Resource collections are - used to select files for which checksums should be generated. -

      +

      resource collections

      +

      Resource collections are used to select files +for which checksums should be generated.

      Examples

      -

      Example 1

      -
      <checksum file="foo.bar"/>
      -Generates a MD5 checksum for foo.bar and stores the checksum in the destination file -foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar is newer than itself. - -

      Example 2

      -
      <checksum file="foo.bar" forceOverwrite="yes"/>
      -Generates a MD5 checksum for foo.bar and stores the checksum in foo.bar.MD5. -If foo.bar.MD5 already exists, it is overwritten. - -

      Example 3

      -
      <checksum file="foo.bar" property="foobarMD5"/>
      -Generates a MD5 checksum for foo.bar and stores it in the Project Property foobarMD5. - -

      Example 4

      -
      <checksum file="foo.bar" verifyProperty="isMD5ok"/>
      -Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 and sets -isMD5ok to either true or false, depending upon the result. - -

      Example 5

      -
      <checksum file="foo.bar" algorithm="SHA-512" fileext="asc"/>
      -Generates a SHA-512 checksum for foo.bar and stores the checksum in the destination file -foo.bar.asc. foo.bar.asc is overwritten only if foo.bar is newer than itself. - -

      Example 6

      -
      -<checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/>
      -
      -Generates a MD5 checksum for foo.bar, compares it against the value of the property -md5, and sets isEqual to either true or false, depending upon the result. +

      Example 1

      +
      <checksum file="foo.bar"/>
      +

      Generates a MD5 checksum for foo.bar and stores the checksum in the destination +file foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar +is newer than itself.

      + +

      Example 2

      +
      <checksum file="foo.bar" forceOverwrite="yes"/>
      +

      Generates a MD5 checksum for foo.bar and stores the checksum +in foo.bar.MD5. If foo.bar.MD5 already exists, it is overwritten.

      + +

      Example 3

      +
      <checksum file="foo.bar" property="foobarMD5"/>
      +

      Generates a MD5 checksum for foo.bar and stores it in the project +property foobarMD5.

      + +

      Example 4

      +
      <checksum file="foo.bar" verifyProperty="isMD5ok"/>
      +

      Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 +and sets isMD5ok to either true or false, depending upon the result.

      + +

      Example 5

      +
      <checksum file="foo.bar" algorithm="SHA-512" fileext="asc"/>
      +

      Generates a SHA-512 checksum for foo.bar and stores the checksum in the destination +file foo.bar.asc. foo.bar.asc is overwritten only if foo.bar +is newer than itself.

      + +

      Example 6

      +
      <checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/>
      +

      Generates a MD5 checksum for foo.bar, compares it against the value of the +property md5, and sets isEqual to either true or false, +depending upon the result.

      -

      Example 7

      -
      +

      Example 7

      +
       <checksum>
         <fileset dir=".">
           <include name="foo*"/>
         </fileset>
      -</checksum>
      -
      -Works just like Example 1, but generates a .MD5 file for every file that begins with the name foo. +</checksum> +

      Works just like Example 1, but generates a .MD5 file for every file that begins with +the name foo.

      -

      Example 8

      -
      +

      Example 8

      +
       <condition property="isChecksumEqual">
         <checksum>
           <fileset dir=".">
             <include name="foo.bar"/>
           </fileset>
         </checksum>
      -</condition>
      -
      -Works like Example 4, but only sets isChecksumEqual to true, if the -checksum matches - it will never be set to false. This example -demonstrates use with the Condition task. - - -

      Note:

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

      Works like Example 4, but only sets isChecksumEqual to true, if the checksum +matches—it will never be set to false. This example demonstrates use with +the condition task.

      + +

      Note

      +

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

      - diff -Nru ant-1.9.10/manual/Tasks/chgrp.html ant-1.10.3/manual/Tasks/chgrp.html --- ant-1.9.10/manual/Tasks/chgrp.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/chgrp.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,125 +24,105 @@ -

      Chgrp

      -

      Since Apache Ant 1.6.

      +

      Chgrp

      +

      Since Apache Ant 1.6.

      Description

      -

      Changes the group of a file or all files inside specified -directories. Right now it has effect only under Unix. The group -attribute is equivalent to the corresponding argument for the chgrp -command.

      - -

      FileSets, -DirSets or FileLists can be specified using -nested <fileset>, <dirset> and -<filelist> elements.

      - -

      Starting with Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

      - -

      By default this task will use a single invocation of the underlying -chgrp command. If you are working on a large number of files this may -result in a command line that is too long for your operating system. -If you encounter such problems, you should set the maxparallel -attribute of this task to a non-zero value. The number to use highly -depends on the length of your file names (the depth of your directory -tree) and your operating system, so you'll have to experiment a -little. POSIX recommends command line length limits of at least 4096 -characters, this may give you an approximation for the number you -could use as initial value for these experiments.

      - -

      By default this task won't do anything unless it detects it is - running on a Unix system. If you know for sure that you have a - "chgrp" executable on your PATH that is command line compatible with - the Unix command, you can use the task's os attribute and set its - value to your current os.

      +

      Changes the group of a file or all files inside specified directories. Right now it has effect +only under Unix. The group attribute is equivalent to the corresponding argument for +the chgrp command.

      + +

      FileSets, DirSets +or FileLists can be specified using +nested <fileset>, <dirset> and <filelist> +elements.

      + +

      Since Ant 1.7, this task supports +arbitrary resource collections as nested +elements.

      + +

      By default this task will use a single invocation of the underlying chgrp command. +If you are working on a large number of files this may result in a command line that is too long for +your operating system. If you encounter such problems, you should set the maxparallel +attribute of this task to a non-zero value. The number to use highly depends on the length of your +file names (the depth of your directory tree) and your operating system, so you'll have to +experiment a little. POSIX recommends command line length limits of at least 4096 characters, this +may give you an approximation for the number you could use as initial value for these +experiments.

      + +

      By default this task won't do anything unless it detects it is running on a Unix system. If you +know for sure that you have a chgrp executable on your PATH that is +command line compatible with the Unix command, you can use the task's os attribute and +set its value to your current OS.

      Parameters

      - +
      - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - + - + -
      AttributeDescriptionRequiredAttributeDescriptionRequired
      filethe file or directory of which the group must be - changed.Yes, unless nested - <fileset|filelist|dirset> - elements are specifiedfilethe file or directory of which the group must be changed.Yes, unless nested <fileset|filelist|dirset> elements are specified
      groupthe new group.Yesgroupthe new group.Yes
      parallelprocess all specified files using a single - chgrp command. Defaults to true.Noparallelprocess all specified files using a single chgrp command.No; defaults to true
      typeOne of file, dir or - both. If set to file, only the group of - plain files are going to be changed. If set to dir, only - the directories are considered.
      - Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
      No, default is filetypeOne of file, dir or both. If set to file, only the group of + plain files are going to be changed. If set to dir, only the directories are + considered.
      Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
      No; default is file
      maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Defaults to unlimited.NomaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited.No; defaults to unlimited
      verboseWhether to print a summary after execution or not. - Defaults to false.NoverboseWhether to print a summary after execution or not.No; defaults to false
      oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
      osfamilyOS family as used in - the <os> + osfamilyOS family as used in the <os> condition.No - defaults to "unix"No; defaults to unix

      Examples

      -
      -<chgrp file="${dist}/start.sh" group="coders"/>
      -
      -
      -

      makes the "start.sh" file belong to the coders group on a -UNIX system.

      -
      +
      <chgrp file="${dist}/start.sh" group="coders"/>
      + +

      makes the start.sh file belong to the coders group on a UNIX +system.

      +
       <chgrp group="coders">
         <fileset dir="${dist}/bin" includes="**/*.sh"/>
      -</chgrp>
      -
      -
      -

      makes all ".sh" files below ${dist}/bin -belong to the coders group on a UNIX system.

      -
      +</chgrp> + +

      makes all .sh files below ${dist}/bin belong to the coders +group on a UNIX system.

      +
       <chgrp group="coders">
         <fileset dir="shared/sources1">
      @@ -151,14 +131,12 @@
         <fileset refid="other.shared.sources"/>
       </chgrp>
       
      -
      -

      makes all files below shared/sources1 (except those -below any directory named trial) belong to the coders group on a UNIX -system. In addition all files belonging to a FileSet -with id other.shared.sources get the same + +

      makes all files below shared/sources1 (except those below any directory +named trial) belong to the coders group on a UNIX system. In addition all +files belonging to a FileSet with id other.shared.sources get the same group.

      -
       <chgrp group="webdev" type="file">
         <fileset dir="/web">
      @@ -168,18 +146,12 @@
         <dirset dir="/web">
           <include name="**/test_*"/>
         </dirset>
      -</chmod>
      -
      -
      - -

      makes all .test.jsp, and .new files belong to -group webdev. Directories beginning with test_ also will belong -to webdev, but if there is a directory that ends in .new or a file -that begins with test_ it will be unaffected.

      - - +</chmod> +

      makes all .test.jsp, and .new files belong to +group webdev. Directories with names beginning with test_ also will belong +to webdev, but if there is a directory name that ends in .new or a file +name that begins with test_ it will be unaffected.

      - diff -Nru ant-1.9.10/manual/Tasks/chmod.html ant-1.10.3/manual/Tasks/chmod.html --- ant-1.9.10/manual/Tasks/chmod.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/chmod.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,169 +24,144 @@ -

      Chmod

      +

      Chmod

      Description

      -

      Changes the permissions of a file or all files inside specified -directories. Right now it has effect only under Unix or NonStop Kernel (Tandem). -The permissions are also UNIX style, like the argument for the chmod command.

      -

      See the section on directory based -tasks, on how the inclusion/exclusion of files works, and how to -write patterns.

      - -

      This task holds an implicit FileSet and supports all of -FileSet's attributes and nested elements directly. More sets can be -specified using nested <fileset> or -<dirset> (since Apache Ant 1.6) elements.

      - -

      Starting with Ant 1.6, this task also supports nested filelists.

      - -

      Starting with Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

      - -

      By default this task will use a single invocation of the underlying -chmod command. If you are working on a large number of files this may -result in a command line that is too long for your operating system. -If you encounter such problems, you should set the maxparallel -attribute of this task to a non-zero value. The number to use highly -depends on the length of your file names (the depth of your directory -tree) and your operating system, so you'll have to experiment a -little. POSIX recommends command line length limits of at least 4096 -characters, this may give you an approximation for the number you -could use as initial value for these experiments.

      - -

      By default this task won't do anything unless it detects it is - running on a Unix system. If you know for sure that you have a - "chmod" executable on your PATH that is command line compatible with - the Unix command, you can use the task's os attribute and set its - value to your current os.

      +

      Changes the permissions of a file or all files inside specified directories. Right now it has +effect only under Unix or NonStop Kernel (Tandem). The permissions are also UNIX style, like the +argument for the chmod command.

      +

      See the section on directory based tasks, on +how the inclusion/exclusion of files works, and how to write patterns.

      + +

      This task holds an implicit FileSet and supports all of +FileSet's attributes and nested elements directly. More sets can be specified using +nested <fileset> or <dirset> (since Apache Ant 1.6) +elements.

      + +

      Since Ant 1.6, this task also supports +nested filelists.

      + +

      Since Ant 1.7, this task supports +arbitrary resource collections as nested +elements.

      + +

      By default this task will use a single invocation of the underlying chmod command. +If you are working on a large number of files this may result in a command line that is too long for +your operating system. If you encounter such problems, you should set the maxparallel +attribute of this task to a non-zero value. The number to use highly depends on the length of your +file names (the depth of your directory tree) and your operating system, so you'll have to +experiment a little. POSIX recommends command line length limits of at least 4096 characters, this +may give you an approximation for the number you could use as initial value for these +experiments.

      + +

      By default this task won't do anything unless it detects it is running on a Unix system. If you +know for sure that you have a chmod executable on your PATH that is +command line compatible with the Unix command, you can use the task's os attribute and +set its value to your current OS.

      + +

      See the setpermissions task for a platform independent +alternative.

      Parameters

      - +
      - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      filethe file or single directory of which the permissions - must be changed.exactly one of the two or nested <fileset/list> elements.filethe file or single directory of which the permissions must be changed.Exactly one of the two, unless + nested <fileset|filelist|dirset> elements are specified
      dirthe directory which holds the files whose permissions - must be changed.
      - Note: for backwards compatibility - reasons <chmod dir="some-dir"/> will - only change the permissions on "some-dir" but not recurse into - it, unless you also specify any patterns.
      dirthe directory which holds the files whose permissions must be + changed.
      Note: for backwards compatibility reasons <chmod + dir="some-dir"/> will only change the permissions on some-dir but not + recurse into it, unless you also specify any patterns.
      permthe new permissions.Yespermthe new permissions.Yes
      includescomma- or space-separated list of patterns of files that must be - included.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
      excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
      defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
      parallelprocess all specified files using a single - chmod command. Defaults to true.Noparallelprocess all specified files using a single chmod command.No; defaults to true
      typeOne of file, dir or - both. If set to file, only the permissions of - plain files are going to be changed. If set to dir, only - the directories are considered.
      - Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
      No, default is filetypeOne of file, dir or both. If set to file, only the permissions + of plain files are going to be changed. If set to dir, only the directories are + considered.
      Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
      No; default is file
      maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Defaults to unlimited. Since Ant 1.6.NomaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited. Since Ant 1.6.No; defaults to unlimited
      verboseWhether to print a summary after execution or not. - Defaults to false. Since Ant 1.6.NoverboseWhether to print a summary after execution or not. Since Ant 1.6.No; defaults to false
      oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
      osfamilyOS family as used in - the <os> condition.No - defaults to "unix"osfamilyOS family as used in the <os> condition.No; defaults to unix

      Examples

      -
      -<chmod file="${dist}/start.sh" perm="ugo+rx"/>
      -
      -

      makes the "start.sh" file readable and executable for anyone on a -UNIX system.

      -
      -<chmod file="${dist}/start.sh" perm="700"/>
      -
      -

      makes the "start.sh" file readable, writable and executable only for the owner on a +

      <chmod file="${dist}/start.sh" perm="ugo+rx"/>
      +

      makes the start.sh file readable and executable for anyone on a UNIX system.

      + +
      <chmod file="${dist}/start.sh" perm="700"/>
      +

      makes the start.sh file readable, writable and executable only for the owner on a UNIX system.

      -
      +
      -<chmod dir="${dist}/bin" perm="ugo+rx" 
      -       includes="**/*.sh"/>
      -
      -
      -

      makes all ".sh" files below ${dist}/bin -readable and executable for anyone on a UNIX system.

      -
      +<chmod dir="${dist}/bin" perm="ugo+rx" + includes="**/*.sh"/> +

      makes all .sh files below ${dist}/bin readable and executable for +anyone on a UNIX system.

      +
       <chmod perm="g+w">
         <fileset dir="shared/sources1">
           <exclude name="**/trial/**"/>
         </fileset>
         <fileset refid="other.shared.sources"/>
      -</chmod>
      -
      -
      -

      makes all files below shared/sources1 (except those -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 id other.shared.sources get the same -permissions.

      +</chmod> +

      makes all files below shared/sources1 (except those 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 id other.shared.sources get the same permissions.

      -
       <chmod perm="go-rwx" type="file">
         <fileset dir="/web">
      @@ -196,30 +171,17 @@
         <dirset dir="/web">
           <include name="**/private_*"/>
         </dirset>
      -</chmod>
      -
      -
      - -

      keeps non-owners from touching cgi scripts, files with a .old -extension or directories beginning with private_. A directory -ending in .old or a file beginning with private_ would remain -unaffected.

      - - -

      Note on maxparallel attribute

      -

      - Some shells have a limit of the number of characters that - a command line may contain. - This maximum limit varies from shell to shell and from operating - system to operating system. - If one has a large number of files to change mode on, consider - using the maxparallel attribute. For example - when using AIX and the limit is reached, the system responds - with a warning: "Warning: - UNIXProcess.forkAndExec native error: The parameter or environment lists - are too long". A value of about 300 seems to result in a - command line that is acceptable. -

      +</chmod> +

      keeps non-owners from touching cgi scripts, files with a .old extension or +directories beginning with private_. A directory ending in .old or a file +beginning with private_ would remain unaffected.

      + +

      Note on maxparallel attribute

      +

      Some shells have a limit of the number of characters that a command line may contain. This +maximum limit varies from shell to shell and from operating system to operating system. If one has +a large number of files to change mode on, consider using the maxparallel attribute. For +example when using AIX and the limit is reached, the system responds with a warning: "Warning: +UNIXProcess.forkAndExec native error: The parameter or environment lists are too long". A +value of about 300 seems to result in a command line that is acceptable.

      - diff -Nru ant-1.9.10/manual/Tasks/chown.html ant-1.10.3/manual/Tasks/chown.html --- ant-1.9.10/manual/Tasks/chown.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/chown.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,140 +24,114 @@ -

      Chown

      -

      Since Apache Ant 1.6.

      +

      Chown

      +

      Since Apache Ant 1.6.

      Description

      -

      Changes the owner of a file or all files inside specified -directories. Right now it has effect only under Unix. The owner -attribute is equivalent to the corresponding argument for the chown -command.

      - -

      FileSets, -DirSets or FileLists can be specified using -nested <fileset>, <dirset> and -<filelist> elements.

      - -

      Starting with Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

      - -

      By default this task will use a single invocation of the underlying -chown command. If you are working on a large number of files this may -result in a command line that is too long for your operating system. -If you encounter such problems, you should set the maxparallel -attribute of this task to a non-zero value. The number to use highly -depends on the length of your file names (the depth of your directory -tree) and your operating system, so you'll have to experiment a -little. POSIX recommends command line length limits of at least 4096 -characters, this may give you an approximation for the number you -could use as initial value for these experiments.

      - -

      By default this task won't do anything unless it detects it is - running on a Unix system. If you know for sure that you have a - "chown" executable on your PATH that is command line compatible with - the Unix command, you can use the task's os attribute and set its - value to your current os.

      +

      Changes the owner of a file or all files inside specified directories. Right now it has effect +only under Unix. The owner attribute is equivalent to the corresponding argument for +the chown command.

      + +

      FileSets, DirSets +or FileLists can be specified using +nested <fileset>, <dirset> and <filelist> +elements.

      + +

      Since Ant 1.7, this task supports +arbitrary resource collections as nested +elements.

      + +

      By default this task will use a single invocation of the underlying chown command. +If you are working on a large number of files this may result in a command line that is too long for +your operating system. If you encounter such problems, you should set the maxparallel +attribute of this task to a non-zero value. The number to use highly depends on the length of your +file names (the depth of your directory tree) and your operating system, so you'll have to +experiment a little. POSIX recommends command line length limits of at least 4096 characters, this +may give you an approximation for the number you could use as initial value for these +experiments.

      + +

      By default this task won't do anything unless it detects it is running on a Unix system. If you +know for sure that you have a chown executable on your PATH that is command +line compatible with the Unix command, you can use the task's os attribute and set its +value to your current OS.

      Parameters

      - +
      - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - + - + -
      AttributeDescriptionRequiredAttributeDescriptionRequired
      filethe file or directory of which the owner must be + filethe file or directory of which the owner must be changed.Yes or nested - <fileset/list> elements.Yes, unless nested <fileset|filelist|dirset> elements are specified
      ownerthe new owner.Yesownerthe new owner.Yes
      parallelprocess all specified files using a single - chown command. Defaults to true.Noparallelprocess all specified files using a single chown command.No; defaults to true
      typeOne of file, dir or - both. If set to file, only the owner of - plain files are going to be changed. If set to dir, only - the directories are considered.
      - Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
      No, default is filetypeOne of file, dir or both. If set to file, only the owner of + plain files are going to be changed. If set to dir, only the directories are + considered.
      Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
      No; default is file
      maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Defaults to unlimited.NomaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited.No; defaults to unlimited
      verboseWhether to print a summary after execution or not. - Defaults to false.NoverboseWhether to print a summary after execution or not.No; defaults to false
      oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
      osfamilyOS family as used in - the <os> + osfamilyOS family as used in the <os> condition.No - defaults to "unix"No; defaults to unix

      Examples

      -
      -<chown file="${dist}/start.sh" owner="coderjoe"/>
      -
      -
      -

      makes the "start.sh" file belong to coderjoe on a -UNIX system.

      -
      +
      <chown file="${dist}/start.sh" owner="coderjoe"/>
      +

      makes the start.sh file belong to coderjoe on a UNIX system.

      +
      -    <chown owner="coderjoe">
      -      <fileset dir="${dist}/bin" includes="**/*.sh"/>
      -    </chown>
      -
      -
      -

      makes all ".sh" files below ${dist}/bin -belong to coderjoe on a UNIX system.

      -
      +<chown owner="coderjoe"> + <fileset dir="${dist}/bin" includes="**/*.sh"/> +</chown> +

      makes all .sh files below ${dist}/bin belong to coderjoe +on a UNIX system.

      +
       <chown owner="coderjoe">
         <fileset dir="shared/sources1">
           <exclude name="**/trial/**"/>
         </fileset>
         <fileset refid="other.shared.sources"/>
      -</chown>
      -
      -
      -

      makes all files below shared/sources1 (except those -below any directory named trial) belong to coderjoe on a UNIX -system. In addition all files belonging to a FileSet -with id other.shared.sources get the same -owner.

      +</chown> +

      makes all files below shared/sources1 (except those below any directory +named trial) belong to coderjoe on a UNIX system. In addition all files +belonging to a FileSet with id other.shared.sources get the same owner.

      -
       <chown owner="webadmin" type="file">
         <fileset dir="/web">
      @@ -167,17 +141,10 @@
         <dirset dir="/web">
           <include name="**/private_*"/>
         </dirset>
      -</chmod>
      -
      -
      - -

      makes cgi scripts, files with a .old extension or -directories beginning with private_ belong to the user named -webadmin. A directory ending in .old or a file beginning with -private_ would remain unaffected.

      - - +</chmod> +

      makes cgi scripts, files with a .old extension or directories beginning +with private_ belong to the user named webadmin. A directory ending +in .old or a file beginning with private_ would remain unaffected.

      - diff -Nru ant-1.9.10/manual/Tasks/clearcase.html ant-1.10.3/manual/Tasks/clearcase.html --- ant-1.9.10/manual/Tasks/clearcase.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/clearcase.html 2018-03-24 12:37:12.000000000 +0000 @@ -19,60 +19,58 @@ - Clearcase Tasks + ClearCase Tasks

      Apache Ant ClearCase Tasks

      -

      by:
      -Curtis White (cwhite at aracnet dot com),
      -Sean P. Kane (spkane at genomatica dot com),
      -Rob Anderson (Anderson.Rob at vectorscm dot com), and
      +

      by:
      +Curtis White (cwhite at aracnet dot com),
      +Sean P. Kane (spkane at genomatica dot com),
      +Rob Anderson (Anderson.Rob at vectorscm dot com), and
      Sean Egan (sean at cm-logic dot com)

      -

      Version 1.6 - 02/25/2003

      +

      Version 1.6—02/25/2003

      ClearCase Support

      Table of Contents

      -
      -

      Introduction

      -

      Apache Ant provides several optional tasks for working with ClearCase. These tasks correspond to various -ClearCase commands using the Cleartool program. The current tasks available for Ant correspond to only -a few of the significant ClearCase commands.

      - -

      More tasks can be easily added by deriving from the ClearCase class and then adding -functionality that is specific to that ClearCase command.

      -

      - Important: these tasks all require cleartool on the command line. - If a task fails with an IOException, especially error code 2 on Windows, - this is your problem. -

      +
      +

      Introduction

      +

      Apache Ant provides several optional tasks for working with ClearCase. These tasks correspond to +various ClearCase commands using the cleartool program. The current tasks available for +Ant correspond to only a few of the significant ClearCase commands.

      +

      More tasks can be easily added by deriving from the ClearCase class and then adding functionality +that is specific to that ClearCase command.

      +

      Important: these tasks all require cleartool on the command line. If a task fails +with an IOException, especially error=2 on Windows, this is your +problem.

      -
      -

      CCCheckin

      +
      + +

      CCCheckin

      Description

      -Task to perform a "cleartool checkin" command to ClearCase. +

      Task to perform a cleartool checkin command to ClearCase.

      Parameters

      - +
      @@ -80,20 +78,17 @@ - + - - + + - - + @@ -107,40 +102,40 @@ - + - + - - + +
      Attribute Values
      viewpathPath to the ClearCase view file or directory that the command - will operate onPath to the ClearCase view file or directory that the command will operate on No
      commentSpecify a comment. Only one of comment or commentfile may be used.NoSpecify a commentNo; only one of the two may be used
      commentfileSpecify a file containing a comment. Only one of comment or commentfile - may be used.NoSpecify a file containing a comment
      nowarn
      keepcopyKeeps a copy of the file with a .keep extensionKeeps a copy of the file with a .keep extension No
      identicalAllows the file to be checked in even if it is identical - to the originalAllows the file to be checked in even if it is identical to the original No
      failonerrThrow an exception if the command fails. Default is trueNoThrow an exception if the command failsNo; default is true

      Examples

      -
      +
       <cccheckin viewpath="c:/views/viewdir/afile"
      -        commentfile="acomment.txt"
      -        nowarn="true"
      -        identical="true"/>
      -
      -
      -

      Does a ClearCase checkin on the file c:/views/viewdir/afile. -Comment text from the file acomment.txt is added to ClearCase as a comment. -All warning messages are suppressed. The file is checked in even if it is -identical to the original.

      -
      -

      CCCheckout

      + commentfile="acomment.txt" + nowarn="true" + identical="true"/> + +

      Does a ClearCase checkin on the file c:/views/viewdir/afile. Comment +text from the file acomment.txt is added to ClearCase as a comment. All warning +messages are suppressed. The file is checked in even if it is identical to the +original.

      + +
      + +

      CCCheckout

      Description

      -Task to perform a "cleartool checkout" command to ClearCase. +

      Task to perform a cleartool checkout command to ClearCase.

      Parameters

      - +
      @@ -148,8 +143,7 @@ - + @@ -164,8 +158,7 @@ - + @@ -175,7 +168,8 @@ - + @@ -185,48 +179,45 @@ - - + + - - + - - + + - - + +
      Attribute Values
      viewpathPath to the ClearCase view file or directory that the command - will operate onPath to the ClearCase view file or directory that the command will operate on No
      nodataChecks out the file but does not create an editable file - containing its dataChecks out the file but does not create an editable file containing its data No
      versionAllows checkout of a version other than main latestAllows checkout of a version other than /main/LATEST (or whatever is selected + by a config spec) No
      commentSpecify a comment. Only one of comment or commentfile may be used.NoSpecify a commentNo; only one of the two may be used
      commentfileSpecify a file containing a comment. Only one of comment or - commentfile may be used.NoSpecify a file containing a comment
      notcoFail if it's already checked out to the current view. Set to false to ignore it.
      - Since ant 1.6.1
      NoFail if it's already checked out to the current view. Set to false to ignore + it.
      Since Ant 1.6.1
      No; default is true
      failonerrThrow an exception if the command fails. Default is true.
      - Since ant 1.6.1
      NoThrow an exception if the command fails.
      Since Ant 1.6.1
      No; default is true

      Examples

      -
      +
       <cccheckout viewpath="c:/views/viewdir/afile"
      -        reserved="true"
      -        branch="abranch"
      -        nowarn="true"
      -        comment="Some comment text"/>
      -
      -
      -

      Does a ClearCase checkout on the file c:/views/viewdir/afile. -It is checked out as reserved on branch called abranch. All -warning messages are suppressed. A Some comment text is added to -ClearCase as a comment.

      -
      -

      CCUnCheckout

      + reserved="true" + branch="abranch" + nowarn="true" + comment="Some comment text"/> + +

      Does a ClearCase checkout on the file c:/views/viewdir/afile. It is +checked out as reserved on branch called abranch. All warning messages are +suppressed. A "Some comment text" is added to ClearCase as a comment.

      + +
      + +

      CCUnCheckout

      Description

      -Task to perform a UnCheckout command to ClearCase. +

      Task to perform a cleartool uncheckout command to ClearCase.

      Parameters

      - +
      @@ -234,38 +225,34 @@ - + - + - - + +
      Attribute Values
      viewpathPath to the ClearCase view file or directory that the command - will operate onPath to the ClearCase view file or directory that the command will operate on No
      keepcopySpecifies whether to keep a copy of the file with a .keep - extension or notSpecifies whether to keep a copy of the file with a .keep extension or not No
      failonerrThrow an exception if the command fails. Default is true
      - Since ant 1.6.1
      NoThrow an exception if the command fails.
      Since Ant 1.6.1
      No; default is true

      Examples

      -
      -
      -<ccuncheckout viewpath="c:/views/viewdir/afile"
      -        keepcopy="true"/>
      -
      -
      -

      Does a ClearCase uncheckout on the file c:/views/viewdir/afile. -A copy of the file called c:/views/viewdir/afile.keep is kept.

      -
      -

      CCUpdate

      + +
      <ccuncheckout viewpath="c:/views/viewdir/afile" keepcopy="true"/>
      + +

      Does a ClearCase uncheckout on the file c:/views/viewdir/afile. A copy +of the file called c:/views/viewdir/afile.keep is kept.

      + +
      + +

      CCUpdate

      Description

      -Task to perform an "cleartool update" command to ClearCase. +

      Task to perform an cleartool update command to ClearCase.

      Parameters

      - +
      @@ -273,8 +260,7 @@ - + @@ -294,54 +280,49 @@ - + - + - + - - + +
      Attribute Values
      viewpathPath to the ClearCase snapshot view file or directory that the command - will operate onPath to the ClearCase snapshot view file or directory that the command will operate on No
      renameSpecifies that hijacked files should be renamed with a .keep extensionSpecifies that hijacked files should be renamed with a .keep extension No
      currenttimeSpecifies that modification time should be written as the - current time. Either currenttime or preservetime can be - specified.Specifies that modification time should be written as the current time. Mutually exclusive + with preservetime. No
      preservetimeSpecifies that modification time should preserved from the - VOB time. Either currenttime or preservetime can be - specified.Specifies that modification time should preserved from the VOB time. Mutually exclusive + with currenttime. No
      failonerrThrow an exception if the command fails. Default is true.
      - Since ant 1.6.1
      NoThrow an exception if the command fails.
      Since Ant 1.6.1
      No; default is true

      Examples

      -
      +
       <ccupdate viewpath="c:/views/viewdir"
      -        graphical="false"
      -        log="log.log"
      -        overwrite="true"
      -        currenttime="true"
      -        rename="false"/>
      -
      -
      -

      Does a ClearCase update on the snapshot view directory c:/views/viewdir. -A graphical dialog will be displayed. The output will be logged to -log.log and it will overwrite any hijacked files. The modified -time will be set to the current time.

      + graphical="false" + log="log.log" + overwrite="true" + currenttime="true" + rename="false"/> +

      Does a ClearCase update on the snapshot view +directory c:/views/viewdir. A graphical dialog will be displayed. The output will be +logged to log.log and it will overwrite any hijacked files. The modified time will be +set to the current time.

      +
      -
      -

      CCMklbtype

      +

      CCMklbtype

      Description

      -Task to perform a "mklbtype" command to ClearCase. +

      Task to perform a cleartool mklbtype command to ClearCase.

      Parameters

      - +
      @@ -351,74 +332,72 @@ - + - + - + - - - + + + - - - + + - + - + - + - - - + + + - - - + + - - + +
      Attribute Valuestypename Name of the label type to create Yes
      vob Name of the VOB No
      replace Replace an existing label definition of the same type No
      globalEither global or ordinary can be specified, not both. Creates a label type that is global to the VOB or to VOBs that use this VOBNo
      Creates a label type that is global to the VOB or to VOBs that use this VOB.No; only one of the two may be used, + default ordinary=true
      ordinaryEither global or ordinary can be specified, not both. Creates a label type that can be used only in the current VOB. DefaultNo
      Creates a label type that can be used only in the current VOB.
      pbranch Allows the label type to be used once per branch in a given element's version tree No
      sharedSets the way mastership is checked by ClearCase. See ClearCase documentation for detailsSets the way mastership is checked by ClearCase. See ClearCase documentation for + details No
      commentSpecify a comment. Only one of comment or cfile may be used.No
      Specify a commentNo; only one of the two may be used
      commentfileSpecify a file containing a comment. Only one of comment or cfile may be used.No
      Specify a file containing a comment
      failonerrThrow an exception if the command fails. Default is true
      - Since ant 1.6.1
      NoThrow an exception if the command fails.
      Since Ant 1.6.1
      No; default is true

      Examples

      -
      +
       <ccmklbtype typename="VERSION_1"
      -        ordinary="true"
      -        comment="Development version 1"/>
      -
      -
      -

      Does a ClearCase mklbtype to create a label type named VERSION_1. -It is created as ordinary so it is available only to the current VOB. -The text Development version 1 is added as a comment.

      + ordinary="true" + comment="Development version 1"/> + +

      Does a ClearCase mklbtype to create a label type named VERSION_1. It +is created as ordinary so it is available only to the current VOB. The text Development +version 1 is added as a comment.

      +
      -
      -

      CCMklabel

      +

      CCMklabel

      Description

      -Task to perform a "mklabel" command to ClearCase. +

      Task to perform a cleartool mklabel command to ClearCase.

      Parameters

      - +
      @@ -428,71 +407,69 @@ - + - + - + - + - + - + - + - - - + + + - - - + + - - + +
      Attribute Valuestypename Name of the label type Yes
      viewpath Path to the ClearCase view file or directory that the command will operate on No
      replace Replace a label of the same type on the same branch No
      recurseProcess each subdirectory under viewpathProcess each subdirectory under viewpath No
      version Identify a specific version to attach the label to No
      vob Name of the VOB No
      commentSpecify a comment. Only one of comment or cfile may be used.No
      Specify a commentNo; only one of the two may be used
      commentfileSpecify a file containing a comment. Only one of comment or cfile may be used.No
      Specify a file containing a comment
      failonerrThrow an exception if the command fails. Default is true
      - Since ant 1.6.1
      NoThrow an exception if the command fails.
      Since Ant 1.6.1
      No; default is true

      Examples

      -
      +
       <ccmklabel viewpath="c:/views/viewdir/afile"
      -        comment="Some comment text"
      -        recurse="true"
      -        version="\main\2"
      -        typename="VERSION_1"/>
      +           comment="Some comment text"
      +           recurse="true"
      +           version="\main\2"
      +           typename="VERSION_1"/>
       
      -
      -

      Does a ClearCase mklabel on the file c:/views/viewdir/afile under -the main branch for version 2 (\main\2). Text Some comment text is added -as a comment. It will recurse all subdirectories. +

      Does a ClearCase mklabel on the file c:/views/viewdir/afile under the +main branch for version 2 (\main\2). Text "Some comment text" is +added as a comment. It will recurse all subdirectories.

      + +
      -
      -

      CCRmtype

      +

      CCRmtype

      Description

      -Task to perform a "rmtype" command to ClearCase. +

      Task to perform a cleartool rmtype command to ClearCase.

      Parameters

      - +
      @@ -501,458 +478,441 @@ + + + + +
      Attribute Values
      typekind The kind of type to create. Valid types are: - +
      + + + + + + + + + + + + + + + + + + + + - - - - + + -
      KindDescription
      attypeattribute type
      brtypebranch type
      eltypeelement type
      hltypehyperlink type
      attype
      - brtype
      - eltype
      - hltype
      - lbtype
      - trtype -
      -
      - -
      - -
      - -
      - -
      - - -
      attribute type
      - branch type
      - element type
      - hyperlink type
      - label type
      - trigger type -
      lbtypelabel type
      -
      trtypetrigger type
      Yes
      typename The name of the type to remove Yes
      ignoreUsed with trigger types only. Forces removal of trigger type even if a pre-operation trigger would prevent its removalUsed with trigger types only. Forces removal of trigger type even if a pre-operation trigger + would prevent its removal No
      rmall Removes all instances of a type and the type object itself No
      commentSpecify a comment. Only one of comment or cfile may be used.No
      Specify a commentNo; only one of the two may be used
      commentfileSpecify a file containing a comment. Only one of comment or cfile may be used.No
      Specify a file containing a comment
      failonerrThrow an exception if the command fails. Default is true - Since ant 1.6.1NoThrow an exception if the command fails. Since Ant 1.6.1No; default is true

      Examples

      -
      +
       <ccrmtype typekind="lbtype"
      -        typename="VERSION_1"
      -        commentfile="acomment.txt"
      -        rmall="true"/>
      -
      -
      -

      Does a ClearCase rmtype to remove a label type (lbtype) named VERSION_1. -Comment text from the file acomment.txt is added as a comment. All instances of the type -are removed, including the type object itself.

      -
      - -

      CCLock

      -

      Description

      -Task to perform a "cleartool lock" command to ClearCase. -

      Parameters

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + typename="VERSION_1" + commentfile="acomment.txt" + rmall="true"/> + +

      Does a ClearCase rmtype to remove a label type (lbtype) +named VERSION_1. Comment text from the file acomment.txt is added as a +comment. All instances of the type are removed, including the type object itself.

      + +
      + +

      CCLock

      +

      Description

      +

      Task to perform a cleartool lock command to ClearCase.

      +

      Parameters

      +
      AttributeValuesRequired
      replaceSpecifies replacing an existing lockNo
      nusersSpecifies user(s) who can still modify the objectNo
      obsoleteSpecifies that the object should be marked obsoleteNo
      commentSpecifies how to populate comments fieldsNo
      pnameSpecifies the object pathname to be locked.No
      objselectThis variable is obsolete. Should use objsel instead.No
      objselSpecifies the object(s) to be locked.
      - Since ant 1.6.1
      No
      - - + + + + + + + - -
      failonerrThrow an exception if the command fails. Default is true.
      - Since ant 1.6.1
      AttributeValuesRequired
      replaceSpecifies replacing an existing lock No
      -

      Examples

      -
      -
      -<cclock
      -    objsel="stream:Application_Integration@\MyProject_PVOB"
      -    />
      -
      -
      -

      Does a ClearCase lock on the object stream:Application_Integration@\MyProject_PVOB.

      -
      - -

      CCUnlock

      -

      Description

      -Task to perform a "cleartool unlock" command to ClearCase. -

      Parameters

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      AttributeValuesRequired
      commentSpecifies how to populate comments fieldsNo
      pnameSpecifies the object pathname to be unlocked.No
      objselectThis variable is obsolete. Should use objsel instead.No
      objselSpecifies the object(s) to be unlocked.
      - Since ant 1.6.1
      No
      failonerrThrow an exception if the command fails. Default is true.
      - Since ant 1.6.1
      nusersSpecifies user(s) who can still modify the object No
      obsoleteSpecifies that the object should be marked obsoleteNo
      commentSpecifies how to populate comments fieldsNo
      pnameSpecifies the object pathname to be locked.No
      objselectObsolete. Use objsel instead.No
      objselSpecifies the object(s) to be locked.
      Since Ant 1.6.1
      No
      failonerrThrow an exception if the command fails.
      Since Ant 1.6.1
      No; default is true
      +

      Examples

      -
    -

    Examples

    -
    -
    -<ccunlock
    -    objsel="stream:Application_Integration@\MyProject_PVOB"
    -    />
    -
    -
    -

    Does a ClearCase unlock on the object stream:Application_Integration@\MyProject_PVOB.

    -
    - -

    CCMkbl

    -

    Description

    -Task to perform a "cleartool mkbl" command to ClearCase. -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    <cclock objsel="stream:Application_Integration@\MyProject_PVOB"/>
    + +

    Does a ClearCase lock on the +object stream:Application_Integration@\MyProject_PVOB.

    + +
    + +

    CCUnlock

    +

    Description

    +

    Task to perform a cleartool unlock command to ClearCase.

    +

    Parameters

    +
    AttributeValuesRequired
    commentSpecify a comment. Only one of comment or cfile may be -used.No
    commentfileSpecify a file containing a comment. Only one of comment or -cfile may be used.No
    baselinerootnameSpecify the name to be associated with the baseline.Yes
    nowarnSuppress warning messagesNo
    identicalAllows the baseline to be created even if it is identical to the -previous baseline.No
    fullCreates a full baseline.No
    nlabelAllows the baseline to be created without a label.No
    + + + + + + + + + + + + + + + + + + + + + + + + + - + + + +
    AttributeValuesRequired
    commentSpecifies how to populate comments fieldsNo
    pnameSpecifies the object pathname to be unlocked.No
    objselectObsolete. Use objsel instead.No
    objselSpecifies the object(s) to be unlocked.
    Since Ant 1.6.1
    No
    failonerrThrow an exception if the command fails. Default is true.
    - Since ant 1.6.1
    Throw an exception if the command fails.
    Since Ant 1.6.1
    No; default is true
    +

    Examples

    + +
    <ccunlock objsel="stream:Application_Integration@\MyProject_PVOB"/>
    + +

    Does a ClearCase unlock on the +object stream:Application_Integration@\MyProject_PVOB.

    + +
    + +

    CCMkbl

    +

    Description

    +

    Task to perform a cleartool mkbl command to ClearCase.

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + -
    AttributeValuesRequired
    commentSpecify a commentNo; only one of the two may be used
    commentfileSpecify a file containing a comment
    baselinerootnameSpecify the name to be associated with the baseline.Yes
    nowarnSuppress warning messages No
    + + identical + Allows the baseline to be created even if it is identical to the previous baseline. + No + + + full + Creates a full baseline. + No + + + nlabel + Allows the baseline to be created without a label. + No + + + failonerr + Throw an exception if the command fails.
    Since Ant 1.6.1 + No; default is true + +

    Examples

    -
    +
    -<ccmkbl
    -    baselinerootname="Application_Baseline_AUTO"
    -    identical="yes"
    -    full="no"
    -    viewpath="v:\ApplicationCC"
    -    />
    -
    -
    -

    Does a ClearCase mkbl on the Integration view at v:\ApplicationCC -even if it is identical to a previous baseline. The new baseline with be -incremental and named "Application_Baseline_AUTO".

    -
    - -

    CCMkattr

    -

    Description

    -Task to perform a "cleartool mkattr" command to ClearCase.
    -Since ant 1.6.1 -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AttributeValuesRequired
    viewpathPath to the ClearCase view file or directory that the command will operate onYes
    replaceReplace the value of the attribute if it already existsNo
    recurseProcess each subdirectory under viewpathNo
    versionIdentify a specific version to attach the attribute toNo
    typenameName of the attribute typeYes
    typevalueValue to attach to the attribute typeYes
    commentSpecify a comment. Only one of comment or cfile may be used.No
    commentfileSpecify a file containing a comment. Only one of comment or cfile may be used.No
    failonerrThrow an exception if the command fails. Default is trueNo
    +<ccmkbl baselinerootname="Application_Baseline_AUTO" + identical="yes" + full="no" + viewpath="v:\ApplicationCC"/> + +

    Does a ClearCase mkbl on the Integration view at v:\ApplicationCC even +if it is identical to a previous baseline. The new baseline with be incremental and +named Application_Baseline_AUTO.

    + +
    + +

    CCMkattr

    +

    Since Ant 1.6.1

    +

    Description

    +

    Task to perform a cleartool mkattr command to ClearCase.

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeValuesRequired
    viewpathPath to the ClearCase view file or directory that the command will operate onYes
    replaceReplace the value of the attribute if it already existsNo
    recurseProcess each subdirectory under viewpathNo
    versionIdentify a specific version to attach the attribute toNo
    typenameName of the attribute typeYes
    typevalueValue to attach to the attribute typeYes
    commentSpecify a commentNo; only one of the two may be used
    commentfileSpecify a file containing a comment
    failonerrThrow an exception if the command fails.No; default is true

    Examples

    -
    +
     <ccmkattr viewpath="c:/views/viewdir/afile"
    -    typename="BugFix"
    -    typevalue="34445"
    -    />
    +          typename="BugFix"
    +          typevalue="34445"/>
     
    -
    -

    Does a ClearCase mkattr on the file c:/views/viewdir/afile and -attaches the attribute BugFix with a value of 34445 to it.

    -
    - -

    CCMkdir

    -

    Description

    -Task to perform a "cleartool mkdir" command to ClearCase.
    -Since ant 1.6.1 -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AttributeValuesRequired
    viewpathPath to the ClearCase view directory that the command will operate onYes
    commentSpecify a comment. Only one of comment or cfile may be used.No
    commentfileSpecify a file containing a comment. Only one of comment or cfile may be used.No
    nocheckoutDo not checkout after element creationNo
    failonerrThrow an exception if the command fails. Default is trueNo
    + +

    Does a ClearCase mkattr on the file c:/views/viewdir/afile and attaches +the attribute BugFix with a value of 34445 to it.

    + +
    + +

    CCMkdir

    +

    Since Ant 1.6.1

    +

    Description

    +

    Task to perform a cleartool mkdir command to ClearCase.

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeValuesRequired
    viewpathPath to the ClearCase view directory that the command will operate onYes
    commentSpecify a commentNo; only one of the two may be used
    commentfileSpecify a file containing a comment
    nocheckoutDo not checkout after element creationNo
    failonerrThrow an exception if the command fails.No; default is true

    Examples

    -
    +
     <ccmkdir viewpath="c:/views/viewdir/adir"
    -        nocheckout="true"
    -        comment="Some comment text"/>
    -
    -
    -

    Does a ClearCase mkdir on the dir c:/views/viewdir/adir and -does not automatically check it out.

    -
    - -

    CCMkelem

    -

    Description

    -Task to perform a "cleartool mkelem" command to ClearCase.
    -Since ant 1.6.1 -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AttributeValuesRequired
    viewpathPath to the ClearCase view file or directory that the command will operate onYes
    commentSpecify a comment. Only one of comment or cfile may be used.No
    commentfileSpecify a file containing a comment. Only one of comment or cfile may be used.No
    nowarnSuppress warning messagesNo
    nocheckoutDo not checkout after element creationNo
    checkinCheckin element after creationNo
    preservetimePreserve the modification time (for checkin)No
    masterAssign mastership of the main branch to the current siteNo
    eltypeElement type to use during element creationNo
    failonerrThrow an exception if the command fails. Default is trueNo
    + nocheckout="true" + comment="Some comment text"/> + +

    Does a ClearCase mkdir on the dir c:/views/viewdir/adir and does not +automatically check it out.

    + +
    + +

    CCMkelem

    +

    Since Ant 1.6.1

    +

    Description

    +

    Task to perform a cleartool mkelem command to ClearCase.

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeValuesRequired
    viewpathPath to the ClearCase view file or directory that the command will operate onYes
    commentSpecify a commentNo; only one of the two may be used
    commentfileSpecify a file containing a comment
    nowarnSuppress warning messagesNo
    nocheckoutDo not checkout after element creationNo
    checkinCheckin element after creationNo
    preservetimePreserve the modification time (for checkin)No
    masterAssign mastership of the main branch to the current siteNo
    eltypeElement type to use during element creationNo
    failonerrThrow an exception if the command fails.No; default is true

    Examples

    -
    +
     <ccmkelem viewpath="c:/views/viewdir/afile"
    -        eltype="text_file"
    -        checkin="true"
    -        comment="Some comment text"/>
    -
    -
    -

    Does a ClearCase mkelem on the file c:/views/viewdir/afile with -element type text_file. It also checks in the file after creation.

    + eltype="text_file" + checkin="true" + comment="Some comment text"/> + +

    Does a ClearCase mkelem on the file c:/views/viewdir/afile with element +type text_file. It also checks in the file after creation.

    diff -Nru ant-1.9.10/manual/Tasks/common.html ant-1.10.3/manual/Tasks/common.html --- ant-1.9.10/manual/Tasks/common.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/common.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,36 +24,33 @@ -

    Common Attributes of all Tasks

    +

    Common Attributes of all Tasks

    All tasks share the following attributes:

    - +
    - - - + + + - - + - + - - + - + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    idUnique identifier for this task instance, can be + idUnique identifier for this task instance, can be used to reference this task in scripts.NoNo
    tasknameA different name for this task instance - will + tasknameA different name for this task instance—will show up in the logging output.NoNo
    descriptionRoom for your commentsNodescriptionRoom for your commentsNo
    - - - diff -Nru ant-1.9.10/manual/Tasks/componentdef.html ant-1.10.3/manual/Tasks/componentdef.html --- ant-1.9.10/manual/Tasks/componentdef.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/componentdef.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,39 +24,27 @@ -

    componentdef

    +

    componentdef

    Description

    -

    - Adds a component definition to the current project. - A component definition is the same as a - typedef except: -

    -
      -
    1. - that it can only be used in other types or tasks that - accept components (by having an add() method). -
    2. -
    3. - multiple components may have the same name, provided they - implement different interfaces. -
    4. -
    -

    - The purpose of this is to allow internal Apache Ant definitions to be - made for tags like "and" or "or". -

    +

    Adds a component definition to the current project. A component definition is the same as +a typedef except:

    +
      +
    1. that it can only be used in other types or tasks that accept components (by having + an add() method).
    2. +
    3. multiple components may have the same name, provided they implement different interfaces.
    4. +
    +

    The purpose of this is to allow internal Apache Ant definitions to be made for tags +like and or or.

    -

    Examples

    +

    Examples

    -
     <componentdef name="or" onerror="ignore"
    -    classname="com.apache.tools.ant.taskdefs.conditions.Or"/>
    -  <componentdef name="or" onerror="ignore"
    -    classname="com.apache.tools.ant.types.resources.selectors.Or"/>
    -

    - defines two components with the same name "or"; one is a condition - (see conditions) and one is - a selector (see selectors). -

    +
    +<componentdef name="or" onerror="ignore"
    +              classname="com.apache.tools.ant.taskdefs.conditions.Or"/>
    +<componentdef name="or" onerror="ignore"
    +              classname="com.apache.tools.ant.types.resources.selectors.Or"/>
    +

    defines two components with the same name or; one is a condition +(see conditions) and one is a selector +(see selectors).

    - diff -Nru ant-1.9.10/manual/Tasks/concat.html ant-1.10.3/manual/Tasks/concat.html --- ant-1.9.10/manual/Tasks/concat.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/concat.html 2018-03-24 12:37:12.000000000 +0000 @@ -16,322 +16,240 @@ --> - - - -Concat - - - - -

    Concat

    - -

    Description

    - -

    - Concatenates one or more - resources - to a single file or to the console. The destination - file will be created if it does not exist unless the resource - list is empty and ignoreempty is true. -

    - -

    Since Apache Ant 1.7.1, this task can be used as a - Resource Collection - that will return exactly one - resource. -

    - -

    - -Resource Collections are used to - select which resources are to be concatenated. There is no - singular attribute to specify a single resource to cat. -

    - -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AttributeDescriptionRequired
    destfile - The destination file for the concatenated stream. - If not specified the console will be used instead. - - No -
    append - Specifies whether or not the file specified by 'destfile' - should be appended. Defaults to "no". - No
    force - Specifies whether or not the file specified by 'destfile' - should be written to even if it is newer than all source files. - deprecated, use the overwrite attribute instead - Defaults to "yes". - No
    overwrite - Specifies whether or not the file specified by 'destfile' - should be written to even if it is newer than all source files. - since Ant 1.8.2. - Defaults to "yes". - No
    forceReadOnlyOverwrite read-only destination - files. since Ant 1.8.2No; defaults to false.
    encoding - Specifies the encoding for the input files. Please see - Supported Encodings - for a list of possible values. Defaults to the platform's - default character encoding. - No
    outputencoding - The encoding to use when writing the output file - since Ant 1.6. - Defaults to the value of the encoding attribute - if given or the default JVM encoding otherwise. - No
    fixlastline - Specifies whether or not to check if - each file concatenated is terminated by - a new line. If this attribute is "yes" - a new line will be appended to the stream if - the file did not end in a new line. - since Ant 1.6. - Defaults to "no". - This attribute does not apply to embedded text. - No
    eol - Specifies what the end of line character are - for use by the fixlastline attribute. - since Ant 1.6 - Valid values for this property are: -
      -
    • cr: a single CR
    • -
    • lf: a single LF
    • -
    • crlf: the pair CRLF
    • -
    • mac: a single CR
    • -
    • unix: a single LF
    • -
    • dos: the pair CRLF
    • -
    - The default is platform dependent. - For Unix platforms, the default is "lf". - For DOS based systems (including Windows), - the default is "crlf". - For Mac OS, the default is "cr". -
    No
    binary - since Ant 1.6.2 - If this attribute is set to true, the task concatenates the files - in a byte by byte fashion. If this attribute is false, concat will - not normally work for binary files due to character encoding - issues. - If this option is set to true, the destfile attribute must be - set, and the task cannot used nested text. - Also the attributes encoding, outputencoding, filelastline - cannot be used. - The default is "false". - No
    ignoreempty - Since Ant 1.8.0 - Specifies whether or not the file specified by 'destfile' - should be created if the source resource list is - empty. Defaults to "true". - No
    resourcename - Since Ant 1.8.3 - Specifies the name reported if this task is exposed - as a resource. - No
    - -

    Parameters specified as nested elements

    -

    Resource Collection

    -

    since Ant 1.7.

    - -

    - Any of the various - Resource Collection types can specify the resources to be - concatenated. -

    - -

    filterchain

    -

    since Ant 1.6.

    -

    The concat task supports nested - FilterChains.

    - -

    header, footer

    -

    since Ant 1.6.

    -

    Used to prepend or postpend text into the concatenated stream.

    -

    The text may be in-line or be in a file.

    - - - - - - - - - - - - - - - - - - - - - - - - -
    AttributeDescriptionRequired
    filtering - Whether to filter the text provided by this sub element, - default is "yes". - No
    fileA file to place at the head or tail of the - concatenated text. - No
    trimWhether to trim the value, default is "no"No
    trimleading - Whether to trim leading white space on each line, default is "no" - No
    - -

    Examples

    - -

    Concatenate a string to a file:

    - -
    -  <concat destfile="README">Hello, World!</concat>
    -      
    - -

    Concatenate a series of files to the console:

    - -
    -  <concat>
    -    <fileset dir="messages" includes="*important*"/>
    -  </concat>
    -      
    - -

    Concatenate a single file, appending if the destination file exists:

    - -
    -  <concat destfile="NOTES" append="true">
    -    <filelist dir="notes" files="note.txt"/>
    -  </concat>
    -      
    - -

    Concatenate a series of files, update the destination - file only if is older that all the source files:

    - -
    -  <concat destfile="${docbook.dir}/all-sections.xml"
    -          force="no">
    -    <filelist dir="${docbook.dir}/sections"
    -         files="introduction.xml,overview.xml"/>
    -    <fileset dir="${docbook.dir}"
    -         includes="sections/*.xml"
    -         excludes="introduction.xml,overview.xml"/>
    -  </concat>
    -      
    - -

    Concatenate a series of files, expanding ant properties

    -
    -   <concat destfile="${build.dir}/subs">
    -      <path>
    -        <fileset dir="${src.dir}" includes="*.xml"/>
    -        <pathelement location="build.xml"/>
    -      </path>
    -      <filterchain>
    -        <expandproperties/>
    -      </filterchain>
    -   </concat>
    -        
    - -

    Filter the lines containing project from build.xml and output - them to report.output, prepending with a header

    -
    -   <concat destfile="${build.dir}/report.output">
    -      <header filtering="no" trimleading="yes">
    -          Lines that contain project
    -          ==========================
    -      </header>
    -      <path path="build.xml"/>
    -      <filterchain>
    -         <linecontains>
    -           <contains value="project"/>
    -         </linecontains>
    -      </filterchain>
    -   </concat>
    -        
    - -

    Concatenate a number of binary files.

    -
    -   <concat destfile="${build.dir}/dist.bin" binary="yes">
    -     <fileset file="${src.dir}/scripts/dist.sh" />
    -     <fileset file="${build.dir}/dist.tar.bz2" />
    -   </concat>
    -        
    + + + + Concat + + + + +

    Concat

    + +

    Description

    + +

    Concatenates one or more resources to a single file or + to the console. The destination file will be created if it does not exist unless the resource + list is empty and ignoreempty is true.

    + +

    Since Apache Ant 1.7.1, this task can be used as + a resource collection that will return + exactly one resource.

    + +

    Resource collections are used to select + which resources are to be concatenated. There is no singular attribute to specify a single + resource to concat.

    + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    destfileThe destination file for the concatenated stream. If not specified the console will be + used instead.No
    appendSpecifies whether or not the file specified by destfile should be + appended.No; defaults to no
    forceSpecifies whether or not the file specified by destfile should be written to + even if it is newer than all source files. Deprecated, use + the overwrite attribute instead.No; defaults to yes
    overwriteSpecifies whether or not the file specified by destfile should be written to + even if it is newer than all source files. Since Ant 1.8.2.No; defaults to yes
    forceReadOnlyOverwrite read-only destination files. Since Ant 1.8.2No; defaults to false
    encodingSpecifies the encoding for the input files. Please + see Supported Encodings for a list of possible values.No; defaults to default JVM character encoding
    outputencodingThe encoding to use when writing the output file. Since Ant 1.6.No; defaults to encoding if set or default JVM character encoding + otherwise
    fixlastlineSpecifies whether or not to check if each file concatenated is terminated by a new + line. If this attribute is yes a new line will be appended to the stream if the + file did not end in a new line. Since Ant 1.6. This attribute does not apply to + embedded text.No; defaults to no
    eolSpecifies what the end of line character are for use by the fixlastline + attribute. Since Ant 1.6 Valid values for this property are: +
      +
    • cr: a single CR
    • +
    • lf: a single LF
    • +
    • crlf: the pair CRLF
    • +
    • mac: a single CR
    • +
    • unix: a single LF
    • +
    • dos: the pair CRLF
    • +
    No; default is platform dependent: lf for Unix, crlf for DOS family + (including Windows), cr for Mac OS 9 or earlier
    binarySince Ant 1.6.2 If this attribute is set to true, the task concatenates + the files in a byte by byte fashion. If this attribute is false, concat will not + normally work for binary files due to character encoding issues. If this option is set + to true, the destfile attribute must be set, and the task cannot used + nested text. Also the + attributes encoding, outputencoding, filelastline cannot + be used.No; default is false
    ignoreemptySince Ant 1.8.0 Specifies whether or not the file specified + by destfile should be created if the source resource list is empty. + No; defaults to true
    resourcenameSince Ant 1.8.3 Specifies the name reported if this task is exposed as + a resource. + No
    + +

    Parameters specified as nested elements

    +

    resource collection

    +

    Since Ant 1.7.

    + +

    Any of the various resource collection types + can specify the resources to be concatenated.

    + +

    filterchain

    +

    Since Ant 1.6.

    +

    The task supports nested FilterChains.

    + +

    header, footer

    +

    Since Ant 1.6.

    +

    Used to prepend or postpend text into the concatenated stream.

    +

    The text may be in-line or be in a file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    filteringWhether to filter the text provided by this sub element.No; default is yes
    fileA file to place at the head or tail of the concatenated text.No
    trimWhether to trim the value.No; default is no
    trimleadingWhether to trim leading white space on each line.No; default is no
    + +

    Examples

    + +

    Concatenate a string to a file:

    + +
    <concat destfile="README">Hello, World!</concat>
    + +

    Concatenate a series of files to the console:

    + +
    +<concat>
    +  <fileset dir="messages" includes="*important*"/>
    +</concat>
    + +

    Concatenate a single file, appending if the destination file exists:

    + +
    +<concat destfile="NOTES" append="true">
    +  <filelist dir="notes" files="note.txt"/>
    +</concat>
    + +

    Concatenate a series of files, update the destination file only if is older that all + the source files:

    + +
    +<concat destfile="${docbook.dir}/all-sections.xml"
    +        force="no">
    +  <filelist dir="${docbook.dir}/sections"
    +            files="introduction.xml,overview.xml"/>
    +  <fileset dir="${docbook.dir}"
    +           includes="sections/*.xml"
    +           excludes="introduction.xml,overview.xml"/>
    +</concat>
    + +

    Concatenate a series of files, expanding Ant properties

    +
    +<concat destfile="${build.dir}/subs">
    +  <path>
    +    <fileset dir="${src.dir}" includes="*.xml"/>
    +    <pathelement location="build.xml"/>
    +  </path>
    +  <filterchain>
    +    <expandproperties/>
    +  </filterchain>
    +</concat>
    + +

    Filter the lines containing project from build.xml and output them to report.output, + prepending with a header

    +
    +<concat destfile="${build.dir}/report.output">
    +  <header filtering="no" trimleading="yes">
    +      Lines that contain project
    +      ==========================
    +  </header>
    +  <path path="build.xml"/>
    +  <filterchain>
    +    <linecontains>
    +      <contains value="project"/>
    +    </linecontains>
    +  </filterchain>
    +</concat>
    + +

    Concatenate a number of binary files.

    +
    +<concat destfile="${build.dir}/dist.bin" binary="yes">
    +  <fileset file="${src.dir}/scripts/dist.sh"/>
    +  <fileset file="${build.dir}/dist.tar.bz2"/>
    +</concat>
    - - - - - + + diff -Nru ant-1.9.10/manual/Tasks/condition.html ant-1.10.3/manual/Tasks/condition.html --- ant-1.9.10/manual/Tasks/condition.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/condition.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,87 +24,73 @@ -

    Condition

    +

    Condition

    Description

    -

    Sets a property if a certain condition holds true - this is a -generalization of Available and Uptodate.

    -

    If the condition holds true, the property value is set to true by -default; otherwise, the property is not set. You can set the value to -something other than the default by specifying the value -attribute.

    -

    Conditions are specified as nested elements, -you must specify exactly one condition.

    +

    Sets a property if a certain condition holds true—this is a generalization +of Available and Uptodate.

    +

    If the condition holds true, the property value is set to true by default; otherwise, the +property is not set. You can set the value to something other than the default by specifying +the value attribute.

    +

    Conditions are specified as nested elements, you must specify exactly one +condition.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - + - +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    propertyThe name of the property to set.YespropertyThe name of the property to set.Yes
    valueThe value to set the property to. Defaults to - "true".NovalueThe value to set the property to.No; defaults to true
    elseThe value to set the property to if the condition - evaluates to false. By default the property will remain unset. - Since Apache Ant 1.6.3 + elseThe value to set the property to if the condition evaluates to false. Since + Apache Ant 1.6.3 NoNo; by default the property will remain unset
    -

    Parameters specified as nested elements

    -

    All conditions to test are specified as nested elements, for a -complete list see here.

    +

    Parameters specified as nested elements

    +

    All conditions to test are specified as nested elements, for a complete list +see here.

    Examples

    -  <condition property="javamail.complete">
    -    <and>
    -      <available classname="javax.activation.DataHandler"/>
    -      <available classname="javax.mail.Transport"/>
    -    </and>
    -  </condition>
    -
    -

    sets the property javamail.complete if both the -JavaBeans Activation Framework and JavaMail are available in the -classpath.

    +<condition property="javamail.complete"> + <and> + <available classname="javax.activation.DataHandler"/> + <available classname="javax.mail.Transport"/> + </and> +</condition> +

    sets the property javamail.complete if both the JavaBeans Activation Framework and +JavaMail are available in the classpath.

    -  <condition property="isMacOsButNotMacOsX">
    -    <and>
    -      <os family="mac"/>
    -
    -      <not>
    -        <os family="unix"/>
    -
    -      </not>
    -    </and>
    -  </condition>
    -
    -

    sets the property isMacOsButNotMacOsX if the current -operating system is MacOS, but not MacOS X - which Ant considers to be -in the Unix family as well.

    +<condition property="isMacOsButNotMacOsX"> + <and> + <os family="mac"/> + <not> + <os family="unix"/> + </not> + </and> +</condition> +

    sets the property isMacOsButNotMacOsX if the current operating system is MacOS, but +not MacOS X/macOS—which Ant considers to be in the Unix family as well.

    -  <condition property="isSunOSonSparc">
    -    <os name="SunOS" arch="sparc"/>
    -
    -  </condition>
    -
    -

    sets the property isSunOSonSparc if the current -operating system is SunOS and if it is running on a sparc architecture.

    - - +<condition property="isSunOSonSparc"> + <os name="SunOS" arch="sparc"/> +</condition> +

    sets the property isSunOSonSparc if the current operating system is SunOS and if it +is running on a SPARC architecture.

    diff -Nru ant-1.9.10/manual/Tasks/conditions.html ant-1.10.3/manual/Tasks/conditions.html --- ant-1.9.10/manual/Tasks/conditions.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/conditions.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,951 +24,809 @@ -

    Conditions

    -

    Conditions are nested elements of the -<condition> and -<waitfor> tasks. - There are core conditions and custom conditions. Custom - conditions are described in - - Custom Conditions. - Core Conditions are described below. -

    -

    Core Conditions

    - -

    These are the nested elements that can be used as conditions in the -<condition> and -<waitfor> tasks.

    - -

    not

    -

    The <not> element expects exactly one other -condition to be nested into this element, negating the result of the -condition. It doesn't have any attributes and accepts all nested -elements of the condition task as nested elements as well.

    - -

    and

    -The <and> element doesn't have any attributes and -accepts an arbitrary number of conditions as nested elements - all -nested elements of the condition task are supported. This condition -is true if all of its contained conditions are, conditions will be -evaluated in the order they have been specified in the build file.

    -

    The <and> condition has the same shortcut -semantics as the Java && operator, as soon as one of the -nested conditions is false, no other condition will be evaluated.

    - -

    or

    -The <or> element doesn't have any attributes and -accepts an arbitrary number of conditions as nested elements - all -nested elements of the condition task are supported. This condition -is true if at least one of its contained conditions is, conditions -will be evaluated in the order they have been specified in the build -file.

    The <or> condition has the same -shortcut semantics as the Java || operator, as soon as one of the -nested conditions is true, no other condition will be evaluated.

    - -

    xor

    -

    The <xor> element performs an exclusive -or on all nested elements, similar to the ^ operator -in Java. It only evaluates to true if an odd number of nested conditions +

    Conditions

    +

    Conditions are nested elements of the <condition> +and <waitfor> tasks. There are core conditions and +custom conditions. Custom conditions are described +in Custom Conditions. Core +Conditions are described below.

    +

    Core Conditions

    + +

    These are the nested elements that can be used as conditions in +the <condition> +and <waitfor> tasks.

    + +

    not

    +

    The <not> element expects exactly one other condition to be nested into this +element, negating the result of the condition. It doesn't have any attributes and accepts all +nested elements of the condition task as nested elements as well.

    + +

    and

    +

    The <and> element doesn't have any attributes and accepts an arbitrary number +of conditions as nested elements—all nested elements of the condition task are supported. +This condition is true if all of its contained conditions are, conditions will be evaluated in the +order they have been specified in the build file.

    +

    The <and> condition has the same shortcut semantics as the +Java && operator, as soon as one of the nested conditions is false, no other +condition will be evaluated.

    + +

    or

    +

    The <or> element doesn't have any attributes and accepts an arbitrary number +of conditions as nested elements—all nested elements of the condition task are supported. +This condition is true if at least one of its contained conditions is, conditions will be evaluated +in the order they have been specified in the build file.

    +

    The <or> condition has the same shortcut semantics as the Java || +operator, as soon as one of the nested conditions is true, no other condition will be evaluated.

    + +

    xor

    +

    The <xor> element performs an exclusive or on all nested elements, similar to +the ^ operator in Java. It only evaluates to true if an odd number of nested conditions are true. There is no shortcutting of evaluation, unlike the <and> -and <or> tests. -It doesn't have any attributes and accepts all nested -elements of the condition task as nested elements as well.

    - -

    available

    -

    This condition is identical to the Available task, all attributes and nested -elements of that task are supported, the property and value attributes -are redundant and will be ignored.

    - -

    uptodate

    -

    This condition is identical to the Uptodate task, all attributes and nested -elements of that task are supported, the property and value attributes -are redundant and will be ignored.

    - -

    os

    -

    Test whether the current operating system is of a given type. Each -defined attribute is tested and the result is true only if all -the tests succeed. +and <or> tests. It doesn't have any attributes and accepts all nested elements +of the condition task as nested elements as well.

    + +

    available

    +

    This condition is identical to the Available task, all attributes +and nested elements of that task are supported, the property and value attributes are redundant and +will be ignored.

    + +

    uptodate

    +

    This condition is identical to the Uptodate task, all attributes and +nested elements of that task are supported, the property and value attributes are redundant and will +be ignored.

    + +

    os

    +

    Test whether the current operating system is of a given type. Each defined attribute is tested +and the result is true only if all the tests succeed.

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    familyThe name of the operating system family to expect.NofamilyThe name of the operating system family to expect.No
    nameThe name of the operating system to expect.NonameThe name of the operating system to expect.No
    archThe architecture of the operating system to expect.NoarchThe architecture of the operating system to expect.No
    versionThe version of the operating system to expect.NoversionThe version of the operating system to expect.No

    Supported values for the family attribute are:

      -
    • windows (for all versions of Microsoft Windows)
    • -
    • dos (for all Microsoft DOS based operating systems including - Microsoft Windows and OS/2)
    • -
    • mac (for all Apple Macintosh systems)
    • -
    • unix (for all Unix and Unix-like operating systems)
    • -
    • netware (for Novell NetWare)
    • -
    • os/2 (for OS/2)
    • -
    • tandem (for HP's NonStop Kernel - formerly Tandem)
    • -
    • win9x for Microsoft Windows 95 and 98, ME and CE
    • -
    • winnt for Microsoft Windows NT-based systems, including Windows 2000, XP and +
    • windows—for all versions of Microsoft Windows
    • +
    • dos—for all Microsoft DOS based operating systems including Microsoft Windows and + OS/2
    • +
    • mac—for all Apple Macintosh systems prior to Mac OS X
    • +
    • unix—for all Unix(-like) operating systems, including Linux and Mac OS + X/macOS
    • +
    • netware—for Novell NetWare
    • +
    • os/2—for OS/2
    • +
    • tandem—for HP's NonStop Kernel, formerly Tandem
    • +
    • win9x—for Microsoft Windows 95 and 98, ME and CE
    • +
    • winnt—for Microsoft Windows NT-based systems, including Windows 2000, XP and successors
    • -
    • z/os for z/OS and OS/390
    • -
    • os/400 for OS/400
    • -
    • openvms for OpenVMS
    • +
    • z/os—for z/OS and OS/390
    • +
    • os/400—for OS/400
    • +
    • openvms—for OpenVMS
    -

    equals

    +

    equals

    Tests whether the two given values are equal.

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    arg1First value to test.Yesarg1First value to test.Yes
    arg2Second value to test.Yesarg2Second value to test.Yes
    casesensitivePerform a case sensitive comparison. Default is - true.NocasesensitivePerform a case sensitive comparison.No; default is true
    trimTrim whitespace from arguments before comparing - them. Default is false.NotrimTrim whitespace from arguments before comparing them.No; default is false
    forcestringForce string comparison of arg1/arg2. - Default is false. Since Apache Ant 1.8.1 + forcestringForce string comparison of arg1/arg2. Since Apache Ant 1.8.1 NoNo; default is false
    -

    isset

    +

    isset

    Test whether a given property has been set in this project.

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    propertyThe name of the property to test.YespropertyThe name of the property to test.Yes
    -

    checksum

    -

    This condition is identical to the Checksum -task, all attributes and nested elements of that task are supported, -the property and overwrite attributes are redundant and will be -ignored.

    +

    checksum

    +

    This condition is identical to the Checksum task, all attributes and +nested elements of that task are supported, the property and overwrite attributes are redundant and +will be ignored.

    -

    http

    -

    The http condition checks for a valid response from a -web server of the specified url. By default, HTTP responses errors -of 400 or greater are viewed as invalid.

    - +

    http

    +

    The http condition checks for a valid response from a web server of the specified +URL. By default, HTTP responses errors of 400 or greater are viewed as invalid.

    +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    urlThe full URL of the page to request. The web server must - return a status code below the value of errorsBeginAtYes.urlThe full URL of the page to request. The web server must return a status code below the + value of errorsBeginAtYes
    errorsBeginAtThe lowest HTTP response code that signals an error; - by default '400'; server errors, not-authorized, not-found and the like - are detectedNoerrorsBeginAtThe lowest HTTP response code that signals an error; server errors, not-authorized, + not-found and the like are detectedNo; default is 400
    requestMethodThe HTTP method to be used when issuing the request. - Any of GET, POST, HEAD, OPTIONS, PUT, DELETEm and TRACE - are valid, subject to protocol restrictions. The default if not - specified is "GET".
    - since Ant 1.8.0
    NorequestMethodThe HTTP method to be used when issuing the request. Any + of GET, POST, HEAD, OPTIONS, PUT, DELETE + and TRACE are valid, subject to protocol restrictions.
    since Ant + 1.8.0
    No; default is GET
    followRedirectsWhether redirects should be followed. The default - is true
    - since Ant 1.9.7
    NofollowRedirectsWhether redirects should be followed.
    since Ant 1.9.7
    No; default is true
    -

    socket

    -

    The socket condition checks for the existence of a -TCP/IP listener at the specified host and port.

    - +

    socket

    +

    The socket condition checks for the existence of a TCP/IP listener at the specified +host and port.

    +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    serverThe DNS name or IP address of the server.Yes.serverThe DNS name or IP address of the server.Yes
    portThe port number to connect to.Yes.portThe port number to connect to.Yes
    -

    filesmatch

    -

    Test two files for matching. Nonexistence of one file results in "false", -although if neither exists they are considered equal in terms of content. -This test does a byte for byte comparison, so test time scales with -byte size. NB: if the files are different sizes, one of them is missing -or the filenames match the answer is so obvious the detailed test is omitted. - +

    filesmatch

    +

    Test two files for matching. Nonexistence of one file results in false, although if +neither exists they are considered equal in terms of content. This test does a byte for byte +comparison, so test time scales with byte size. Note: if the files are different +sizes, one of them is missing or the filenames match the answer is so obvious the detailed test is +omitted.

    - +
    - - - + + + - - - + + + - - - + + + - - + - +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    file1First file to testYesfile1First file to testYes
    file2Second file to testYesfile2Second file to testYes
    textfileWhether to ignore line endings when comparing - files; defaults to false which triggers a binary - comparison. Since Ant 1.7 + textfileWhether to ignore line endings when comparing files. Since Ant 1.7 NoNo; defaults to false which triggers a binary comparison
    -

    contains

    +

    contains

    Tests whether a string contains another one.

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    stringThe string to search in.YesstringThe string to search in.Yes
    substringThe string to search for.YessubstringThe string to search for.Yes
    casesensitivePerform a case sensitive comparison. Default is - true.NocasesensitivePerform a case sensitive comparison.No; default is true
    -

    istrue

    -

    Tests whether a string equals any of the ant definitions of true, -that is "true","yes", or "on"

    - +

    istrue

    +

    Tests whether a string equals any of the Ant definitions of true, that +is true, yes, or on

    +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    valuevalue to testYesvaluevalue to testYes
    -
    +
     <istrue value="${someproperty}"/>
    -<istrue value="false"/>
    -
    +<istrue value="false"/> -

    isfalse

    -

    Tests whether a string is not true, the negation of <istrue> -

    - +

    isfalse

    +

    Tests whether a string is not true, the negation of <istrue>

    +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    valuevalue to testYesvaluevalue to testYes
    -
    +
     <isfalse value="${someproperty}"/>
    -<isfalse value="false"/>
    -
    - -

    isreference

    +<isfalse value="false"/> -

    Test whether a given reference has been defined in this project and -- optionally - is of an expected type.

    +

    isreference

    +

    Test whether a given reference has been defined in this project and—optionally—is of +an expected type.

    -

    This condition has been added in Apache Ant 1.6.

    +

    Since Apache Ant 1.6.

    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    refidThe id of the reference to test.YesrefidThe id of the reference to test.Yes
    typeName of the data type or task this reference is - expected to be.NotypeName of the data type or task this reference is expected to be.No
    -

    issigned

    -

    - Test whether a jarfile is signed. - If the name of the - signature is passed, the file is checked for presence of that - particular signature; otherwise the file is checked for the - existence of any signature. It does not perform rigorous - signature validation; it only looks for the presence of a signature. -

    -

    - This condition was added in Apache Ant 1.7. -

    - +

    issigned

    +

    Test whether a jarfile is signed. If the name of the signature is passed, the file is checked +for presence of that particular signature; otherwise the file is checked for the existence of any +signature. It does not perform rigorous signature validation; it only looks for the presence of a +signature.

    +

    Since Apache Ant 1.7.

    +
    - - - + + + - - - + + + - - - + + + -
    AttributeDescriptionRequiredAttributeDescriptionRequired
    file - The jarfile that is to be tested for the presence - of a signature. - YesfileThe jarfile that is to be tested for the presence of a signature.Yes
    name The signature name to check for.NonameThe signature name to check for.No
    + -

    isfileselected

    -

    - Test whether a file passes an embedded - selector. -

    -

    - This condition was added in Apache Ant 1.6.3. -

    - +

    isfileselected

    +

    Test whether a file passes an embedded selector.

    +

    Since Apache Ant 1.6.3.

    +
    - - - + + + - - - + + + - - - - -
    AttributeDescriptionRequiredAttributeDescriptionRequired
    file - The file to check if is passes the embedded selector. - YesfileThe file to check if is passes the embedded selector.Yes
    basedirThe base directory to use for name based selectors. It this is not set, - the project's basedirectory will be used.No
    -

    - Example usage: -

    -
    +    basedir
    +    The base directory to use for name based selectors. It this is not set, the
    +      project's basedir will be used.
    +    No
    +  
    +
    +

    Example usage:

    +
     <isfileselected file="a.xml">
       <date datetime="06/28/2000 2:02 pm" when="equal"/>
    -</isfileselected>
    -
    +</isfileselected> -

    typefound

    +

    typefound

    -

    Test whether a given type is defined, and that -its implementation class can be loaded. Types include -tasks, datatypes, scriptdefs, macrodefs and presetdefs.

    +

    Test whether a given type is defined, and that its implementation class can be loaded. Types +include tasks, datatypes, scriptdefs, macrodefs and presetdefs.

    -

    This condition was added in Apache Ant 1.7.

    +

    Since Apache Ant 1.7.

    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    namename of the typeYesnameName of the typeYes
    uri - The uri that this type lives in. - NouriThe URI that this type lives in.No
    -

    - Example usages: -

    -
    +

    Example usages:

    +
     <typefound name="junit"/>
    -<typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/>
    -
    +<typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/> -

    scriptcondition

    +

    scriptcondition

    -

    Evaluate a condition based on a script in any -Apache BSF - or - JSR 223 -supported language. -

    -

    -See the Script task for -an explanation of scripts and dependencies. -

    +

    Evaluate a condition based on a script in any Apache BSF +or JSR 223 supported language.

    +

    See the Script task for an explanation of scripts and +dependencies.

    -

    This condition was added in Apache Ant 1.7.

    +

    Since Apache Ant 1.7.

    - +
    - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + + + + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    languagescript languageYeslanguagescript languageYes
    manager - The script engine manager to use. - See the script task - for using this attribute. - No - default is "auto"managerThe script engine manager to use. See the script task + for using this attribute.No; default is auto
    valuedefault boolean valueNo -default is "false"
    valuedefault boolean valueNo; default is false
    srcfilename of script sourceNosrcfilename of script sourceNo
    setbeanswhether to have all properties, references and targets as - global variables in the script. since Ant 1.8.0No, default is "true".encodingThe encoding of the script source. Since Ant 1.10.2.No; defaults to default JVM character encoding
    classpath - The classpath to pass into the script. - Nosetbeanswhether to have all properties, references and targets as global variables in the + script. since Ant 1.8.0No; default is true
    classpathrefThe classpath to use, given as a - reference to a path defined elsewhere. - NoclasspathThe classpath to pass into the script.No
    classpathrefThe classpath to use, given as a reference to a path + defined elsewhere.No
    Parameters specified as nested elements
    classpath
    -

    - See the script task - for using this nested element. -

    +

    See the script task for using this nested element.

    Description
    -

    -The script supports script language inline, this script has access to the -same beans as the <script> task, and to the self bean, -which refers back to the condition itself. If the script evaluates to a boolean result, -this is the result of the condition's evaluation (since Ant 1.7.1). -Alternatively, self.value can be used to set the evaluation result. -

    -

    -Example: -

    -
    +

    The script supports script language inline, this script has access to the same beans as +the <script> task, and to the self bean, which refers back to the +condition itself. If the script evaluates to a boolean result, this is the result of the condition's +evaluation (since Ant 1.7.1). Alternatively, self.value can be used to set +the evaluation result.

    +

    Example:

    +
     <scriptcondition language="javascript"
             value="true">
         self.setValue(false);
    -</scriptcondition>
    -
    +</scriptcondition> -Sets the default value of the condition to true, then in the script, -sets the value to false. This condition always evaluates to "false" +

    Sets the default value of the condition to true, then in the script, sets the value +to false. This condition always evaluates to false.

    -

    parsersupports

    +

    parsersupports

    -

    Tests whether Ant's XML parser supports a given -feature or property, as per the SAX/JAXP specifications, by -attempting to set the appropriate property/feature/

    +

    Tests whether Ant's XML parser supports a given feature or property, as per the SAX/JAXP +specifications, by attempting to set the appropriate property/feature

    -

    This condition was added in Apache Ant 1.7.

    +

    Since Apache Ant 1.7.

    - +
    - - - + + + - - - + + + - - - + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    propertyproperty to setone of property or featurepropertyproperty to setExactly one of the two
    featurefeature to setone of property or featurefeaturefeature to set
    valuestring (property) or boolean (feature)For property tests, but not for feature testsvaluestring (property) or boolean (feature)For property tests, but not for feature tests
    -
    -<parsersupports feature="http://xml.org/sax/features/namespaces"/>
    -
    -Check for namespace support. All SAX2 parsers should have this. -
    +
    <parsersupports feature="http://xml.org/sax/features/namespaces"/>
    +

    Check for namespace support. All SAX2 parsers should have this.

    + +
     <or>
       <parsersupports
         feature="http://apache.org/xml/features/validation/schema"/>
       <parsersupports
         feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/>
    -</or>
    -
    - -Check for XML Schema support. +</or> +

    Check for XML Schema support.

     <parsersupports
       property="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"
    -  value="document.xsd"/>
    -
    - -Check for Xerces-specific definition of the location of the no namespace schema. - -

    isreachable

    - -

    Uses Java1.5+ networking APIs to probe for a (remote) system being -reachable. Exactly what probe mechanisms are used is an implementation -feature of the JVM. They may include ICMP "ping" packets, UDP or TCP connections -to port 7 "echo service" or other means. On Java1.4 and earlier, being able -to resolve the hostname is considered success. This means that if DNS is not -working or a URL/hostname is bad, the test will fail, but otherwise succeed -even if the remote host is actually absent. - -

    -

    -This condition turns unknown host exceptions into false conditions. This is -because on a laptop, DNS is one of the first services when the network goes; you -are implicitly offline. -

    -

    - If a URL is supplied instead of a host, the hostname is extracted - and used in the test - all other parts of the URL are discarded. -

    -

    -The test may not work through firewalls, that is, something may be reachable -using a protocol such as HTTP, while the lower level ICMP packets get dropped -on the floor. Similarly, a host may detected as reachable with ICMP, but -not reachable on other ports (i.e. port 80), because of firewalls. -

    -

    + value="document.xsd"/> +

    Check for Xerces-specific definition of the location of the no namespace schema.

    -This condition was added in Apache Ant 1.7.

    +

    isreachable

    - - - - - - - - - - - - - - - - - - - - +

    Uses Java 5+ networking APIs to probe for a (remote) system being reachable. Exactly what probe +mechanisms are used is an implementation feature of the JVM. They may include ICMP "ping" packets, +UDP or TCP connections to port 7 "echo service" or other means. On Java 1.4 and earlier, being able +to resolve the hostname is considered success. This means that if DNS is not working or a +URL/hostname is bad, the test will fail, but otherwise succeed even if the remote host is actually +absent.

    +

    This condition turns unknown host exceptions into false conditions. This is because on a laptop, +DNS is one of the first services when the network goes; you are implicitly offline.

    +

    If a URL is supplied instead of a host, the hostname is extracted and used in the +test—all other parts of the URL are discarded.

    +

    The test may not work through firewalls, that is, something may be reachable using a protocol +such as HTTP, while the lower level ICMP packets get dropped on the floor. Similarly, a host may +detected as reachable with ICMP, but not reachable on other ports (i.e. port 80), because of +firewalls.

    +

    Since Apache Ant 1.7.

    + +
    AttributeDescriptionRequired
    hosthost to check forone of url or host
    urlURL containing hostnameone of url or host
    timeouttimeout in secondsno, default is 30s
    + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    hosthost to check forExactly one of the two
    urlURL containing hostname
    timeouttimeout in secondsNo; default is 30
    -
    +
     <condition property="offline">
    -  <isreachable url="http://ibiblio.org/maven/" />
    -</condition>
    -
    + <isreachable url="http://ibiblio.org/maven/"/> +</condition> -

    -Probe for the maven repository being reachable. -

    +

    Probe for the Maven repository being reachable.

    -
    +
     <condition property="offline">
    -  <isreachable host="ibiblio.org" timeout="10" />
    -</condition>
    -
    + <isreachable host="ibiblio.org" timeout="10"/> +</condition> -

    -Probe for the maven repository being reachable using the hostname, ten second timeout.. -

    +

    Probe for the Maven repository being reachable using the hostname, ten second timeout.

    -

    length

    -

    This condition is a facet of the Length task. - It is used to test the length of a string or one or more files. - Since Ant 1.6.3 -

    +

    length

    +

    Since Ant 1.6.3

    +

    This condition is a facet of the Length task. It is used to test the +length of a string or one or more files.

    -
    -<length string=" foo " trim="true" length="3" />
    -
    +
    <length string=" foo " trim="true" length="3"/>

    Verify a string is of a certain length.

    -
    -<length file="foo" when="greater" length="0" />
    -
    -

    Verify that file foo is not empty.

    +
    <length file="foo" when="greater" length="0"/>
    +

    Verify that file foo is not empty.

    -

    isfailure

    +

    isfailure

    +

    Since Ant 1.7

    +

    Test the return code of an executable (see the Exec task) for +failure.

    -

    Test the return code of an executable (see the -Exec task) for failure. Since Ant 1.7

    - - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    codeThe return code to test.YescodeThe return code to test.Yes
    -

    resourcecount

    -

    This condition is a facet of the - ResourceCount task. - It is used to test the size of a - resource collection. - Since Ant 1.7 -

    +

    resourcecount

    +

    Since Ant 1.7

    +

    This condition is a facet of the ResourceCount task. It is used +to test the size of a resource +collection.

    -
    -<resourcecount refid="myresourcecollection" when="greater" count="0" />
    -
    +
    <resourcecount refid="myresourcecollection" when="greater" count="0"/>

    Verify that a resource collection is not empty.

    -

    resourcesmatch

    -

    Test resources for matching. Nonexistence of one or more resources results in -"false", although if none exists they are considered equal in terms of content. -By default this test does a byte for byte comparison, so test time scales with -byte size. NB: if the files are different sizes, one of them is missing -or the filenames match the answer is so obvious the detailed test is omitted. -The resources to check are specified as nested -resource collections, -meaning that more than two resources can be checked; in this case all resources -must match. Since Ant 1.7 -

    - - - - - - - - - - +

    resourcesmatch

    +

    Since Ant 1.7

    +

    Test resources for matching. Nonexistence of one or more resources results in false, +although if none exists they are considered equal in terms of content. By default, this test does a +byte for byte comparison, so test time scales with byte size. Note: if the files +are different sizes, one of them is missing or the filenames match the answer is so obvious the +detailed test is omitted. The resources to check are specified as +nested resource collections, meaning that more than +two resources can be checked; in this case all resources must match.

    +
    AttributeDescriptionRequired
    astextWhether to ignore line endings - when comparing resource content; defaults to false, - while true triggers a binary comparison. - No
    + + + + + + + + +
    AttributeDescriptionRequired
    astextWhether to ignore line endings when comparing resource content; true triggers a + binary comparison.No; defaults to false
    -

    resourcecontains

    +

    resourcecontains

    +

    Since Ant 1.7.1

    Tests whether a resource contains a given (sub)string.

    -

    The resources to check are specified via references or - in the - case of file resources via the resource attribute. Since Ant 1.7.1 -

    - +

    The resources to check are specified via references or—in the case of file +resources—via the resource attribute.

    +
    - - - + + + - - - + + + - - + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    resourceName of a file that is the resource to test. - One of the tworesourceName of a file that is the resource to test.Exactly one of the two
    refidReference to a resource defined inside the project.refidReference to a resource defined inside the project.
    substringThe string to search for.YessubstringThe string to search for.Yes
    casesensitivePerform a case sensitive comparison. Default is - true.NocasesensitivePerform a case sensitive comparison.No; default is true
    -

    hasmethod

    +

    hasmethod

    +

    Since Ant 1.7

    +

    Tests for a class having a method or field. If the class is not found or fails to load, the build +fails.

    -

    Tests for a class having a method or field. If the class is not found - or fails to load, the build fails. - - Since Ant 1.7 -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AttributeDescriptionRequired
    classnamename of the class to loadyes
    fieldname of a field to look forone of field or method
    methodname of a method to look forone of field or method
    ignoreSystemClassesshould system classes be ignored?No -default is false
    classpatha class pathNo
    classpathrefreference to a class pathNo
    - -

    - There is also a nested <classpath> element, which can be used to specify - a classpath. -

    -
    -<hasmethod classname="java.util.ArrayList" method="trimToSize"  />
    -
    - -

    Looks for the method trimToSize in the ArrayList class.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    classnamename of the class to loadyes
    fieldname of a field to look forExactly one of the two
    methodname of a method to look for
    ignoreSystemClassesshould system classes be ignored?No; default is false
    classpatha class pathNo
    classpathrefreference to a class pathNo
    -

    matches

    +

    There is also a nested <classpath> element, which can be used to specify a +classpath.

    +
    <hasmethod classname="java.util.ArrayList" method="trimToSize"/>
    +

    Looks for the method trimToSize() in +the java.util.ArrayList class.

    -

    - Test if the specified string matches the specified regular - expression pattern. - Since Ant 1.7

    +

    matches

    +

    Since Ant 1.7

    +

    Test if the specified string matches the specified regular expression pattern

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    stringThe string to test.YesstringThe string to test.Yes
    patternThe regular expression pattern used to test.Yes, unless there is a nested - <regexp> element.patternThe regular expression pattern used to test.Yes, unless there is a nested <regexp> element
    casesensitivePerform a case sensitive match. Default is - true.NocasesensitivePerform a case sensitive match.No; default is true
    multiline - Perform a multi line match. - Default is false.NomultilinePerform a multi line match.No; default is false
    singleline - This allows '.' to match new lines. - SingleLine is not to be confused with multiline, SingleLine is a perl - regex term, it corresponds to dotall in java regex. - Default is false.NosinglelineThis allows . to match new lines. SingleLine is not to be confused with + multiline, SingleLine is a perl regex term, it corresponds to dotall in + Java regex.No; default is false
    -

    - There is also an optional <regexp> element, which can be used to specify - a regular expression instead of the "pattern" attribute. - See Regexp Type for the description - of the nested element regexp and of - the choice of regular expression implementation. -

    -

    - An example: -

    -
    +

    There is also an optional <regexp> element, which can be used to specify a +regular expression instead of the pattern attribute. +See Regexp Type for the description of the nested element regexp +and of the choice of regular expression implementation.

    +

    An example:

    +
     <condition property="legal-password">
       <matches pattern="[1-9]" string="${user-input}"/>
     </condition>
     <fail message="Your password should at least contain one number"
    -      unless="legal-password"/>
    -
    -

    - The following example sets the property "ok" if - the property "input" is three characters long, starting - with 'a' and ending with 'b'. -

    -
    +      unless="legal-password"/>
    +

    The following example sets the property ok if the property input is +three characters long, starting with a and ending with b.

    +
     <condition property="ok">
       <matches string="${input}" pattern="^a.b$"/>
    -</condition>
    -
    -

    - The following defines a reference regular expression for - matching dates and then uses antunit to check if the - property "today" is in the correct format: -

    -
    +</condition>
    +

    The following defines a reference regular expression for matching dates and then uses antunit to +check if the property today is in the correct format:

    +
     <regexp id="date.pattern" pattern="^[0123]\d-[01]\d-[12]\d\d\d$"/>
     
     <au:assertTrue xmlns:au="antlib:org.apache.ant.antunit">
       <matches string="${today}">
         <regexp refid="date.pattern"/>
       </matches>
    -</au:assertTrue>
    -
    -

    - The following example shows the use of the singleline and the casesensitive - flags. -

    -
    +</au:assertTrue>
    +

    The following example shows the use of the singleline and the casesensitive +flags.

    +
     <au:assertTrue>
       <matches string="AB${line.separator}C" pattern="^ab.*C$"
                casesensitive="false"
    @@ -978,156 +836,128 @@
       <matches string="AB${line.separator}C" pattern="^ab.*C$"
                casesensitive="false"
                singleline="false"/>
    -</au:assertFalse>
    -
    - -

    antversion

    -

    This condition is identical to the Antversion task, all attributes are supported, the property attribute -is redundant and will be ignored.

    - +</au:assertFalse> -

    hasfreespace

    - -

    - Tests a partition to see if there is enough space. - Since Ant 1.7.0

    -

    Needed attribute can be specified using standard computing terms:
    -

      -
    • K : Kilobytes (1024 bytes)
    • -
    • M : Megabytes (1024 K)
    • -
    • G : Gigabytes (1024 M)
    • -
    • T : Terabytes (1024 G)
    • -
    • P : Petabytes (1024 T)
    • -
    -

    +

    antversion

    +

    This condition is identical to the Antversion task, all attributes +are supported, the property attribute is redundant and will be ignored.

    + +

    hasfreespace

    +

    Since Ant 1.7.0

    +

    Tests a partition to see if there is enough space.

    +

    Needed attribute can be specified using standard computing terms:

    +
      +
    • K : Kilobytes (1024 bytes)
    • +
    • M : Megabytes (1024 K)
    • +
    • G : Gigabytes (1024 M)
    • +
    • T : Terabytes (1024 G)
    • +
    • P : Petabytes (1024 T)
    • +
    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    partitionThe partition or filesystem to check for freespaceYespartitionThe partition or filesystem to check for free spaceYes
    neededThe amount of freespace needed.YesneededThe amount of free space needed.Yes
    -

    - An example: -

    -
    -<hasfreespace partition="c:" needed="100M"/>
    -
    +

    An example:

    +
    <hasfreespace partition="c:" needed="100M"/>
    -

    islastmodified

    +

    islastmodified

    +

    Since Ant 1.8.0

    +

    Tests the last modified date of a resource.

    -

    Tests the last modified date of a resource. Since Ant -1.8.0

    - - +
    - - - + + + - - - + + + - - + + - - - + + + - - + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    millisSpecifies the expected modification time of the resource - in milliseconds since midnight Jan 1 1970.Exactly one of the - two.millisSpecifies the expected modification time of the resource in milliseconds since midnight Jan + 1 1970.Exactly one of the two
    datetimeSpecifies the expected modification time of the - resource. The special value "now" indicates the - current time.datetimeSpecifies the expected modification time of the resource. The special + value now indicates the current time.
    patternSimpleDateFormat-compatible pattern string. - Defaults to MM/DD/YYYY HH:MM AM_or_PM or MM/DD/YYYY HH:MM:SS AM_or_PM. - NopatternSimpleDateFormat-compatible pattern string.No; defaults to MM/dd/YYYY hh:mm a or MM/dd/YYYY hh:mm:ss a
    modeHow to compare the timestamp. Accepted values - are "equals", "before", "not-before", "after" and "not-after". - No, defaults to "equals".modeHow to compare the timestamp. Accepted values + are equals, before, not-before, after and not-after. + No; defaults to equals

    The actual resource to test is specified as a nested element.

    -

    - An example: -

    -
    +

    An example:

    +
     <islastmodified dateTime="08/18/2009 04:41:19 AM" mode="not-before">
       <file file="${file}"/>
    -</islastmodified>
    -
    +</islastmodified> -

    resourceexists

    - -

    Tests a resource for existence. since Ant 1.8.0

    +

    resourceexists

    +

    Since Ant 1.8.0

    +

    Tests a resource for existence.

    The actual resource to test is specified as a nested element.

    -

    - An example: -

    -
    +

    An example:

    +
     <resourceexists>
       <file file="${file}"/>
    -</resourceexists>
    -
    - -

    javaversion

    +</resourceexists> -

    Tests the version of the JVM executing Ant. Since Ant -1.9.10

    +

    javaversion

    +

    Since Ant 1.10.2

    +

    Tests the version of the JVM executing Ant.

    - +
    - - - + + + - - - - + + + - - - + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    atleastThe version that this JVM is at least. - The format is major.minor.point. Starting with Java9 really - only the major number is determined.NoOne of these.atleastThe version that this JVM is of at least. The format + is major.minor.point. Starting with Java 9 really only the major number is + determined.Exactly one of the two
    exactlyThe version that this JVM is exactly. - The format is major.minor.point. Starting with Java9 really - only the major number is determined.NoexactlyThe version that this JVM is of exactly. The format + is major.minor.point. Starting with Java 9 really only the major number is + determined.
    -

    - An example: -

    +

    An example:

    -
    -<javaversion atleast="9"/>
    -
    +
    <javaversion atleast="9"/>
    -

    will evaluate to true if the current JVM is Java9 or above.

    +

    will evaluate to true if the current JVM is Java 9 or above.

    diff -Nru ant-1.9.10/manual/Tasks/copydir.html ant-1.10.3/manual/Tasks/copydir.html --- ant-1.9.10/manual/Tasks/copydir.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/copydir.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,113 +24,104 @@ -

    Copydir

    -

    Deprecated

    -

    This task has been deprecated. Use the Copy task instead.

    +

    Copydir

    +

    Deprecated

    +

    This task has been deprecated. Use the Copy task instead.

    Description

    Copies a directory tree from the source to the destination.

    -

    It is possible to refine the set of files that are being copied. This can be -done with the includes, includesfile, excludes, excludesfile and defaultexcludes -attributes. With the includes or includesfile attribute you specify the files you want to -have included by using patterns. The exclude or excludesfile attribute is used to specify -the files you want to have excluded. This is also done with patterns. And -finally with the defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the +

    It is possible to refine the set of files that are being copied. This can be done with +the includes, includesfile, excludes, excludesfile +and defaultexcludes attributes. With the includes or includesfile +attribute you specify the files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This is +also done with patterns. And finally with the defaultexcludes attribute, you can specify +whether you want to use default exclusions or not. See the section +on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.

    -

    This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes src) as well as the nested -<include>, <exclude> and -<patternset> elements.

    +

    This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes src) as well as the +nested <include>, <exclude> +and <patternset> elements.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    srcthe directory to copy.Yessrcthe directory to copy.Yes
    destthe directory to copy to.Yesdestthe directory to copy to.Yes
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    filteringindicates whether token filtering should take place during - the copyNofilteringindicates whether token filtering should take place during the copyNo; default is false
    flattenignore directory structure of source directory, - copy all files into a single directory, specified by the dest - attribute (default is false).Noflattenignore directory structure of source directory, copy all files into a single directory, + specified by the dest attribute.No; default is false
    forceoverwriteoverwrite existing files even if the destination - files are newer (default is false).Noforceoverwriteoverwrite existing files even if the destination files are newer.No; default is false

    Examples

    -
      <copydir src="${src}/resources"
    -           dest="${dist}"
    -  />
    -

    copies the directory ${src}/resources to ${dist}.

    -
      <copydir src="${src}/resources"
    -           dest="${dist}"
    -           includes="**/*.java"
    -           excludes="**/Test.java"
    -  />
    -

    copies the directory ${src}/resources to ${dist} -recursively. All java files are copied, except for files with the name Test.java.

    -
      <copydir src="${src}/resources"
    -           dest="${dist}"
    -           includes="**/*.java"
    -           excludes="mypackage/test/**"/>
    -

    copies the directory ${src}/resources to ${dist} -recursively. All java files are copied, except for the files under the mypackage/test -directory.

    - +
    +<copydir src="${src}/resources"
    +         dest="${dist}"/>
    +

    copies the directory ${src}/resources to ${dist}.

    +
    +<copydir src="${src}/resources"
    +         dest="${dist}"
    +         includes="**/*.java"
    +         excludes="**/Test.java"/>
    +

    copies the directory ${src}/resources to ${dist} +recursively. All .java files are copied, except for files with the +name Test.java.

    +
    +<copydir src="${src}/resources"
    +         dest="${dist}"
    +         includes="**/*.java"
    +         excludes="mypackage/test/**"/>
    +

    copies the directory ${src}/resources to ${dist} +recursively. All .java files are copied, except for the files under +the mypackage/test directory.

    - diff -Nru ant-1.9.10/manual/Tasks/copyfile.html ant-1.10.3/manual/Tasks/copyfile.html --- ant-1.9.10/manual/Tasks/copyfile.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/copyfile.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,50 +24,44 @@ -

    Copyfile

    -

    Deprecated

    -

    This task has been deprecated. Use the Copy task instead.

    +

    Copyfile

    +

    Deprecated

    +

    This task has been deprecated. Use the Copy task instead.

    Description

    -

    Copies a file from the source to the destination. The file is only copied if -the source file is newer than the destination file, or when the destination file -does not exist.

    +

    Copies a file from the source to the destination. The file is only copied if the source file is +newer than the destination file, or when the destination file does not exist.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    srcthe filename of the file to copy.Yessrcthe filename of the file to copy.Yes
    destthe filename of the file where to copy to.Yesdestthe filename of the file where to copy to.Yes
    filteringindicates whether token filtering should take place during - the copyNofilteringindicates whether token filtering should take place during the copyNo; default is false
    forceoverwriteoverwrite existing files even if the destination - files are newer (default is false).Noforceoverwriteoverwrite existing files even if the destination files are newer.No; default is false

    Examples

    -
    -

    <copyfile src="test.java" dest="subdir/test.java"/>

    -

    <copyfile src="${src}/index.html" dest="${dist}/help/index.html"/>

    -
    - +
    +<copyfile src="test.java" dest="subdir/test.java"/>
    +<copyfile src="${src}/index.html" dest="${dist}/help/index.html"/>
    - diff -Nru ant-1.9.10/manual/Tasks/copy.html ant-1.10.3/manual/Tasks/copy.html --- ant-1.9.10/manual/Tasks/copy.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/copy.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,353 +24,274 @@ -

    Copy

    +

    Copy

    Description

    -

    Copies a file or resource collection 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 -overwrite files with the overwrite attribute.

    - -

    Resource -Collections are used to select a group of files to copy. To use a -resource collection, the todir attribute must be set. -Note that some resources (for example -the file resource) -return absolute paths as names and the result of using them without -using a nested mapper (or the flatten attribute) may not be what you +

    Copies a file or resource collection 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 overwrite files with the overwrite attribute.

    + +

    Resource collections are used to select a group +of files to copy. To use a resource collection, the todir attribute must be +set. Note that some resources (for example +the file resource) return absolute paths as names and the +result of using them without using a nested mapper (or the flatten attribute) may not be what you expect.

    -

    -Note: If you employ filters in your copy operation, -you should limit the copy to text files. Binary files will be corrupted -by the copy operation. -This applies whether the filters are implicitly defined by the -filter task or explicitly provided to the copy -operation as filtersets. - See encoding note. -

    +

    Note: If you employ filters in your copy operation, you should limit the copy to +text files. Binary files will be corrupted by the copy operation. This applies whether the filters +are implicitly defined by the filter task or explicitly provided to the +copy operation +as filtersets. See encoding +note.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - - - - - - + + + + + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    fileThe file to copy.Yes, unless a nested - resource collection element is used.fileThe file to copy.Yes, unless a nested resource collection element is used
    preservelastmodifiedGive the copied files the same last modified - time as the original source files.No; defaults to false.preservelastmodifiedGive the copied files the same last modified time as the original source files.No; defaults to false
    tofileThe file to copy to.With the file - attribute, either tofile or todir can be used.
    - - With nested resource collection elements, if the number of - included resources - is greater than 1, or if only the dir attribute is - specified in the <fileset>, or if the - file attribute is also specified, then only - todir is allowed.
    - Prior to Apache Ant 1.8.2 the tofile attribute - only supported filesystem resources top copy from.
    tofileThe file to copy to. Prior to Apache Ant 1.8.2, the tofile attribute only + supported file resources to copy from.With the file attribute, either tofile or todir + can be used.
    With nested resource collection elements, if the number of included + resources is greater than 1, or if only the dir attribute is specified in + the <fileset>, or if the file attribute is also specified, then + only todir is allowed.
    todirThe directory to copy to.todirThe directory to copy to.
    overwriteOverwrite existing files even if the destination - files are newer.No; defaults to false.overwriteOverwrite existing files even if the destination files are newer.No; defaults to false
    forceOverwrite read-only destination - files. since Ant 1.8.2No; defaults to false.forceOverwrite read-only destination files. since Ant 1.8.2No; defaults to false
    filteringIndicates whether token filtering using the global - build-file filters should take place during the copy. - Note: Nested <filterset> elements will - always be used, even if this attribute is not specified, or its value is - false (no, or off).No; defaults to false.filteringIndicates whether token filtering using the global + build-file filters should take place during the copy. Note: + Nested <filterset> elements will always be used, even if this attribute is + not specified, or its value is false, no, or off.No; defaults to false
    flattenIgnore the directory structure of the source files, - and copy all files into the directory specified by the todir - attribute. Note that you can achieve the same effect by using a - flatten mapper.No; defaults to false.flattenIgnore the directory structure of the source files, and copy all files into the directory + specified by the todir attribute. Note that you can achieve the same effect by + using a flatten mapper.No; defaults to false
    includeEmptyDirsCopy any empty directories included in the FileSet(s). - No; defaults to true.includeEmptyDirsCopy any empty directories included in the FileSet(s).No; defaults to true
    failonerrorIf false, log a warning message, but do not stop the - build, when the file to copy does not exist or one of the nested - filesets points to a directory that doesn't exist or an error occurs - while copying. - No; defaults to true.failonerrorIf false, log a warning message, but do not stop the build, when the file to copy + does not exist or one of the nested filesets points to a directory that doesn't exist or an + error occurs while copying.No; defaults to true
    quietIf true and failonerror is false, then do not log a - warning message when the file to copy does not exist or one of the nested - filesets points to a directory that doesn't exist or an error occurs - while copying. since Ant 1.8.3. - No; defaults to false.quietIf true and failonerror is false, then do not log a warning message + when the file to copy does not exist or one of the nested filesets points to a directory that + doesn't exist or an error occurs while copying. since Ant 1.8.3.No; defaults to false
    verboseLog the files that are being copied.No; defaults to false.verboseLog the files that are being copied.No; defaults to false
    encodingThe encoding to assume when filter-copying the - files. since Ant 1.5.No - defaults to default JVM encodingencodingThe encoding to assume when filter-copying the files. since Ant 1.5.No; defaults to default JVM character encoding
    outputencodingThe encoding to use when writing the files. + outputencodingThe encoding to use when writing the files. since Ant 1.6.No - defaults to the value of the encoding - attribute if given or the default JVM encoding otherwise.No; defaults to encoding if set or default JVM character encoding otherwise
    enablemultiplemappings - If true the task will process to all the mappings for a - given source path. If false the task will only process - the first file or directory. This attribute is only relevant - if there is a mapper subelement. - since Ant 1.6.No - defaults to false.
    granularityThe 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 1 second, or 2 seconds on DOS - systems. This can also be useful if source and target files live - on separate machines with clocks being out of sync. since Ant - 1.6.2.NoenablemultiplemappingsIf true the task will process to all the mappings for a given source + path. If false the task will only process the first file or directory. This attribute + is only relevant if there is a mapper subelement. since Ant 1.6.No; defaults to false
    granularityThe 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. This can also be useful if source and target files live on separate + machines with clocks being out of sync. since Ant 1.6.2.No; default is 1 second, or 2 seconds on DOS systems

    Parameters specified as nested elements

    -

    fileset or any other resource collection

    -

    Resource -Collections are used to select groups of files to copy. To use a -resource collection, the todir attribute must be set.

    -

    Prior to Ant 1.7 only <fileset> has been -supported as a nested element.

    +

    any filesystem based resource collection

    +

    Resource collections are used to select groups +of files to copy. To use a resource collection, the todir attribute must be set.

    +

    Prior to Ant 1.7, only <fileset> has been supported as a nested element.

    mapper

    -

    You can define filename transformations by using a nested mapper element. The default mapper used by - <copy> is the identity mapper.

    -

    - Since Ant 1.6.3, - one can use a filenamemapper type in place of the mapper element. -

    - -

    Note that the source name handed to the mapper depends on the -resource collection you use. If you use <fileset> -or any other collection that provides a base directory, the name -passed to the mapper will be a relative filename, relative to the base -directory. In any other case the absolute filename of the source will -be used.

    +

    You can define filename transformations by using a +nested mapper element. The default mapper used +by <copy> is the identity +mapper.

    +

    Since Ant 1.6.3, one can use a filenamemapper type in place of the mapper element.

    + +

    Note that the source name handed to the mapper depends on the resource collection you use. If +you use <fileset> or any other collection that provides a base directory, the +name passed to the mapper will be a relative filename, relative to the base directory. In any other +case the absolute filename of the source will be used.

    filterset

    -

    FilterSets are used to replace -tokens in files that are copied. - To use a FilterSet, use the nested <filterset> element.

    +

    FilterSets are used to replace tokens in files that are +copied. To use a FilterSet, use the nested <filterset> element.

    It is possible to use more than one filterset.

    filterchain

    -

    The Copy task supports nested -FilterChains.

    +

    The Copy task supports nested FilterChains.

    -

    -If <filterset> and <filterchain> elements are used inside the -same <copy> task, all <filterchain> elements are processed first -followed by <filterset> elements. -

    +

    If <filterset> and <filterchain> elements are used inside +the same <copy> task, all <filterchain> elements are processed +first followed by <filterset> elements.

    Examples

    -

    Copy a single file

    -
    -  <copy file="myfile.txt" tofile="mycopy.txt"/>
    -
    -

    Copy a single file to a directory

    -
    -  <copy file="myfile.txt" todir="../some/other/dir"/>
    -
    -

    Copy a directory to another directory

    +

    Copy a single file

    +
    <copy file="myfile.txt" tofile="mycopy.txt"/>
    +

    Copy a single file to a directory

    +
    <copy file="myfile.txt" todir="../some/other/dir"/>
    +

    Copy a directory to another directory

    -  <copy todir="../new/dir">
    -    <fileset dir="src_dir"/>
    -  </copy>
    +<copy todir="../new/dir">
    +  <fileset dir="src_dir"/>
    +</copy>
     
    -

    Copy a set of files to a directory

    +

    Copy a set of files to a directory

    -  <copy todir="../dest/dir">
    -    <fileset dir="src_dir">
    -      <exclude name="**/*.java"/>
    -    </fileset>
    -  </copy>
    -
    -  <copy todir="../dest/dir">
    -    <fileset dir="src_dir" excludes="**/*.java"/>
    -  </copy>
    -
    -

    Copy a set of files to a directory, appending -.bak to the file name on the fly

    +<copy todir="../dest/dir"> + <fileset dir="src_dir"> + <exclude name="**/*.java"/> + </fileset> +</copy> + +<copy todir="../dest/dir"> + <fileset dir="src_dir" excludes="**/*.java"/> +</copy> +

    Copy a set of files to a directory, appending .bak to the file name on the +fly

    -  <copy todir="../backup/dir">
    -    <fileset dir="src_dir"/>
    -    <globmapper from="*" to="*.bak"/>
    -  </copy>
    -
    +<copy todir="../backup/dir"> + <fileset dir="src_dir"/> + <globmapper from="*" to="*.bak"/> +</copy> -

    Copy a set of files to a directory, replacing @TITLE@ with Foo Bar -in all files.

    +

    Copy a set of files to a directory, replacing @TITLE@ with Foo +Bar in all files.

    -  <copy todir="../backup/dir">
    -    <fileset dir="src_dir"/>
    -    <filterset>
    -      <filter token="TITLE" value="Foo Bar"/>
    -    </filterset>
    -  </copy>
    -
    +<copy todir="../backup/dir"> + <fileset dir="src_dir"/> + <filterset> + <filter token="TITLE" value="Foo Bar"/> + </filterset> +</copy> -

    Collect all items from the current CLASSPATH setting into a -destination directory, flattening the directory structure.

    +

    Collect all items from the current CLASSPATH setting into a destination +directory, flattening the directory structure.

    -  <copy todir="dest" flatten="true">
    -    <path>
    -      <pathelement path="${java.class.path}"/>
    -    </path>
    -  </copy>
    -
    +<copy todir="dest" flatten="true"> + <path> + <pathelement path="${java.class.path}"/> + </path> +</copy> -

    Copies some resources to a given directory.

    +

    Copies some resources to a given directory.

    -  <copy todir="dest" flatten="true">
    -    <resources>
    -      <file file="src_dir/file1.txt"/>
    -      <url url="http://ant.apache.org/index.html"/>
    -    </resources>
    -  </copy>
    -
    +<copy todir="dest" flatten="true"> + <resources> + <file file="src_dir/file1.txt"/> + <url url="http://ant.apache.org/index.html"/> + </resources> +</copy> + +

    If the example above didn't use the flatten attribute, the <file> +resource would have returned its full path as source and target name and would not have been copied +at all. In general it is a good practice to use an explicit mapper together with resources that use +an absolute path as their names.

    -

    If the example above didn't use the flatten attribute, - the <file> resource would have returned its full - path as source and target name and would not have been copied at - all. In general it is a good practice to use an explicit mapper - together with resources that use an absolute path as their - names.

    - -

    Copies the two newest resources into a destination directory.

    +

    Copies the two newest resources into a destination directory.

    -  <copy todir="dest" flatten="true">
    -    <first count="2">
    -      <sort>
    -        <date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
    -        <resources>
    -          <file file="src_dir/file1.txt"/>
    -          <file file="src_dir/file2.txt"/>
    -          <file file="src_dir/file3.txt"/>
    -          <url url="http://ant.apache.org/index.html"/>
    -        </resources>
    -      </sort>
    -    </first>
    -  </copy>
    -
    - -

    The paragraph following the previous example applies to this - example as well.

    - -

    Unix Note: File permissions are not retained when files -are copied; they end up with the default UMASK 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 <exec executable="cp" ... > instead. -

    - -

    Windows Note: If you copy a file to a directory -where that file already exists, but with different casing, -the copied file takes on the case of the original. The workaround is to -delete -the file in the destination directory before you copy it. -

    -

    - Important Encoding Note: - The reason that binary files when filtered get corrupted is that - filtering involves reading in the file using a Reader class. This - has an encoding specifying how files are encoded. There are a number - of different types of encoding - UTF-8, UTF-16, Cp1252, ISO-8859-1, - US-ASCII and (lots) others. On Windows the default character encoding - is Cp1252, on Unix it is usually UTF-8. For both of these encoding - there are illegal byte sequences (more in UTF-8 than for Cp1252). -

    -

    - How the Reader class deals with these illegal sequences is up to the - implementation - of the character decoder. The current Sun Java implementation is to - map them to legal characters. Previous Sun Java (1.3 and lower) threw - a MalformedInputException. IBM Java 1.4 also throws this exception. - It is the mapping of the characters that cause the corruption. -

    -

    - On Unix, where the default is normally UTF-8, this is a big - problem, as it is easy to edit a file to contain non US Ascii characters - from ISO-8859-1, for example the Danish oe character. When this is - copied (with filtering) by Ant, the character get converted to a - question mark (or some such thing). -

    -

    - There is not much that Ant can do. It cannot figure out which - files are binary - a UTF-8 version of Korean will have lots of - bytes with the top bit set. It is not informed about illegal - character sequences by current Sun Java implementions. -

    -

    - One trick for filtering containing only US-ASCII is to - use the ISO-8859-1 encoding. This does not seem to contain - illegal character sequences, and the lower 7 bits are US-ASCII. - Another trick is to change the LANG environment variable from - something like "us.utf8" to "us". -

    - - - +<copy todir="dest" flatten="true"> + <first count="2"> + <sort> + <date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/> + <resources> + <file file="src_dir/file1.txt"/> + <file file="src_dir/file2.txt"/> + <file file="src_dir/file3.txt"/> + <url url="http://ant.apache.org/index.html"/> + </resources> + </sort> + </first> +</copy> + +

    The paragraph following the previous example applies to this example as well.

    + +

    Unix Note: File permissions are not retained when files are copied; they end up +with the default UMASK 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 <exec executable="cp" ... > instead.

    + +

    Windows Note: If you copy a file to a directory where that file already exists, +but with different case, the copied file takes on the case of the original. The workaround is +to delete the file in the destination directory before you copy it.

    +

    Important Encoding Note: The reason that binary files when +filtered get corrupted is that filtering involves reading in the file using a Reader class. This has +an encoding specifying how files are encoded. There are a number of different types of +encoding—UTF-8, UTF-16, Cp1252, ISO-8859-1, US-ASCII and (lots of) others. On Windows the +default character encoding is Cp1252, on Unix it is usually UTF-8. For both of these encoding there +are illegal byte sequences (more in UTF-8 than for Cp1252).

    +

    How the Reader class deals with these illegal sequences is up to the implementation of the +character decoder. The current Sun Java implementation is to map them to legal characters. Previous +Sun Java (1.3 and lower) threw a MalformedInputException. IBM Java 1.4 also throws this +exception. It is the mapping of the characters that cause the corruption.

    +

    On Unix, where the default is normally UTF-8, this is a big problem, as it is easy to +edit a file to contain non US-ASCII characters from ISO-8859-1, for example the Danish œ +character. When this is copied (with filtering) by Ant, the character get converted to a question +mark (or some such thing).

    +

    There is not much that Ant can do. It cannot figure out which files are binary—a UTF-8 +version of Korean will have lots of bytes with the top bit set. It is not informed about illegal +character sequences by current Sun Java implementations.

    +

    One trick for filtering containing only US-ASCII is to use the ISO-8859-1 encoding. This does not +seem to contain illegal character sequences, and the lower 7 bits are US-ASCII. Another trick is to +change the LANG environment variable from something like us.utf8 +to us.

    - + + diff -Nru ant-1.9.10/manual/Tasks/cvs.html ant-1.10.3/manual/Tasks/cvs.html --- ant-1.9.10/manual/Tasks/cvs.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/cvs.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,134 +24,127 @@ -

    Cvs

    +

    Cvs

    Description

    -

    Handles packages/modules retrieved from a -CVS repository.

    -

    Important: This task needs "cvs" on the path. If it isn't, you will get -an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe -from the command line in the target directory in which you are working. -Also note that this task assumes that the cvs executable is compatible -with the Unix version from cvshome.org, this is not completely true -for certain other cvs clients - like CVSNT for example - and some -operation may fail when using such an incompatible client. -

    - -

    CVSNT Note: CVSNT prefers users to store the passwords -inside the registry. If the cvspass task -and the passfile attribute don't seem to work for you, the most likely -reason is that CVSNT ignores your .cvspass file completely. See bugzilla +

    Handles packages/modules retrieved from a CVS repository.

    +

    Important: This task needs cvs binary on the path. If it isn't, you +will get an error (such as error=2 on Windows). If <cvs> doesn't +work, try to execute cvs.exe from the command line in the target directory in which you +are working. Also note that this task assumes that the cvs executable is compatible with +the Unix version, this is not completely true for certain other CVS clients—like CVSNT for +example—and some operation may fail when using such an incompatible client.

    + +

    CVSNT Note: CVSNT prefers users to store the passwords inside the registry. If +the cvspass task and the passfile attribute don't seem to work +for you, the most likely reason is that CVSNT ignores your .cvspass file completely. +See bugzilla report 21657 for recommended workarounds.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    commandthe CVS command to execute.No, default "checkout".commandthe CVS command to execute.No; default is checkout
    compressiontrue or false - if set - to true, this is the same as compressionlevel="3"No. Defaults to false.compressiontrue (equivalent to compressionlevel=3) or falseNo; defaults to false
    compressionlevelA number between 1 and 9 (corresponding to - possible values for CVS' -z# argument). Any - other value is treated as compression="false"No. Defaults to no compression.compressionlevelA number between 1 and 9 (corresponding to possible values for + CVS -z# argument). Any other value is treated + as compression=falseNo; defaults to no compression
    cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
    cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
    destthe directory where the checked out files should - be placed. Note that this is different from CVS's -d command line - switch as Apache Ant will never shorten pathnames to avoid empty - directories.No, default is project's basedir.destthe directory where the checked out files should be placed. Note that this is different + from CVS's -d command line switch as Apache Ant will never shorten pathnames to + avoid empty directories.No; default is project's basedir
    packagethe package/module to check out. Note: - multiple attributes can be split using spaces. Use a nested - <module> element if you want to specify a module with - spaces in its name.Nopackagethe package/module to check out. Note: multiple attributes can be split + using spaces. Use a nested <module> element if you want to specify a + module with spaces in its name.No
    tagthe tag of the package/module to check out.Notagthe tag of the package/module to check out.No
    dateUse the most recent revision no later than the given dateNodateUse the most recent revision no later than the given dateNo
    quietsuppress informational messages. This is the same as -q on the command line.No, default "false"quietsuppress informational messages. This is the same as -q on the command + line.No; defaults to false
    reallyquietsuppress all messages. This is the same as - -Q on the command line. since Ant 1.6.No, default "false"reallyquietsuppress all messages. This is the same as -Q on the command line. since + Ant 1.6.No; defaults to false
    noexecreport only, don't change any files.No, default to "false"noexecreport only, don't change any files.No; defaults to false
    outputthe file to direct standard output from the command.No, default output to ANT Log as MSG_INFO.outputthe file to direct standard output from the command.No; default is output to the log as MSG_INFO
    errorthe file to direct standard error from the command.No, default error to ANT Log as MSG_WARN.errorthe file to direct standard error from the command.No; default is error to the log as MSG_WARN
    appendwhether to append output/error when redirecting to a file.No, default to "false".appendwhether to append output/error when redirecting to a file.No; defaults to false
    portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; default is 2401
    passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; default is ~/.cvspass
    failonerrorStop the build process if the command exits with a - return code other than 0. Defaults to "false"NofailonerrorStop the build process if the command exits with a return code other than 0.No; defaults to false
    @@ -159,39 +152,39 @@

    module

    -

    Specifies a package/module to work on, unlike the package attribute - modules specified using this attribute can contain spaces in their - name.

    +

    Specifies a package/module to work on, unlike the package attribute modules specified using this +attribute can contain spaces in their name.

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    nameThe module's/package's name.Yes.nameThe module's/package's name.Yes

    Examples

    -
      <cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    -       package="ant"
    -       dest="${ws.dir}"
    -  />
    -

    checks out the package/module "ant" from the CVS -repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}".

    -
      <cvs dest="${ws.dir}" command="update"/>
    -

    updates the package/module that has previously been checked out into -"${ws.dir}".

    - -
      <cvs command="-q diff -u -N" output="patch.txt"/>
    - -

    silently (-q) creates a file called patch.txt which contains a unified (-u) diff which includes new files added via "cvs add" (-N) and can be used as input to patch. -The equivalent, using <commandline> elements, is: -

    +
    +<cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    +     package="ant"
    +     dest="${ws.dir}"/>
    +

    checks out the package/module ant from the CVS repository pointed to by +the cvsRoot attribute, and stores the files in ${ws.dir}.

    + +
    <cvs dest="${ws.dir}" command="update"/>
    +

    updates the package/module that has previously been checked out into ${ws.dir}.

    + +
    <cvs command="-q diff -u -N" output="patch.txt"/>
    + +

    silently (-q) creates a file called patch.txt which contains a unified +(-u) diff which includes new files added via cvs add (-N) and +can be used as input to patch. The equivalent, using <commandline> +elements, is:

     <cvs output="patch">
         <commandline>
    @@ -200,31 +193,27 @@
             <argument value="-u"/>
             <argument value="-N"/>
         </commandline>
    -</cvs>
    -
    -or: +</cvs> +

    or:

     <cvs output="patch">
         <commandline>
             <argument line="-q diff -u -N"/>
         </commandline>
    -</cvs>
    -
    -

    -You may include as many <commandline> elements as you like. -Each will inherit the failonerror, compression, and other "global" parameters -from the <cvs> element. -

    - +</cvs> +

    You may include as many <commandline> elements as you like. Each will inherit +the failonerror, compression, and other "global" parameters from +the <cvs> element.

      <cvs command="update -A -d"/>
    -

    Updates from the head of repository ignoring sticky bits (-A) and creating any new directories as necessary (-d).

    -

    Note: the text of the command is passed to cvs "as-is" so any cvs options should appear -before the command, and any command options should appear after the command as in the diff example -above. See the cvs manual for details, -specifically the Guide to CVS commands

    - +

    Updates from the head of repository ignoring sticky bits (-A) and creating any new +directories as necessary (-d).

    +

    Note: the text of the command is passed to cvs "as-is" so any cvs options +should appear before the command, and any command options should appear after the command as in the +diff example above. See the CVS +book for details, specifically +the Guide +to CVS commands

    - diff -Nru ant-1.9.10/manual/Tasks/cvspass.html ant-1.10.3/manual/Tasks/cvspass.html --- ant-1.9.10/manual/Tasks/cvspass.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/cvspass.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,47 +24,45 @@ -

    cvspass

    +

    cvspass

    Description

    -

    Adds entries to a .cvspass file. Adding entries to this file has the same affect as a cvs login command.

    +

    Adds entries to a .cvspass file. Adding entries to this file has the same affect as +a cvs login command.

    -

    CVSNT Note: CVSNT prefers users to store the passwords -inside the registry. If the task doesn't seem to work for you, the -most likely reason is that CVSNT ignores your .cvspass file -completely. See bug -zilla report 21657 for recommended workarounds.

    +

    CVSNT Note: CVSNT prefers users to store the passwords inside the registry. If +the task doesn't seem to work for you, the most likely reason is that CVSNT ignores +your .cvspass file +completely. See bugzilla report 21657 for recommended workarounds.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    cvsrootthe CVS repository to add an entry for.Yescvsrootthe CVS repository to add an entry for.Yes
    passwordPassword to be added to the password file.YespasswordPassword to be added to the password file.Yes
    passfilePassword file to add the entry to.No, default is ~/.cvspass.passfilePassword file to add the entry to.No; default is ~/.cvspass

    Examples

    -
      <cvspass cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    -       password="anoncvs"
    -  />
    -

    Adds an entry into the ~/.cvspass password file.

    - +
    +<cvspass cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    +         password="anoncvs"/>
    +

    Adds an entry into the ~/.cvspass password file.

    - diff -Nru ant-1.9.10/manual/Tasks/cvstagdiff.html ant-1.10.3/manual/Tasks/cvstagdiff.html --- ant-1.9.10/manual/Tasks/cvstagdiff.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/cvstagdiff.html 2018-03-24 12:37:12.000000000 +0000 @@ -21,115 +21,108 @@ CvsTagDiff Task -

    CvsTagDiff

    +

    CvsTagDiff

    Description

    -

    Generates an XML-formatted report file of the changes between two tags or dates recorded in a -CVS repository.

    -

    Important: This task needs "cvs" on the path. If it isn't, you will get -an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe -from the command line in the target directory in which you are working. -Also note that this task assumes that the cvs executable is compatible -with the Unix version from cvshome.org, this is not completely true -for certain other cvs clients - like CVSNT for example - and some -operation may fail when using such an incompatible client. -

    +

    Generates an XML-formatted report file of the changes between two tags or dates recorded in +a CVS repository.

    +

    Important: This task needs cvs on the path. If it isn't, you will get +an error (such as error=2 on Windows). If <cvs> doesn't work, try to +execute cvs.exe from the command line in the target directory in which you are working. +Also note that this task assumes that the cvs executable is compatible with the Unix +version, this is not completely true for certain other CVS clients—like CVSNT for +example—and some operation may fail when using such an incompatible client.

    Parameters

    - +
    - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    startTagThe earliest tag from which diffs are to be - included in the report.exactly one of the two.startTagThe earliest tag from which diffs are to be included in the report.Exactly one of the two
    startDateThe earliest date from which diffs are to be - included in the report.
    - accepts all formats accepted by the cvs command for -D date_spec arguments
    startDateThe earliest date from which diffs are to be included in the + report.
    Accepts all formats accepted by the cvs command for -D + date_spec arguments.
    endTagThe latest tag from which diffs are to be - included in the report.exactly one of the two.endTagThe latest tag from which diffs are to be included in the report.Exactly one of the two
    endDateThe latest date from which diffs are to be - included in the report.
    - accepts all formats accepted by the cvs command for -D date_spec arguments
    endDateThe latest date from which diffs are to be included in the report.
    Accepts + all formats accepted by the cvs command for -D date_spec + arguments.
    destfileThe file in which to write the diff report.YesdestfileThe file in which to write the diff report.Yes
    ignoreRemovedWhen set to true, the report will not include any - removed files. Since Apache Ant 1.8.0No, defaults to false.ignoreRemovedWhen set to true, the report will not include any removed files. Since Apache + Ant 1.8.0No; defaults to false

    Parameters inherited from the cvs task

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    compressiontrue, false, or the number 1-9 (corresponding to possible values for CVS -z# argument). Any other value is treated as falseNo. Defaults to no compression. if passed true, level 3 compression is assumed.compressiontrue (equivalent to 3), false, or a number between 1 + and 9 (corresponding to possible values for CVS -z# argument). Any other + value is treated as falseNo; defaults to no compression
    cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
    cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
    packagethe package/module to analyze.
    - Since Ant 1.6 - multiple packages separated by spaces are possible. - aliases corresponding to different modules are also possible - Use a nested <module> element if you want to specify a module with - spaces in its name.
    No
    Yespackagethe package/module to analyze.
    Since Ant 1.6 multiple packages separated by + spaces are possible. aliases corresponding to different modules are also possible. Use a + nested <module> element if you want to specify a module with spaces in its + name.
    No
    quietsuppress informational messages.No, default "false"quietsuppress informational messages.No; default false
    portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; default 2401
    passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; default ~/.cvspass
    failonerrorStop the buildprocess if the command exits with a - returncode other than 0. Defaults to falseNofailonerrorStop the build process if the command exits with a return code other than 0.No; defaults to false
    @@ -137,93 +130,96 @@

    module

    -

    Specifies a package/module to work on, unlike the package attribute - modules specified using this attribute can contain spaces in their - name.

    +

    Specifies a package/module to work on, unlike the package attribute modules specified using this +attribute can contain spaces in their name.

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    nameThe module's/package's name.Yes.nameName of the module/package.Yes

    Examples

    -
      <cvstagdiff cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    -                destfile="tagdiff.xml"
    -                package="ant"
    -                startTag="ANT_14"
    -                endTag="ANT_141"
    -  />
    - -

    Generates a tagdiff report for all the changes that have been made -in the ant module between the tags ANT_14 and ANT_141. -It writes these changes into the file tagdiff.xml.

    - -
      <cvstagdiff
    -                destfile="tagdiff.xml"
    -                package="ant"
    -                startDate="2002-01-01"
    -                endDate="2002-31-01"
    -  />
    - -

    Generates a tagdiff report for all the changes that have been made -in the ant module in january 2002. In this example cvsRoot -has not been set. The current cvsRoot will be used (assuming the build is started -from a folder stored in cvs. -It writes these changes into the file tagdiff.xml.

    - -
      <cvstagdiff
    -                destfile="tagdiff.xml"
    -                package="ant jakarta-gump"
    -                startDate="2003-01-01"
    -                endDate="2003-31-01"
    -  />
    - -

    Generates a tagdiff report for all the changes that have been made -in the ant and jakarta-gump modules in january 2003. -In this example cvsRoot -has not been set. The current cvsRoot will be used (assuming the build is started -from a folder stored in cvs. -It writes these changes into the file tagdiff.xml.

    +
    +<cvstagdiff cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    +            destfile="tagdiff.xml"
    +            package="ant"
    +            startTag="ANT_14"
    +            endTag="ANT_141"/>
    + +

    Generates a tagdiff report for all the changes that have been made in +the ant module between the tags ANT_14 and ANT_141. It +writes these changes into the file tagdiff.xml.

    + +
    +<cvstagdiff destfile="tagdiff.xml"
    +            package="ant"
    +            startDate="2002-01-01"
    +            endDate="2002-31-01"/>
    + +

    Generates a tagdiff report for all the changes that have been made in +the ant module in January 2002. In this example cvsRoot has not been +set. The current cvsRoot will be used (assuming the build is started from a folder stored +in cvs. It writes these changes into the file tagdiff.xml.

    + +
    +<cvstagdiff destfile="tagdiff.xml"
    +            package="ant jakarta-gump"
    +            startDate="2003-01-01"
    +            endDate="2003-31-01"/>
    + +

    Generates a tagdiff report for all the changes that have been made in +the ant and jakarta-gump modules in January 2003. In this +example cvsRoot has not been set. The current cvsRoot will be used (assuming +the build is started from a folder stored in cvs. It writes these changes into the +file tagdiff.xml.

    Generate Report

    -

    Ant includes a basic XSLT stylesheet that you can use to generate -a HTML report based on the xml output. The following example illustrates -how to generate a HTML report from the XML report.

    +

    Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the xml +output. The following example illustrates how to generate a HTML report from the XML report.

    -        <style in="tagdiff.xml" 
    -               out="tagdiff.html" 
    -               style="${ant.home}/etc/tagdiff.xsl">
    -          <param name="title" expression="Ant Diff"/>
    -          <param name="module" expression="ant"/>
    -          <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
    -        </style>
    -
    +<style in="tagdiff.xml" + out="tagdiff.html" + style="${ant.home}/etc/tagdiff.xsl"> + <param name="title" expression="Ant Diff"/> + <param name="module" expression="ant"/> + <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/> +</style>

    Output

    -

    -The cvsroot and package attributes of the tagdiff element are new in ant 1.6.
    -Notes on entry attributes : - - - - - +

    The cvsroot and package attributes of the tagdiff element are +new in Ant 1.6.
    Notes on entry attributes:

    +
    AttributeComment
    namewhen reporting on one package, the package name is removed from the output
    revisionsupplied for files which exist at the end of the reporting period
    prevrevisionsupplied for files which exist at the beginning of the reporting period.
    -Old CVS servers do not supply it for deleted files. CVS 1.12.2 supplies it.
    + + + + + + + + + + + + + + + +
    AttributeComment
    namewhen reporting on one package, the package name is removed from the output
    revisionsupplied for files which exist at the end of the reporting period
    prevrevisionsupplied for files which exist at the beginning of the reporting period.
    Old CVS servers + do not supply it for deleted files. CVS 1.12.2 supplies it.
    -

     <?xml version="1.0" encoding="UTF-8"?>
    -<tagdiff startTag="ANT_14" endTag="ANT_141" 
    -cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" package="ant">
    +<tagdiff startTag="ANT_14" endTag="ANT_141"
    +         cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" package="ant">
       <entry>
         <file>
           <name>src/main/org/apache/tools/ant/DirectoryScanner.java</name>
    @@ -234,8 +230,5 @@
     </tagdiff>
     
    - - - diff -Nru ant-1.9.10/manual/Tasks/cvsversion.html ant-1.10.3/manual/Tasks/cvsversion.html --- ant-1.9.10/manual/Tasks/cvsversion.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/cvsversion.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,85 +24,78 @@ -

    CvsVersion

    +

    CvsVersion

    +

    Since Apache Ant 1.6.1.

    Description

    -

    -This task allows to retrieve a CVS client and server version. - Since Apache Ant 1.6.1. -

    +

    This task allows to retrieve a CVS client and server version.

    Parameters

    - +
    - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    Attributes from parent Cvs task which are meaningful hereAttributes from parent <cvs> task which are + meaningful here
    cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
    cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
    destdirectory containing the checked out version of the projectNo, default is project's basedir.destdirectory containing the checked out version of the projectNo; default is project's basedir
    packagethe package/module to check out.Nopackagethe package/module to check out.No
    portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; default is 2401
    passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; default is ~/.cvspass
    failonerrorStop the build process if the command exits with a - return code other than 0. Defaults to falseNofailonerrorStop the build process if the command exits with a return code other than 0.No; defaults to false
    Specific attributesSpecific attributes
    clientversionpropertyName of a property where the cvsclient version - should be storedNoclientversionpropertyName of a property where the CVS client version should be storedNo
    serverversionpropertyName of a property where the cvs server version - should be storedNoserverversionpropertyName of a property where the CVS server version should be storedNo

    Examples

    -
      <cvsversion cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    -       passfile="/home/myself/.cvspass"
    -       serverversionproperty="apachecvsversion"
    -       clientversionproperty="localcvsversion"
    -  />
    -

    finds out the cvs client and server versions and stores the versions in the -properties called apachecvsversion and localcvsversion

    - - +
    +<cvsversion cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
    +            passfile="/home/myself/.cvspass"
    +            serverversionproperty="apachecvsversion"
    +            clientversionproperty="localcvsversion"/>
    +

    finds out the CVS client and server versions and stores the versions in the properties +called apachecvsversion and localcvsversion

    - diff -Nru ant-1.9.10/manual/Tasks/defaultexcludes.html ant-1.10.3/manual/Tasks/defaultexcludes.html --- ant-1.9.10/manual/Tasks/defaultexcludes.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/defaultexcludes.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,42 +24,40 @@ -

    DefaultExcludes

    +

    DefaultExcludes

    -

    since Apache Ant 1.6

    +

    Since Apache Ant 1.6

    Description

    -

    Alters the default excludes for all subsequent processing in the -build, and prints out the current default excludes if desired. +

    Alters the default excludes for all subsequent processing in the build, and prints out the +current default excludes if desired.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    echowhether or not to print out the default excludes.(defaults to false)attribute "true" required if no - other attribute specifiedechowhether or not to print out the default excludestrue required if no other attribute specified; defaults to false
    defaultgo back to hard wired default excludesattribute "true" required if no - if no other attribute is specifieddefaultgo back to hard wired default excludestrue required if no other attribute is specified
    addthe pattern to add to the default excludesif no other attribute is specifiedaddthe pattern to add to the default excludesif no other attribute is specified
    removeremove the specified pattern from the default excludesif no other attribute is specifiedremoveremove the specified pattern from the default excludesif no other attribute is specified
    @@ -67,41 +65,37 @@

    Print out the default excludes

    -
      <defaultexcludes echo="true"/>
    +
    <defaultexcludes echo="true"/>
    -

    Print out the default excludes and exclude all *.bak files in -all further processing

    +

    Print out the default excludes and exclude all *.bak files in all +further processing

    -
      <defaultexcludes echo="true" add="**/*.bak"/>
    +
    <defaultexcludes echo="true" add="**/*.bak"/>
    -

    Silently allow several fileset based tasks to operate on emacs -backup files and then restore normal behavior

    +

    Silently allow several fileset based tasks to operate on emacs backup files and then restore +normal behavior

    -  <defaultexcludes remove="**/*~"/>
    +<defaultexcludes remove="**/*~"/>
     
    -  (do several fileset based tasks here)
    +(do several fileset based tasks here)
     
    -  <defaultexcludes default="true"/>
    -
    +<defaultexcludes default="true"/>

    Notes

    -By default the pattern **/.svn and **/.svn/** are set as default -excludes. With version 1.3 Subversion supports the -"_svn hack". -That means, that the svn-libraries evaluate environment variables and use .svn -or _svn directory regarding to that value. We had chosen not to evaluate environment variables to -get a more reliable build. Instead you have to change the settings by yourself by changing -the exclude patterns: +

    By default the pattern **/.svn and **/.svn/** are set as default +excludes. Since version 1.3, Subversion supports +the "_svn hack". That means, that the svn-libraries evaluate environment +variables and use .svn or _svn directory regarding to that value. We had +chosen not to evaluate environment variables to get a more reliable build. Instead you have to +change the settings by yourself by changing the exclude patterns:

    -  <defaultexcludes remove="**/.svn"/>
    -  <defaultexcludes remove="**/.svn/**"/>
    -  <defaultexcludes add="**/_svn"/>
    -  <defaultexcludes add="**/_svn/**"/>
    +<defaultexcludes remove="**/.svn"/>
    +<defaultexcludes remove="**/.svn/**"/>
    +<defaultexcludes add="**/_svn"/>
    +<defaultexcludes add="**/_svn/**"/>
     
    - - - diff -Nru ant-1.9.10/manual/Tasks/delete.html ant-1.10.3/manual/Tasks/delete.html --- ant-1.9.10/manual/Tasks/delete.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/delete.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,205 +24,174 @@ -

    Delete

    +

    Delete

    Description

    -

    Deletes a single file, a specified directory and all its files and -subdirectories, or a set of files specified by one or more -resource collections. -The literal implication of <fileset> is that -directories are not included; however the removal of empty directories can -be triggered when using nested filesets by setting the -includeEmptyDirs attribute to true. Note that this -attribute is meaningless in the context of any of the various resource -collection types that do include directories, but that no attempt -will be made to delete non-empty directories in any case. Whether a -directory is empty or not is decided by looking into the filesystem - -include or exclude patterns don't apply here.

    -

    -If you use this task to delete temporary files created by editors -and it doesn't seem to work, read up on the -default exclusion set -in Directory-based Tasks, and see the -defaultexcludes attribute below. - -

    For historical reasons <delete dir="x"/> is - different from <delete><fileset - dir="x"/></delete>, it will try to remove everything - inside "x" including "x" itself, not taking default excludes into - account, blindly following all symbolic links. If you need more - control, use a nested <fileset>.

    +

    Deletes a single file, a specified directory and all its files and subdirectories, or a set of +files specified by one or more resource +collections. The literal implication of <fileset> is that directories are +not included; however the removal of empty directories can be triggered when using nested filesets +by setting the includeEmptyDirs attribute to true. Note that this attribute is +meaningless in the context of any of the various resource collection types that do include +directories, but that no attempt will be made to delete non-empty directories in any case. Whether +a directory is empty or not is decided by looking into the filesystem—include or exclude +patterns don't apply here.

    +

    If you use this task to delete temporary files created by editors and it doesn't seem to work, +read up on the default exclusion set +in Directory-based Tasks, and see the defaultexcludes attribute +below.

    + +

    For historical reasons <delete dir="x"/> is different +from <delete><fileset dir="x"/></delete>; it will try to remove +everything inside x including x itself, not taking default excludes into account, +blindly following all symbolic links. If you need more control, use a +nested <fileset>.

    Parameters

    - +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    fileThe file to delete, specified as either the simple - filename (if the file exists in the current base directory), a - relative-path filename, or a full-path filename.At least one of the two, - unless nested resource collections are specified -
    dirThe directory to delete, including all its files and - subdirectories.
    - Note: dir is not used - to specify a directory name for file; file - and dir are independent of each other.
    - WARNING: Do not set dir to - ".", "${basedir}", - or the full-pathname equivalent unless you truly intend to - recursively remove the entire contents of the current base directory - (and the base directory itself, if different from the current working - directory).
    verboseWhether to show the name of each deleted file.No, default "false"
    quietIf the specified file or directory does not exist, - do not display a diagnostic message (unless Apache Ant - has been invoked with the -verbose or - -debug switches) or modify the exit status to - reflect an error. - When set to "true", if a file or directory cannot be deleted, - no error is reported. This setting emulates the - -f option to the Unix rm command. - Setting this to "true" implies setting - failonerror to "false". - No, default "false"
    failonerrorControls whether an error (such as a failure to - delete a file) stops the build or is merely reported to the screen. - Only relevant if quiet is "false".No, default "true"
    includeemptydirsWhether to delete empty directories - when using filesets.No, default "false"
    includesDeprecated. Use resource collections. - Comma- or space-separated list of patterns of - files that must be deleted. All files are relative to the directory - specified in dir.No
    includesfileDeprecated. Use resource collections. - The name of a file. Each line of - this file is taken to be an include pattern.No
    excludesDeprecated. Use resource collections. - Comma- or space-separated list of patterns of - files that must be excluded from the deletion list. - All files are relative to the directory specified in dir. - No files (except default excludes) are excluded when omitted.No
    excludesfileDeprecated. Use resource collections. - The name of a file. Each line of - this file is taken to be an exclude patternNo
    defaultexcludesDeprecated. Use resource collections. - Whether to use - default excludes.No, default "true"
    deleteonexit - Indicates whether to use File#deleteOnExit() if there is a - failure to delete a file, this causes the jvm to attempt - to delete the file when the jvm process is terminating. - Since Ant 1.6.2No, default "false"
    removeNotFollowedSymlinks - Whether symbolic links (not the files/directories they link to) - should be removed if they haven't been followed because - followSymlinks was false or the maximum number of symbolic links - was too big. - Since Ant 1.8.0No, default "false"
    performGCOnFailedDelete - If Ant fails to delete a file or directory it will retry the - operation once. If this flag is set to true it will perform a - garbage collection before retrying the delete.
    - Setting this flag to true is known to resolve some problems on - Windows (where it defaults to true) but also for directory trees - residing on an NFS share. - Since Ant 1.8.3
    No, default "true" on - Windows and "true" on any other OS.AttributeDescriptionRequired
    fileThe file to delete, specified as either the simple filename (if the file exists in the + current base directory), a relative-path filename, or a full-path filename.At least one of the two, unless nested resource collections are specified
    dirThe directory to delete, including all its files and + subdirectories.
    Note: dir is not used to specify a + directory name for file; file and dir are independent of each + other.
    Warning: Do not set dir + to ., ${basedir}, or the full-pathname equivalent unless you + truly intend to recursively remove the entire contents of the current base directory + (and the base directory itself, if different from the current working directory).
    verboseWhether to show the name of each deleted file.No; default false
    quietIf the specified file or directory does not exist, do not display a diagnostic message + (unless Apache Ant has been invoked with the -verbose or -debug + switches) or modify the exit status to reflect an error. When set to true, if a file + or directory cannot be deleted, no error is reported. This setting emulates + the -f option to the Unix rm command. Setting this to true + implies setting failonerror to false.No; default false
    failonerrorControls whether an error (such as a failure to delete a file) stops the build or is merely + reported to the screen. Only relevant if quiet is false.No; default true
    includeemptydirsWhether to delete empty directories when using filesets.No; default false
    includesDeprecated. Use resource collections. Comma- or space-separated list of + patterns of files that must be deleted. All files are relative to the directory specified + in dir.No
    includesfileDeprecated. Use resource collections. Name of a file; each line of this + file is taken to be an include pattern.No
    excludesDeprecated. Use resource collections. Comma- or space-separated list of + patterns of files that must be excluded from the deletion list. All files are relative to the + directory specified in dir.No; defaults to default excludes or none if defaultexcludes is no
    excludesfileDeprecated. Use resource collections. Name of a file; each line of this + file is taken to be an exclude patternNo
    defaultexcludesDeprecated. Use resource collections. Whether to + use default excludes.No; default true
    deleteonexitIndicates whether to use File#deleteOnExit() if there is a failure to delete a + file. This causes the JVM to attempt to delete the file when the JVM process is + terminating. Since Ant 1.6.2No; default false
    removeNotFollowedSymlinksWhether symbolic links (not the files/directories they link to) should be removed if they + haven't been followed because followSymlinks was false or the maximum number + of symbolic links was too big. Since Ant 1.8.0No; default false
    performGCOnFailedDeleteIf Ant fails to delete a file or directory it will retry the operation once. If this flag + is set to true it will perform a garbage collection before retrying the + delete.
    Setting this flag to true is known to resolve some problems on Windows (where it + defaults to true) but also for directory trees residing on an NFS share. Since Ant + 1.8.3
    No; default true on Windows and true on any other OS

    Examples

    -
      <delete file="/lib/ant.jar"/>
    -

    deletes the file /lib/ant.jar.

    -
      <delete dir="lib"/>
    -

    deletes the lib directory, including all files -and subdirectories of lib.

    - -
      <delete>
    -    <fileset dir="." includes="**/*.bak"/>
    -  </delete>
    -
    -

    deletes all files with the extension .bak from the current directory -and any subdirectories.

    +
    <delete file="/lib/ant.jar"/>
    +

    deletes the file /lib/ant.jar.

    -
      <delete includeEmptyDirs="true">
    -    <fileset dir="build"/>
    -  </delete>
    +
    <delete dir="lib"/>
    +

    deletes the lib directory, including all files and subdirectories +of lib.

    + +
    +<delete>
    +  <fileset dir="." includes="**/*.bak"/>
    +</delete>
     
    -

    deletes all files and subdirectories of build, including -build itself.

    +

    deletes all files with the extension .bak from the current directory and any +subdirectories.

    -
      <delete includeemptydirs="true">
    -    <fileset dir="build" includes="**/*"/>
    -  </delete>
    +
    +<delete includeEmptyDirs="true">
    +  <fileset dir="build"/>
    +</delete>
     
    -

    deletes all files and subdirectories of build, without -build itself.

    +

    deletes all files and subdirectories of build, including build +itself.

    -
      <delete includeemptydirs="true">
    -    <fileset dir="src" includes="**/.svn/" defaultexcludes="false"/>
    -  </delete>
    +
    +<delete includeemptydirs="true">
    +  <fileset dir="build" includes="**/*"/>
    +</delete>
     
    -

    deletes the subversion metadata directories under src. Because .svn -is on of the default excludes you have to use the -defaultexcludes flag, otherwise Ant wont delete these directories and the files in it.

    - +

    deletes all files and subdirectories of build, without build +itself.

    +
    +<delete includeemptydirs="true">
    +  <fileset dir="src" includes="**/.svn/" defaultexcludes="false"/>
    +</delete>
    +
    +

    deletes the subversion metadata directories under src. Because .svn is +on of the default excludes you have to use the +defaultexcludes flag, otherwise Ant won't delete these directories and the files in it.

    diff -Nru ant-1.9.10/manual/Tasks/deltree.html ant-1.10.3/manual/Tasks/deltree.html --- ant-1.9.10/manual/Tasks/deltree.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/deltree.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,33 +24,29 @@ -

    Deltree

    -

    Deprecated

    -

    This task has been deprecated. Use the Delete task instead.

    +

    Deltree

    +

    Deprecated

    +

    This task has been deprecated. Use the Delete task instead.

    Description

    Deletes a directory with all its files and subdirectories.

    Parameters

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    dirthe directory to delete.Yesdirthe directory to delete.Yes

    Examples

    -
      <deltree dir="dist"/>
    -

    deletes the directory dist, including its files and -subdirectories.

    -
      <deltree dir="${dist}"/>
    -

    deletes the directory ${dist}, including its files and -subdirectories.

    - +
    <deltree dir="dist"/>
    +

    deletes the directory dist, including its files and subdirectories.

    +
    <deltree dir="${dist}"/>
    +

    deletes the directory ${dist}, including its files and subdirectories.

    - diff -Nru ant-1.9.10/manual/Tasks/depend.html ant-1.10.3/manual/Tasks/depend.html --- ant-1.9.10/manual/Tasks/depend.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/depend.html 2018-03-24 12:37:12.000000000 +0000 @@ -26,191 +26,171 @@

    Depend

    -A task to manage Java class file dependencies. +

    A task to manage Java class file dependencies.

    Description

    -

    -The depend task works by determining which classes are out of date with -respect to their source and then removing the class files of any other -classes which depend on the out-of-date classes. -

    - -

    To determine the class dependencies, the depend task analyzes the class -files of all class files passed to it. Depend does not parse your source code in -any way but relies upon the class references encoded into the class files by the -compiler. This is generally faster than parsing the Java source.

    - -

    -To learn more about how this information is obtained from the class files, -please refer to the Java -Virtual Machine Specification -

    - -

    Since a class' dependencies only change when the class itself changes, the -depend task is able to cache dependency information. Only those class files -which have changed will have their dependency information re-analysed. Note that -if you change a class' dependencies by changing the source, it will be -recompiled anyway. You can examine the dependency files created to understand -the dependencies of your classes. Please do not rely, however, on the format of -the information, as it may change in a later release.

    - -

    Once depend discovers all of the class dependencies, it "inverts" -this relation to determine, for each class, which other classes are dependent -upon it. This "affects" list is used to discover which classes are -invalidated by the out of date class. The class files of the invalidated -classes are removed, triggering the compilation of the affected classes.

    - -

    The depend task supports an attribute, "closure" which controls -whether depend will only consider direct class-class relationships or whether it -will also consider transitive, indirect relationships. For example, say there -are three classes, A, which depends on B, which in-turn depend on C. Now say -that class C is out of date. Without closure, only class B would be removed by -depend. With closure set, class A would also be removed. Normally direct -relationships are sufficient - it is unusual for a class to depend on another -without having a direct relationship. With closure set, you will notice that -depend typically removes far more class files.

    - -

    The classpath attribute for <depend> is optional. If it is present, -depend will check class dependencies against classes and jars on this classpath. -Any classes which depend on an element from this classpath and which are older -than that element will be deleted. A typical example where you would use this -facility would be where you are building a utility jar and want to make sure -classes which are out of date with respect to this jar are rebuilt. You should -not include jars in this classpath which you do not expect to change, -such as the JDK runtime jar or third party jars, since doing so will just slow -down the dependency check. This means that if you do use a classpath for the -depend task it may be different from the classpath necessary to actually -compile your code.

    - -

    Performance

    - -

    The performance of the depend task is dependent on a -number of factors such as class relationship complexity and how many class files -are out of date. The decision about whether it is cheaper to just recompile all -classes or to use the depend task will depend on the size of your project and -how interrelated your classes are.

    +

    The depend task works by determining which classes are out of date with respect to +their source and then removing the class files of any other classes which depend on the out-of-date +classes.

    + +

    To determine the class dependencies, the depend task analyzes the class files of all +class files passed to it. The task does not parse your source code in any way but relies upon the +class references encoded into the class files by the compiler. This is generally faster than parsing +the Java source files.

    + +

    To learn more about how this information is obtained from the class files, please refer +to the Java Virtual Machine +Specification

    + +

    Since a class' dependencies only change when the class itself changes, the +depend task is able to cache dependency information. Only those class files which have +changed will have their dependency information re-analysed. Note that if you change a class' +dependencies by changing the source, it will be recompiled anyway. You can examine the dependency +files created to understand the dependencies of your classes. Please do not rely, however, on the +format of the information, as it may change in a later release.

    + +

    Once depend discovers all of the class dependencies, it "inverts" this +relation to determine, for each class, which other classes are dependent upon it. This +"affects" list is used to discover which classes are invalidated by the out of date +class. The class files of the invalidated classes are removed, triggering the compilation of the +affected classes.

    + +

    The depend task supports an attribute, closure which controls +whether depend will only consider direct class-class relationships or whether it will +also consider transitive, indirect relationships. For example, say there are three classes, A, which +depends on B, which in-turn depend on C. Now say that class C is out of +date. Without closure, only class B would be removed +by depend. With closure set, class A would also be removed. Normally direct +relationships are sufficient—it is unusual for a class to depend on another without having a +direct relationship. With closure set, you will notice that depend typically +removes far more class files.

    + +

    The classpath attribute for <depend> is optional. If it is +present, depend will check class dependencies against classes and jars on this +classpath. Any classes which depend on an element from this classpath and which are older than that +element will be deleted. A typical example where you would use this facility would be where you are +building a utility jar and want to make sure classes which are out of date with respect to this jar +are rebuilt. You should not include jars in this classpath which you do not expect +to change, such as the JDK runtime jar or third party jars, since doing so will just slow down the +dependency check. This means that if you do use a classpath for the depend task it may +be different from the classpath necessary to actually compile your code.

    + +

    Performance

    + +

    The performance of the depend task is dependent on a number of factors such as class +relationship complexity and how many class files are out of date. The decision about whether it is +cheaper to just recompile all classes or to use the depend task will depend on the size +of your project and how interrelated your classes are.

    Limitations

    -

    There are some source dependencies which depend will not detect.

    +

    There are some source dependencies which depend will not detect.

      -
    • If the Java compiler optimizes away a class relationship, - there can be a source dependency without a class dependency.
    • - -
    • Non public classes cause two problems. Firstly depend cannot relate - the class file to a source file. In the future this may be addressed - using the source file attribute in the classfile. Secondly, neither - depend nor the compiler tasks can detect when a non public class is - missing. Inner classes are handled by the depend task.
    • +
    • If the Java compiler optimizes away a class relationship, there can be a source dependency +without a class dependency.
    • + +
    • Non public classes cause two problems. Firstly depend cannot relate the class file to a source +file. In the future this may be addressed using the source file attribute in the +classfile. Secondly, neither depend nor the compiler tasks can detect when a non public +class is missing. Inner classes are handled by the depend task.
    -The most obvious example of these limitations is that the task can't tell -which classes to recompile when a constant primitive data type exported -by other classes is changed. For example, a change in the definition of -something like +

    The most obvious example of these limitations is that the task can't tell which classes to +recompile when a constant primitive data type exported by other classes is changed. For example, a +change in the definition of something like

     public final class Constants {
    -  public final static boolean DEBUG=false;
    -}
    -
    will not be picked up by other classes. + public final static boolean DEBUG=false; +}
    +

    will not be picked up by other classes.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    srcDirThis is the directory where the source exists. depend -will examine this to determine which classes are out of date. If you use multiple -source directories you can pass this attribute a path of source directories.YessrcDirThis is the directory where the source exists. depend will examine this to + determine which classes are out of date. If you use multiple source directories you can pass + this attribute a path of source directories.Yes
    destDirThis is the root directory of the class files which -will be analysed. If this is not present, the srcdir is used.NodestDirThis is the root directory of the class files which will be analysed.No; defaults to srcdir
    cacheThis is a directory in which depend can store and -retrieve dependency information. If this is not present, depend will not -use a cache NocacheThis is a directory in which depend can store and retrieve dependency + information.No; defaults to no cache
    closureThis attribute controls whether depend only removes -classes which directly depend on out of date classes. If this is set to true, -depend will traverse the class dependency graph deleting all affected -classes. Defaults to falseNoclosureThis attribute controls whether depend only removes classes which directly + depend on out of date classes. If this is set to true, depend will + traverse the class dependency graph deleting all affected classes.No; defaults to false
    dumpIf true the dependency information will be written to the debug level log - NodumpIf true the dependency information will be written to the debug level logNo; default is false
    classpathThe classpath containing jars and classes for which <depend> should also - check dependenciesNoclasspathThe classpath containing jars and classes for which <depend> should also + check dependenciesNo
    warnOnRmiStubsFlag to disable warnings about files that look like rmic generated stub/skeleton - classes, and which have no .java source. Useful when doing rmi development. No, default=truewarnOnRmiStubsFlag to disable warnings about files that look like rmic generated + stub/skeleton classes and have no .java source. Useful when doing RMI + development.No; default true

    Parameters specified as nested elements

    -

    The depend task's classpath attribute is a -PATH-like structure and can also be set -via a nested <classpath> element.

    - -

    Additionally, -this task forms an implicit -FileSet -and supports most attributes of -<fileset> (dir becomes srcdir), -as well as the nested <include>, -<exclude>, and <patternset> elements. +

    The depend task's classpath attribute is +a path-like structure and can also be set via a +nested <classpath> element.

    + +

    Additionally, this task forms an implicit FileSet and +supports most attributes of <fileset> (dir becomes srcdir), +as well as the nested <include>, <exclude>, +and <patternset> elements.

    Examples

    -
    <depend srcdir="${java.dir}"
    +
    +<depend srcdir="${java.dir}"
             destdir="${build.classes}"
             cache="depcache"
             closure="yes"/>
    -

    removes any classes in the ${build.classes} directory -that depend on out-of-date classes. Classes are considered out-of-date with -respect to the source in the ${java.dir} directory, using the same -mechanism as the <javac> task. In this example, the -<depend> task caches its dependency -information in the depcache directory.

    +

    removes any classes in the ${build.classes} directory that depend on out-of-date +classes. Classes are considered out-of-date with respect to the source in +the ${java.dir} directory, using the same mechanism as the <javac> +task. In this example, the <depend> task caches its dependency information in +the depcache directory.

     <depend srcdir="${java.dir}" destdir="${build.classes}"
             cache="depcache" closure="yes">
       <include name="**/*.java"/>
       <excludesfile name="${java.dir}/build_excludes"/>
    -</depend>
    -
    -

    does the same as the previous example, but explicitly includes all -.java files, except those that match the list given -in ${java.dir}/build_excludes.

    - +</depend>
    +

    does the same as the previous example, but explicitly includes all .java files, +except those that match the list given in ${java.dir}/build_excludes.

    - diff -Nru ant-1.9.10/manual/Tasks/dependset.html ant-1.10.3/manual/Tasks/dependset.html --- ant-1.9.10/manual/Tasks/dependset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/dependset.html 2018-03-24 12:37:12.000000000 +0000 @@ -30,142 +30,113 @@

    Description

    -

    -The dependset task compares a set of sources with a set of target -files. If any of the sources has been modified more recently than -any of the target files, all of the target files are removed. -

    -

    -Sources and target files are specified via nested -Resource Collections; -sources can be resources of any type, while targets are restricted to files -only. At least one set of sources and one set of targets is required. -

    -

    -Use a FileSet when you want to use wildcard include or exclude -patterns and don't care about missing files. Use a FileList when you -want to consider the non-existence of a file as if it were out of -date. If there are any non-existing files in any source or target -FileList, all target files will be removed. -

    -

    -DependSet is useful to capture dependencies that are not or cannot be -determined algorithmically. For example, the <style> task only -compares the source XML file and XSLT stylesheet against the target -file to determined whether to restyle the source. Using dependset you -can extend this dependency checking to include a DTD or XSD file as -well as other stylesheets imported by the main stylesheet. -

    +

    The dependset task compares a set of sources with a set of target files. If any of +the sources has been modified more recently than any of the target files, all of the target files +are removed.

    +

    Sources and target files are specified via +nested resource collections; sources can be +resources of any type, while targets are restricted to files only. At least one set of sources and +one set of targets is required.

    +

    Use a FileSet when you want to use wildcard include or exclude patterns and don't care about +missing files. Use a FileList when you want to consider the non-existence of a file as if it were +out of date. If there are any non-existing files in any source or target FileList, all target files +will be removed.

    +

    DependSet is useful to capture dependencies that are not or cannot be determined algorithmically. +For example, the <style> task only compares the source XML file and XSLT +stylesheet against the target file to determined whether to restyle the source. +Using dependset you can extend this dependency checking to include a DTD or XSD file as +well as other stylesheets imported by the main stylesheet.

    Parameters

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    verboseMakes the task list all deleted targets files - and the reason why they get deleted.NoverboseMakes the task list all deleted targets files and the reason why they get deleted.No
    -

    Parameters Specified as Nested Elements

    +

    Parameters specified as nested elements

    sources

    -

    The <sources> element is a -Union into which -arbitrary resource collections can be nested. Since Apache Ant 1.7 +

    The <sources> element is a Union +into which arbitrary resource collections can be nested. Since Apache Ant 1.7

    srcfileset

    -

    -The nested <srcfileset> element specifies a FileSet. All files included in -this fileset will be compared against all files included in all of the -<targetfileset> filesets and <targetfilelist> -filelists. Multiple <srcfileset> filesets may be specified. -

    +

    The nested <srcfileset> element specifies +a FileSet. All files included in this fileset will be compared +against all files included in all of the <targetfileset> filesets +and <targetfilelist> filelists. Multiple <srcfileset> +filesets may be specified.

    srcfilelist

    -

    -The nested <srcfilelist> element specifies a FileList. All files included in -this filelist will be compared against all files included in all of the -<targetfileset> filesets and <targetfilelist> -filelists. Multiple <srcfilelist> filelists may be specified. -

    +

    The nested <srcfilelist> element specifies +a FileList. All files included in this filelist will be +compared against all files included in all of the <targetfileset> filesets +and <targetfilelist> filelists. Multiple <srcfilelist> +filelists may be specified.

    targets

    -

    The <targets> element is a -Path and thus can -include any filesystem-based resource. Since Ant 1.7 -

    +

    Since Ant 1.7

    + +

    The <targets> element is a Path and thus can +include any filesystem-based resource.

    targetfileset

    -

    -The nested <targetfileset> element specifies a FileSet. All files included in -this fileset will be compared against all files included in all of the -<srcfileset> filesets and <sourcefilelist> -filelists, and if any are older, they are all deleted. -Multiple <targetfileset> filesets may be specified. -

    +

    The nested <targetfileset> element specifies +a FileSet. All files included in this fileset will be compared +against all files included in all of the <srcfileset> filesets +and <sourcefilelist> filelists, and if any are older, they are all deleted. +Multiple <targetfileset> filesets may be specified.

    targetfilelist

    -

    -The nested <targetfilelist> element specifies a FileList. All files included in -this filelist will be compared against all files included in all of the -<srcfileset> filesets and <sourcefilelist> -filelists, and if any are older, they are all deleted. -Multiple <targetfilelist> filelists may be specified. -

    +

    The nested <targetfilelist> element specifies +a FileList. All files included in this filelist will be +compared against all files included in all of the <srcfileset> filesets +and <sourcefilelist> filelists, and if any are older, they are all deleted. +Multiple <targetfilelist> filelists may be specified.

    Examples

    -
    -    <dependset>
    -       <srcfilelist
    -           dir   = "${dtd.dir}"
    -           files = "paper.dtd,common.dtd"/>
    -       <srcfilelist
    -           dir   = "${xsl.dir}"
    -           files = "common.xsl"/>
    -       <srcfilelist
    -           dir   = "${basedir}"
    -           files = "build.xml"/>
    -       <targetfileset
    -           dir      = "${output.dir}"
    -           includes = "**/*.html"/>
    -    </dependset>  
    -
    - -

    -In this example derived HTML files in the ${output.dir} directory -will be removed if any are out-of-date with respect to:

    +
    +<dependset>
    +  <srcfilelist
    +      dir   = "${dtd.dir}"
    +      files = "paper.dtd,common.dtd"/>
    +  <srcfilelist
    +      dir   = "${xsl.dir}"
    +      files = "common.xsl"/>
    +  <srcfilelist
    +      dir   = "${basedir}"
    +      files = "build.xml"/>
    +  <targetfileset
    +      dir      = "${output.dir}"
    +      includes = "**/*.html"/>
    +</dependset>
    + +

    In this example derived HTML files in the ${output.dir} directory will be removed if any are +out-of-date with respect to:

      -
    1. the DTD of their source XML files
    2. -
    3. a common DTD (imported by the main DTD)
    4. -
    5. a subordinate XSLT stylesheet (imported by the main stylesheet), or
    6. -
    7. the buildfile
    8. +
    9. the DTD of their source XML files
    10. +
    11. a common DTD (imported by the main DTD)
    12. +
    13. a subordinate XSLT stylesheet (imported by the main stylesheet), or
    14. +
    15. the buildfile
    -

    -If any of the sources in the above example does not exist, all -target files will also be removed. To ignore missing sources instead, -use filesets instead of filelists for the sources. -

    - - +

    If any of the sources in the above example does not exist, all target files will also be removed. +To ignore missing sources instead, use filesets instead of filelists for the sources.

    diff -Nru ant-1.9.10/manual/Tasks/diagnostics.html ant-1.10.3/manual/Tasks/diagnostics.html --- ant-1.9.10/manual/Tasks/diagnostics.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/diagnostics.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,26 +24,19 @@ -

    Diagnostics

    -

    Diagnostics

    -

    -Runs Apache Ant's -diagnostics code inside Ant itself. This is good for -debugging Ant's configuration under an IDE. -Since Ant 1.7.0 -

    - +

    Diagnostics

    +

    Since Ant 1.7.0

    +

    Description

    +

    Runs Apache Ant's -diagnostics code inside Ant itself. This is good for debugging +Ant's configuration under an IDE.

    Examples

    -    <target name="diagnostics" description="diagnostics">
    -        <diagnostics/>
    -    </target>
    -
    -

    - Prints out the current diagnostics dump. -

    - +<target name="diagnostics" description="diagnostics"> + <diagnostics/> +</target>
    +

    Prints out the current diagnostics dump.

    diff -Nru ant-1.9.10/manual/Tasks/dirname.html ant-1.10.3/manual/Tasks/dirname.html --- ant-1.9.10/manual/Tasks/dirname.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/dirname.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,51 +24,41 @@ -

    Dirname

    +

    Dirname

    Description

    -

    -Task to determine the directory path of a specified file. -

    -

    -When this task executes, it will set the specified property to the -value of the specified file (or directory) up to, but not including, -the last path element. If the specified file is a path that ends in a -filename, the filename will be dropped. If the specified file is just -a filename, the directory will be the current directory. -

    -

    - Note: This is not the same as the UNIX dirname command, which is - defined as "strip non-directory suffix from filename". <dirname> - determines the full directory path of the specified file. -

    +

    Task to determine the directory path of a specified file.

    +

    When this task executes, it will set the specified property to the value of the specified file +(or directory) up to, but not including, the last path element. If the specified file is a path that +ends in a filename, the filename will be dropped. If the specified file is just a filename, the +directory will be the current directory.

    +

    Note: This is not the same as the UNIX dirname command, which is +defined as "strip non-directory suffix from filename". <dirname> determines the +full directory path of the specified file.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    fileThe path to take the dirname of.YesfileThe path to take the dirname of.Yes
    propertyThe name of the property to set.YespropertyThe name of the property to set.Yes

    Examples

    -
      <dirname property="antfile.dir" file="${ant.file}"/>
    -will set antfile.dir to the directory path for -${ant.file}. -
      <dirname property="foo.dirname" file="foo.txt"/>
    -will set foo.dirname to the project's basedir.

    - +
    <dirname property="antfile.dir" file="${ant.file}"/>
    +

    will set antfile.dir to the directory path for ${ant.file}.

    +
    <dirname property="foo.dirname" file="foo.txt"/>
    +

    will set foo.dirname to the project's basedir.

    - diff -Nru ant-1.9.10/manual/Tasks/ear.html ant-1.10.3/manual/Tasks/ear.html --- ant-1.9.10/manual/Tasks/ear.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/ear.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,278 +24,244 @@ -

    Ear

    +

    Ear

    Description

    -

    An extension of the Jar task with special -treatment for files that should end up in an Enterprise Application archive.

    -

    (The Ear task is a shortcut for specifying the particular layout of a EAR file. -The same thing can be accomplished by using the prefix and fullpath -attributes of zipfilesets in a Zip or Jar task.)

    -

    The extended zipfileset element from the zip task (with attributes prefix, fullpath, and src) is available in the Ear task.

    - -

    Please note that the zip format allows multiple files of the same -fully-qualified name to exist within a single archive. This has been -documented as causing various problems for unsuspecting users. If you wish -to avoid this behavior you must set the duplicate attribute -to a value other than its default, "add".

    +

    An extension of the Jar task with special treatment for files that should +end up in an Enterprise Application archive.

    +

    (The Ear task is a shortcut for specifying the particular layout of a EAR file. The +same thing can be accomplished by using the prefix and fullpath attributes of +zipfilesets in a Zip or Jar task.)

    +

    The extended zipfileset element from the Zip task (with +attributes prefix, fullpath, and src) is available in +the Ear task.

    + +

    Please note that the zip format allows multiple files of the same fully-qualified name to +exist within a single archive. This has been documented as causing various problems for +unsuspecting users. If you wish to avoid this behavior you must set the duplicate +attribute to a value other than its default, add.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    destfilethe EAR file to create.Yesdestfilethe EAR file to create.Yes
    appxmlThe deployment descriptor to use (META-INF/application.xml).Yes, unless update is set to trueappxmlThe deployment descriptor to use (META-INF/application.xml).Yes, unless update is set to true
    basedirthe directory from which to jar the files.Nobasedirthe directory from which to jar the files.No
    compressNot only store data but also compress them, - defaults to true. Unless you set the keepcompression - attribute to false, this will apply to the entire archive, not - only the files you've added while updating.NocompressNot only store data but also compress them. Unless you set the keepcompression + attribute to false, this will apply to the entire archive, not only the files you've + added while updating.No; defaults to true
    keepcompressionFor entries coming from existing archives (like - nested zipfilesets or while updating the archive), keep - the compression as it has been originally instead of using the - compress attribute. Defaults false. Since Apache Ant - 1.6NokeepcompressionFor entries coming from existing archives (like nested zipfilesets or while + updating the archive), keep the compression as it has been originally instead of using the + compress attribute. Since Apache Ant 1.6No; defaults to false
    encodingThe character encoding to use for filenames - inside the archive. Defaults to UTF8. It is not - recommended to change this value as the created archive will most - likely be unreadable for Java otherwise. -
    See also the discussion in the - zip task page
    NoencodingThe character encoding to use for filenames inside the archive. It is not + recommended to change this value as the created archive will most likely be unreadable for + Java otherwise.
    See also the discussion in the zip + task page
    No; defaults to UTF8
    filesonlyStore only file entries, defaults to falseNofilesonlyStore only file entries.No; defaults to false
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include pattern.No
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude pattern.No
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    manifestthe manifest file to use.Nomanifestthe manifest file to use.No
    filesetmanifestbehavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. Valid values are "skip", "merge", and "mergewithoutmain". "merge" will merge all of the manifests together, and merge this into any other specified manifests. "mergewithoutmain" merges everything but the Main section of the manifests. Default value is "skip". - Nofilesetmanifestbehavior when a manifest file is found in a zipfileset + or zipgroupfileset file. Valid values are skip, merge, + and mergewithoutmain. merge will merge all of the manifests together, and merge + this into any other specified manifests. mergewithoutmain merges everything but the + Main section of the manifests.No; defaults to skip
    whenmanifestonlybehavior when no files match. Valid values are fail, skip, + and create.No; defaults to create
    manifestencodingThe encoding used to read the JAR manifest, when a manifest file is specified.No; defaults to default JVM character encoding
    indexwhether to create + an index list to speed up classloading. This is a JDK 1.3+ specific feature. + Unless you specify additional jars with + nested indexjars elements, only the contents of + this jar will be included in the index.No; defaults to false
    indexMetaInfwhether to include META-INF and its children in the index. Doesn't have any + effect if index is false.
    Oracle's jar implementation used to skip + the META-INF directory and Ant followed that example. The behavior has been + changed with Java + 5. In order to avoid problems with Ant generated jars on Java 1.4 or earlier, Ant will + not include META-INF unless explicitly asked to.
    Since Ant + 1.8.0.
    No; defaults to false
    updateindicates whether to update or overwrite the destination file if it already exists.No; default is false
    duplicatebehavior when a duplicate file is found. Valid values are add, preserve, + and fail.No; default is add
    roundupWhether the file modification times will be rounded up to the next even number of + seconds.
    Zip archives store file modification times with a granularity of 2 seconds, so + the times will either be rounded up or down. If you round down, the archive will always seem + out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a + different type of problems like JSPs inside a web archive that seem to be slightly more recent + than precompiled pages, rendering precompilation useless.
    Since Ant 1.6.2
    No; defaults to true
    whenmanifestonlybehavior when no files match. Valid values are "fail", "skip", and "create". Default is "create".No
    manifestencodingThe encoding used to read the JAR manifest, when a manifest file is specified.No, defaults to the platform encoding.
    indexwhether to create an index - list to speed up classloading. This is a JDK 1.3+ specific - feature. Unless you specify additional jars with nested indexjars elements, only the - contents of this jar will be included in the index. Defaults to - false.No
    indexMetaInfwhether to include META-INF and its children in - the index. Doesn't have any effect if index is - false.
    - Oracle's jar implementation used to skip the META-INF directory and - Ant followed that example. The behavior has been changed with - Java - 5. In order to avoid problems with Ant generated jars on - Java 1.4 or earlier Ant will not include META-INF unless - explicitly asked to.
    - Ant 1.8.0 - Defaults to false.
    No
    updateindicates whether to update or overwrite - the destination file if it already exists. Default is "false".No
    duplicatebehavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". No
    roundupWhether the file modification times will be - rounded up to the next even number of seconds.
    - Zip archives store file modification times with a granularity of - two seconds, so the times will either be rounded up or down. If - you round down, the archive will always seem out-of-date when you - rerun the task, so the default is to round up. Rounding up may - lead to a different type of problems like JSPs inside a web - archive that seem to be slightly more recent than precompiled - pages, rendering precompilation useless.
    - Defaults to true. Since Ant 1.6.2
    No
    levelNon-default level at which file compression should be - performed. Valid values range from 0 (no compression/fastest) to 9 - (maximum compression/slowest). Since Ant 1.7No
    preserve0permissionswhen updating an archive or adding entries from a - different archive Ant will assume that a Unix permissions value of - 0 (nobody is allowed to do anything to the file/directory) means - that the permissions haven't been stored at all rather than real - permissions and will instead apply its own default values.
    - Set this attribute to true if you really want to preserve the - original permission field.since Ant 1.8.0 +
    levelNon-default level at which file compression should be performed. Valid values range + from 0 (no compression/fastest) to 9 (maximum compression/slowest). Since Ant + 1.7No
    preserve0permissionswhen updating an archive or adding entries from a different archive Ant will assume that a + Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means + that the permissions haven't been stored at all rather than real permissions and will instead + apply its own default values.
    Set this attribute to true if you really want to + preserve the original permission field. Since Ant 1.8.0
    No, default is falseNo; default is false
    useLanguageEncodingFlagWhether to set the language encoding flag if the encoding is UTF-8. This setting doesn't + have any effect if the encoding is not UTF-8. Since Ant 1.8.0.
    See also + the discussion in the zip task page
    No; default is true
    createUnicodeExtraFieldsWhether to create Unicode extra fields to store the file names a second time inside the + entry's metadata.
    Possible values are never, always + and not-encodeable which will only add Unicode extra fields if the file name cannot be + encoded using the specified encoding. Since Ant 1.8.0.
    See also + the discussion in the zip task page
    No; default is never
    fallbacktoUTF8Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a + file name cannot be encoded using the specified encoding. Since Ant 1.8.0.
    See + also the discussion in the zip task page
    No; default is false
    useLanguageEncodingFlagWhether to set the language encoding flag if the - encoding is UTF-8. This setting doesn't have any effect if the - encoding is not UTF-8. - Since Ant 1.8.0. -
    See also the discussion in the - zip task page
    No, default is true
    createUnicodeExtraFieldsWhether to create unicode extra fields to store - the file names a second time inside the entry's metadata. -
    Possible values are "never", "always" and "not-encodeable" - which will only add Unicode extra fields if the file name cannot - be encoded using the specified encoding. - Since Ant 1.8.0. -
    See also the discussion in the - zip task page
    No, default is "never"
    fallbacktoUTF8Whether to use UTF-8 and the language encoding - flag instead of the specified encoding if a file name cannot be - encoded using the specified encoding. - Since Ant 1.8.0. -
    See also the discussion in the - zip task page
    No, default is false
    mergeClassPathAttributesWhether to merge the Class-Path attributes found - in different manifests (if merging manifests). If false, only - the attribute of the last merged manifest will be preserved. - Since Ant 1.8.0. -
    unless you also set flattenAttributes to true this may - result in manifests containing multiple Class-Path attributes - which violates the manifest specification.
    No, default is false
    flattenAttributesWhether to merge attributes occurring more than - once in a section (this can only happen for the Class-Path - attribute) into a single attribute. - Since Ant 1.8.0.No, default is false
    zip64ModeWhen to use Zip64 extensions for entries. The - possible values are "never", "always" and "as-needed". - Since Ant 1.9.1. -
    See also the discussion in the - zip task page
    No, default is "never"mergeClassPathAttributesWhether to merge the Class-Path attributes found in different manifests (if + merging manifests). If false, only the attribute of the last merged manifest will be + preserved. Since Ant 1.8.0.
    unless you also set flattenAttributes + to true this may result in manifests containing multiple Class-Path + attributes which violates the manifest specification.
    No; default is false
    flattenAttributesWhether to merge attributes occurring more than once in a section (this can only happen for + the Class-Path attribute) into a single attribute. Since Ant + 1.8.0.No; default is false
    zip64ModeWhen to use Zip64 extensions for entries. The possible values + are never, always and as-needed. Since Ant 1.9.1.
    See also + the discussion in the zip task page
    No; default is never
    -

    Nested elements

    +

    Parameters specified as nested elements

    metainf

    -

    The nested metainf element specifies a FileSet. All files included in this fileset will -end up in the META-INF directory of the ear file. If this -fileset includes a file named MANIFEST.MF, the file is -ignored and you will get a warning.

    +

    The nested metainf element specifies +a FileSet. All files included in this fileset will end up in +the META-INF directory of the ear file. If this fileset includes a file +named MANIFEST.MF, the file is ignored and you will get a warning.

    manifest, indexjars, service

    -These are inherited from <jar> +

    These are inherited from <jar>

    Example

    -    <ear destfile="${build.dir}/myapp.ear" appxml="${src.dir}/metadata/application.xml">
    -      <fileset dir="${build.dir}" includes="*.jar,*.war"/>
    -    </ear>
    -
    - +<ear destfile="${build.dir}/myapp.ear" appxml="${src.dir}/metadata/application.xml"> + <fileset dir="${build.dir}" includes="*.jar,*.war"/> +</ear>
    - - diff -Nru ant-1.9.10/manual/Tasks/echo.html ant-1.10.3/manual/Tasks/echo.html --- ant-1.9.10/manual/Tasks/echo.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/echo.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,170 +24,147 @@ -

    Echo

    +

    Echo

    Description

    -

    Echoes a message to the current loggers and listeners which -means System.out unless overridden. A level -can be specified, which controls at what logging level the message is -filtered at. -

    -The task can also echo to a file, in which case the option to append rather -than overwrite the file is available, and the level option is -ignored

    +

    Echoes a message to the current loggers and listeners which means System.out unless +overridden. A level can be specified, which controls at what logging level the message is +filtered at.

    +

    The task can also echo to a file, in which case the option to append rather than overwrite the +file is available, and the level option is ignored

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - + + Since Apache Ant 1.8 - - + - + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    messagethe message to echo.No. Text may also be included in a - character section within this element. If neither is included a - blank line will be emitted in the output.messagethe message to echo.No; defaults to a blank line unless text is included in a character section within this + element
    filethe file to write the message to.Optionally one of these may be specified.filethe file to write the message to.No; only one of these may be used
    outputthe Resource + outputthe Resource to write the message to (see note). - Since Apache Ant 1.8
    appendAppend to an existing file (or - - open a new file / overwrite an existing file)? Default false. + appendAppend to an existing file + (or open a new file / overwrite an existing file)? No; ignored unless output indicates a - filesystem destination.No; ignored unless output indicates a filesystem destination, default + is false
    levelControl the level at which this message is reported. - One of "error", "warning", "info", "verbose", "debug" (decreasing order)No - default is "warning".levelControl the level at which this message is reported. One + of error, warning, info, verbose, debug (decreasing + order)No; default is warning
    encodingencoding to use, default is ""; the local system encoding. since Ant 1.7Noencodingencoding to use. since Ant 1.7No; defaults to default JVM character encoding
    forceOverwrite read-only destination - files. since Ant 1.8.2No; defaults to false.forceOverwrite read-only destination files. since Ant 1.8.2No; defaults to false

    Examples

    -
    -<echo message="Hello, world"/>
    -
    -
    -<echo message="Embed a line break:${line.separator}"/>
    -
    -
    -<echo>Embed another:${line.separator}</echo>
    -
    -
    -<echo>This is a longer message stretching over
    +
    <echo message="Hello, world"/>
    +
    <echo message="Embed a line break:${line.separator}"/>
    +
    <echo>Embed another:${line.separator}</echo>
    +
    <echo>This is a longer message stretching over
     two lines.
    -</echo>
    -
    -
    -<echo>
    +</echo>
    +
    <echo>
     This is a longer message stretching over
     three lines; the first line is a blank
    -</echo>
    -
    -The newline immediately following the <echo> tag will be part of the output.
    -Newlines in character data within the content of an element are not discarded by XML parsers.
    -See -W3C Recommendation 04 February 2004 / End of Line handling - for more details. +</echo>
    +

    The newline immediately following the <echo> tag will be part of the +output. Newlines in character data within the content of an element are not discarded by XML +parsers.
    See W3C Recommendation +26 November 2008 / End of Line handling for more details.

    <echo message="Deleting drive C:" level="debug"/>
    -A message which only appears in -debug mode. +

    A message which only appears in -debug mode.

    <echo level="error">
     Imminent failure in the antimatter containment facility.
     Please withdraw to safe location at least 50km away.
    -</echo>
    -
    -A message which appears even in -quiet mode. +</echo> +

    A message which appears even in -quiet mode.

    <echo file="runner.csh" append="false">#\!/bin/tcsh
     java-1.3.1 -mx1024m ${project.entrypoint} $$*
     </echo>
    -Generate a shell script by echoing to a file. -Note the use of a double $ symbol to stop Ant -filtering out the single $ during variable expansion +

    Generate a shell script by echoing to a file. Note the use of a double $ symbol to stop +Ant filtering out the single $ during variable expansion.

    -

    Depending on the loglevel Ant runs, messages are print out or silently -ignored: +

    Depending on the log level Ant runs at, messages are print out or silently ignored:

    - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + +
    Ant-Statement-quiet, -qno statement-verbose, -v-debug, -dAnt command line-quiet, -qno switch-verbose, -v-debug, -d
    <echo message="This is error message." level="error" />
    okokokok
    <echo message="This is error message." level="error"/>
    okokokok
    <echo message="This is warning message." />
    okokokok
    <echo message="This is warning message."/>
    okokokok
    <echo message="This is warning message." level="warning" />
    okokokok
    <echo message="This is warning message." level="warning"/>
    okokokok
    <echo message="This is info message." level="info" />
    not loggedokokok
    <echo message="This is info message." level="info"/>
    not loggedokokok
    <echo message="This is verbose message." level="verbose" />
    not loggednot loggedokok
    <echo message="This is verbose message." level="verbose"/>
    not loggednot loggedokok
    <echo message="This is debug message." level="debug" />
    not loggednot loggednot loggedok
    <echo message="This is debug message." level="debug"/>
    not loggednot loggednot loggedok
    - - - - - diff -Nru ant-1.9.10/manual/Tasks/echoproperties.html ant-1.10.3/manual/Tasks/echoproperties.html --- ant-1.9.10/manual/Tasks/echoproperties.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/echoproperties.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,63 +24,53 @@ -

    echoproperties

    +

    echoproperties

    Description

    -

    Displays all the current properties (or a subset of them specified -by a nested <propertyset>) in the project. The -output can be sent to a file if desired. This task can be used as a -somewhat contrived means of returning data from an -<ant> invocation, but is really for debugging build +

    Displays all the current properties (or a subset of them specified by a +nested <propertyset>) in the project. The output can be sent to a file if +desired. This task can be used as a somewhat contrived means of returning data from an +ant invocation, but is really for debugging build files.

    Parameters

    - +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    destfileIf specified, the value indicates the name of the - file to send the output of the statement to. The generated output file - is compatible for loading by any Java application as a property file. - If not specified, then the output will go to the Apache Ant log.No
    prefix - a prefix which is used to filter the properties - only those properties starting with this prefix will be echoed. -

    -

    No
    regex - a regular expression which is used to filter the - properties - only those properties whose names match it will be echoed. - No
    failonerrorBy default, the "failonerror" attribute is enabled. - If an error occurs while writing the properties to a file, and this - attribute is enabled, then a BuildException will be thrown, causing the - build to fail. If disabled, then IO errors will be reported as a log - statement, and the build will continue without failure from this task.No
    formatOne of text or xml. - Determines the output format. Defaults to text.NoAttributeDescriptionRequired
    destfileIf specified, the value indicates the name of the file to send the output of the statement + to. The generated output file is compatible for loading by any Java application as a property + file.No; by default, output to the log
    prefixa prefix which is used to filter the properties: only properties whose names start with this + prefix will be echoed.No
    regexa regular expression which is used to filter the properties: only those properties whose + names match it will be echoed.No
    failonerrorIf an error occurs while writing the properties to a file, and this attribute is enabled, + then a BuildException will be thrown, causing the build to fail. If disabled, + then IO errors will be reported as a log statement, and the build will continue without + failure from this task.No; default is true
    formatOne of text or xml. Determines the output format.No; defaults to text
    @@ -88,59 +78,41 @@

    propertyset

    -

    You can specify subsets of properties to be echoed with propertysets. Using -propertysets gives more control on which properties will be -picked up. The attributes prefix and regex are just -shortcuts that use propertysets internally. -

    +

    Since Ant 1.6.

    -

    since Ant 1.6.

    +

    You can specify subsets of properties to be echoed +with propertysets. Using propertysets gives +more control on which properties will be picked up. The attributes prefix +and regex are just shortcuts that use propertysets internally.

    Examples

    -
    -  <echoproperties/>
    -
    +
    <echoproperties/>

    Report the current properties to the log.

    -
    -  <echoproperties destfile="my.properties"/>
    -
    -

    Report the current properties to the file "my.properties", and will -fail the build if the file could not be created or written to.

    -
    -  <echoproperties destfile="my.properties" failonerror="false"/>
    -
    -

    Report the current properties to the file "my.properties", and will -log a message if the file could not be created or written to, but will still -allow the build to continue.

    -
    -  <echoproperties prefix="java."/>
    -
    -

    List all properties beginning with "java."

    -
    -  <echoproperties>
    -    <propertyset>
    -      <propertyref prefix="java."/>
    -    </propertyset>
    -  </echoproperties>
    -
    -

    This again lists all properties beginning with "java." using a nested -</propertyset> which is an equivalent but longer way.

    -
    -  <echoproperties regex=".*ant.*"/>
    -
    -

    Lists all properties that contain "ant" in their names. -The equivalent snippet with </propertyset> is:

    -
    -  <echoproperties>
    -    <propertyset>
    -      <propertyref regex=".*ant.*"/>
    -    </propertyset>
    -  </echoproperties>
    -
    - - +
    <echoproperties destfile="my.properties"/>
    +

    Report the current properties to the file my.properties, and will fail the build if +the file could not be created or written to.

    +
    <echoproperties destfile="my.properties" failonerror="false"/>
    +

    Report the current properties to the file my.properties, and will log a message if +the file could not be created or written to, but will still allow the build to continue.

    +
    <echoproperties prefix="java."/>
    +

    List all properties beginning with java.

    +
    +<echoproperties>
    +  <propertyset>
    +    <propertyref prefix="java."/>
    +  </propertyset>
    +</echoproperties>
    +

    This again lists all properties beginning with java. using a +nested <propertyset/> which is an equivalent but longer way.

    +
    <echoproperties regex=".*ant.*"/>
    +

    Lists all properties that contain ant in their names. The equivalent snippet +with <propertyset/> is:

    +
    +<echoproperties>
    +  <propertyset>
    +    <propertyref regex=".*ant.*"/>
    +  </propertyset>
    +</echoproperties>
    - diff -Nru ant-1.9.10/manual/Tasks/echoxml.html ant-1.10.3/manual/Tasks/echoxml.html --- ant-1.9.10/manual/Tasks/echoxml.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/echoxml.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,38 +25,36 @@

    EchoXML

    +

    Since Apache Ant 1.7

    Description

    -

    Echo nested XML to the console or a file. Since Apache Ant 1.7

    +

    Echo nested XML to the console or a file.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    fileThe file to receive the XML. If omitted nested - XML will be echoed to the log.NofileThe file to receive the XML.No; by default nested XML is echoed to the log
    appendWhether to append file, if specified.NoappendWhether to append file, if specified.No; default is false
    namespacePolicySets the namespace policy as defined - by org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy. - Valid values are ignore, elementsOnly, or all. - Since Apache Ant 1.8 - No, default ignorenamespacePolicySets the namespace policy as defined + by org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy. Valid values + are ignore, elementsOnly, or all. Since Apache Ant 1.8No; default ignore

    Parameters specified as nested elements

    -Nested XML content is required. +

    Nested XML content is required.

    Examples

    <echoxml file="subbuild.xml">
    @@ -65,10 +63,8 @@
           <echo>foo</echo>
         </target>
       </project>
    -</echoxml>
    -
    -

    Creates an Ant buildfile, subbuild.xml.

    +</echoxml> +

    Creates an Ant buildfile, subbuild.xml.

    - diff -Nru ant-1.9.10/manual/Tasks/ejb.html ant-1.10.3/manual/Tasks/ejb.html --- ant-1.9.10/manual/Tasks/ejb.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/ejb.html 2018-03-24 12:37:12.000000000 +0000 @@ -36,94 +36,93 @@
  • Conor MacNeill
  • Cyrille Morvan (cmorvan@ingenosya.com)
  • Greg Nelson (gn@sun.com)
  • -
  • Rob van Oostrum(rob@springwellfarms.ca)
  • +
  • Rob van Oostrum (rob@springwellfarms.ca)
  • -
    +

    Table of Contents

    -
    -

    Introduction

    -

    Ant provides a number of optional tasks for developing 1.x and 2.x -Enterprise Java Beans (EJBs). -In general these tasks are specific to the particular vendor's EJB Server.

    +
    +

    Introduction

    +

    Ant provides a number of optional tasks for developing 1.x and +2.x Enterprise +Java Beans (EJBs). In general these tasks are specific to the particular vendor's EJB +Server.

    -

    The tasks support:
    +

    The tasks support:

    - Vendors such as BEA and IBM now provide custom Ant tasks to work with their - particular products. More importantly, EJB3.0 renders this whole process obsolete. - Accordingly, development of these tasks is effectively frozen. Bug reports - and especially patches are welcome, but there is no pressing need to add - support for new application servers. Nobody should be writing new EJB2.x applications - and definitely not new EJB2.x servers. -

    - -
    -

    EJB Tasks

    - - - - - - - - - - - - - +

    Vendors such as BEA and IBM now provide custom Ant tasks to work with their particular +products. More importantly, EJB 3.0 renders this whole process obsolete. Accordingly, development +of these tasks is effectively frozen. Bug reports and especially patches are welcome, but there is +no pressing need to add support for new application servers. Nobody should be writing new EJB 2.x +applications and definitely not new EJB 2.x servers.

    + +
    +

    EJB Tasks

    +
    TaskApplication Servers
    blgenclientBorland Application Server 4.5 and 5.x
    iplanet-ejbciPlanet Application Server 6.0
    ejbjarNested Elements
    borlandBorland Application Server 4.5 and 5.x
    iPlanetiPlanet Application Server 6.0
    jbossJBoss
    jonasJOnAS 2.4.x and 2.5
    weblogicWeblogic 5.1 to 7.0
    websphereIBM WebSphere 4.0
    orionIronFlare(Oracle) Orion Application Server 2.0.6
    + + + + + + + + + + +
    TaskApplication Servers
    blgenclientBorland + Application Server 4.5 and 5.x
    iplanet-ejbciPlanet Application Server + 6.0
    ejbjarNested Elements
    borlandBorland Application Server 4.5 and + 5.x
    iPlanetiPlanet Application Server 6.0
    jbossJBoss
    jonasJOnAS 2.4.x and 2.5
    weblogicWebLogic 5.1 to 7.0
    websphereIBM WebSphere 4.0
    orionIronFlare (Oracle) Orion Application Server + 2.0.6
    -
    -

    ddcreator

    -

    Description:

    -

    ddcreator will compile a set of Weblogic text-based deployment descriptors into a serialized -EJB deployment descriptor. The selection of which of the text-based descriptors are to be compiled -is based on the standard Ant include and exclude selection mechanisms. -

    +
    + +

    ddcreator

    +

    Description

    +

    ddcreator will compile a set of WebLogic text-based deployment descriptors into a +serialized EJB deployment descriptor. The selection of which of the text-based descriptors are to be +compiled is based on the standard Ant include and exclude selection +mechanisms.

    -

    Parameters:

    - +

    Parameters

    +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    descriptorsThis is the base directory from which descriptors are selected.YesdescriptorsThis is the base directory from which descriptors are selected.Yes
    destThe directory where the serialized deployment descriptors will be writtenYesdestThe directory where the serialized deployment descriptors will be writtenYes
    classpathThis is the classpath to use to run the underlying weblogic ddcreator tool. - This must include the weblogic.ejb.utils.DDCreator classNoclasspathThis is the classpath to use to run the underlying WebLogic ddcreator tool. + This must include the weblogic.ejb.utils.DDCreator classNo

    Examples

    @@ -132,69 +131,67 @@ dest="${gen.classes}" classpath="${descriptorbuild.classpath}"> <include name="*.txt"/> -</ddcreator> - +</ddcreator> -
    -

    ejbc

    -

    Description:

    -

    The ejbc task will run Weblogic's ejbc tool. This tool will take a serialized deployment descriptor, -examine the various EJB interfaces and bean classes and then generate the required support classes -necessary to deploy the bean in a Weblogic EJB container. This will include the RMI stubs and skeletons -as well as the classes which implement the bean's home and remote interfaces.

    -

    -The ant task which runs this tool is able to compile several beans in a single operation. The beans to be -compiled are selected by including their serialized deployment descriptors. The standard ant -include and exclude constructs can be used to select the deployment descriptors -to be included.

    -

    -Each descriptor is examined to determine whether the generated classes are out of date and need to be -regenerated. The deployment descriptor is de-serialized to discover the home, remote and +


    +

    ejbc

    +

    Description

    +

    The ejbc task will run WebLogic's ejbc tool. This tool will take a +serialized deployment descriptor, examine the various EJB interfaces and bean classes and then +generate the required support classes necessary to deploy the bean in a WebLogic EJB container. This +will include the RMI stubs and skeletons as well as the classes which implement the bean's home and +remote interfaces.

    +

    The Ant task which runs this tool is able to compile several beans in a single operation. The +beans to be compiled are selected by including their serialized deployment descriptors. The standard +Ant include and exclude constructs can be used to select the deployment +descriptors to be included.

    +

    Each descriptor is examined to determine whether the generated classes are out of date and need +to be regenerated. The deployment descriptor is de-serialized to discover the home, remote and implementation classes. The corresponding source files are determined and checked to see their modification times. These times and the modification time of the serialized descriptor itself are -compared with the modification time of the generated classes. If the generated classes are not present -or are out of date, the ejbc tool is run to generate new versions.

    -

    Parameters:

    - +compared with the modification time of the generated classes. If the generated classes are not +present or are out of date, the ejbc tool is run to generate new versions.

    +

    Parameters

    +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    descriptorsThis is the base directory from which the serialized deployment descriptors are selected.YesdescriptorsThis is the base directory from which the serialized deployment descriptors are + selected.Yes
    destThe base directory where the generated classes, RIM stubs and RMI skeletons are writtenYesdestThe base directory where the generated classes, RIM stubs and RMI skeletons are writtenYes
    manifestThe name of a manifest file to be written. This manifest will contain an entry for each EJB processedYesmanifestThe name of a manifest file to be written. This manifest will contain an entry for each EJB + processedYes
    srcThe base directory of the source tree containing the source files of the home interface, - remote interface and bean implementation classes.YessrcThe base directory of the source tree containing the source files of the home interface, + remote interface and bean implementation classes.Yes
    classpathThis classpath must include both the weblogic.ejbc class and the - class files of the bean, home interface, remote interface, etc of the bean being - processed.NoclasspathThis classpath must include both the weblogic.ejbc class and the class files of + the bean, home interface, remote interface, etc of the bean being processed.No
    keepgeneratedControls whether ejbc will keep the - intermediate Java files used to build the class files. This can be - useful when debugging.No, defaults to false.keepgeneratedControls whether ejbc will keep the intermediate java files used to build the + class files. This can be useful when debugging.No; defaults to false

    Examples

    @@ -205,113 +202,83 @@ manifest="${build.manifest}" classpath="${descriptorbuild.classpath}"> <include name="*.ser"/> -</ejbc> - +</ejbc> + +
    +

    iplanet-ejbc

    + +

    Description

    +

    Task to compile EJB stubs and skeletons for the iPlanet Application Server 6.0. Given a standard +EJB 1.1 XML descriptor as well as an iAS-specific EJB descriptor, this task will generate the stubs +and skeletons required to deploy the EJB to iAS. Since the XML descriptors can include multiple +EJBs, this is a convenient way of specifying many EJBs in a single Ant task.

    +

    For each EJB specified, the task will locate the three classes that comprise the EJB in the +destination directory. If these class files cannot be located in the destination directory, the +task will fail. The task will also attempt to locate the EJB stubs and skeletons in this directory. +If found, the timestamps on the stubs and skeletons will be checked to ensure they are up to +date. Only if these files cannot be found or if they are out of date will the iAS ejbc +utility be called to generate new stubs and skeletons.

    +

    Parameters

    -
    -

    -iplanet-ejbc

    - -

    -Description:

    -Task to compile EJB stubs and skeletons for the iPlanet Application Server -6.0. Given a standard EJB 1.1 XML descriptor as well as an iAS-specific -EJB descriptor, this task will generate the stubs and skeletons required -to deploy the EJB to iAS. Since the XML descriptors can include multiple -EJBs, this is a convenient way of specifying many EJBs in a single Ant -task. -

    For each EJB specified, the task will locate the three classes that -comprise the EJB in the destination directory. If these class files -cannot be located in the destination directory, the task will fail. The -task will also attempt to locate the EJB stubs and skeletons in this directory. -If found, the timestamps on the stubs and skeletons will be checked to -ensure they are up to date. Only if these files cannot be found or if they -are out of date will the iAS ejbc utility be called to generate new stubs -and skeletons.

    -

    -Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    AttributeDescriptionRequired
    ejbdescriptorStandard EJB 1.1 XML descriptor (typically titled "ejb-jar.xml").Yes
    iasdescriptoriAS-specific EJB XML descriptor (typically titled "ias-ejb-jar.xml").Yes
    destThe is the base directory where the RMI stubs and skeletons -are written. In addition, the class files for each bean (home interface, -remote interface, and EJB implementation) must be found in this directory.Yes
    classpathThe classpath used when generating EJB stubs and skeletons. -If omitted, the classpath specified when Ant was started will be used. -Nested "classpath" elements may also be used.No
    keepgeneratedIndicates whether or not the Java source files which are -generated by ejbc will be saved or automatically deleted. If "yes", the -source files will be retained. If omitted, it defaults to "no". No
    debugIndicates whether or not the ejbc utility should log additional debugging -statements to the standard output. If "yes", the additional debugging statements -will be generated. If omitted, it defaults to "no". -
    No
    -
    iashomeMay be used to specify the "home" directory for this iAS installation. -This is used to find the ejbc utility if it isn't included in the user's -system path. If specified, it should refer to the "[install-location]/iplanet/ias6/ias" -directory. If omitted, the ejbc utility must be on the user's system path.
    + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    ejbdescriptorStandard EJB 1.1 XML descriptor (typically titled ejb-jar.xml).Yes
    No
    iasdescriptoriAS-specific EJB XML descriptor (typically titled ias-ejb-jar.xml).Yes
    destThe is the base directory where the RMI stubs and skeletons are written. In addition, the + class files for each bean (home interface, remote interface, and EJB implementation) must be + found in this directory.Yes
    classpathThe classpath used when generating EJB stubs and skeletons. Nested classpath + elements may also be used.No; defaults to the classpath specified when Ant was started
    keepgeneratedIndicates whether or not the Java source files which are generated by ejbc will + be saved or automatically deleted. If yes, the source files will be retained.No; defaults to no
    debugIndicates whether or not the ejbc utility should log additional debugging + statements to the standard output. If yes, the additional debugging statements will be + generated.No; defaults to no
    iashomeMay be used to specify the "home" directory for this iAS installation. This is used to find + the ejbc utility if it isn't included in the user's system path. If specified, it + should refer to the [install-location]/iplanet/ias6/ias directory.No; by default the ejbc utility must be on the user's system path
    -

    -Examples

    +

    Examples

     <iplanet-ejbc ejbdescriptor="ejb-jar.xml"
    @@ -330,129 +297,114 @@
                       <pathelement path="."/>
                       <pathelement path="${build.classpath}"/>
                   </classpath>
    -</iplanet-ejbc>
    -
    -
    -
    +</iplanet-ejbc> -
    -

    wlrun

    -

    Description:

    +
    +

    wlrun

    +

    Description

    -

    The wlrun task is used to start a weblogic server. The task runs -a weblogic instance in a separate Java Virtual Machine. A number of parameters -are used to control the operation of the weblogic instance. Note that the task, -and hence ant, will not complete until the weblogic instance is stopped.

    +

    The wlrun task is used to start a WebLogic server. The task runs a WebLogic instance +in a separate JVM. A number of parameters are used to control the operation of the WebLogic +instance. Note that the task, and hence Ant, will not complete until the WebLogic instance is +stopped.

    -

    Parameters:

    - +

    Parameters

    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + +
    AttributeDescriptionRequired for 4.5.1 and 5.1Required for 6.0AttributeDescriptionRequired for 4.5.1 and 5.1Required for 6.0
    BEA HomeThe location of the BEA Home where the server's config is defined. - If this attribute is present, wlrun assumes that the server will - be running under Weblogic 6.0N/AYesBEAhomeThe location of the BEAhome where the server's config is stored. If this + attribute is present, wlrun assumes that the server will be running under + WebLogic 6.0N/AYes
    homeThe location of the weblogic home that is to be used. This is the location - where weblogic is installed.YesYes. Note this is the absolute location, not relative to - BEA home.homeThe location of the WebLogic "home" where WebLogic is installed.YesYes. Note this is the absolute location, not relative to BEAhome.
    DomainThe domain to which the server belongs.N/AYesDomainThe domain to which the server belongs.N/AYes
    classpathThe classpath to be used with the Java Virtual Machine that runs the Weblogic - Server. Prior to Weblogic 6.0, this is typically set to the Weblogic - boot classpath. Under Weblogic 6.0 this should include all the - weblogic jarsYesYesclasspathThe classpath to be used with the JVM that runs the WebLogic Server. Prior to WebLogic 6.0, + this is typically set to the WebLogic boot classpath. Under WebLogic 6.0 this should include + all the WebLogic jarsYes
    wlclasspathThe weblogic classpath used by the Weblogic Server.NoN/AwlclasspathThe WebLogic classpath used by the WebLogic Server.NoN/A
    propertiesThe name of the server's properties file within the weblogic home directory - used to control the weblogic instance.YesN/ApropertiesThe name of the server's properties file within the WebLogic home directory used to control + the WebLogic instance.YesN/A
    nameThe name of the weblogic server within the weblogic home which is to be run. - This defaults to "myserver"NoNonameThe name of the WebLogic server within the WebLogic home which is to be run.No; defaults to myserver
    policyThe name of the security policy file within the weblogic home directory that - is to be used. If not specified, the default policy file weblogic.policy - is used.NoNopolicyThe name of the security policy file within the WebLogic home directory that is to be + used.No; defaults to weblogic.policy
    usernameThe management username used to manage the serverN/ANousernameThe management username used to manage the serverN/ANo
    passwordThe server's management passwordN/AYespasswordThe server's management passwordN/AYes
    pkPasswordThe private key password so the server can decrypt the SSL - private key fileN/ANopkPasswordThe private key password so the server can decrypt the SSL private key fileN/ANo
    jvmargsAdditional argument string passed to the Java Virtual Machine used to run the - Weblogic instance.NoNojvmargsAdditional argument string passed to the JVM used to run the WebLogic instance.No
    weblogicMainClassname of the main class for weblogicNoNoweblogicMainClassname of the main class for WebLogicNo
    -

    Nested Elements

    +

    Parameters specified as nested elements

    -

    The wlrun task supports nested <classpath> and <wlclasspath> -elements to set the respective classpaths.

    +

    The wlrun task supports nested <classpath> +and <wlclasspath> elements to set the respective classpaths.

    Examples

    -

    This example shows the use of wlrun to run a server under Weblogic 5.1

    +

    This example shows the use of wlrun to run a server under WebLogic 5.1

         <wlrun taskname="myserver"
    @@ -463,1354 +415,1194 @@
                properties="myserver/myserver.properties"/>
     
    -

    This example shows wlrun being used to run the petstore server under -Weblogic 6.0

    +

    This example shows wlrun being used to run the petstore server under +WebLogic 6.0

    -    <wlrun taskname="petstore"
    -           classpath="${weblogic.classes}"
    -           name="petstoreServer"
    -           domain="petstore"
    -           home="${weblogic.home}"
    -           password="petstorePassword"
    -           beahome="${bea.home}"/>
    -
    +<wlrun taskname="petstore" + classpath="${weblogic.classes}" + name="petstoreServer" + domain="petstore" + home="${weblogic.home}" + password="petstorePassword" + beahome="${bea.home}"/> -
    -

    wlstop

    -

    Description:

    +
    +

    wlstop

    +

    Description

    -

    The wlstop task is used to stop a weblogic instance which is -currently running. To shut down an instance you must supply both a username and -a password. These will be stored in the clear in the build script used to stop -the instance. For security reasons, this task is therefore only appropriate in a -development environment.

    +

    The wlstop task is used to stop a WebLogic instance which is currently running. To +shut down an instance you must supply both a username and a password. These will be stored in the +clear in the build script used to stop the instance. For security reasons, this task is therefore +only appropriate in a development environment.

    -

    This task works for most version of Weblogic, including 6.0. You need to -specify the BEA Home to have this task work correctly under 6.0

    +

    This task works for most versions of WebLogic, including 6.0. You need to specify +the BEAHome to have this task work correctly under 6.0

    -

    Parameters:

    - +

    Parameters

    +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    BEAHomeThis attribute selects Weblogic 6.0 shutdown.NoBEAHomeThis attribute selects WebLogic 6.0 shutdown.No
    classpathThe classpath to be used with the Java Virtual Machine that runs the Weblogic - Shutdown command.YesclasspathThe classpath to be used with the JVM that runs the WebLogic Shutdown command.Yes
    userThe username of the account which will be used to shutdown the serverYesuserThe username of the account which will be used to shutdown the serverYes
    passwordThe password for the account specified in the user parameter.YespasswordThe password for the account specified in the user parameter.Yes
    urlThe URL which describes the port to which the server is listening for T3 connections. - For example, t3://localhost:7001YesurlThe URL which describes the port to which the server is listening for T3 connections. For + example, t3://localhost:7001Yes
    delayThe delay in seconds after which the server will stop. This defaults to an - immediate shutdown.NodelayThe delay in seconds after which the server will stop.No; default is 0 (immediate shutdown)
    -

    Nested Element

    +

    Parameters specified as nested elements

    -

    The classpath of the wlstop task can be set by a <classpath> nested element.

    +

    The classpath of the wlstop task can be set by a <classpath> +nested element.

    Examples

    -

    This example show the shutdown for a Weblogic 6.0 server

    +

    This example show the shutdown for a WebLogic 6.0 server

    -    <wlstop classpath="${weblogic.classes}"
    -            user="system"
    -            url="t3://localhost:7001"
    -            password="foobar"
    -            beahome="${bea.home}"/>
    -
    - -
    - -

    ejbjar

    -

    Description:

    - -

    This task is designed to support building of EJB jar files (EJB 1.1 & 2.0). -Support is currently provided for 'vanilla' EJB jar files - i.e. those containing only -the user generated class files and the standard deployment descriptor. Nested -elements provide support for vendor specific deployment tools. These currently -include:

    +<wlstop classpath="${weblogic.classes}" + user="system" + url="t3://localhost:7001" + password="foobar" + beahome="${bea.home}"/> + +
    +

    ejbjar

    +

    Description

    + +

    This task is designed to support building of EJB jar files (EJB 1.1 & 2.0). Support is +currently provided for 'vanilla' EJB jar files—i.e. those containing only the user generated +class files and the standard deployment descriptor. Nested elements provide support for vendor +specific deployment tools. These currently include:

    • Borland Application Server 4.5
    • iPlanet Application Server 6.0
    • JBoss 2.1 and above
    • -
    • Weblogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool
    • +
    • WebLogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool
    • IBM WebSphere 4.0
    • TOPLink for WebLogic 2.5.1-enabled entity beans
    • -
    • JOnAS 2.4.x and 2.5 Open Source EJB server
    • +
    • JOnAS 2.4.x and 2.5 Open Source EJB + server
    • IronFlare Orion Application Server 2.0
    - -

    The task works as a directory scanning task, and performs an action for each -deployment descriptor found. As such the includes and excludes should be set -to ensure that all desired EJB descriptors are found, but no application -server descriptors are found. For each descriptor found, ejbjar will parse the -deployment descriptor to determine the necessary class files which implement the -bean. These files are assembled along with the deployment descriptors into a -well formed EJB jar file. Any support files which need to be included in the -generated jar can be added with the <support> nested element. For each -class included in the jar, ejbjar will scan for any super classes or super +

    The task works as a directory scanning task, and performs an action for each deployment +descriptor found. As such the includes and excludes should be set to +ensure that all desired EJB descriptors are found, but no application server descriptors are +found. For each descriptor found, ejbjar will parse the deployment descriptor to +determine the necessary class files which implement the bean. These files are assembled along with +the deployment descriptors into a well formed EJB jar file. Any support files which need to be +included in the generated jar can be added with the <support> nested element. For +each class included in the jar, ejbjar will scan for any super classes or super interfaces. These will be added to the generated jar.

    -

    If no nested vendor-specific deployment elements are present, the task will -simply generate a generic EJB jar. Such jars are typically used as the input to -vendor-specific deployment tools. For each nested deployment element, a vendor -specific deployment tool is run to generate a jar file ready for deployment in -that vendor's EJB container.

    - -

    The jar files are only built if they are out of date. Each deployment tool -element will examine its target jar file and determine if it is out of date with -respect to the class files and deployment descriptors that make up the bean. If -any of these files are newer than the jar file the jar will be rebuilt otherwise -a message is logged that the jar file is up to date.

    - -

    The task uses the -BCEL library -to extract all dependent classes. This -means that, in addition to the classes that are mentioned in the -deployment descriptor, any classes that these depend on are also -automatically included in the jar file.

    - - -

    Naming Convention

    - -Ejbjar handles the processing of multiple beans, and it uses a set of naming -conventions to determine the name of the generated EJB jars. The naming convention -that is used is controlled by the "naming" attribute. It supports the -following values -
      - -
    • descriptor
    • -

      This is the default naming scheme. The name of the generated bean is derived from the -name of the deployment descriptor. For an Account bean, for example, the deployment -descriptor would be named Account-ejb-jar.xml. Vendor specific descriptors are -located using the same naming convention. The weblogic bean, for example, would be named -Account-weblogic-ejb-jar.xml. Under this arrangement, the deployment descriptors +

      If no nested vendor-specific deployment elements are present, the task will simply generate a +generic EJB jar. Such jars are typically used as the input to vendor-specific deployment tools. For +each nested deployment element, a vendor specific deployment tool is run to generate a jar file +ready for deployment in that vendor's EJB container.

      + +

      The jar files are only built if they are out of date. Each deployment tool element will examine +its target jar file and determine if it is out of date with respect to the class files and +deployment descriptors that make up the bean. If any of these files are newer than the jar file the +jar will be rebuilt otherwise a message is logged that the jar file is up to date.

      + +

      The task uses the BCEL library to extract all +dependent classes. This means that, in addition to the classes that are mentioned in the deployment +descriptor, any classes that these depend on are also automatically included in the jar file.

      + +

      Naming convention

      + +Ejbjar handles the processing of multiple beans, and it uses a set of naming +conventions to determine the name of the generated EJB jars. The naming convention that is used is +controlled by the naming attribute. It supports the following values +
      +
      descriptor
      +

      This is the default naming scheme. The name of the generated bean is derived from the name of +the deployment descriptor. For an Account bean, for example, the deployment descriptor +would be named Account-ejb-jar.xml. Vendor specific descriptors are located using the +same naming convention. The WebLogic bean, for example, would be +named Account-weblogic-ejb-jar.xml. Under this arrangement, the deployment descriptors can be separated from the code implementing the beans, which can be useful when the same bean code -is deployed in separate beans. -

      - -

      This scheme is useful when you are using one bean per EJB jar and where you may be -deploying the same bean classes in different beans, with different deployment characteristics. - -

    • ejb-name
    • -

      This naming scheme uses the <ejb-name> element from the deployment descriptor to -determine the bean name. In this situation, the descriptors normally use the generic -descriptor names, such as ejb-jar.xml along with any associated vendor specific descriptor -names. For example, If the value of the <ejb-name> were to be given in the deployment descriptor -as follows: +is deployed in separate beans.

      +

      This scheme is useful when you are using one bean per EJB jar and where you may be deploying the +same bean classes in different beans, with different deployment characteristics.

      + +
      ejb-name
      +

      This naming scheme uses the <ejb-name> element from the deployment +descriptor to determine the bean name. In this situation, the descriptors normally use the generic +descriptor names, such as ejb-jar.xml along with any associated vendor specific +descriptor names. For example, If the value of the <ejb-name> were to be given in +the deployment descriptor as follows:

       <ejb-jar>
           <enterprise-beans>
               <entity>
                   <ejb-name>Sample</ejb-name>
      -            <home>org.apache.ant.ejbsample.SampleHome</home>
      -
      - -then the name of the generated bean would be Sample.jar -

      -

      This scheme is useful where you want to use the standard deployment descriptor names, which may be more -compatible with other EJB tools. This scheme must have one bean per jar. -

      -
    • directory
    • -

      -In this mode, the name of the generated bean jar is derived from the directory -containing the deployment descriptors. Again the deployment descriptors typically use -the standard filenames. For example, if the path to the deployment descriptor is -/home/user/dev/appserver/dd/sample, then the generated -bean will be named sample.jar -

      -

      -This scheme is also useful when you want to use standard style descriptor names. It is often -most useful when the descriptors are located in the same directory as the bean source code, -although that is not mandatory. This scheme can handle multiple beans per jar. -

      - -
    • basejarname
    • -

      -The final scheme supported by the <ejbjar> task is used when you want to specify the generated -bean jar name directly. In this case the name of the generated jar is specified by the -"basejarname" attribute. Since all generated beans will have the same name, this task should -be only used when each descriptor is in its own directory. -

      - -

      -This scheme is most appropriate when you are using multiple beans per jar and only process a single -deployment descriptor. You typically want to specify the name of the jar and not derive it from the -beans in the jar. -

      - -
    + <home>org.apache.ant.ejbsample.SampleHome</home> +

    then the name of the generated bean would be Sample.jar

    +

    This scheme is useful where you want to use the standard deployment descriptor names, which may +be more compatible with other EJB tools. This scheme must have one bean per jar.

    +
    directory
    +

    In this mode, the name of the generated bean jar is derived from the directory containing the +deployment descriptors. Again the deployment descriptors typically use the standard filenames. For +example, if the path to the deployment descriptor +is /home/user/dev/appserver/dd/sample, then the generated bean will be +named sample.jar

    +

    This scheme is also useful when you want to use standard style descriptor names. It is often most +useful when the descriptors are located in the same directory as the bean source code, although that +is not mandatory. This scheme can handle multiple beans per jar.

    + +
    basejarname
    +

    The final scheme supported by the <ejbjar> task is used when you want to +specify the generated bean jar name directly. In this case the name of the generated jar is +specified by the basejarname attribute. Since all generated beans will have the same +name, this task should be only used when each descriptor is in its own directory.

    + +

    This scheme is most appropriate when you are using multiple beans per jar and only process a +single deployment descriptor. You typically want to specify the name of the jar and not derive it +from the beans in the jar.

    + + +

    Dependencies

    +

    In addition to the bean classes, ejbjar is able to ad additional classes to the +generated EJB jar. These classes are typically the support classes which are used by the bean's +classes or as parameters to the bean's methods.

    + +

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

    + +

    Since Ant 1.5 the task uses the BCEL library to analyze the bean's class files directly, rather than loading them +into the JVM. This also allows ejbjar to add all of the required support classes for a +bean and not just super classes.

    -

    Dependencies

    -

    In addition to the bean classes, ejbjar is able to ad additional classes to the generated -ejbjar. These classes are typically the support classes which are used by the bean's classes or as -parameters to the bean's methods.

    - -

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

    - -

    The ejbjar task in Ant releases 1.5 and later uses the - BCEL library -to analyze the bean's class -files directly, rather than loading them into the JVM. This also allows ejbjar to add all -of the required support classes for a bean and not just super classes. -

    - -

    In Ant 1.5, a new attribute, dependency has been introduced to allow the -buildfile to control what additional classes are added to the generated jar. It takes three -possible values

    +

    Since Ant 1.5, a dependency attribute allows the buildfile to control what +additional classes are added to the generated jar. It takes three possible values

      -
    • none - only the bean classes and interfaces described in the bean's -descriptor are added to the jar.
    • -
    • super - this is the default value and replicates the original ejbjar -behaviour where super classes and super interfaces are added to the jar
    • -
    • full - In this mode all classes used by the bean's classes and interfaces -are added to the jar
    • +
    • none—only the bean classes and interfaces described in the bean's descriptor are + added to the jar.
    • +
    • super—this is the default value and replicates the original ejbjar + behaviour where super classes and super interfaces are added to the jar
    • +
    • full—In this mode all classes used by the bean's classes and interfaces are added + to the jar
    -

    The super and full values require the - BCEL library -to be available. If it is not, ejbjar will drop back to the behaviour corresponding to -the value none.

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

    The super and full values require the BCEL library to be available. If it is not, ejbjar will drop back to +the behaviour corresponding to the value none.

    + +

    Parameters

    +
    AttributeDescriptionRequired
    descriptordirThe base directory under which to scan for EJB - deployment descriptors. If this attribute is not - specified, then the deployment descriptors must be - located in the directory specified by the 'srcdir' - attribute.No
    srcdirThe base directory containing the .class files that - make up the bean. Included are the home- remote- pk- - and implementation- classes and all classes, that these - depend on. Note that this can be the same as the - descriptordir if all files are in the same directory - tree.Yes
    destdirThe base directory into which generated jar files are - deposited. Jar files are deposited in directories - corresponding to their location within the descriptordir - namespace. Note that this attribute is only used if the - task is generating generic jars (i.e. no vendor-specific - deployment elements have been specified).Yes, unless vendor-specific deployment elements - have been specified.
    cmpversionEither 1.0 or 2.0.
    - Default is 1.0.
    - A CMP 2.0 implementation exists currently only for JBoss.
    No
    namingControls the naming convention used to name generated - EJB jars. Please refer to the description above.No
    basejarnameThe base name that is used for the generated jar files. - If this attribute is specified, the generic jar file name - will use this value as the prefix (followed by the value - specified in the 'genericjarsuffix' attribute) and the - resultant ejb jar file (followed by any suffix specified - in the nested element).No
    basenameterminatorString value used to substring out a string from the name - of each deployment descriptor found, which is then used to - locate related deployment descriptors (e.g. the WebLogic - descriptors). For example, a basename of '.' and a - deployment descriptor called 'FooBean.ejb-jar.xml' would - result in a basename of 'FooBean' which would then be used - to find FooBean.weblogic-ejb-jar.xml and - FooBean.weblogic-cmp-rdbms-jar.xml, as well as to create - the filenames of the jar files as FooBean-generic.jar and - FooBean-wl.jar. This attribute is not used if the - 'basejarname' attribute is specified.No, defaults to '-'.
    genericjarsuffixString value appended to the basename of the deployment - descriptor to create the filename of the generic EJB jar - file.No, defaults to '-generic.jar'.
    classpathThis classpath is used when resolving classes which - are to be added to the jar. Typically nested deployment - tool elements will also support a classpath which - will be combined with this classpath when resolving - classesNo.
    flatdestdirSet this attribute to true if you want all generated jars - to be placed in the root of the destdir, rather than - according to the location of the deployment descriptor - within the descriptor dir hierarchy.No.
    dependencyThis attribute controls which additional classes and interfaces - are added to the jar. Please refer to the description - aboveNo.
    manifestthe manifest file to use, if any.No
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    descriptordirThe base directory under which to scan for EJB deployment descriptors. If this attribute is + not specified, then the deployment descriptors must be located in the directory specified by + the srcdir attribute.No
    srcdirThe base directory containing the .class files that make up the bean. Included are + the home-, remote-, pk- + and implementation- classes and all classes that these depend on. Note that this + can be the same as the descriptordir if all files are in the same directory + tree.Yes
    destdirThe base directory into which generated jar files are deposited. Jar files are deposited in + directories corresponding to their location within the descriptordir + namespace. Note that this attribute is only used if the task is generating generic jars + (i.e. no vendor-specific deployment elements have been specified).Yes, unless vendor-specific deployment elements have been specified.
    cmpversionEither 1.0 or 2.0.
    A CMP 2.0 implementation exists currently only for + JBoss.
    No; default is 1.0
    namingControls the naming convention used to name generated EJB jars. Please refer to the + description above.No
    basejarnameThe base name that is used for the generated jar files. If this attribute is specified, the + generic jar file name will use this value as the prefix (followed by the value specified in + the genericjarsuffix attribute) and the resultant EJB jar file (followed by any + suffix specified in the nested element).No
    basenameterminatorString value used to substring out a string from the name of each deployment descriptor + found, which is then used to locate related deployment descriptors (e.g. the WebLogic + descriptors). For example, a basename of . and a deployment descriptor + called FooBean.ejb-jar.xml would result in a basename of FooBean which + would then be used to find FooBean.weblogic-ejb-jar.xml + and FooBean.weblogic-cmp-rdbms-jar.xml, as well as to create the filenames of the + jar files as FooBean-generic.jar and FooBean-wl.jar. This attribute + is not used if the basejarname attribute is specified.No; defaults to -
    genericjarsuffixString value appended to the basename of the deployment descriptor to create the filename of + the generic EJB jar file.No; defaults to -generic.jar
    classpathThis classpath is used when resolving classes which are to be added to the jar. Typically + nested deployment tool elements will also support a classpath which will be combined with this + classpath when resolving classesNo
    flatdestdirSet this attribute to true if you want all generated jars to be placed in the root + of the destdir, rather than according to the location of the deployment + descriptor within the descriptordir hierarchy.No
    dependencyThis attribute controls which additional classes and interfaces are added to the jar. Please + refer to the description aboveNo
    manifestthe manifest file to use, if any.No
    -

    Nested Elements

    +

    Parameters specified as nested elements

    -

    In addition to the vendor specific nested elements, the ejbjar task provides -three nested elements.

    +

    In addition to the vendor specific nested elements, the ejbjar task provides three +nested elements.

    -

    Classpath

    +

    classpath

    -

    The <classpath> nested element allows the classpath -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.

    +

    The <classpath> nested element allows the classpath 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.

    -

    dtd

    +

    dtd

    -

    The <dtd> 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 -faster than loading the DTD across the net. If you are running ejbjar behind a -firewall you may not even be able to access the remote DTD. The supported -vendor-specific nested elements know the location of the required DTDs within -the vendor class hierarchy and, in general, this means <dtd> elements are -not required. It does mean, however, that the vendor's class hierarchy must be -available in the classpath when Ant is started. If your want to run Ant without -requiring the vendor classes in the classpath, you would need to use a -<dtd> element.

    +

    The <dtd> 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 faster than loading the DTD +across the net. If you are running ejbjar behind a firewall you may not even be able to +access the remote DTD. The supported vendor-specific nested elements know the location of the +required DTDs within the vendor class hierarchy and, in general, this means <dtd> +elements are not required. It does mean, however, that the vendor's class hierarchy must be +available in the classpath when Ant is started. If your want to run Ant without requiring the vendor +classes in the classpath, you would need to use a <dtd> element.

    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    publicIdThe public Id of the DTD for which the location is being providedYespublicIdThe public Id of the DTD for which the location is being providedYes
    locationThe location of the local copy of the DTD. This can either be a - file or a resource loadable from the classpath.YeslocationThe location of the local copy of the DTD. This can either be a file or a resource loadable + from the classpath.Yes

    support

    -

    The <support> nested element is used to supply additional classes -(files) to be included in the generated jars. The <support> element is a -FileSet, so it can either reference a fileset declared elsewhere or it can be -defined in-place with the appropriate <include> and <exclude> nested -elements. The files in the support fileset are added into the generated EJB jar -in the same relative location as their location within the support fileset. Note -that when ejbjar generates more than one jar file, the support files are added -to each one.

    +

    The <support> nested element is used to supply additional classes (files) to +be included in the generated jars. The <support> element is +a FileSet, so it can either reference a fileset declared +elsewhere or it can be defined in-place with the appropriate <include> +and <exclude> nested elements. The files in the support fileset are added into +the generated EJB jar in the same relative location as their location within the support +fileset. Note that when ejbjar generates more than one jar file, the support files are +added to each one.

    Vendor-specific deployment elements

    -Each vendor-specific nested element controls the generation of a deployable jar -specific to that vendor's EJB container. The parameters for each supported -deployment element are detailed here. +

    Each vendor-specific nested element controls the generation of a deployable jar specific to that +vendor's EJB container. The parameters for each supported deployment element are detailed here.

    +

    Jboss element

    -

    Jboss element

    - -

    The jboss element searches for the JBoss specific deployment descriptors and adds them -to the final ejb jar file. JBoss has two deployment descriptors: -

    • jboss.xml
    • -
    • for container manager persistence:
      - - - - -
      CMP versionFile name
      CMP 1.0jaws.xml
      CMP 2.0jbosscmp-jdbc.xml
      -
    • +

      The jboss element searches for the JBoss specific deployment descriptors and adds +them to the final EJB jar file. JBoss has two deployment descriptors:

      +
        +
      • jboss.xml
      • +
      • for container manager persistence: + + + + +
        CMP versionFile name
        CMP 1.0jaws.xml
        CMP 2.0jbosscmp-jdbc.xml
        +
      -
      -. The JBoss server uses hot deployment and does -not require compilation of additional stubs and skeletons.

      - - - - - - - - - - - - - - - - - - - - - - - - - - +

      The JBoss server uses hot deployment and does not require compilation of additional stubs and +skeletons.

      + +
      AttributeDescriptionRequired
      destdirThe base directory into which the generated weblogic ready - jar files are deposited. Jar files are deposited in - directories corresponding to their location within the - descriptordir namespace. Yes
      genericjarsuffixA generic jar is generated as an intermediate step in - build the weblogic deployment jar. The suffix used to - generate the generic jar file is not particularly - important unless it is desired to keep the generic - jar file. It should not, however, be the same - as the suffix setting.No, defaults to '-generic.jar'.
      suffixString value appended to the basename of the deployment - descriptor to create the filename of the JBoss EJB - jar file.No, defaults to '.jar'.
      keepgenericThis controls whether the generic file used as input to - ejbc is retained.No, defaults to false
      + + + + + + + + + + + + + + + + + + + + + + + +
      AttributeDescriptionRequired
      destdirThe base directory into which the generated JBoss ready jar files are deposited. Jar files + are deposited in directories corresponding to their location within + the descriptordir namespace.Yes
      genericjarsuffixA generic jar is generated as an intermediate step in build the JBoss deployment jar. The + suffix used to generate the generic jar file is not particularly important unless it is + desired to keep the generic jar file. It should not, however, be the same as the suffix + setting.No; defaults to -generic.jar
      suffixString value appended to the basename of the deployment descriptor to create the filename of + the JBoss EJB jar file.No; defaults to .jar
      keepgenericThis controls whether the generic file used as input to ejbc is retained.No; defaults to false
      +

      WebLogic element

      + +

      The weblogic element is used to control the weblogic.ejbc compiler for +generating WebLogic EJB jars. Prior to Ant 1.3, the method of locating CMP descriptors was to use +the ejbjar naming convention. So if your EJB jar was +called, Customer-ejb-jar.xml, your WebLogic descriptor was +called Customer-weblogic-ejb-jar.xml and your CMP descriptor had to +be Customer-weblogic-cmp-rdbms-jar.xml. In addition, +the <type-storage> element in the WebLogic descriptor had to be set to the +standard name META-INF/weblogic-cmp-rdbms-jar.xml, as that is where the CMP descriptor +was mapped to in the generated jar.

      + +

      There are a few problems with this scheme. It does not allow for more than one CMP descriptor to +be defined in a jar and it is not compatible with the deployment descriptors generated by some +tools.

      -

      Weblogic element

      +

      In Ant 1.3, ejbjar parses the WebLogic deployment descriptor to discover the CMP +descriptors, which are then included automatically. This behaviour is controlled by +the newCMP attribute. Note that if you move to the new method of determining CMP +descriptors, you will need to update your WebLogic deployment +descriptor's <type-storage> element. In the above example, you would define this +as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.

      -

      The weblogic element is used to control the weblogic.ejbc compiler for -generating weblogic EJB jars. Prior to Ant 1.3, the method of locating CMP -descriptors was to use the ejbjar naming convention. So if your ejb-jar was -called, Customer-ejb-jar.xml, your weblogic descriptor was called Customer- -weblogic-ejb-jar.xml and your CMP descriptor had to be Customer-weblogic-cmp- -rdbms-jar.xml. In addition, the <type-storage> element in the weblogic -descriptor had to be set to the standard name META-INF/weblogic-cmp-rdbms- -jar.xml, as that is where the CMP descriptor was mapped to in the generated -jar.

      - -

      There are a few problems with this scheme. It does not allow for more than -one CMP descriptor to be defined in a jar and it is not compatible with the -deployment descriptors generated by some tools.

      - -

      In Ant 1.3, ejbjar parses the weblogic deployment descriptor to discover the -CMP descriptors, which are then included automatically. This behaviour is -controlled by the newCMP attribute. Note that if you move to the new method of -determining CMP descriptors, you will need to update your weblogic deployment -descriptor's <type-storage> element. In the above example, you would -define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
      AttributeDescriptionRequired
      destdirThe base directory into which the generated weblogic ready - jar files are deposited. Jar files are deposited in - directories corresponding to their location within the - descriptordir namespace. Yes
      genericjarsuffixA generic jar is generated as an intermediate step in - build the weblogic deployment jar. The suffix used to - generate the generic jar file is not particularly - important unless it is desired to keep the generic - jar file. It should not, however, be the same - as the suffix setting.No, defaults to '-generic.jar'.
      suffixString value appended to the basename of the deployment - descriptor to create the filename of the WebLogic EJB - jar file.No, defaults to '.jar'.
      classpathThe classpath to be used when running the weblogic ejbc - tool. Note that this tool typically requires the classes - that make up the bean to be available on the classpath. - Currently, however, this will cause the ejbc tool to be - run in a separate VMNo
      wlclasspathWeblogic 6.0 will give a warning if the home and remote interfaces - of a bean are on the system classpath used to run weblogic.ejbc. - In that case, the standard weblogic classes should be set with - this attribute (or equivalent nested element) and the - home and remote interfaces located with the standard classpath - attributeNo
      keepgenericThis controls whether the generic file used as input to - ejbc is retained.No, defaults to false
      compilerThis allows for the selection of a different compiler - to be used for the compilation of the generated Java - files. This could be set, for example, to Jikes to - compile with the Jikes compiler. If this is not set - and the build.compiler property is set - to jikes, the Jikes compiler will be used. If this - is not desired, the value "default" - may be given to use the default compilerNo
      rebuildThis flag controls whether weblogic.ejbc is always - invoked to build the jar file. In certain circumstances, - such as when only a bean class has been changed, the jar - can be generated by merely replacing the changed classes - and not rerunning ejbc. Setting this to false will reduce - the time to run ejbjar. - No, defaults to true.
      keepgeneratedControls whether weblogic will keep the generated Java - files used to build the class files added to the - jar. This can be useful when debugging - No, defaults to false.
      argsAny additional arguments to be passed to the weblogic.ejbc - tool. - No.
      weblogicdtdDeprecated. 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 <dtd> element, described above. If you do choose - to use an attribute, you should use a - nested <dtd> element. - No.
      wldtdDeprecated. Defines the location of the weblogic-ejb-jar - DTD which covers the Weblogic specific deployment descriptors. - This should not be necessary if you have weblogic in your - classpath. If you do not, you should use a nested <dtd> - element, described above. - No.
      ejbdtdDeprecated. 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 <dtd> element, described above. - No.
      newCMPIf this is set to true, the new method for locating - CMP descriptors will be used.No. Defaults to false
      oldCMPDeprecated This is an antonym for newCMP which should be used instead.No.
      noEJBCIf this attribute is set to true, Weblogic's ejbc will not be run on the EJB jar. - Use this if you prefer to run ejbc at deployment time.No.
      ejbcclassSpecifies the classname of the ejbc compiler. Normally ejbjar determines - the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler - featured in weblogic 6 has, however, been deprecated in version 7. When - using with version 7 this attribute should be set to - "weblogic.ejbc" to avoid the deprecation warning.No.
      jvmargsAny additional arguments to be passed to the Virtual Machine - running weblogic.ejbc tool. For example to set the memory size, - this could be jvmargs="-Xmx128m" - No.
      jvmdebuglevelSets the weblogic.StdoutSeverityLevel to use when running - the Virtual Machine that executes ejbc. Set to 16 to avoid - the warnings about EJB Home and Remotes being in the classpath - No.
      outputdirIf set ejbc will be given this directory as the output - destination rather than a jar file. This allows for the - generation of "exploded" jars. - No.
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      AttributeDescriptionRequired
      destdirThe base directory into which the generated WebLogic ready jar files are deposited. Jar + files are deposited in directories corresponding to their location within + the descriptordir namespace.Yes
      genericjarsuffixA generic jar is generated as an intermediate step in build the WebLogic deployment jar. The + suffix used to generate the generic jar file is not particularly important unless it is + desired to keep the generic jar file. It should not, however, be the same as the suffix + setting.No; defaults to -generic.jar
      suffixString value appended to the basename of the deployment descriptor to create the filename of + the WebLogic EJB jar file.No; defaults to .jar
      classpathThe classpath to be used when running the WebLogic ejbc tool. Note that this + tool typically requires the classes that make up the bean to be available on the classpath. + Currently, however, this will cause the ejbc tool to be run in a separate + JVMNo
      wlclasspathWebLogic 6.0 will give a warning if the home and remote interfaces of a bean are on the + system classpath used to run weblogic.ejbc. In that case, the standard WebLogic + classes should be set with this attribute (or equivalent nested element) and the home and + remote interfaces located with the standard classpath attributeNo
      keepgenericThis controls whether the generic file used as input to ejbc is retained.No; defaults to false
      compilerThis allows for the selection of a different compiler to be used for the compilation of the + generated Java files. This could be set, for example, to jikes to compile with the + Jikes compiler. If this is not set and the build.compiler property is set + to jikes, the Jikes compiler will be used. If this is not desired, the + value default may be given to use the default compilerNo
      rebuildThis flag controls whether weblogic.ejbc is always invoked to build the jar + file. In certain circumstances, such as when only a bean class has been changed, the jar can + be generated by merely replacing the changed classes and not + rerunning ejbc. Setting this to false will reduce the time to + run ejbjar.No; defaults to true
      keepgeneratedControls whether WebLogic will keep the generated Java files used to build the class files + added to the jar. This can be useful when debuggingNo; defaults to false
      argsAny additional arguments to be passed to the weblogic.ejbc tool.No
      weblogicdtdDeprecated. 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 <dtd> element, described above. If you do choose to + use an attribute, you should use a nested <dtd> element.No
      wldtdDeprecated. Defines the location of the weblogic-ejb-jar DTD which covers + the WebLogic specific deployment descriptors. This should not be necessary if you have + WebLogic in your classpath. If you do not, you should use a nested <dtd> + element, described above.No
      ejbdtdDeprecated. 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 <dtd> element, described above.No
      newCMPIf this is set to true, the new method for locating CMP descriptors will be + used.No; defaults to false
      oldCMPDeprecated This is an antonym for newCMP which should be used + instead.No
      noEJBCIf this attribute is set to true, WebLogic's ejbc will not be run on the + EJB jar. Use this if you prefer to run ejbc at deployment time.No
      ejbcclassSpecifies the classname of the ejbc compiler. Normally ejbjar + determines the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler + featured in WebLogic 6 has, however, been deprecated in version 7. When using with version 7 + this attribute should be set to weblogic.ejbc to avoid the deprecation warning.No
      jvmargsAny additional arguments to be passed to the JVM running weblogic.ejbc + tool. For example to set the memory size, this could + be jvmargs=-Xmx128mNo
      jvmdebuglevelSets the weblogic.StdoutSeverityLevel to use when running the JVM that + executes ejbc. Set to 16 to avoid the warnings about EJB Home and Remotes + being in the classpathNo
      outputdirIf set ejbc will be given this directory as the output destination rather than a + jar file. This allows for the generation of "exploded" jars.No
      -

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

      +

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

      -

      TOPLink for Weblogic element

      +

      TOPLink for WebLogic element

      -

      Deprecated

      +

      Deprecated

      -

      The toplink element is no longer required. Toplink beans can now be built with the standard -weblogic element, as long as the newCMP attribute is set to "true" -

      +

      The toplink element is no longer required. Toplink beans can now be built with the +standard weblogic element, as long as the newCMP attribute is set +to true

      -

      The TopLink element is used to handle beans which use Toplink for the CMP operations. It -is derived from the standard weblogic element so it supports the same set of attributes plus these -additional attributes

      +

      The TopLink element is used to handle beans which use Toplink for the CMP +operations. It is derived from the standard weblogic element so it supports the same +set of attributes plus these additional attributes

      - +
      - - - + + + - - - + + + - - - + + +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      toplinkdescriptorThis specifies the name of the TOPLink deployment descriptor file contained in the - 'descriptordir' directory.YestoplinkdescriptorThis specifies the name of the TOPLink deployment descriptor file contained in + the descriptordir directory.Yes
      toplinkdtdThis specifies the location of the TOPLink DTD file. This can be a file path or - a file URL. This attribute is not required, but using a local DTD is recommended.No, defaults to dtd file at www.objectpeople.com.toplinkdtdThis specifies the location of the TOPLink DTD file. This can be a file path or a file + URL. This attribute is not required, but using a local DTD is recommended.No; defaults to DTD file at www.objectpeople.com.
      -

      Examples

      -

      This example shows ejbjar being used to generate deployment jars using a -Weblogic EJB container. This example requires the naming standard to be used for -the deployment descriptors. Using this format will create a ejb jar file for -each variation of '*-ejb-jar.xml' that is found in the deployment descriptor -directory.

      +

      This example shows ejbjar being used to generate deployment jars using a WebLogic +EJB container. This example requires the naming standard to be used for the deployment +descriptors. Using this format will create a EJB jar file for each variation +of *-ejb-jar.xml that is found in the deployment descriptor directory.

      -    <ejbjar srcdir="${build.classes}"
      -            descriptordir="${descriptor.dir}">
      -      <weblogic destdir="${deploymentjars.dir}"
      -                classpath="${descriptorbuild.classpath}"/>
      -      <include name="**/*-ejb-jar.xml"/>
      -      <exclude name="**/*weblogic*.xml"/>
      -    </ejbjar>
      -
      +<ejbjar srcdir="${build.classes}" + descriptordir="${descriptor.dir}"> + <weblogic destdir="${deploymentjars.dir}" + classpath="${descriptorbuild.classpath}"/> + <include name="**/*-ejb-jar.xml"/> + <exclude name="**/*weblogic*.xml"/> +</ejbjar> -

      If weblogic is not in the Ant classpath, the following example -shows how to specify the location of the weblogic DTDs. This -example also show the use of a nested classpath element.

      +

      If WebLogic is not in the Ant classpath, the following example shows how to specify the location +of the WebLogic DTDs. This example also show the use of a nested classpath element.

      -    <ejbjar descriptordir="${src.dir}" srcdir="${build.classes}">
      -       <weblogic destdir="${deployment.webshop.dir}"
      -                 keepgeneric="true"
      -                 args="-g -keepgenerated ${ejbc.compiler}"
      -                 suffix=".jar"
      -                 oldCMP="false">
      -         <classpath>
      -           <pathelement path="${descriptorbuild.classpath}"/>
      -         </classpath>
      -       </weblogic>
      -       <include name="**/*-ejb-jar.xml"/>
      -       <exclude name="**/*-weblogic-ejb-jar.xml"/>
      -       <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
      -            location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/ejb-jar.dtd"/>
      -       <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
      -            location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd"/>
      -    </ejbjar>
      -
      - - -

      This example shows ejbjar being used to generate a single deployment jar -using a Weblogic EJB container. This example does not require the deployment -descriptors to use the naming standard. This will create only one ejb jar file - -'TheEJBJar.jar'.

      - +<ejbjar descriptordir="${src.dir}" srcdir="${build.classes}"> + <weblogic destdir="${deployment.webshop.dir}" + keepgeneric="true" + args="-g -keepgenerated ${ejbc.compiler}" + suffix=".jar" + oldCMP="false"> + <classpath> + <pathelement path="${descriptorbuild.classpath}"/> + </classpath> + </weblogic> + <include name="**/*-ejb-jar.xml"/> + <exclude name="**/*-weblogic-ejb-jar.xml"/> + <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" + location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/ejb-jar.dtd"/> + <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN" + location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd"/> +</ejbjar> + +

      This example shows ejbjar being used to generate a single deployment jar using a +WebLogic EJB container. This example does not require the deployment descriptors to use the naming +standard. This will create only one EJB jar file—TheEJBJar.jar.

      -    <ejbjar srcdir="${build.classes}"
      -            descriptordir="${descriptor.dir}"
      -            basejarname="TheEJBJar">
      -      <weblogic destdir="${deploymentjars.dir}"
      -                classpath="${descriptorbuild.classpath}"/>
      -      <include name="**/ejb-jar.xml"/>
      -      <exclude name="**/weblogic*.xml"/>
      -    </ejbjar>
      -
      - -

      This example shows ejbjar being used to generate deployment jars for a TOPLink-enabled entity bean using a -Weblogic EJB container. This example does not require the deployment descriptors to use the naming standard. -This will create only one TOPLink-enabled ejb jar file - 'Address.jar'.

      +<ejbjar srcdir="${build.classes}" + descriptordir="${descriptor.dir}" + basejarname="TheEJBJar"> + <weblogic destdir="${deploymentjars.dir}" + classpath="${descriptorbuild.classpath}"/> + <include name="**/ejb-jar.xml"/> + <exclude name="**/weblogic*.xml"/> +</ejbjar> + +

      This example shows ejbjar being used to generate deployment jars for a +TOPLink-enabled entity bean using a WebLogic EJB container. This example does not require the +deployment descriptors to use the naming standard. This will create only one TOPLink-enabled EJB +jar file—Address.jar.

      -    <ejbjar srcdir="${build.dir}"
      -            destdir="${solant.ejb.dir}"
      -            descriptordir="${descriptor.dir}"
      -            basejarname="Address">
      -            <weblogictoplink destdir="${solant.ejb.dir}"
      -                    classpath="${java.class.path}"
      -                    keepgeneric="false"
      -                    toplinkdescriptor="Address.xml"
      -                    toplinkdtd="file:///dtdfiles/toplink-cmp_2_5_1.dtd"
      -                    suffix=".jar"/>
      -            <include name="**/ejb-jar.xml"/>
      -            <exclude name="**/weblogic-ejb-jar.xml"/>
      -    </ejbjar>
      -
      +<ejbjar srcdir="${build.dir}" + destdir="${solant.ejb.dir}" + descriptordir="${descriptor.dir}" + basejarname="Address"> + <weblogictoplink destdir="${solant.ejb.dir}" + classpath="${java.class.path}" + keepgeneric="false" + toplinkdescriptor="Address.xml" + toplinkdtd="file:///dtdfiles/toplink-cmp_2_5_1.dtd" + suffix=".jar"/> + <include name="**/ejb-jar.xml"/> + <exclude name="**/weblogic-ejb-jar.xml"/> +</ejbjar> -

      This final example shows how you would set-up ejbjar under Weblogic 6.0. It also shows the use of the -<support> element to add support files

      +

      This final example shows how you would set-up ejbjar under WebLogic 6.0. It also +shows the use of the <support> element to add support files

      -    <ejbjar descriptordir="${dd.dir}" srcdir="${build.classes.server}">
      -       <include name="**/*-ejb-jar.xml"/>
      -       <exclude name="**/*-weblogic-ejb-jar.xml"/>
      -       <support dir="${build.classes.server}">
      -            <include name="**/*.class"/>
      -       </support>
      -       <weblogic destdir="${deployment.dir}"
      -                 keepgeneric="true"
      -                 suffix=".jar"
      -                 rebuild="false">
      -         <classpath>
      -            <pathelement path="${build.classes.server}"/>
      -         </classpath>
      -         <wlclasspath>
      -            <pathelement path="${weblogic.classes}"/>
      -         </wlclasspath>
      -       </weblogic>
      -    </ejbjar>
      -
      +<ejbjar descriptordir="${dd.dir}" srcdir="${build.classes.server}"> + <include name="**/*-ejb-jar.xml"/> + <exclude name="**/*-weblogic-ejb-jar.xml"/> + <support dir="${build.classes.server}"> + <include name="**/*.class"/> + </support> + <weblogic destdir="${deployment.dir}" + keepgeneric="true" + suffix=".jar" + rebuild="false"> + <classpath> + <pathelement path="${build.classes.server}"/> + </classpath> + <wlclasspath> + <pathelement path="${weblogic.classes}"/> + </wlclasspath> + </weblogic> +</ejbjar> +

      WebSphere element

      -

      WebSphere element

      - -

      The websphere element searches for the websphere specific deployment descriptors and -adds them to the final ejb jar file. Websphere has two specific descriptors for session -beans: +

      The websphere element searches for the WebSphere specific deployment descriptors and +adds them to the final EJB jar file. WebSphere has two specific descriptors for session beans:

        -
      • ibm-ejb-jar-bnd.xmi
      • -
      • ibm-ejb-jar-ext.xmi
      • +
      • ibm-ejb-jar-bnd.xmi
      • +
      • ibm-ejb-jar-ext.xmi
      -and another two for container managed entity beans: +

      and another two for container managed entity beans:

        -
      • Map.mapxmi
      • -
      • Schema.dbxmi
      • +
      • Map.mapxmi
      • +
      • Schema.dbxmi
      -In terms of WebSphere, the generation of container code and stubs is called deployment. -This step can be performed by the websphere element as part of the jar generation process. If the -switch ejbdeploy is on, the ejbdeploy tool from the websphere toolset is called for -every ejb-jar. Unfortunately, this step only works, if you use the ibm jdk. Otherwise, the rmic -(called by ejbdeploy) throws a ClassFormatError. Be sure to switch ejbdeploy off, if run ant with -Oracle JDK or OpenJDK. -

      +

      In terms of WebSphere, the generation of container code and stubs is called deployment. +This step can be performed by the websphere element as part of the jar generation +process. If the switch ejbdeploy is on, the ejbdeploy tool from the +WebSphere toolset is called for every EJB jar. Unfortunately, this step only works, if you use the +IBM JDK. Otherwise, the rmic (called by ejbdeploy) throws +a ClassFormatError. Be sure to switch ejbdeploy off, if Ant runs with Oracle +JDK or OpenJDK.

      -

      -For the websphere element to work, you have to provide a complete classpath, that contains all -classes, that are required to reflect the bean classes. For ejbdeploy to work, you must also provide -the classpath of the ejbdeploy tool and set the websphere.home property (look at the examples below). -

      +

      For the websphere element to work, you have to provide a complete classpath, that +contains all classes, that are required to reflect the bean classes. For ejbdeploy to +work, you must also provide the classpath of the ejbdeploy tool and set +the websphere.home property (look at the examples below).

      - +
      - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      destdirThe base directory into which the generated weblogic ready - jar files are deposited. Jar files are deposited in - directories corresponding to their location within the - descriptordir namespace. YesdestdirThe base directory into which the generated WebSphere ready jar files are deposited. Jar + files are deposited in directories corresponding to their location within + the descriptordir namespace.Yes
      ejbdeployDecides whether ejbdeploy is called. When you set this to true, - be sure, to run ant with the ibm jdk.No, defaults to trueejbdeployDecides whether ejbdeploy is called. When you set this to true, be sure + to run Ant with the IBM JDK.No; defaults to true
      suffixString value appended to the basename of the deployment - descriptor to create the filename of the WebLogic EJB - jar file.No, defaults to '.jar'.suffixString value appended to the basename of the deployment descriptor to create the filename of + the WebSphere EJB jar file.No; defaults to .jar
      keepgenericThis controls whether the generic file used as input to - ejbdeploy is retained.No, defaults to falsekeepgenericThis controls whether the generic file used as input to ejbdeploy is + retained.No; defaults to false
      rebuildThis controls whether ejbdeploy is called although no changes - have occurred.No, defaults to falserebuildThis controls whether ejbdeploy is called although no changes have occurred.No; defaults to false
      tempdirA directory, where ejbdeploy will write temporary filesNo, defaults to '_ejbdeploy_temp'.tempdirA directory, where ejbdeploy will write temporary filesNo; defaults to _ejbdeploy_temp
      dbName
      dbSchema
      These options are passed to ejbdeploy.NodbName
      dbSchema
      These options are passed to ejbdeploy.No
      dbVendorThis option is passed to ejbdeploy. -

      - Valid options can be obtained by running the following command: - - <WAS_HOME>/bin/EJBDeploy.[sh/bat] -help - -

      - This is also used to determine the name of the Map.mapxmi and - Schema.dbxmi files, for example Account-DB2UDBWIN_V71-Map.mapxmi - and Account-DB2UDBWIN_V71-Schema.dbxmi. -
      NodbVendorThis option is passed to ejbdeploy. Valid options can be obtained by running the + following command:
      <WAS_HOME>/bin/EJBDeploy.[sh/bat] -help
      This is also used + to determine the name of the Map.mapxmi and Schema.dbxmi files, for + example Account-DB2UDBWIN_V71-Map.mapxmi + and Account-DB2UDBWIN_V71-Schema.dbxmi.
      No
      codegen
      quiet
      novalidate
      noinform
      trace
      - use35MappingRules
      These options are all passed to ejbdeploy. All options - except 'quiet' default to false.Nocodegen
      quiet
      novalidate
      noinform
      trace
      use35MappingRules
      These options are all passed to ejbdeploy.No; default is false (except for quiet)
      rmicOptionsThis option is passed to ejbdeploy and will be passed - on to rmic.NormicOptionsThis option is passed to ejbdeploy and will be passed on + to rmic.No
      -

      This example shows ejbjar being used to generate deployment jars for all deployment descriptors -in the descriptor dir:

      +

      This example shows ejbjar being used to generate deployment jars for all deployment +descriptors in the descriptordir:

      -    <property name="websphere.home" value="${was4.home}"/>
      -    <ejbjar srcdir="${build.class}" descriptordir="etc/ejb">
      -      <include name="*-ejb-jar.xml"/>
      -      <websphere dbvendor="DB2UDBOS390_V6"
      -                 ejbdeploy="true"
      -                 oldCMP="false"
      -                 tempdir="/tmp"
      -                 destdir="${dist.server}">
      -        <wasclasspath>
      -          <pathelement location="${was4.home}/deploytool/itp/plugins/org.eclipse.core.boot/boot.jar"/>
      -          <pathelement location="${was4.home}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/batch.jar"/>
      -          <pathelement location="${was4.home}/lib/xerces.jar"/>
      -          <pathelement location="${was4.home}/lib/ivjejb35.jar"/>
      -          <pathelement location="${was4.home}/lib/j2ee.jar"/>
      -          <pathelement location="${was4.home}/lib/vaprt.jar"/>
      -        </wasclasspath>
      -        <classpath>
      -          <path refid="build.classpath"/>
      -        </classpath>
      -      </websphere>
      -      <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
      -           location="${lib}/dtd/ejb-jar_1_1.dtd"/>
      -    </ejbjar>
      -
      - -

      iPlanet Application Server (iAS) element

      - -The <iplanet< nested element is used to build iAS-specific stubs and - -skeletons and construct a JAR file which may be deployed to the iPlanet -Application Server 6.0. The build process will always determine if -the EJB stubs/skeletons and the EJB-JAR file are up to date, and it will -do the minimum amount of work required. -

      Like the WebLogic element, a naming convention for the EJB descriptors -is most commonly used to specify the name for the completed JAR file. -For example, if the EJB descriptor ejb/Account-ejb-jar.xml is found in -the descriptor directory, the iplanet element will search for an iAS-specific -EJB descriptor file named ejb/Account-ias-ejb-jar.xml (if it isn't found, -the task will fail) and a JAR file named ejb/Account.jar will be written -in the destination directory. Note that when the EJB descriptors -are added to the JAR file, they are automatically renamed META-INF/ejb-jar.xml -and META-INF/ias-ejb-jar.xml.

      -

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

      -

      -Parameters:

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +<property name="websphere.home" value="${was4.home}"/> +<ejbjar srcdir="${build.class}" descriptordir="etc/ejb"> + <include name="*-ejb-jar.xml"/> + <websphere dbvendor="DB2UDBOS390_V6" + ejbdeploy="true" + oldCMP="false" + tempdir="/tmp" + destdir="${dist.server}"> + <wasclasspath> + <pathelement location="${was4.home}/deploytool/itp/plugins/org.eclipse.core.boot/boot.jar"/> + <pathelement location="${was4.home}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/batch.jar"/> + <pathelement location="${was4.home}/lib/xerces.jar"/> + <pathelement location="${was4.home}/lib/ivjejb35.jar"/> + <pathelement location="${was4.home}/lib/j2ee.jar"/> + <pathelement location="${was4.home}/lib/vaprt.jar"/> + </wasclasspath> + <classpath> + <path refid="build.classpath"/> + </classpath> + </websphere> + <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" + location="${lib}/dtd/ejb-jar_1_1.dtd"/> +</ejbjar> + +

      iPlanet Application Server (iAS) element

      + +

      The <iplanet> nested element is used to build iAS-specific stubs and skeletons +and construct a JAR file which may be deployed to the iPlanet Application Server 6.0. The build +process will always determine if the EJB stubs/skeletons and the EJB jar file are up to date, and it +will do the minimum amount of work required.

      +

      Like the weblogic element, a naming convention for the EJB descriptors is most +commonly used to specify the name for the completed JAR file. For example, if the EJB +descriptor ejb/Account-ejb-jar.xml is found in the descriptor directory, +the iplanet element will search for an iAS-specific EJB descriptor file +named ejb/Account-ias-ejb-jar.xml (if it isn't found, the task will fail) and a JAR +file named ejb/Account.jar will be written in the destination directory. Note that +when the EJB descriptors are added to the JAR file, they are automatically +renamed META-INF/ejb-jar.xml and META-INF/ias-ejb-jar.xml.

      +

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

      + +

      Parameters

      + +
      AttributeDescriptionRequired
      destdirThe base directory into which the generated JAR files will -be written. Each JAR file is written in directories which correspond to -their location within the "descriptordir" namespace.Yes
      classpathThe classpath used when generating EJB stubs and skeletons. -If omitted, the classpath specified in the "ejbjar" parent task will be -used. If specified, the classpath elements will be prepended to the -classpath specified in the parent "ejbjar" task. Note that nested "classpath" -elements may also be used.No
      keepgeneratedIndicates whether or not the Java source files which are -generated by ejbc will be saved or automatically deleted. If "yes", the -source files will be retained. If omitted, it defaults to "no". No
      debugIndicates whether or not the ejbc utility should log additional debugging -statements to the standard output. If "yes", the additional debugging statements -will be generated. If omitted, it defaults to "no". No
      iashomeMay be used to specify the "home" directory for this iAS installation. -This is used to find the ejbc utility if it isn't included in the user's -system path. If specified, it should refer to the [install-location]/iplanet/ias6/ias -directory. If omitted, the ejbc utility must be on the user's system -path. No
      suffixString value appended to the JAR filename when creating each JAR. -If omitted, it defaults to ".jar". No
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      AttributeDescriptionRequired
      destdirThe base directory into which the generated JAR files will be written. Each JAR file is + written in directories which correspond to their location within the descriptordir + namespace.Yes
      classpathThe classpath used when generating EJB stubs and skeletons. If + specified, classpath will be prepended to the classpath specified in the + parent ejbjar task. Note that nested classpath elements may also be + used.No; defaults to the classpath specified in the ejbjar parent task
      keepgeneratedIndicates whether or not the Java source files which are generated by ejbc will + be saved or automatically deleted. If yes, the source files will be retained.No; defaults to no
      debugIndicates whether or not the ejbc utility should log additional debugging + statements to the standard output. If yes, the additional debugging statements will be + generated.No; defaults to no
      iashomeMay be used to specify the "home" directory for this iAS installation. This is used to find + the ejbc utility if it isn't included in the user's system path. If specified, it + should refer to the [install-location]/iplanet/ias6/ias directory.No; by default, the ejbc utility must be on the user's system path.
      suffixString value appended to the JAR filename when creating each JAR.No; defaults to .jar
      -

      As noted above, the iplanet element supports additional <classpath> -nested elements.

      -

      -Examples

      -This example demonstrates the typical use of the <iplanet> nested element. -It will name each EJB-JAR using the "basename" prepended to each standard -EJB descriptor. For example, if the descriptor named "Account-ejb-jar.xml" -is processed, the EJB-JAR will be named "Account.jar" +

      As noted above, the iplanet element supports +additional <classpath> nested elements.

      +

      Examples

      +

      This example demonstrates the typical use of the <iplanet> nested element. It +will name each EJB jar using the "basename" prepended to each standard EJB descriptor. For example, +if the descriptor named Account-ejb-jar.xml is processed, the EJB-JAR will be +named Account.jar

      -    <ejbjar srcdir="${build.classesdir}"
      -            descriptordir="${src}">
      +<ejbjar srcdir="${build.classesdir}"
      +        descriptordir="${src}">
       
      -            <iplanet destdir="${assemble.ejbjar}"
      -                     classpath="${ias.ejbc.cpath}"/>
      -            <include name="**/*-ejb-jar.xml"/>
      -            <exclude name="**/*ias-*.xml"/>
      -    </ejbjar>
      + <iplanet destdir="${assemble.ejbjar}" + classpath="${ias.ejbc.cpath}"/> + <include name="**/*-ejb-jar.xml"/> + <exclude name="**/*ias-*.xml"/> +</ejbjar> -This example demonstrates the use of a nested classpath element as well -as some of the other optional attributes. +

      This example demonstrates the use of a nested classpath element as well as some of +the other optional attributes.

      -    <ejbjar srcdir="${build.classesdir}"
      -            descriptordir="${src}">
      +<ejbjar srcdir="${build.classesdir}"
      +        descriptordir="${src}">
      +
      +    <iplanet destdir="${assemble.ejbjar}"
      +             iashome="${ias.home}"
      +             debug="yes"
      +             keepgenerated="yes">
      +        <classpath>
      +            <pathelement path="."/>
      +            <pathelement path="${build.classpath}"/>
      +        </classpath>
      +    </iplanet>
      +    <include name="**/*-ejb-jar.xml"/>
      +    <exclude name="**/*ias-*.xml"/>
      +</ejbjar>
      + +

      This example demonstrates the use of basejarname attribute. In this case, the +completed EJB jar will be named HelloWorld.jar. If multiple EJB descriptors might be +found, care must be taken to ensure that the completed JAR files don't overwrite each other.

      - <iplanet destdir="${assemble.ejbjar}" - iashome="${ias.home}" - debug="yes" - keepgenerated="yes"> - <classpath> - <pathelement path="."/> - <pathelement path="${build.classpath}"/> - </classpath> - </iplanet> - <include name="**/*-ejb-jar.xml"/> - <exclude name="**/*ias-*.xml"/> - </ejbjar> - -This example demonstrates the use of basejarname attribute. In this -case, the completed EJB-JAR will be named "HelloWorld.jar" If multiple -EJB descriptors might be found, care must be taken to ensure that the completed -JAR files don't overwrite each other.
      -    <ejbjar srcdir="${build.classesdir}"
      -            descriptordir="${src}"
      -            basejarname="HelloWorld">
      -
      -            <iplanet destdir="${assemble.ejbjar}"
      -                     classpath="${ias.ejbc.cpath}"/>
      -            <include name="**/*-ejb-jar.xml"/>
      -            <exclude name="**/*ias-*.xml"/>
      -    </ejbjar>
      -This example demonstrates the use of the dtd nested element. If the local -copies of the DTDs are included in the classpath, they will be automatically -referenced without the nested elements. In iAS 6.0 SP2, these local DTDs are -found in the [iAS-install-directory]/APPS directory. In iAS 6.0 SP3, these -local DTDs are found in the [iAS-install-directory]/dtd directory. +<ejbjar srcdir="${build.classesdir}" + descriptordir="${src}" + basejarname="HelloWorld"> + + <iplanet destdir="${assemble.ejbjar}" + classpath="${ias.ejbc.cpath}"/> + <include name="**/*-ejb-jar.xml"/> + <exclude name="**/*ias-*.xml"/> +</ejbjar> + +

      This example demonstrates the use of the dtd nested element. If the local copies of +the DTDs are included in the classpath, they will be automatically referenced without the nested +elements. In iAS 6.0 SP2, these local DTDs are found in +the [iAS-install-directory]/APPS directory. In iAS 6.0 SP3, these local DTDs are found +in the [iAS-install-directory]/dtd directory.

      +
      -    <ejbjar srcdir="${build.classesdir}"
      -            descriptordir="${src}">
      -            <iplanet destdir="${assemble.ejbjar}">
      -                     classpath="${ias.ejbc.cpath}"/>
      -            <include name="**/*-ejb-jar.xml"/>
      -            <exclude name="**/*ias-*.xml"/>
      -
      -            <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
      -                 location="${ias.home}/APPS/ejb-jar_1_1.dtd"/>
      -            <dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"
      -                 location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/>
      -    </ejbjar>
      - -

      JOnAS (Java Open Application Server) element

      - -

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

      - -

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

      - -

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

      +<ejbjar srcdir="${build.classesdir}" + descriptordir="${src}"> + <iplanet destdir="${assemble.ejbjar}"> + classpath="${ias.ejbc.cpath}"/> + <include name="**/*-ejb-jar.xml"/> + <exclude name="**/*ias-*.xml"/> + + <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" + location="${ias.home}/APPS/ejb-jar_1_1.dtd"/> + <dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN" + location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/> +</ejbjar> + +

      JOnAS (Java Open Application Server) element

      + +

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

      + +

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

      + +

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

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

      +the ejbjar task (for example, basejarname, basenameterminator, +and flatdestdir) as well as the iplanet element (for +example, suffix). Refer to the appropriate documentation for more details.

      -

      Parameters:

      +

      Parameters

      - +
      - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      AttributeDescriptionRequiredAttributeDescriptionRequired
      destdirThe base directory into which the generated JAR files - will be written. Each JAR file is written in directories which correspond - to their location within the "descriptordir" namespace.YesdestdirThe base directory into which the generated JAR files will be written. Each JAR file is + written in directories which correspond to their location within + the descriptordir namespace.Yes
      jonasrootThe root directory for JOnAS.YesjonasrootThe root directory for JOnAS.Yes
      classpathThe classpath used when generating EJB stubs and - skeletons. If omitted, the classpath specified in the "ejbjar" parent - task will be used. If specified, the classpath elements will be prepended - to the classpath specified in the parent "ejbjar" task (see also the ORB - attribute documentation below). Note that nested "classpath" elements may - also be used.NoclasspathThe classpath used when generating EJB stubs and skeletons. If + specified, classpath will be prepended to the classpath specified in the + parent ejbjar task (see also the ORB attribute documentation below). Note that + nested classpath elements may also be used.No; defaults to the classpath specified in the ejbjar parent task
      keepgeneratedtrue if the intermediate Java - source files generated by GenIC must be deleted or not. If - omitted, it defaults to false.Nokeepgeneratedtrue if the intermediate Java source files generated by GenIC must be deleted or + not.No; defaults to false
      nocompiltrue if the generated source files - must not be compiled via the java and rmi compilers. If omitted, - it defaults to false.Nonocompiltrue if the generated source files must not be compiled via the Java and RMI + compilers.No; defaults to false
      novalidationtrue if the XML deployment descriptors must - be parsed without validation. If omitted, it defaults to false.Nonovalidationtrue if the XML deployment descriptors must be parsed without validation.No; defaults to false
      javacJava compiler to use. If omitted, it defaults - to the value of build.compiler property.NojavacJava compiler to use.No; defaults + to the value of build.compiler property
      javacoptsOptions to pass to the java compiler.NojavacoptsOptions to pass to the Java compiler.No
      rmicoptsOptions to pass to the rmi compiler.NormicoptsOptions to pass to the RMI compiler.No
      secpropagtrue if the RMI Skel. and - Stub. must be modified to implement the implicit propagation of - the security context (the transactional context is always - provided). If omitted, it defaults to false.Nosecpropagtrue if the RMI skeletons and stubs must be modified to implement the implicit + propagation of the security context (the transactional context is always provided).No; defaults to false
      verboseIndicates whether or not to use -verbose switch. If - omitted, it defaults to false.NoverboseIndicates whether or not to use -verbose switch.No; defaults to false
      additionalargsAdd additional args to GenIC.NoadditionalargsAdd additional args to GenIC.No
      keepgenerictrue if the generic JAR file used as input - to GenIC must be retained. If omitted, it defaults to false.Nokeepgenerictrue if the generic JAR file used as input to GenIC must be retained.No; defaults to false
      jarsuffixString value appended to the JAR filename when creating each JAR. If - omitted, it defaults to ".jar". NojarsuffixString value appended to the JAR filename when creating each JAR.No; defaults to .jar
      orbChoose your ORB : RMI, JEREMIE, DAVID. If omitted, it defaults to the - one present in classpath. If specified, the corresponding JOnAS JAR is - automatically added to the classpath.NoorbChoose your ORB: RMI, JEREMIE, DAVID. If specified, the + corresponding JOnAS JAR is automatically added to the classpath.No; defaults to the one present in classpath
      nogenicIf this attribute is set to true, - JOnAS's GenIC will not be run on the EJB JAR. Use this if you - prefer to run GenIC at deployment time. If omitted, it defaults - to false.NonogenicIf this attribute is set to true, JOnAS's GenIC will not be run on the EJB jar. Use + this if you prefer to run GenIC at deployment time.No; defaults to false
      -

      As noted above, the jonas element supports additional <classpath> +

      As noted above, the jonas element supports additional <classpath> nested elements.

      Examples

      -

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

      +

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

      -      <ejbjar srcdir="${build.classes}"
      -              descriptordir="${descriptor.dir}">
      -        <jonas destdir="${deploymentjars.dir}"
      -             jonasroot="${jonas.root}"
      -             orb="RMI"/>
      -        <include name="**/*.xml"/>
      -        <exclude name="**/jonas-*.xml"/>
      -        <support dir="${build.classes}">
      -             <include name="**/*.class"/>
      -        </support>
      -      </ejbjar>
      -
      - -

      This example shows ejbjar being used to generate a single deployment jar -using a JOnAS EJB container. This example does require the deployment -descriptors to use the naming standard. This will create only one ejb jar file - -'TheEJBJar.jar'.

      +<ejbjar srcdir="${build.classes}" + descriptordir="${descriptor.dir}"> + <jonas destdir="${deploymentjars.dir}" + jonasroot="${jonas.root}" + orb="RMI"/> + <include name="**/*.xml"/> + <exclude name="**/jonas-*.xml"/> + <support dir="${build.classes}"> + <include name="**/*.class"/> + </support> +</ejbjar> + +

      This example shows ejbjar being used to generate a single deployment jar using a +JOnAS EJB container. This example does require the deployment descriptors to use the naming +standard. This will create only one EJB jar file—TheEJBJar.jar.

      -      <ejbjar srcdir="${build.classes}"
      -              descriptordir="${descriptor.dir}"
      -              basejarname="TheEJBJar">
      -        <jonas destdir="${deploymentjars.dir}"
      -                  jonasroot="${jonas.root}"
      -                  suffix=".jar"
      -                  classpath="${descriptorbuild.classpath}"/>
      -        <include name="**/ejb-jar.xml"/>
      -        <exclude name="**/jonas-ejb-jar.xml"/>
      -      </ejbjar>
      -
      - +<ejbjar srcdir="${build.classes}" + descriptordir="${descriptor.dir}" + basejarname="TheEJBJar"> + <jonas destdir="${deploymentjars.dir}" + jonasroot="${jonas.root}" + suffix=".jar" + classpath="${descriptorbuild.classpath}"/> + <include name="**/ejb-jar.xml"/> + <exclude name="**/jonas-ejb-jar.xml"/> +</ejbjar> -

      Orion element

      +

      Orion element

      -

      The orion element searches for the Orion Application Server specific deployment descriptors and adds them -to the final ejb jar file. Orion has one deployment descriptor: -

      • orion-ejb-jar.xml
      • +

        The orion element searches for the Orion Application Server specific deployment +descriptors and adds them to the final EJB jar file. Orion has one deployment descriptor:

        +
          +
        • orion-ejb-jar.xml
        -
        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        destdirThe base directory into which the generated - jar files are deposited. Jar files are deposited in - directories corresponding to their location within the - descriptordir namespace. YesdestdirThe base directory into which the generated jar files are deposited. Jar files are deposited + in directories corresponding to their location within the descriptordir + namespace.Yes

        Example

        -      <ejbjar srcdir="${build.classes}"
        -              descriptordir="${descriptor.dir}"
        -              basejarname="TheEJBJar"
        -              flatdestdir="true"
        -              dependency="super"
        -              genericjarsuffix=".jar">
        -        <include name="**/*-ejb-jar.xml"/>
        -        <orion destdir="${deploymentjars.dir}"\>
        -      </ejbjar>
        -
        +<ejbjar srcdir="${build.classes}" + descriptordir="${descriptor.dir}" + basejarname="TheEJBJar" + flatdestdir="true" + dependency="super" + genericjarsuffix=".jar"> + <include name="**/*-ejb-jar.xml"/> + <orion destdir="${deploymentjars.dir}"\> +</ejbjar> - diff -Nru ant-1.9.10/manual/Tasks/exec.html ant-1.10.3/manual/Tasks/exec.html --- ant-1.9.10/manual/Tasks/exec.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/exec.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,44 +24,35 @@ -

        Exec

        +

        Exec

        Description

        -

        Executes a system command. When the os attribute is specified, then -the command is only executed when Apache Ant is run on one of the specified operating -systems.

        - -

        Note that you cannot interact with the forked program, the only way -to send input to it is via the input and inputstring attributes. Also note that -since Ant 1.6, any attempt to read input in the forked program will receive an -EOF (-1). This is a change from Ant 1.5, where such an attempt would block.

        - -

        If you want to execute an executable using a path relative to the - project's basedir, you may need to - use vmlauncher="false" on some operating systems - but - even this may fail (Solaris 8/9 has been reported as problematic). - The resolveexecutable attribute should be more - reliable, as would be something like +

        Executes a system command. When the os attribute is specified, then the command is +only executed when Apache Ant is run on one of the specified operating systems.

        + +

        Note that you cannot interact with the forked program, the only way to send input to it is via +the input and inputstring attributes. Also note that since Ant 1.6, any attempt to read +input in the forked program will receive an EOF (-1). This is a change from Ant 1.5, where +such an attempt would block.

        + +

        If you want to execute an executable using a path relative to the project's basedir, +you may need to use vmlauncher=false on some operating systems—but even this +may fail (Solaris 8/9 has been reported as problematic). The resolveexecutable attribute +should be more reliable, as would be something like

        -  <property name="executable-full-path"
        -            location="../relative/path/to/executable"/>
        -  <exec executable="${executable-full-path}" ...
        -
        -

        +<property name="executable-full-path" + location="../relative/path/to/executable"/> +<exec executable="${executable-full-path}" ...

        Windows Users

        The <exec> task delegates to Runtime.exec which in turn -apparently calls -::CreateProcess. It is the latter Win32 function that defines -the exact semantics of the call. In particular, if you do not put a file extension -on the executable, only ".EXE" files are looked for, not ".COM", ".CMD" or other file -types listed in the environment variable PATHEXT. That is only used by the shell. -

        -

        - Note that .bat files cannot in general by executed directly. - One normally needs to execute the command shell executable cmd - using the /c switch. -

        -
        +apparently +calls ::CreateProcess. It is the latter Win32 function that defines the +exact semantics of the call. In particular, if you do not put a file extension on the executable, +only .EXE files are looked for, not .COM, .CMD or other file +types listed in the environment variable PATHEXT. That is only used by the shell.

        +

        Note that .bat files cannot in general by executed directly. One normally needs to +execute the command shell executable cmd using the /c switch.

         <target name="help">
           <exec executable="cmd">
        @@ -69,365 +60,303 @@
             <arg value="ant.bat"/>
             <arg value="-p"/>
           </exec>
        -</target>
        -
        - -

        A common problem is not having the executable on the PATH. In case you get an error -message Cannot run program "...":CreateProcess error=2. The system cannot find -the path specified. have a look at your PATH variable. Just type the command directly on -the command line and if Windows finds it, Ant should do it too. (Otherwise ask on the user mailinglist for help.) If Windows can not execute the program add the directory of the program -to the PATH (set PATH=%PATH%;dirOfProgram) or specify the absolute path in the -executable attribute in your buildfile. -

        +</target> +

        A common problem is not having the executable on the PATH. In case you get an error +message Cannot run program "...":CreateProcess error=2. The system cannot find +the path specified. have a look at your PATH variable. Just type the command +directly on the command line and if Windows finds it, Ant should do it too. (Otherwise ask on the +user mailinglist for help.) If Windows can not execute the program, add the directory of the program +to the PATH (set PATH=%PATH%;dirOfProgram) or specify the absolute path in +the executable attribute in your buildfile.

        Cygwin Users

        -

        The <exec> task will not understand paths such as /bin/sh -for the executable parameter. This is because the Java VM in which Ant is -running is a standard Windows executable and is not aware of the Cygwin -environment (i.e., doesn't load cygwin1.dll). The only -work-around for this is to compile a JVM under Cygwin (at your own risk). -See for instance - -OpenJDK build instructions for cygwin. -

        +

        The <exec> task will not understand paths such as /bin/sh for +the executable parameter. This is because JVM in which Ant is running is a standard +Windows executable and is not aware of the Cygwin environment (i.e., doesn't +load cygwin1.dll). The only work-around for this is to compile a JVM under Cygwin (at +your own risk). See for +instance OpenJDK build instructions for cygwin.

        OpenVMS Users

        -

        The command specified using executable and -<arg> elements is executed exactly as specified -inside a temporary DCL script. This has some implications: +

        The command specified using executable and <arg> elements is +executed exactly as specified inside a temporary DCL script. This has some implications:

          -
        • paths have to be written in VMS style
        • -
        • if your executable points to a DCL script remember to -prefix it with an @-sign -(e.g. executable="@[FOO]BAR.COM"), just as you would in a -DCL script
        • +
        • paths have to be written in VMS style
        • +
        • if your executable points to a DCL script remember to prefix it with + an @-sign (e.g. executable=@[FOO]BAR.COM), just as you would in a DCL + script
        -For <exec> to work in an environment with a Java VM -older than version 1.4.1-2 it is also required that the logical -JAVA$FORK_SUPPORT_CHDIR is set to TRUE in -the job table (see the JDK Release Notes).

        - -

        Please note that the Java VM provided by HP doesn't follow OpenVMS' -conventions of exit codes. If you run a Java VM with this task, the -task may falsely claim that an error occurred (or silently ignore an -error). Don't use this task to run JAVA.EXE, use a -<java> task with the fork attribute -set to true instead as this task will follow the VM's +

        For <exec> to work in an environment with a JVM older than version 1.4.1-2 it +is also required that the logical JAVA$FORK_SUPPORT_CHDIR is set +to TRUE in the job table (see the JDK Release Notes).

        + +

        Please note that JVM provided by HP doesn't follow OpenVMS' conventions of exit codes. If you +run a JVM with this task, the task may falsely claim that an error occurred (or silently ignore an +error). Don't use this task to run JAVA.EXE, use a <java> task with +the fork attribute set to true instead as this task will follow the JVM's interpretation of exit codes.

        RedHat S/390 Users

        - -

        It has been reported -on the VMESA-LISTSERV that shell scripts invoked via the Ant Exec -task must have their interpreter specified, i.e., the scripts must -start with something like: - -

        -
        -#!/bin/bash
        -
        -
        - -or the task will fail as follows: - -
        -
        +

        It has been reported on linux-390 that shell scripts invoked via the Ant Exec task must have +their interpreter specified, i.e., the scripts must start with something like:

        + +
        #!/bin/bash
        +

        or the task will fail as follows:

        +
         [exec] Warning: UNIXProcess.forkAndExec native error: Exec format error
        -[exec] Result: 255
        -
        -
        -

        +[exec] Result: 255 -

        Running Ant as a background process on - Unix(-like) systems

        +

        Running Ant as a background process on Unix(-like) systems

        -

        If you run Ant as a background process (like ant &) - and use the <exec> task with spawn - set to false, you must provide explicit input to the - forked process or Ant will be suspended because it tries to read - from the standard input.

        +

        If you run Ant as a background process (like ant &) and use +the <exec> task with spawn set to false, you must provide +explicit input to the forked process or Ant will be suspended because it tries to read from the +standard input.

        Parameters

        - +
        - - - + + + - - - + + + - - + + - - - + + + - - + - + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - + + + - - - + + + - - - + + + - - - + + + + + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        commandthe command to execute with all command line - arguments. deprecated, use executable and nested - <arg> elements instead.Exactly one of the two.commandthe command to execute with all command line arguments. Deprecated, + use executable and nested <arg> elements instead.Exactly one of the two
        executablethe command to execute without any command line - arguments.executablethe command to execute without any command line arguments.
        dirthe directory in which the command should be executed.No.
        - Note: the default used when dir has not been - specified depends on the vmlauncher attribute. If - vmlauncher is true the task will use - the current working directory, otherwise it uses the project's basedir. -
        dirthe directory in which the command should be executed.No; if vmlauncher is true, defaults to the current working directory, + otherwise the project's basedir
        oslist of Operating Systems on which the command may be - executed. If the current OS's name is contained in this list, the command will - be executed. The OS's name is determined by the Java Virtual machine and is set - in the "os.name" system property. + oslist of Operating Systems on which the command may be executed. If the current OS's name is + contained in this list, the command will be executed. The OS's name is determined by JVM and + is set in the os.name system property. NoNo
        osfamilyOS family as used in the <os> condition. - since Ant 1.7NoosfamilyOS family as used in the <os> condition. since Ant 1.7No
        spawnwhether or not you want the command to be spawned
        - Default is false.
        - If you spawn a command, its output will not be logged by ant.
        - The input, output, error, and result property settings are not active when spawning a process.
        - since Ant 1.6 +
        spawnwhether or not you want the command to be spawned
        If you spawn a command, its output + will not be logged by Ant.
        The input, output, error, + and result property settings are not active when spawning a process.
        since + Ant 1.6
        NoNo; default is false
        outputName of a file to which to write the output. If the error stream - is not also redirected to a file or property, it will appear in this output.NooutputName of a file to which to write the output. If the error stream is not also redirected to a + file or property, it will appear in this output.No
        errorThe file to which the standard error of the - command should be redirected. since Ant 1.6NoerrorThe file to which the standard error of the command should be redirected. since Ant + 1.6No
        logErrorThis attribute is used when you wish to see error output in Ant's - log and you are redirecting output to a file/property. The error - output will not be included in the output file/property. If you - redirect error with the "error" or "errorProperty" - attributes, this will have no effect. since Ant 1.6NologErrorThis attribute is used when you wish to see error output in Ant's log and you are + redirecting output to a file/property. The error output will not be included in the output + file/property. If you redirect error with the error or errorProperty + attributes, this will have no effect. since Ant 1.6No
        appendWhether output and error files should be appended to or overwritten. - Defaults to false.NoappendWhether output and error files should be appended to or overwritten.No; defaults to false
        outputpropertyThe name of a property in which the output of the - command should be stored. Unless the error stream is redirected to a separate - file or stream, this property will include the error output.NooutputpropertyThe name of a property in which the output of the command should be stored. Unless the error + stream is redirected to a separate file or stream, this property will include the error + output.No
        errorpropertyThe name of a property in which the standard error of the - command should be stored. since Ant 1.6NoerrorpropertyThe name of a property in which the standard error of the command should be + stored. since Ant 1.6No
        inputA file from which the executed command's standard input - is taken. This attribute is mutually exclusive with the - inputstring attribute. since Ant 1.6NoinputA file from which the executed command's standard input is taken. This attribute is mutually + exclusive with the inputstring attribute. since Ant 1.6No
        inputstringA string which serves as the input stream for the - executed command. This attribute is mutually exclusive with the - input attribute. since Ant 1.6NoinputstringA string which serves as the input stream for the executed command. This attribute is + mutually exclusive with the input attribute. since Ant 1.6No
        resultpropertythe name of a property in which the return code of the - command should be stored. Only of interest if failonerror=false.Noresultpropertythe name of a property in which the return code of the command should be stored. Only of + interest if failonerror=false.No
        timeoutStop the command if it doesn't finish within the - specified time (given in milliseconds).NotimeoutStop the command if it doesn't finish within the specified time (given in + milliseconds).No
        failonerrorStop the buildprocess if the command exits with a - return code signaling failure. Defaults to false.NofailonerrorStop the build process if the command exits with a return code signaling failure.No; defaults to false
        failifexecutionfailsStop the build if we can't start the program. - Defaults to true. No
        newenvironmentDo not propagate old environment when new environment - variables are specified.No, default is falsefailifexecutionfailsStop the build if we can't start the program.No; defaults to true
        vmlauncherRun command using the Java VM's execution facilities - where available. If set to false the underlying OS's shell, - either directly or through the antRun scripts, will be used. - Under some operating systems, this gives access to facilities - not normally available through the VM including, under Windows, - being able to execute scripts, rather than their associated - interpreter. If you want to specify the name of the - executable as a relative path to the directory given by the - dir attribute, it may become necessary to set vmlauncher to - false as well.No, default is truenewenvironmentDo not propagate old environment when new environment variables are specified.No; default is false
        resolveexecutableWhen this attribute is true, the name of the executable - is resolved firstly against the project basedir and - if that does not exist, against the execution - directory if specified. On Unix systems, if you only - want to allow execution of commands in the user's path, - set this to false. since Ant 1.6No, default is falsevmlauncherRun command using the JVM's execution facilities where available. If set to false the + underlying OS's shell, either directly or through the antRun scripts, will be + used. Under some operating systems, this gives access to facilities not normally available + through JVM including, under Windows, being able to execute scripts, rather than their + associated interpreter. If you want to specify the name of the executable as a relative path + to the directory given by the dir attribute, it may become necessary to + set vmlauncher to false as well.No; default is true
        searchpathWhen this attribute is true, then - system path environment variables will - be searched when resolving the location - of the executable. since Ant 1.6.3No, default is falseresolveexecutableWhen this attribute is true, the name of the executable is resolved firstly against + the project basedir and if that does not exist, against the execution directory if + specified. On Unix systems, if you only want to allow execution of commands in the user's + path, set this to false. since Ant 1.6No; default is false
        searchpathWhen this attribute is true, then system path environment variables will be searched + when resolving the location of the executable. since Ant 1.6.3No; default is false

        Examples

        -
         <exec dir="${src}" executable="cmd.exe" os="Windows 2000" output="dir.txt">
           <arg line="/c dir"/>
         </exec>
        -
        +

        Parameters specified as nested elements

        arg

        -

        Command line arguments should be specified as nested -<arg> elements. See Command line arguments.

        -

        env

        -

        It is possible to specify environment variables to pass to the -system command via nested <env> elements.

        - - - - - - - - - - +

        Command line arguments should be specified as nested <arg> +elements. See Command line arguments.

        +

        env

        +

        It is possible to specify environment variables to pass to the system command via +nested <env> elements.

        +
        AttributeDescriptionRequired
        key - The name of the environment variable. -
        - Note: (Since Ant 1.7) - For windows, the name is case-insensitive. -
        Yes
        + + + + + + + + + - - - + + + - - + + - - + +
        AttributeDescriptionRequired
        keyThe name of the environment variable.
        Note: since Ant 1.7, for + Windows, the name is case-insensitive.
        Yes
        valueThe literal value for the environment variable.Exactly one of these.valueThe literal value for the environment variable.Exactly one of these
        pathThe value for a PATH like environment - variable. You can use ; or : as path separators and Ant will - convert it to the platform's local conventions.pathThe value for a PATH-like environment variable. You can + use ; or : as path separators and Ant will convert it to the platform's local + conventions.
        fileThe value for the environment variable. Will be - replaced by the absolute filename of the file by Ant.fileThe value for the environment variable. Will be replaced by the absolute + filename of the file by Ant.
        -

        redirector

        -Since Ant 1.6.2 -

        A nested I/O Redirector -can be specified. In general, the attributes of the redirector behave -as the corresponding attributes available at the task level. The most -notable peculiarity stems from the retention of the <exec> -attributes for backwards compatibility. Any file mapping is done -using a null sourcefile; therefore not all -Mapper types will return -results. When no results are returned, redirection specifications -will fall back to the task level attributes. In practice this means that -defaults can be specified for input, output, and error output files. -

        +

        redirector

        +Since Ant 1.6.2 +

        A nested I/O Redirector can be specified. In general, the +attributes of the redirector behave as the corresponding attributes available at the task level. +The most notable peculiarity stems from the retention of the <exec> attributes +for backwards compatibility. Any file mapping is done using a null sourcefile; +therefore not allMapper types will return results. When no +results are returned, redirection specifications will fall back to the task level attributes. In +practice this means that defaults can be specified for input, output, and error output files.

        Errors and return codes

        -By default the return code of a <exec> is ignored; when you set -failonerror="true" then any return code signaling failure -(OS specific) causes the build to fail. Alternatively, you can set -resultproperty to the name of a property and have it assigned to -the result code (barring immutability, of course). -

        -If the attempt to start the program fails with an OS dependent error code, -then <exec> halts the build unless failifexecutionfails -is set to false. You can use that to run a program if it exists, but -otherwise do nothing. -

        -What do those error codes mean? Well, they are OS dependent. On Windows -boxes you have to look at - -the documentation; error code 2 means 'no such program', which usually means -it is not on the path. Any time you see such an error from any Ant task, it is -usually not an Ant bug, but some configuration problem on your machine. +

        By default the return code of a <exec> is ignored; when you +set failonerror to true then any return code signaling failure (OS specific) +causes the build to fail. Alternatively, you can set resultproperty to the name of a +property and have it assigned to the result code (barring immutability, of course).

        +

        If the attempt to start the program fails with an OS dependent error code, +then <exec> halts the build unless failifexecutionfails is set +to false. You can use that to run a program if it exists, but otherwise do nothing.

        +

        What do those error codes mean? Well, they are OS dependent. On Windows boxes you have to look +at the documentation; error=2 means 'no such program', which usually +means it is not on the path. Any time you see such an error from any Ant task, it is usually not an +Ant bug, but some configuration problem on your machine.

        Examples

        -
        +
         <exec executable="emacs">
           <env key="DISPLAY" value=":1.0"/>
         </exec>
        -
        +

        starts emacs on display 1 of the X Window System.

        -
        +
         <property environment="env"/>
         <exec ... >
           <env key="PATH" path="${env.PATH}:${basedir}/bin"/>
         </exec>
        -
        -

        adds ${basedir}/bin to the PATH of the -system command.

        + +

        adds ${basedir}/bin to the PATH of the system command.

        -
        +
         <property name="browser" location="C:/Program Files/Internet Explorer/iexplore.exe"/>
         <property name="file" location="ant/docs/manual/index.html"/>
         
         <exec executable="${browser}" spawn="true">
             <arg value="${file}"/>
         </exec>
        -
        -

        Starts the ${browser} with the specified ${file} and end the -Ant process. The browser will remain.

        + +

        Starts the ${browser} with the specified ${file} and end the Ant +process. The browser will remain.

        -
        +
         <exec executable="cat">
             <redirector outputproperty="redirector.out"
                         errorproperty="redirector.err"
        @@ -439,27 +368,19 @@
                 <errormapper type="merge" to="redirector.err"/>
             </redirector>
         </exec>
        -
        - -Sends the string "blah before blah" to the "cat" executable, -using an <inputfilterchain> -to replace "before" with "after" on the way in. -Output is sent to the file "redirector.out" and stored -in a property of the same name. Similarly, error output is sent to -a file and a property, both named "redirector.err". - - -

        Note: do not try to specify arguments using -a simple arg-element and separate them by spaces. This results in -only a single argument containing the entire string.

        -

        -Timeouts: If a timeout is specified, when it is reached the -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 -failonerror=true, but be ignored otherwise. - - + +

        Sends the string blah before blah to the cat executable, using +an <inputfilterchain> to replace before +with after on the way in. Output is sent to the file redirector.out and stored +in a property of the same name. Similarly, error output is sent to a file and a property, both +named redirector.err.

        + +

        Note: do not try to specify arguments using a simple arg-element +and separate them by spaces. This results in only a single argument containing the entire +string.

        +

        Timeouts: If a timeout is specified, when it is reached the 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 failonerror=true, but be ignored otherwise.

        - diff -Nru ant-1.9.10/manual/Tasks/fail.html ant-1.10.3/manual/Tasks/fail.html --- ant-1.9.10/manual/Tasks/fail.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/fail.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,105 +24,97 @@ -

        Fail

        +

        Fail

        Description

        -

        Exits the current build (just throwing a BuildException), optionally printing additional information.

        -

        The message of the Exception can be set via the message attribute -or character data nested into the element.

        +

        Exits the current build (just throwing a BuildException), optionally printing additional +information.

        +

        The message of the Exception can be set via the message attribute or character data nested into +the element.

        Parameters

        - +
        - - - + + + - - - + + + - - + - + - - + - + - - + - +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        messageA message giving further information on why the build exitedNomessageA message giving further information on why the build exitedNo
        ifOnly fail if a property of the given name exists + ifOnly fail if a property of the given name exists in the current projectNoNo
        unlessOnly fail if a property of the given name doesn't + unlessOnly fail if a property of the given name doesn't exist in the current projectNoNo
        statusExit using the specified status code; - assuming the generated Exception is not caught, the + statusExit using the specified status code; assuming the generated Exception is not caught, the JVM will exit with this status. Since Apache Ant 1.6.2NoNo

        Parameters specified as nested elements

        -

        As an alternative to the if/unless attributes, - conditional failure can be achieved using a single nested - <condition> element, which should contain exactly one - core or custom condition. For information about conditions, see - here.
        Since Ant 1.6.2 +

        As an alternative to the if/unless attributes, conditional failure can be +achieved using a single nested <condition> element, which should contain exactly +one core or custom condition. For information about conditions, +see here.
        Since Ant 1.6.2

        Examples

        -
          <fail/>
        +
        <fail/>

        will exit the current build with no further information given.

        -
        +
         BUILD FAILED
         
        -build.xml:4: No message
        -
        +build.xml:4: No message
        -
          <fail message="Something wrong here."/>
        -

        will exit the current build and print something - like the following to wherever your output goes: -

        -
        +
        <fail message="Something wrong here."/>
        +

        will exit the current build and print something like the following to wherever your output +goes:

        +
         BUILD FAILED
         
        -build.xml:4: Something wrong here.
        -
        +build.xml:4: Something wrong here.
        -
          <fail>Something wrong here.</fail>
        +
        <fail>Something wrong here.</fail>

        will give the same result as above.

        -
          <fail unless="thisdoesnotexist"/>
        -

        will exit the current build and print something - like the following to wherever your output goes: -

        -
        +
        <fail unless="thisdoesnotexist"/>
        +

        will exit the current build and print something like the following to wherever your output +goes:

        +
         BUILD FAILED
         
        -build.xml:2: unless=thisdoesnotexist
        -
        +build.xml:2: unless=thisdoesnotexist
        Using a condition to achieve the same effect:
        -  <fail>
        -     <condition>
        -       <not>
        -         <isset property="thisdoesnotexist"/>
        -       </not>
        -     </condition>
        -   </fail>
        -
        +<fail> + <condition> + <not> + <isset property="thisdoesnotexist"/> + </not> + </condition> +</fail>

        Output:

        -
        +
         BUILD FAILED
         
        -build.xml:2: condition satisfied
        -
        +build.xml:2: condition satisfied
         <fail message="Files are missing.">
        @@ -133,11 +125,9 @@
                     </resourcecount>
                 </not>
             </condition>
        -</fail>
        -
        -

        Will check that both files one.txt and two.txt are present otherwise the build -will fail.

        +</fail> +

        Will check that both files one.txt and two.txt are present otherwise +the build will fail.

        - diff -Nru ant-1.9.10/manual/Tasks/filter.html ant-1.10.3/manual/Tasks/filter.html --- ant-1.9.10/manual/Tasks/filter.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/filter.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,56 +24,50 @@ -

        Filter

        +

        Filter

        Description

        -

        Sets a token filter for this project or read multiple token filter from -an input file and sets these as filters. -Token filters are used by all tasks that perform file copying operations -through the Project commodity methods. See the warning -here before using.

        -

        Note 1: the token string must not contain the separators chars (@).
        -Note 2: Either token and value attributes must be provided, or only the -filtersfile attribute.

        +

        Sets a token filter for this project or reads a properties file as multiple token filter +definitions and sets them. Token filters are used by all tasks that perform file copying operations +through the Project commodity methods. See the +warning here before using.

        +

        The task uses @ as token separator. Token strings cannot contain separator characters; +incorrect tokens are ignored.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + - - - + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        tokenthe token string without @Yes*tokenthe token string without the separator chars (@)Yes; either both token and value, or + only filtersfile
        valuethe string that should be put to replace the token when the - file is copiedYes*valuethe string that should be put to replace the token when the file is copied
        filtersfileThe file from which the filters must be read. This file must be a formatted as a property file. Yes*filtersfileThe file from which the filters must be read. This file must be a formatted as + a property file.
        -

        * see notes 1 and 2 above parameters table.

        Examples

        -
          <filter token="year" value="2000"/>
        -  <copy todir="${dest.dir}" filtering="true">
        -    <fileset dir="${src.dir}"/>
        -  </copy>
        -

        will copy recursively all the files from the src.dir directory into -the dest.dir directory replacing all the occurrences of the string @year@ -with 2000.

        -
          <filter filtersfile="deploy_env.properties"/>
        -will read all property entries from the deploy_env.properties file -and set these as filters. - - +
        +<filter token="year" value="2000"/>
        +<copy todir="${dest.dir}" filtering="true">
        +  <fileset dir="${src.dir}"/>
        +</copy>
        +

        will copy recursively all the files from the src.dir directory into +the dest.dir directory replacing all the occurrences of the string @year@ +with 2000.

        +
        <filter filtersfile="deploy_env.properties"/>
        +

        will read all property entries from the deploy_env.properties file and set these as +filters.

        - diff -Nru ant-1.9.10/manual/Tasks/fixcrlf.html ant-1.10.3/manual/Tasks/fixcrlf.html --- ant-1.9.10/manual/Tasks/fixcrlf.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/fixcrlf.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,304 +24,222 @@ -

        FixCRLF

        +

        FixCRLF

        Description

        -

        - Adjusts a text file to local conventions. -

        +

        Adjusts a text file to local conventions.

        -

        - The set of files to be adjusted can be refined with the - includes, includesfile, excludes, - excludesfile and defaultexcludes - attributes. Patterns provided through the includes or - includesfile attributes specify files to be - included. Patterns provided through the exclude or - excludesfile attribute specify files to be - excluded. Additionally, default exclusions can be specified with - the defaultexcludes attribute. See the section on directory-based - tasks, for details of file inclusion/exclusion patterns - and their usage. -

        +

        The set of files to be adjusted can be refined with + the includes, includesfile, excludes, excludesfile + and defaultexcludes attributes. Patterns provided through the includes + or includesfile attributes specify files to be included. Patterns provided through + the exclude or excludesfile attribute specify files to be + excluded. Additionally, default exclusions can be specified with the defaultexcludes + attribute. See the section on directory-based + tasks, for details of file inclusion/exclusion patterns and their usage.

        + +

        This task forms an implicit FileSet and supports most + attributes of <fileset> (dir becomes srcdir) as well as + the nested <include>, <exclude> + and <patternset> elements.

        + +

        The output file is only written if it is a new file, or if it differs from the existing file. + This prevents spurious rebuilds based on unchanged files which have been regenerated by this + task.

        -

        - This task forms an implicit - FileSet and - supports most attributes of <fileset> - (dir becomes srcdir) as well as the nested - <include>, <exclude> and - <patternset> elements. -

        - -

        - The output file is only written if it is a new file, or if it - differs from the existing file. This prevents spurious - rebuilds based on unchanged files which have been regenerated - by this task. -

        - -

        - Since Apache Ant 1.7, this task can be used in a - filterchain. -

        +

        Since Apache Ant 1.7, this task can be used in + a filterchain.

        Parameters

        - +
        - - - + + + - - + + - - - - + + + + - - - + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - + - + - - + - + - - - + + + - - + - + - - - + + + - - + - + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        As TaskAs FilterAs TaskAs Filter
        srcDirWhere to find the files to be fixed up.One of these srcDirWhere to find the files to be fixed up.One of theseN/A
        fileName of a single file to fix. Since Ant 1.7 fileName of a single file to fix. Since Ant 1.7
        destDirWhere to place the corrected files. Defaults to - srcDir (replacing the original file).No destDirWhere to place the corrected files.No; defaults to srcDir (replace the original files)
        includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.No includescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
        includesfilethe name of a file. Each line of this file is - taken to be an include pattern.No includesfilename of a file. Each line of this file is taken to be an include pattern.No
        excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.No excludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes + is no
        excludesfilethe name of a file. Each line of this file is - taken to be an exclude pattern.No excludesfilename of a file. Each line of this file is taken to be an exclude pattern.No
        defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted. - No defaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
        encodingThe encoding of the files.No; defaults to default JVM encoding. encodingThe encoding of the files.No; defaults to default JVM character encoding
        outputencodingThe encoding to use when writing the files. - Since Ant 1.7No; defaults to the value of the encoding attribute. outputencodingThe encoding to use when writing the files. Since Ant 1.7No; defaults to encoding if set or default JVM character encoding + otherwise
        preservelastmodifiedWhether to preserve the last modified - date of source files. Since Ant 1.6.3No; default is false preservelastmodifiedWhether to preserve the last modified date of source files. Since Ant 1.6.3No; default is false
        eol - Specifies how end-of-line (EOL) characters are to be - handled. The EOL characters are CR, LF and the pair CRLF. - Valid values for this property are: + eolSpecifies how end-of-line (EOL) characters are to be handled. The EOL characters are CR, LF + and the pair CRLF. Valid values for this property are:
          -
        • asis: leave EOL characters alone
        • -
        • cr: convert all EOLs to a single CR
        • -
        • lf: convert all EOLs to a single LF
        • -
        • crlf: convert all EOLs to the pair CRLF
        • -
        • mac: convert all EOLs to a single CR
        • -
        • unix: convert all EOLs to a single LF
        • -
        • dos: convert all EOLs to the pair CRLF
        • +
        • asis: leave EOL characters alone
        • +
        • cr: convert all EOLs to a single CR
        • +
        • lf: convert all EOLs to a single LF
        • +
        • crlf: convert all EOLs to the pair CRLF
        • +
        • mac: convert all EOLs to a single CR
        • +
        • unix: convert all EOLs to a single LF
        • +
        • dos: convert all EOLs to the pair CRLF
        - Default is based on the platform on which you are running this task. - For Unix platforms (including Mac OS X), the default is "lf". - For DOS-based systems (including Windows), the default is - "crlf". - For Mac environments other than OS X, the default is "cr". -

        - This is the preferred method for specifying EOL. The - "cr" attribute (see below) is - now deprecated. -

        -

        - N.B.: One special case is recognized. The three - characters CR-CR-LF are regarded as a single EOL. - Unless this property is specified as "asis", - this sequence will be converted into the specified EOL - type. -

        +

        This is the preferred method for specifying EOL. The cr attribute (see below) + is now deprecated.

        +

        Note: One special case is recognized. The three characters CR-CR-LF are + regarded as a single EOL. Unless this property is specified as asis, this sequence + will be converted into the specified EOL type.

        NoNo; default is platform-specific: lf for Unix platforms (including Mac OS + X/macOS), crlf for DOS-based systems (including Windows), cr for Mac environments + other than OS X
        cr - Deprecated. Specifies how CR characters are - to be handled at end-of-line (EOL). Valid values for this - property are: + crDeprecated. Specifies how CR characters are to be handled at end-of-line + (EOL). Valid values for this property are:
          -
        • asis: leave EOL characters alone.
        • -
        • - add: add a CR before any single LF characters. The - intent is to convert all EOLs to the pair CRLF. -
        • -
        • - remove: remove all CRs from the file. The intent is - to convert all EOLs to a single LF. -
        • +
        • asis: leave EOL characters alone.
        • +
        • add: add a CR before any single LF characters. The intent is to convert all EOLs + to the pair CRLF.
        • +
        • remove: remove all CRs from the file. The intent is to convert all EOLs to a + single LF.
        - Default is based on the platform on which you are running - this task. For Unix platforms, the default is "remove". - For DOS based systems (including Windows), the default is - "add". -

        - N.B.: One special case is recognized. The three - characters CR-CR-LF are regarded as a single EOL. - Unless this property is specified as "asis", - this sequence will be converted into the specified EOL - type. -

        +

        Note: One special case is recognized. The three characters CR-CR-LF are + regarded as a single EOL. Unless this property is specified as asis, this sequence + will be converted into the specified EOL type.

        NoNo; default is platform-specific: remove for Unix platforms, add + for DOS based systems (including Windows)
        javafiles - Used only in association with the - "tab" attribute (see below), this - boolean attribute indicates whether the fileset is a set - of java source files - ("yes"/"no"). Defaults to - "no". See notes in section on "tab". - NojavafilesUsed only in association with the tab attribute (see below), this boolean + attribute indicates whether the fileset is a set of Java source files (yes|no). See + notes in section on tab.No; defaults to no
        tabSpecifies how tab characters are to be handled. Valid - values for this property are: + tabSpecifies how tab characters are to be handled. Valid values for this property are:
          -
        • add: convert sequences of spaces which span a tab stop to tabs
        • -
        • asis: leave tab and space characters alone
        • -
        • remove: convert tabs to spaces
        • +
        • add: convert sequences of spaces which span a tab stop to tabs
        • +
        • asis: leave tab and space characters alone
        • +
        • remove: convert tabs to spaces
        - Default for this parameter is "asis". -

        - N.B.: When the attribute - "javafiles" (see above) is - "true", literal TAB characters occurring - within Java string or character constants are never - modified. This functionality also requires the - recognition of Java-style comments. -

        -

        - N.B.: There is an incompatibility between this - and the previous version in the handling of white - space at the end of lines. This version does - not remove trailing whitespace on lines. -

        +

        Note: When the attribute javafiles (see above) is true, + literal TAB characters occurring within Java string or character constants are never + modified. This functionality also requires the recognition of Java-style comments.

        +

        Note: There is an incompatibility between this and the previous version in + the handling of white space at the end of lines. This version + does not remove trailing whitespace on lines.

        NoNo; default is asis
        tablengthTAB character interval. Valid values are between - 2 and 80 inclusive. The default for this parameter is 8.NotablengthTAB character interval. Valid values are between 2 and 80 inclusive.No; default is 8
        eofSpecifies how DOS end of file (control-Z) characters are - to be handled. Valid values for this property are: + eofSpecifies how DOS end of file (control-Z) characters are to be handled. Valid values for + this property are:
          -
        • add: ensure that there is an EOF character at the end of the file
        • -
        • asis: leave EOF characters alone
        • -
        • remove: remove any EOF character found at the end
        • +
        • add: ensure that there is an EOF character at the end of the file
        • +
        • asis: leave EOF characters alone
        • +
        • remove: remove any EOF character found at the end
        - Default is based on the platform on which you are running this task. - For Unix platforms, the default is remove. For DOS based systems - (including Windows), the default is asis. -
        NoNo; default is platform-specific: remove for Unix platforms, asis + for DOS based systems (including Windows)
        fixlastWhether to add a missing EOL to the last line - of a processed file.
        Ignored if EOL is asis.
        Since Ant 1.6.1
        No; default is truefixlastWhether to add a missing EOL to the last line of a processed file.
        Ignored + if eof is asis.
        Since Ant 1.6.1
        No; default is true

        Examples

        -
        <fixcrlf srcdir="${src}" includes="**/*.sh"
        -         eol="lf" eof="remove" />
        -

        Replaces EOLs with LF characters and removes eof characters from - the shell scripts. Tabs and spaces are left as is.

        -
        <fixcrlf srcdir="${src}"
        -         includes="**/*.bat" eol="crlf" />
        -

        Replaces all EOLs with cr-lf pairs in the batch files. - Tabs and spaces are left as is. - EOF characters are left alone if run on - DOS systems, and are removed if run on Unix systems.

        -
        <fixcrlf srcdir="${src}"
        -         includes="**/Makefile" tab="add" />
        -

        Sets EOLs according to local OS conventions, and - converts sequences of spaces and tabs to the minimal set of spaces and - tabs which will maintain spacing within the line. Tabs are - set at 8 character intervals. EOF characters are left alone if - run on DOS systems, and are removed if run on Unix systems. - Many versions of make require tabs prior to commands.

        -
        <fixcrlf srcdir="${src}" includes="**/*.java"
        +
        +<fixcrlf srcdir="${src}" includes="**/*.sh"
        +         eol="lf" eof="remove"/>
        +

        Replaces EOLs with LF characters and removes eof characters from the shell scripts. Tabs and +spaces are left as is.

        +
        +<fixcrlf srcdir="${src}"
        +         includes="**/*.bat" eol="crlf"/>
        +

        Replaces all EOLs with cr-lf pairs in the batch files. Tabs and spaces are left as is. EOF +characters are left alone if run on DOS systems, and are removed if run on Unix systems.

        +
        +<fixcrlf srcdir="${src}"
        +         includes="**/Makefile" tab="add"/>
        +

        Sets EOLs according to local OS conventions, and converts sequences of spaces and tabs to the +minimal set of spaces and tabs which will maintain spacing within the line. Tabs are set at 8 +character intervals. EOF characters are left alone if run on DOS systems, and are removed if run on +Unix systems. Many versions of make require tabs prior to commands.

        +
        +<fixcrlf srcdir="${src}" includes="**/*.java"
                  tab="remove" tablength="3"
        -         eol="lf" javafiles="yes" />
        -

        - Converts all EOLs in the included java source files to a - single LF. Replace all TAB characters except those in string - or character constants with spaces, assuming a tab width of 3. - If run on a unix system, any CTRL-Z EOF characters at the end - of the file are removed. On DOS/Windows, any such EOF - characters will be left untouched. + eol="lf" javafiles="yes"/>

        +

        Converts all EOLs in the included Java source files to a single LF. Replace all TAB characters +except those in string or character constants with spaces, assuming a tab width of 3. If run on a +Unix system, any CTRL-Z EOF characters at the end of the file are removed. On DOS/Windows, any such +EOF characters will be left untouched.

        -
        <fixcrlf srcdir="${src}"
        -         includes="**/README*" tab="remove" />
        -

        Sets EOLs according to local OS conventions, and - converts all tabs to spaces, assuming a tab width of 8. - 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 READMEs.

        - +
        +<fixcrlf srcdir="${src}"
        +         includes="**/README*" tab="remove"/>
        +

        Sets EOLs according to local OS conventions, and converts all tabs to spaces, assuming a tab +width of 8. 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 READMEs.

        diff -Nru ant-1.9.10/manual/Tasks/ftp.html ant-1.10.3/manual/Tasks/ftp.html --- ant-1.9.10/manual/Tasks/ftp.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/ftp.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,701 +24,576 @@ -

        FTP

        +

        FTP

        Description

        -

        The ftp task implements a basic FTP client that can send, receive, -list, delete files, and create directories. See below for descriptions and examples of how -to perform each task.

        -

        Note: This task depends on external libraries not included in the Apache Ant distribution. -See Library Dependencies for more information. -Get the latest version of this library, for the best support in Ant - -

        -

        The ftp task attempts to determine what file system is in place on the FTP server. -Supported server types are Unix, NT, OS2, VMS, and OS400. In addition, NT and OS400 servers -which have been configured to display the directory in Unix style are also supported correctly. -Otherwise, the system will default to Unix standards. -remotedir must be specified in the exact syntax required by the ftp -server. If the usual Unix conventions are not supported by the server, -separator can be used to set the file separator that should be used -instead.

        -

        See the section on directory based -tasks, on how the inclusion/exclusion of files works, and how to -write patterns.

        -

        -This task does not currently use the proxy information set by the -<setproxy> task, and cannot go through -a firewall via socks. -

        -Warning: there have been problems reported concerning the ftp get with the newer attribute. -Problems might be due to format of ls -l differing from what is expected by commons-net, -for instance due to specificities of language used by the ftp server in the directory listing. -If you encounter such a problem, please send an email including a sample directory listing -coming from your ftp server (ls -l on the ftp prompt). -

        -

        -If you can connect but not upload or download, try setting the passive -attribute to true to use the existing (open) channel, instead of having the server -try to set up a new connection.

        +

        The ftp task implements a basic FTP client that can send, receive, list, delete +files, and create directories. See below for descriptions and examples of how to perform each +task.

        +

        Note: This task depends on external libraries not included in the Apache Ant +distribution. See Library Dependencies for more +information. Get the latest version of this library, for the best support in Ant.

        +

        The ftp task attempts to determine what file system is in place on the FTP server. +Supported server types are Unix, NT, OS2, VMS, and OS400. In addition, NT and OS400 servers which +have been configured to display the directory in Unix style are also supported correctly. +Otherwise, the system will default to Unix standards. remotedir must be specified in the +exact syntax required by the FTP server. If the usual Unix conventions are not supported by the +server, separator can be used to set the file separator that should be used instead.

        +

        See the section on directory based tasks, on +how the inclusion/exclusion of files works, and how to write patterns.

        +

        This task does not currently use the proxy information set by +the <setproxy> task, and cannot go through a firewall +via socks.

        +

        Warning: there have been problems reported concerning +the ftp get with the newer attribute. Problems might be due to +format of ls -l differing from what is expected by commons-net, for instance due to +specifics of language used by the FTP server in the directory listing. If you encounter such a +problem, please send an email including a sample directory listing coming from your FTP server +(ls -l on the FTP prompt).

        +

        If you can connect but not upload or download, try setting the passive attribute +to true to use the existing (open) channel, instead of having the server try to set up a new +connection.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - + + + - - - + + - - - + + + - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - +

        If none of these is specified, the default mechanism of letting the system auto-detect the + server OS type based on the FTP SYST command and assuming standard formatting + for that OS type will be used.

        +

        To aid in property-file-based development where a build script is configured with property + files, for any of these attributes, a value of is equivalent to not specifying it.

        +

        Please understand that these options are incompatible with the autodetection scheme. If + any of these options is specified, (other than with a value of ) a system type must be + chosen and if systemTypeKey is not specified, UNIX will be assumed. The philosophy + behind this is that these options are for setting non-standard formats, and a build-script + author who knows what system he is dealing with will know what options to need to be + set. Otherwise, these options should be left alone and the default autodetection scheme can be + used and will work in the majority of cases.

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + - - + - + the serverLanguageCode attribute.
        Since Ant 1.7 +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        serverthe address of the remote ftp server.Yesserverthe address of the remote FTP server.Yes
        portthe port number of the remote ftp server. - Defaults to port 21.Noportthe port number of the remote FTP server.No; defaults to 21
        useridthe login id to use on the ftp server.Yesuseridthe login id to use on the FTP server.Yes
        passwordthe login password to use on the ftp server.Yespasswordthe login password to use on the FTP server.Yes
        accountthe account to use on the ftp server. - since Ant 1.7. - Noaccountthe account to use on the FTP server. + since Ant 1.7.No
        remotedirremote directory on the - ftp server - see table below for detailed usage - Noremotedirremote directory on the FTP server see table below for detailed usageNo
        actionthe ftp action to perform, defaulting to "send". - Currently supports "put", "get", - "del", "list", "chmod", - "mkdir", "rmdir", and "site".NoactionFTP action to perform. Currently + supports put, get, del, list, chmod, mkdir, rmdir, + and site.No; defaults to send
        binaryselects binary-mode ("yes") or text-mode - ("no") transfers. - Defaults to "yes"Nobinaryselects binary-mode (yes) or text-mode (no) transfers.No; defaults to yes
        passiveselects passive-mode ("yes") transfers, for - better through-firewall connectivity, at the price - of performance. - Defaults to "no"Nopassiveselects passive-mode (yes) transfers, for better through-firewall connectivity, at + the price of performance.No; defaults to no
        verbosedisplays information on each file transferred if set - to "yes". Defaults to "no".Noverbosedisplays information on each file transferred if set to yes.No; defaults to no
        dependstransfers only new or changed files if set to - "yes". Defaults to "no".Nodependstransfers only new or changed files if set to yes.No; defaults to no
        newera synonym for depends. - see timediffauto and timediffmillisNonewera synonym for depends. See timediffauto + and timediffmillisNo
        timediffautoset to "true" - to make ant calculate the time difference between client and server.
        - requires write access in the remote directory
        - Since ant 1.6
        Notimediffautoset to true to make Ant calculate the time difference between client and + server.
        requires write access in the remote directory
        Since Ant + 1.6
        No
        timestampGranularitySpecify either MINUTE, NONE, - (or you may specify "" which is equivalent to not specifying a value, - useful for property-file driven scripts). Allows override of the typical situation - in PUT and GET where local filesystem timestamps are HH:mm:ss - and the typical FTP server's timestamps are HH:mm. This can throw - off uptodate calculations. However, the default values should suffice for most - applications.
        - Since ant 1.7 -
        No. Only applies in "puts" and "gets" where the - default values are MINUTE for PUT and NONE for GET. - (It is not as necessary in GET because we have the preservelastmodified option.)
        timestampGranularitySpecify either MINUTE or NONE (you may specify which is equivalent to + not specifying a value, useful for property-file driven scripts). Allows override of the + typical situation in put and get where local filesystem timestamps + are HH:mm:ss and the typical FTP server's timestamps are HH:mm. + This can throw off uptodate calculations. However, the default values should + suffice for most applications.
        Since Ant 1.7
        No; only applies for put (default is MINUTE) and get (default + is NONE; not as necessary because we have the preservelastmodified + option)
        timediffmillisDeprecated. Number of milliseconds to add to the time on - the remote machine to get the time on the local machine. The timestampGranularity - attribute (for which the default values should suffice in most situations), and the - serverTimeZoneConfig option, should make this unnecessary. - serverTimeZoneConfig does the math for you and also knows about - Daylight Savings Time.
        - Since ant 1.6 -
        NotimediffmillisDeprecated. Number of milliseconds to add to the time on the remote machine + to get the time on the local machine. The timestampGranularity attribute (for + which the default values should suffice in most situations), and + the serverTimeZoneConfig option, should make this + unnecessary. serverTimeZoneConfig does the math for you and also knows about + Daylight Savings Time.
        Since Ant 1.6
        No
        separatorsets the file separator used on the ftp server. - Defaults to "/".Noseparatorsets the file separator used on the FTP server.No; defaults to /
        umasksets the default file permissions for new files, - unix only.Noumasksets the default file permissions for new files, Unix only.No
        chmodsets or changes file permissions for new or existing files, - unix only. If used with a put action, chmod will be issued for each file.Nochmodsets or changes file permissions for new or existing files, Unix only. If used with + a put action, chmod will be issued for each file.No
        listingthe file to write results of the "list" action. - Required for the "list" action, ignored otherwise.Nolistingthe file to write results of the list action.Yes, for the list action; ignored otherwise
        ignoreNoncriticalErrorsflag which permits the task to ignore some non-fatal error - codes sent by some servers during directory creation: wu-ftp in particular. - Default: falseNoignoreNoncriticalErrorsflag which permits the task to ignore some non-fatal error codes sent by some servers during + directory creation: wu-ftp in particular.No; defaults to false
        skipFailedTransfersflag which enables unsuccessful file put, delete - and get operations to be skipped with a warning and the - remainder of the files still transferred. Default: falseNo
        preservelastmodifiedGive the copied files the same last modified - time as the original source files (applies to getting files only). - (Note: Ignored on Java 1.1)No; defaults to false.skipFailedTransfersflag which enables unsuccessful file put, delete and get operations to + be skipped with a warning and the remainder of the files still transferred.No; default to false
        retriesAllowedSet the number of retries allowed on an file-transfer operation. - If a number > 0 specified, each file transfer can fail up to that - many times before the operation is failed. If -1 or "forever" specified, the - operation will keep trying until it succeeds.No; defaults to 0preservelastmodifiedGive the copied files the same last modified time as the original source files (applies to + getting files only). (Note: Ignored on Java 1.1)No; defaults to false
        siteCommandSet the server-specific SITE command to execute if - the action attribute has been specified as "site". - NoretriesAllowedSet the number of retries allowed on an file-transfer operation. If a positive number is + specified, each file transfer can fail up to that many times before the operation is failed. + If -1 or forever specified, the operation will keep trying until it + succeeds.No; defaults to 0
        initialSiteCommandSet a server-specific SITE command to execute immediately - after login.NositeCommandSet the server-specific SITE command to execute if the action + attribute has been specified as site. + No
        enableRemoteVerificationWhether data connection should be verified to - connect to the same host as the control connection. This is a - security measure that is enabled by default, but it may be useful - to disable it in certain firewall scenarios. - since Ant 1.8.0No, default is trueinitialSiteCommandSet a server-specific SITE command to execute immediately after login.No
        -

        The following attributes require - jakarta-commons-net-1.4.0 or greater.

        -

        - Use these options when the standard options don't work, because -

        • the server is in a different timezone and you need timestamp - dependency checking
        • -
        • the default timestamp formatting doesn't match the server display and - list parsing therefore fails
        -

        - If none of these is specified, the default mechanism of letting the system - auto-detect the server OS type based on the FTP SYST command and assuming - standard formatting for that OS type will be used. -

        - To aid in property-file-based development where a build script is configured - with property files, for any of these attributes, a value of "" - is equivalent to not specifying it. -

        - Please understand that these options are incompatible with the autodetection - scheme. If any of these options is specified, (other than with a value of - "" ) a system type must be chosen and if systemTypeKey is not - specified, UNIX will be assumed. The philosophy behind this is that these - options are for setting non-standard formats, and a build-script author who - knows what system he is dealing with will know what options to need to be - set. Otherwise, these options should be left alone and the default - autodetection scheme can be used and will work in the majority of cases. -

        systemTypeKeySpecifies the type of system in use on the server. - Supported values are "UNIX", "VMS", "WINDOWS", "OS/2", "OS/400", - "MVS". If not specified, (or specified as "") and if - no other xxxConfig attributes are specified, the autodetection mechanism - based on the FTP SYST command will be used.
        - Since ant 1.7 -
        No, but if any of the following xxxConfig - attributes is specified, UNIX will be assumed, even if "" - is specified here. -
        serverTimeZoneConfigSpecify as a Java - - TimeZone identifier, (e.g. GMT, America/Chicago or - Asia/Jakarta) the timezone used by the server for timestamps. This - enables timestamp dependency checking even when the server is in a different - time zone from the client. Time Zones know, also, about daylight savings time, - and do not require you to calculate milliseconds of difference. If not specified, - (or specified as ""), the time zone of the client is assumed.
        - Since ant 1.7 -
        NoenableRemoteVerificationWhether data connection should be verified to connect to the same host as the control + connection. This is a security measure that is enabled by default, but it may be useful to + disable it in certain firewall scenarios. since Ant 1.8.0No; default is true
        defaultDateFormatConfigSpecify in Java - - SimpleDateFormat notation, (e.g. - yyyy-MM-dd), the date format generally used by the FTP server - to parse dates. In some cases this will be the only date format used. - In others, (unix for example) this will be used for dates - older than a year old. (See recentDateFormatConfig). If not specified, - (or specified as ""), the default date format for the system - type indicated by the systemTypeKey attribute will be used.
        - Since ant 1.7 -
        - No. -
        recentDateFormatConfigSpecify in Java - - SimpleDateFormat notation, - (e.g. MMM dd hh:mm) the date format used by the FTP server - to parse dates less than a year old. If not specified (or specified as - ""), and if the system type indicated by the system key uses - a recent date format, its standard format will be used.
        - Since ant 1.7 -
        No
        serverLanguageCodeConfiga - two-letter ISO-639 language code used to specify the - language used by the server to format month names. This only needs to be - specified when the server uses non-numeric abbreviations for months in its - date listings in a language other than English. This appears to be - becoming rarer and rarer, as commonly distributed ftp servers seem - increasingly to use English or all-numeric formats. - Languages supported are: + +

        The following attributes + require jakarta-commons-net-1.4.0 or greater.

        +

        Use these options when the standard options don't work, because

          -
        • en - English
        • -
        • fr - French
        • -
        • de - German
        • -
        • it - Italian
        • -
        • es - Spanish
        • -
        • pt - Portuguese
        • -
        • da - Danish
        • -
        • sv - Swedish
        • -
        • no - Norwegian
        • -
        • nl - Dutch
        • -
        • ro - Romanian
        • -
        • sq - Albanian
        • -
        • sh - Serbo-croatian
        • -
        • sk - Slovak
        • -
        • sl - Slovenian
        • +
        • the server is in a different timezone and you need timestamp dependency checking
        • +
        • the default timestamp formatting doesn't match the server display and list parsing + therefore fails
        - If you require a language other than the above, see also the - shortMonthNamesConfig attribute.
        - Since ant 1.7 -
        No
        systemTypeKeySpecifies the type of system in use on the server. Supported values + are UNIX, VMS, WINDOWS, OS/2, OS/400, MVS. If not + specified, (or specified as ) and if no other xxxConfig attributes are + specified, the autodetection mechanism based on the FTP SYST command will be + used.
        Since Ant 1.7
        No, but if any of the following xxxConfig attributes is specified, UNIX will be + assumed, even if is specified here. +
        serverTimeZoneConfigSpecify as a + Java TimeZone identifier, (e.g. GMT, America/Chicago + or Asia/Jakarta) the timezone used by the server for timestamps. This enables + timestamp dependency checking even when the server is in a different time zone from the + client. Time Zones know, also, about daylight savings time, and do not require you to + calculate milliseconds of difference. If not specified, (or specified as ), the time + zone of the client is assumed.
        Since Ant 1.7
        No
        defaultDateFormatConfigSpecify in + Java SimpleDateFormat notation, (e.g. yyyy-MM-dd), the date format + generally used by the FTP server to parse dates. In some cases this will be the only date + format used. In others, (unix for example) this will be used for dates older than a + year old. (See recentDateFormatConfig). When specified as , default value + will be used.
        Since Ant 1.7
        No; defaults to default date format for the system type indicated + by systemTypeKey
        recentDateFormatConfigSpecify in + Java SimpleDateFormat notation, (e.g. MMM dd hh:mm) the date format used + by the FTP server to parse dates less than a year old. If not specified (or specified + as ), and if the system type indicated by the systemTypeKey uses a recent + date format, its standard format will be used.
        Since Ant 1.7
        No
        serverLanguageCodeConfiga two-letter + ISO-639 language code used to specify the language used by the server to format month + names. This only needs to be specified when the server uses non-numeric abbreviations for + months in its date listings in a language other than English. This appears to be becoming + rarer and rarer, as commonly distributed FTP servers seem increasingly to use English or + all-numeric formats. Languages supported are: +
          +
        • en—English
        • +
        • fr—French
        • +
        • de—German
        • +
        • it—Italian
        • +
        • es—Spanish
        • +
        • pt—Portuguese
        • +
        • da—Danish
        • +
        • sv—Swedish
        • +
        • no—Norwegian
        • +
        • nl—Dutch
        • +
        • ro—Romanian
        • +
        • sq—Albanian
        • +
        • sh—Serbo-Croatian
        • +
        • sk—Slovak
        • +
        • sl—Slovenian
        • +
        + If you require a language other than the above, see also the shortMonthNamesConfig + attribute.
        Since Ant 1.7
        No
        shortMonthNamesConfigspecify the month abbreviations used on the server in file - timestamp dates as a pipe-delimited string for each month. For example, - a set of month names used by a hypothetical - Icelandic FTP server might conceivably be specified as - "jan|feb|mar|apr|maí|jún|júl|ágú|sep|okt|nóv|des". + shortMonthNamesConfigspecify the month abbreviations used on the server in file timestamp dates as a + pipe-delimited string for each month. For example, a set of month names used by a hypothetical + Icelandic FTP server might conceivably be specified + as jan|feb|mar|apr|maí|jún|júl|ágú|sep|okt|nóv|des. This attribute exists primarily to support languages not supported by - the serverLanguageCode attribute.
        - Since ant 1.7 -
        NoNo
        -

        Note about remotedir attribute

        - - +

        Note about remotedir attribute

        +
        + - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + -
        Action
        -
        meaning of remotedir
        -
        use of nested fileset -(s)
        -
        Actionmeaning of remotediruse of nested fileset(s)
        send/put
        -
        base directory to -which the files are sent
        -
        they are used normally and -evaluated on the local machine
        -
        send/putbase directory to which the files are sentthey are used normally and evaluated on the local machine
        recv/get
        -
        base directory from -which the files are retrieved
        -
        the remote files located under -the remotedir matching the include/exclude patterns of -the fileset recv/getbase directory from which the files are retrievedthe remote files located under the remotedir matching the include/exclude + patterns of the fileset
        del/delete
        -
        base directory from -which files get deleted
        -
        the remote files located under -the remotedir matching the include/exclude patterns of -the fileset
        -
        del/deletebase directory from which files get deletedthe remote files located under the remotedir matching the include/exclude + patterns of the fileset
        list
        -
        base directory from -which files are listed
        -
        the remote files located under -the remotedir matching the include/exclude patterns of -the fileset
        -
        listbase directory from which files are listedthe remote files located under the remotedir matching the include/exclude + patterns of the fileset
        mkdirdirectory to create
        -
        not used
        -
        mkdirdirectory to createnot used
        chmodbase directory from -which the mode of files get changed
        -
        the remote files located under -the remotedir matching the include/exclude patterns of -the fileset
        -
        chmodbase directory from which the mode of files get changedthe remote files located under the remotedir matching the include/exclude + patterns of the fileset
        rmdir
        -
        base directory from -which directories get removed
        -
        the remote directories located -under the remotedir matching the include/exclude -patterns of the fileset
        -
        rmdirbase directory from which directories get removedthe remote directories located under the remotedir matching the include/exclude + patterns of the fileset

        Parameters specified as nested elements

        + +

        Parameters specified as nested elements

        fileset

        -

        The ftp task supports any number of nested <fileset> elements to specify -the files to be retrieved, or deleted, or listed, or whose mode you want to change.

        -

        -The attribute followsymlinks of fileset is supported on -local (put) as well as remote (get, chmod, delete) filesets. -Before ant 1.6 there was no support of symbolic links in remote filesets. -In order to exclude symbolic links (preserve the behavior of ant 1.5.x and older), -you need to explicitly set followsymlinks to false. -On remote filesets hidden files are not checked for being symbolic links. Hidden -files are currently assumed to not be symbolic links. -

        +

        The ftp task supports any number of +nested <fileset> elements to specify the +files to be retrieved, or deleted, or listed, or whose mode you want to change.

        +

        The attribute followsymlinks of fileset is supported on local +(put) as well as remote (get, chmod, delete) filesets. Before Ant +1.6 there was no support of symbolic links in remote filesets. In order to exclude symbolic links +(preserve the behavior of Ant 1.5.x and older), you need to explicitly set followsymlinks +to false. On remote filesets hidden files are not checked for being symbolic links. +Hidden files are currently assumed to not be symbolic links.

        -

        Sending Files

        +

        Sending files

        The easiest way to describe how to send files is with a couple of examples:

        -  <ftp server="ftp.apache.org"
        -       userid="anonymous"
        -       password="me@myorg.com">
        +<ftp server="ftp.apache.org"
        +     userid="anonymous"
        +     password="me@myorg.com">
             <fileset dir="htdocs/manual"/>
        -  </ftp>
        -
        -

        Logs in to ftp.apache.org as anonymous and -uploads all files in the htdocs/manual directory -to the default directory for that user.

        -
          <ftp server="ftp.apache.org"
        -       remotedir="incoming"
        -       userid="anonymous"
        -       password="me@myorg.com"
        -       depends="yes">
        +</ftp>
        +

        Logs in to ftp.apache.org as anonymous and uploads all files in +the htdocs/manual directory to the default directory for that user.

        +
        +<ftp server="ftp.apache.org"
        +     remotedir="incoming"
        +     userid="anonymous"
        +     password="me@myorg.com"
        +     depends="yes">
             <fileset dir="htdocs/manual"/>
        -  </ftp>
        -

        Logs in to ftp.apache.org as anonymous and -uploads all new or changed files in the htdocs/manual directory -to the incoming directory relative to the default directory -for anonymous.

        -
          <ftp server="ftp.apache.org"
        -       port="2121"
        -       remotedir="/pub/incoming"
        -       userid="coder"
        -       password="java1"
        -       passive="yes"
        -       depends="yes"
        -       binary="no">
        +</ftp>
        +

        Logs in to ftp.apache.org as anonymous and uploads all new or changed +files in the htdocs/manual directory to the incoming directory relative to +the default directory for anonymous.

        +
        +<ftp server="ftp.apache.org"
        +     port="2121"
        +     remotedir="/pub/incoming"
        +     userid="coder"
        +     password="java1"
        +     passive="yes"
        +     depends="yes"
        +     binary="no">
             <fileset dir="htdocs/manual">
        -      <include name="**/*.html"/>
        +        <include name="**/*.html"/>
             </fileset>
        -  </ftp>
        -

        Logs in to ftp.apache.org at port 2121 as -coder with password java1 and uploads all new or -changed HTML files in the htdocs/manual directory to the -/pub/incoming directory. The files are transferred in text mode. -Passive mode has been switched on to send files from behind a firewall.

        -
          <ftp server="ftp.hypothetical.india.org"
        -       port="2121"
        -       remotedir="/pub/incoming"
        -       userid="coder"
        -       password="java1"
        -       depends="yes"
        -       binary="no"
        -       systemTypeKey="Windows"
        -       serverTimeZoneConfig="India/Calcutta">
        +</ftp>
        +

        Logs in to ftp.apache.org at port 2121 as coder with +password java1 and uploads all new or changed HTML files in +the htdocs/manual directory to the /pub/incoming directory. The files are +transferred in text mode. Passive mode has been switched on to send files from behind a +firewall.

        +
        +<ftp server="ftp.hypothetical.india.org"
        +     port="2121"
        +     remotedir="/pub/incoming"
        +     userid="coder"
        +     password="java1"
        +     depends="yes"
        +     binary="no"
        +     systemTypeKey="Windows"
        +     serverTimeZoneConfig="India/Calcutta">
             <fileset dir="htdocs/manual">
        -      <include name="**/*.html"/>
        +        <include name="**/*.html"/>
             </fileset>
        -  </ftp>
        -

        Logs in to a Windows server at ftp.hypothetical.india.org -at port 2121 as coder with password java1 -and uploads all new or changed (accounting for timezone differences) -HTML files in the htdocs/manual -directory to the /pub/incoming directory. The files are transferred -in text mode.

        -
          <ftp server="ftp.nt.org"
        -       remotedir="c:\uploads"
        -       userid="coder"
        -       password="java1"
        -       separator="\"
        -       verbose="yes">
        +</ftp>
        +

        Logs in to a Windows server at ftp.hypothetical.india.org at port 2121 +as coder with password java1 and uploads all new or changed (accounting +for timezone differences) HTML files in the htdocs/manual directory to +the /pub/incoming directory. The files are transferred in text mode.

        +
        +<ftp server="ftp.nt.org"
        +     remotedir="c:\uploads"
        +     userid="coder"
        +     password="java1"
        +     separator="\"
        +     verbose="yes">
             <fileset dir="htdocs/manual">
        -      <include name="**/*.html"/>
        +        <include name="**/*.html"/>
             </fileset>
        -  </ftp>

        Logs in to the Windows-based ftp.nt.org as -coder with password java1 and uploads all -HTML files in the htdocs/manual directory to the -c:\uploads directory. Progress messages are displayed as each -file is uploaded.

        -

        Getting Files

        -

        Getting files from an FTP server works pretty much the same way as -sending them does. The only difference is that the nested filesets -use the remotedir attribute as the base directory for the files on the -FTP server, and the dir attribute as the local directory to put the files -into. The file structure from the FTP site is preserved on the local machine.

        -
        -  <ftp action="get"
        -       server="ftp.apache.org"
        -       userid="anonymous"
        -       password="me@myorg.com">
        +</ftp>
        +

        Logs in to the Windows-based ftp.nt.org as coder with +password java1 and uploads all HTML files in the htdocs/manual directory +to the c:\uploads directory. Progress messages are displayed as each file is +uploaded.

        +

        Getting files

        +

        Getting files from an FTP server works pretty much the same way as sending them does. The only +difference is that the nested filesets use the remotedir attribute as the base directory +for the files on the FTP server, and the dir attribute as the local directory to put the +files into. The file structure from the FTP site is preserved on the local machine.

        +
        +<ftp action="get"
        +     server="ftp.apache.org"
        +     userid="anonymous"
        +     password="me@myorg.com">
             <fileset dir="htdocs/manual">
        -      <include name="**/*.html"/>
        +        <include name="**/*.html"/>
             </fileset>
        -  </ftp>
        -
        -

        Logs in to ftp.apache.org as anonymous and -recursively downloads all .html files from default directory for that user -into the htdocs/manual directory on the local machine.

        -
        -  <ftp action="get"
        -       server="ftp.apache.org"
        -       userid="anonymous"
        -       password="me@myorg.com"
        -       systemTypeKey="UNIX"
        -       defaultDateFormatConfig="yyyy-MM-dd HH:mm">
        +</ftp>
        +

        Logs in to ftp.apache.org as anonymous and recursively downloads +all .html files from default directory for that user into +the htdocs/manual directory on the local machine.

        +
        +<ftp action="get"
        +     server="ftp.apache.org"
        +     userid="anonymous"
        +     password="me@myorg.com"
        +     systemTypeKey="UNIX"
        +     defaultDateFormatConfig="yyyy-MM-dd HH:mm">
             <fileset dir="htdocs/manual">
        -      <include name="**/*.html"/>
        +        <include name="**/*.html"/>
             </fileset>
        -  </ftp>
        -
        -

        If apache.org ever switches to a unix FTP server that uses the new all-numeric -format for timestamps, this version would become necessary. It would accomplish -the same functionality as the previous example but would successfully handle the -numeric timestamps. -The systemTypeKey is not necessary here but helps clarify what is -going on.

        -
        -  <ftp action="get"
        -       server="ftp.hypthetical.fr"
        -       userid="anonymous"
        -       password="me@myorg.com"
        -       defaultDateFormatConfig="d MMM yyyy"
        -       recentDateFormatConfig="d MMM HH:mm"
        -       serverLanguageCodeConfig="fr">
        -     <fileset dir="htdocs/manual">
        -      <include name="**/*.html"/>
        +</ftp>
        +

        If apache.org ever switches to a Unix FTP server that uses the new all-numeric +format for timestamps, this version would become necessary. It would accomplish the same +functionality as the previous example but would successfully handle the numeric timestamps. +The systemTypeKey is not necessary here but helps clarify what is going on.

        +
        +<ftp action="get"
        +     server="ftp.hypthetical.fr"
        +     userid="anonymous"
        +     password="me@myorg.com"
        +     defaultDateFormatConfig="d MMM yyyy"
        +     recentDateFormatConfig="d MMM HH:mm"
        +     serverLanguageCodeConfig="fr">
        +    <fileset dir="htdocs/manual">
        +        <include name="**/*.html"/>
             </fileset>
        -  </ftp>
        -
        -

        Logs into a UNIX FTP server at ftp.hypothetical.fr which displays -dates with French names in Standard European format, as anonymous, and -recursively downloads all .html files from default directory for that user -into the htdocs/manual directory on the local machine.

        - -

        Deleting Files

        -As you've probably guessed by now, you use nested fileset elements to -select the files to delete from the remote FTP server. Again, the -filesets are relative to the remote directory, not a local directory. In -fact, the dir attribute of the fileset is ignored completely. +</ftp> +

        Logs into a UNIX FTP server at ftp.hypothetical.fr which displays dates with French +names in Standard European format, as anonymous, and recursively downloads +all .html files from default directory for that user into +the htdocs/manual directory on the local machine.

        + +

        Deleting files

        +

        As you've probably guessed by now, you use nested fileset elements to select the files to delete +from the remote FTP server. Again, the filesets are relative to the remote directory, not a local +directory. In fact, the dir attribute of the fileset is ignored completely.

        -  <ftp action="del"
        -       server="ftp.apache.org"
        -       userid="anonymous"
        -       password="me@myorg.com">
        +<ftp action="del"
        +     server="ftp.apache.org"
        +     userid="anonymous"
        +     password="me@myorg.com">
             <fileset>
        -      <include name="**/*.tmp"/>
        +        <include name="**/*.tmp"/>
             </fileset>
        -  </ftp>
        -
        -

        Logs in to ftp.apache.org as anonymous and -tries to delete all *.tmp files from the default directory for that user. -If you don't have permission to delete a file, a BuildException is thrown.

        +</ftp> +

        Logs in to ftp.apache.org as anonymous and tries to delete +all *.tmp files from the default directory for that user. If you don't have permission +to delete a file, a BuildException is thrown.

        Listing Files

        -  <ftp action="list"
        -       server="ftp.apache.org"
        -       userid="anonymous"
        -       password="me@myorg.com"
        -       listing="data/ftp.listing">
        +<ftp action="list"
        +     server="ftp.apache.org"
        +     userid="anonymous"
        +     password="me@myorg.com"
        +     listing="data/ftp.listing">
             <fileset>
        -      <include name="**"/>
        +        <include name="**"/>
             </fileset>
        -  </ftp>
        -
        -

        This provides a file listing in data/ftp.listing of all the files on -the FTP server relative to the default directory of the anonymous -user. The listing is in whatever format the FTP server normally lists files.

        - -

        Creating Directories

        -

        Note that with the mkdir action, the directory to create is specified using the -remotedir attribute.

        -
        -  <ftp action="mkdir"
        -       server="ftp.apache.org"
        -       userid="anonymous"
        -       password="me@myorg.com"
        -       remotedir="some/remote/dir"/>
        -
        -

        This creates the directory some/remote/dir beneath the default root -directory. As with all other actions, the directory separator character must be correct -according to the desires of the FTP server.

        -

        Removing Directories

        -This action uses nested fileset elements to -select the directories to remove from the remote FTP server. The -filesets are relative to the remote directory, not a local directory. -The dir attribute of the fileset is ignored completely. -The directories to be removed must be empty, or contain only -other directories that have been also selected to be removed by the filesets -patterns, otherwise a BuildException will be thrown. -Also, if you don't have permission to remove a directory, a BuildException is -thrown. - +</ftp> +

        This provides a file listing in data/ftp.listing of all the files on the FTP server +relative to the default directory of the anonymous user. The listing is in whatever +format the FTP server normally lists files.

        + +

        Creating directories

        +

        Note that with the mkdir action, the directory to create is specified using +the remotedir attribute.

        -  <ftp action="rmdir"
        -       server="ftp.apache.org"
        -       userid="anonymous"
        -       password="me@myorg.com"
        -       remotedir="/somedir" >
        -    <fileset>
        -      <include name="dira"/>
        -      <include name="dirb/**"/>
        -    </fileset>
        -  </ftp>
        -
        -

        Logs in to ftp.apache.org as anonymous and -tries to remove /somedir/dira directory and -all the directories tree starting at, and including, /somedir/dirb. -When removing the /somedir/dirb tree, -it will start at the leaves moving up to the root, so that when -it tries to remove a directory it is sure all the directories under it are -already removed. -Obviously all the files in the tree must have been already deleted. -

        -

        As an example suppose you want to delete everything contained into -/somedir, so invoke first the <ftp> task with -action="delete", then with -action="rmdir" specifying in both cases -remotedir="/somedir" and +<ftp action="mkdir" + server="ftp.apache.org" + userid="anonymous" + password="me@myorg.com" + remotedir="some/remote/dir"/> +

        This creates the directory some/remote/dir beneath the default root directory. As +with all other actions, the directory separator character must be correct according to the desires +of the FTP server.

        +

        Removing directories

        +

        This action uses nested fileset elements to select the directories to remove from the remote FTP +server. The filesets are relative to the remote directory, not a local directory. +The dir attribute of the fileset is ignored completely. The directories to be removed +must be empty, or contain only other directories that have been also selected to be removed by the +filesets patterns, otherwise a BuildException will be thrown. Also, if you don't have +permission to remove a directory, a BuildException is thrown.

        +<ftp action="rmdir"
        +     server="ftp.apache.org"
        +     userid="anonymous"
        +     password="me@myorg.com"
        +     remotedir="/somedir" >
             <fileset>
        -        <include name="**"/>
        +        <include name="dira"/>
        +        <include name="dirb/**"/>
             </fileset>
        -
        - -The directory specified in the remotedir parameter is never -selected for remove, so if you need to remove it, specify its parent in -remotedir parameter and include it in the -<fileset> pattern, like "somedir/**". -

        - +</ftp> +

        Logs in to ftp.apache.org as anonymous and tries to +remove /somedir/dira directory and all the directories tree starting at, and +including, /somedir/dirb. When removing the /somedir/dirb tree, it will +start at the leaves moving up to the root, so that when it tries to remove a directory it is sure +all the directories under it are already removed. Obviously all the files in the tree must have +been already deleted.

        +

        As an example suppose you want to delete everything contained into /somedir, so +invoke first the <ftp> task with action=delete, then +with action=rmdir specifying in both cases remotedir=/somedir +and

        +
        +<fileset>
        +    <include name="**"/>
        +</fileset>
        +

        The directory specified in the remotedir parameter is never selected for remove, so if +you need to remove it, specify its parent in remotedir parameter and include it in the +<fileset> pattern, like somedir/**.

        - diff -Nru ant-1.9.10/manual/Tasks/genkey.html ant-1.10.3/manual/Tasks/genkey.html --- ant-1.9.10/manual/Tasks/genkey.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/genkey.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,92 +24,88 @@ -

        GenKey

        +

        GenKey

        Description

        -

        Generates a key in a keystore.

        +

        Generates a key in a keystore.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        aliasthe alias to add underYes.aliasthe alias to add underYes.
        storepasspassword for keystore integrity. Must - be at least 6 characters longYes.storepasspassword for keystore integrity. Must be at least 6 characters longYes.
        keystorekeystore locationNokeystorekeystore locationNo
        storetypekeystore typeNostoretypekeystore typeNo
        keypasspassword for private key (if different)Nokeypasspassword for private key (if different)No
        sigalgthe algorithm to use in signingNosigalgthe algorithm to use in signingNo
        keyalgthe method to use when generating name-value pairNokeyalgthe method to use when generating name-value pairNo
        verbose(true | false) verbose output when signingNoverbose(true|false) verbose output when signingNo
        dnameThe distinguished name for entityYes if dname element unspecifieddnameThe distinguished name for entityYes unless <dname> element is specified
        validity(integer) indicates how many days certificate is validNovalidity(integer) indicates how many days certificate is validNo
        keysize(integer) indicates the size of key generatedNokeysize(integer) indicates the size of key generatedNo
        -

        Alternatively you can specify the distinguished name by creating a -sub-element named dname and populating it with param elements that -have a name and a value. When using the subelement it is automatically -encoded properly and commas (",") are replaced -with "\,".

        +

        Alternatively you can specify the distinguished name by creating a <dname> +sub-element and populating it with <param> elements that have a name +and a value. When using the subelement, it is automatically encoded properly and commas +(,) are replaced with \,.

        -

        The following two examples are identical:

        +

        The following two examples are identical:

        Examples

        -
        -<genkey alias="apache-group" storepass="secret" 
        -  dname="CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US"/>
        -
        - -
        -
        -<genkey alias="apache-group" storepass="secret" >
        +
        +<genkey alias="apache-group" storepass="secret"
        +        dname="CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US"/>
        + +
        +<genkey alias="apache-group" storepass="secret">
           <dname>
             <param name="CN" value="Ant Group"/>
             <param name="OU" value="Jakarta Division"/>
        @@ -117,9 +113,6 @@
             <param name="C"  value="US"/>
           </dname>
         </genkey>
        -
        - - diff -Nru ant-1.9.10/manual/Tasks/get.html ant-1.10.3/manual/Tasks/get.html --- ant-1.9.10/manual/Tasks/get.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/get.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,219 +24,225 @@ -

        Get

        +

        Get

        Description

        -

        Gets files from URLs. When the verbose option is "on", this task -displays a '.' for every 100 Kb retrieved. Any URL schema supported by -the runtime is valid here, including http:, ftp: and jar:; -

        -The usetimestamp option enables you to control downloads so that the remote file is -only fetched if newer than the local copy. If there is no local copy, the download always takes -place. When a file is downloaded, the timestamp of the downloaded file is set to the remote timestamp. -NB: This timestamp facility only works on downloads using the HTTP protocol. -

        -A username and password can be specified, in which case basic 'slightly encoded -plain text' authentication is used. This is only secure over an HTTPS link. -

        - -

        Proxies. Since Apache Ant 1.7.0, Ant running on Java1.5 or later can - use the proxy settings of the operating - system if enabled with the - -autoproxy option. There is also the - <setproxy> task - for earlier Java versions. With proxies turned - on, <get> requests against localhost may not work - as expected, if the request is relayed to the proxy.

        - +

        Gets files from URLs. When the verbose option is on, this task displays +a . for every 100 Kb retrieved. Any URL schema supported by the runtime is valid here, +including http:, ftp: and jar:.

        +

        The usetimestamp option enables you to control downloads so that the remote file is +only fetched if newer than the local copy. If there is no local copy, the download always takes +place. When a file is downloaded, the timestamp of the downloaded file is set to the remote +timestamp. Note: This timestamp facility only works on downloads using the HTTP +protocol.

        +

        A username and password can be specified, in which case basic ('slightly encoded plain text') +authentication is used. This is only secure over an HTTPS link.

        + +

        Proxies. Since Apache Ant 1.7.0, Ant running on Java 5 or later +can use the proxy settings of the operating system if enabled with +the -autoproxy command line option. There is also +the <setproxy> task for earlier Java versions. With +proxies turned on, <get> requests against localhost may not work as expected, if +the request is relayed to the proxy.

        +

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        srcthe URL from which to retrieve a file.Yes or a nested resource collectionsrcthe URL from which to retrieve a file.Yes, or a nested resource collection
        destthe file or directory where to store the - retrieved file(s).Yesdestthe file or directory where to store the retrieved file(s).Yes
        verboseshow verbose progress information ("on"/"off").No; default "false"verboseshow verbose progress information (on|off).No; default is off
        quietLog errors only.("true"/"false").No; default "false"quietLog errors only.(true|false).No; default is false
        ignoreerrorsLog errors but don't treat as fatal.No; default "false"ignoreerrorsLog errors but don't treat as fatal.No; default is false
        usetimestampconditionally download a file based on the timestamp of the - local copy. HTTP onlyNo; default "false"usetimestampconditionally download a file based on the timestamp of the local copy. HTTP onlyNo; default is false
        usernameusername for 'BASIC' http authenticationif password is set
        usernameusername for basic HTTP authenticationYes, if password is set
        passwordpassword: required if username is set
        passwordpassword for basic HTTP authenticationYes if username is set
        maxtimeMaximum time in seconds a single download may take, - otherwise it will be interrupted and treated like a download - error. Since Ant 1.8.0No: default 0 which means no - maximum time
        maxtimeMaximum time in seconds a single download may take, otherwise it will be interrupted and + treated like a download error. Since Ant 1.8.0No; default is 0 which means + unlimited
        retriesThe number of attempts to make for opening the URI.
        - The name of the attribute is misleading as a value of 1 means - "don't retry on error" and a value of 0 meant don't even try to - reach the URI at all.
        - since Ant 1.8.0
        No; default "3"retriesThe number of attempts to make for opening the URI.
        The name of the attribute is + misleading as a value of 1 means "don't retry on error" and a value of 0 meant + don't even try to reach the URI at all.
        since Ant 1.8.0
        No; default is 3
        skipexistingskip files that already exist on the local filesystem
        - since Ant 1.8.0
        No; default "false"skipexistingskip files that already exist on the local filesystem
        since Ant 1.8.0
        No; default is false
        httpusecachesHTTP only - if true, allow caching at the - HttpUrlConnection level. if false, turn caching off.
        - Note this is only a hint to the underlying UrlConnection - class, implementations and proxies are free to ignore the - setting.
        No; default "true"
        useragentUser-Agent HTTP header to send, starting with Ant - 1.9.3 Ant will specify a User-Agent header of "Apache Ant VERSION" - unless overridden by this attribute
        - since Ant 1.9.3
        No
        tryGzipEncodingWhen set to true Ant will tell the server it is - willing to accept gzip encoding to reduce the amount of data to - transfer and uncompress the content transparently.
        - Setting this to true also means Ant will uncompress - .tar.gz and similar files automatically.
        - since Ant 1.9.5
        No; default "false"httpusecachesHTTP only—if true, allow caching at the HttpUrlConnection level, + if false, turn caching off.
        Note this is only a hint to the + underlying UrlConnection class, implementations and proxies are free to ignore the + setting.
        No; default is true
        useragentUser-Agent HTTP header to send.
        since Ant 1.9.3
        No; defaults to Apache Ant VERSION
        tryGzipEncodingWhen set to true, Ant will tell the server it is willing to accept gzip encoding to + reduce the amount of data to transfer and uncompress the content transparently.
        Setting + this to true also means Ant will uncompress .tar.gz and similar files + automatically.
        since Ant 1.9.5
        No; default is false

        Parameters specified as nested elements

        any resource collection

        -

        Resource - Collections are used to select groups of URLs to download. If - the collection contains more than one resource, the dest attribute - must point to a directory if it exists or a directory will be - created if it doesn't exist. The destination file name use the - last part of the path of the source URL unless you also specify a - mapper.

        +

        resource collections are used to select groups +of URLs to download. If the collection contains more than one resource, the dest +attribute must point to a directory if it exists or a directory will be created if it doesn't exist. +The destination file name use the last part of the path of the source URL unless you also specify a +mapper.

        mapper

        -

        You can define name transformations by using a - nested mapper element. You - can also use any filenamemapper type in place of the mapper - element.

        - -

        The mapper will receive the resource's name as argument. Any - resource for which the mapper returns no or more than one mapped - name will be skipped. If the returned name is a relative path, it - will be considered relative to the dest attribute.

        +

        You can define name transformations by using a nested mapper +element. You can also use any filenamemapper type in place of the mapper element.

        + +

        The mapper will receive the resource's name as argument. Any resource for which the mapper +returns no or more than one mapped name will be skipped. If the returned name is a relative path, +it will be considered relative to the dest attribute.

        + +

        header

        +

        Any arbitrary number of HTTP headers can be added to a request.
        The attributes of a +nested <header/> node are as follows:

        + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        nameThe name or key of this header. Cannot be null or empty. Leading and trailing spaces are + removedYes
        valueThe value to assign to the header. Cannot be null or empty. Leading and trailing spaces are + removedYes

        Examples

        -
          <get src="http://ant.apache.org/" dest="help/index.html"/>
        -

        Gets the index page of http://ant.apache.org/, and stores it in the file help/index.html.

        +
        <get src="http://ant.apache.org/" dest="help/index.html"/>
        +

        Gets the index page of http://ant.apache.org/, and stores it in the +file help/index.html.

        + +
        +<get src="http://www.apache.org/dist/ant/KEYS"
        +     dest="KEYS"
        +     verbose="true"
        +     usetimestamp="true"/>
        +

        Gets the PGP keys of Ant's (current and past) release managers, if the local copy is missing or +out of date. Uses the verbose option for progress information.

        -
          <get src="http://www.apache.org/dist/ant/KEYS" 
        -    dest="KEYS" 
        -    verbose="true"
        -    usetimestamp="true"/>
        -

        -Gets the PGP keys of Ant's (current and past) release managers, if the local copy -is missing or out of date. Uses the verbose option -for progress information. -

        - -
          <get src="https://insecure-bank.org/statement/user=1214" 
        -    dest="statement.html" 
        -    username="1214";
        -    password="secret"/>
        -

        -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 if you -ignore the fact that it is part of your build file which may be -readable by third parties. If you need more security, consider using +

        +<get src="https://insecure-bank.org/statement/user=1214"
        +     dest="statement.html"
        +     username="1214"
        +     password="secret"/>
        +

        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 if you ignore the fact that it is part of your build +file which may be readable by third parties. If you need more security, consider using the input task to query for a password.

        Using a macro like the following

        -  <macrodef name="get-and-checksum">
        -    <attribute name="url"/>
        -    <attribute name="dest"/>
        -    <sequential>
        -      <local name="destdir"/>
        -      <dirname property="destdir" file="@{dest}"/>
        -      <get dest="${destdir}">
        -        <url url="@{url}"/>
        -        <url url="@{url}.sha1"/>
        -        <firstmatchmapper>
        -          <globmapper from="@{url}.sha1" to="@{dest}.sha"/>
        -          <globmapper from="@{url}" to="@{dest}"/>
        -        </firstmatchmapper>
        -      </get>
        -      <local name="checksum.matches"/>
        -      <local name="checksum.matches.fail"/>
        -      <checksum file="@{dest}" algorithm="sha" fileext=".sha"
        -                verifyproperty="checksum.matches"/>
        -      <condition property="checksum.matches.fail">
        -        <equals arg1="${checksum.matches}" arg2="false"/>
        -      </condition>
        -      <fail if="checksum.matches.fail">Checksum error</fail>
        -    </sequential>
        -  </macrodef>
        -
        - -

        it is possible to download an artifacts together with its SHA1 - checksum (assuming a certain naming convention for the checksum - file, of course) and validate the checksum on the fly.

        +<macrodef name="get-and-checksum"> + <attribute name="url"/> + <attribute name="dest"/> + <sequential> + <local name="destdir"/> + <dirname property="destdir" file="@{dest}"/> + <get dest="${destdir}"> + <url url="@{url}"/> + <url url="@{url}.sha1"/> + <firstmatchmapper> + <globmapper from="@{url}.sha1" to="@{dest}.sha"/> + <globmapper from="@{url}" to="@{dest}"/> + </firstmatchmapper> + </get> + <local name="checksum.matches"/> + <local name="checksum.matches.fail"/> + <checksum file="@{dest}" algorithm="sha" fileext=".sha" + verifyproperty="checksum.matches"/> + <condition property="checksum.matches.fail"> + <equals arg1="${checksum.matches}" arg2="false"/> + </condition> + <fail if="checksum.matches.fail">Checksum error</fail> + </sequential> +</macrodef> + +

        it is possible to download an artifacts together with its SHA1 checksum (assuming a certain +naming convention for the checksum file, of course) and validate the checksum on the fly.

         <get dest="downloads">
        -  <url url="http://ant.apache.org/index.html"/> 
        +  <url url="http://ant.apache.org/index.html"/>
           <url url="http://ant.apache.org/faq.html"/>
        -</get>
        -
        -

        Gets the index and FAQ pages of http://ant.apache.org/, and stores - them in the directory downloads which will be created if - necessary.

        +</get> + +

        With custom HTTP headers

        + +
        +<get src="http://ant.apache.org/index.html" dest="downloads">
        +  <header name="header1" value="headerValue1"/>
        +  <header name="header2" value="headerValue2"/>
        +  <header name="header3" value="headerValue3"/>
        +</get>
        + +

        Gets the index and FAQ pages of http://ant.apache.org/, and stores them in the +directory downloads which will be created if necessary.

        - diff -Nru ant-1.9.10/manual/Tasks/gunzip.html ant-1.10.3/manual/Tasks/gunzip.html --- ant-1.9.10/manual/Tasks/gunzip.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/gunzip.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,7 +23,6 @@ -This document's new home is here +This document's new home is here - diff -Nru ant-1.9.10/manual/Tasks/gzip.html ant-1.10.3/manual/Tasks/gzip.html --- ant-1.9.10/manual/Tasks/gzip.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/gzip.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,7 +23,6 @@ -This document's new home is here +This document's new home is here - diff -Nru ant-1.9.10/manual/Tasks/hostinfo.html ant-1.10.3/manual/Tasks/hostinfo.html --- ant-1.9.10/manual/Tasks/hostinfo.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/hostinfo.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,75 +24,61 @@ -

        HostInfo

        +

        HostInfo

        Description

        Sets the NAME, DOMAIN, ADDR4, and ADDR6 properties in the current project.

        -The NAME contains the host part of the canonical name of the host.
        -If the host is not found, the host will contain the name as provided to the task, -or localhost if no host was provided, and no name for the local -host was found.
        -The DOMAIN contains the domain part of the canonical name of the host.
        - If the host is not found, the domain will contain the domain as provided to the task, - or localdomain if no host / domain was provided.
        -The ADDR4 contains the IPv4 address of the host with the widest meaning.
        -If no IPv4 address is found and a host has been provided the address 0.0.0.0 -is returned, when no host was provided the address 127.0.0.1 is returned.
        -The ADDR6 contains the IPv6 address of the host with the widest meaning.
        -If no IPv6 address is found and a host has been provided the address :: -is returned, when no host was provided the address ::1 is returned.
        -

        - -

        These properties can be used in the build-file, for instance, to create -host-stamped filenames, or used to replace placeholder tags inside documents -to indicate, for example, the host where the build was performed on. -The best place for this task is probably in an initialization target.

        +The NAME contains the host part of the canonical name of the host.
        If the host is +not found, the host will contain the name as provided to the task, or localhost if no +host was provided, and no name for the local host was found.
        The DOMAIN contains +the domain part of the canonical name of the host.
        If the host is not found, the domain will +contain the domain as provided to the task, or localdomain if no host / domain was +provided.
        The ADDR4 contains the IPv4 address of the host with the widest +meaning.
        If no IPv4 address is found and a host has been provided the +address 0.0.0.0 is returned, when no host was provided the +address 127.0.0.1 is returned.
        The ADDR6 contains the IPv6 address of +the host with the widest meaning.
        If no IPv6 address is found and a host has been provided the +address :: is returned, when no host was provided the address ::1 is +returned.

        + +

        These properties can be used in the build-file, for instance, to create host-stamped filenames, +or used to replace placeholder tags inside documents to indicate, for example, the host where the +build was performed on. The best place for this task is probably in an initialization target.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        prefixPrefix used for all properties set. The default is no prefix.NoprefixPrefix used for all properties set.No; defaults to no prefix
        host - The host to retrieve the information for, default is to retrieve - information for the host the task is running on. - NohostThe host to retrieve the information for.No; default is to retrieve information for the host the task is running on

        Examples

        -
        -  <hostinfo/>
        -
        +
        <hostinfo/>
        -

        -Sets the NAME, DOMAIN, ADDR4, and -ADDR6 for the local host, using the most "global" address -available.

        -
        -  <hostinfo prefix="remotehost" host="www.apache.org"/>
        -
        -

        -Sets the properties remotehost.NAME to eos, -remotehost.DOMAIN to apache.org, -remotehost.ADDR4 to 140.211.11.130 and -remotehost.ADDR6 to :: -for the host with the name www.apache.org (provided the canonical name and ip -addresses do not change). -

        +

        Sets the NAME, DOMAIN, ADDR4, and ADDR6 for +the local host, using the most "global" address available.

        + +
        <hostinfo prefix="remotehost" host="www.apache.org"/>
        +

        Sets the properties remotehost.NAME +to eos, remotehost.DOMAIN +to apache.org, remotehost.ADDR4 to 140.211.11.130 +and remotehost.ADDR6 to :: for the host with the +name www.apache.org (provided the canonical name and IP addresses do not change).

        diff -Nru ant-1.9.10/manual/Tasks/image.html ant-1.10.3/manual/Tasks/image.html --- ant-1.9.10/manual/Tasks/image.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/image.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,7 +24,7 @@ -

        Image

        +

        Image

        Description

        Applies a chain of image operations on a set of files.

        Requires Java Advanced Image API from Sun.

        @@ -33,170 +33,166 @@ Class-Diagram

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        failonerror Boolean value. If false, note errors to the output but keep going. no (defaults to true) failonerrorBoolean value. If false, note errors to the output but keep going.No; defaults to true
        srcdir Directory containing the images. yes, unless nested fileset is used srcdirDirectory containing the images.Yes, unless nested fileset is used
        encoding Image encoding type.
        - Valid (caseinsensitive) are: jpg, jpeg, tif, tiff +
        encodingImage encoding type.
        Valid (case insensitive) + are: jpg, jpeg, tif, tiff
        no (defaults to JPEG) No; defaults to jpeg
        overwrite Boolean value. Sets whether or not to overwrite - a file if there is naming conflict. - no (defaults to false) overwriteBoolean value. Sets whether or not to overwrite a file if there is naming conflict.No; defaults to false
        gc Boolean value. Enables garbage collection after - each image processed. - no (defaults to false) gcBoolean value. Enables garbage collection after each image processed.No; defaults to false
        destdir Directory where the result images are stored. no (defaults to value of srcdir) destdirDirectory where the result images are stored.No; defaults to value of srcdir
        includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
        includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
        excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
        excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
        defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
        caseSensitive Boolean value. Sets case sensitivity of the file system. no (defaults to false) caseSensitiveBoolean value. Sets case sensitivity of the file system.No; defaults to false
        followSymlinks Boolean value. Sets whether or not symbolic links should be followed. no (defaults to true) followSymlinksBoolean value. Sets whether or not symbolic links should be followed.No; defaults to true

        Parameters specified as nested elements

        -

        This task forms an implicit FileSet and -supports most attributes of <fileset> as well as the -nested <include>, <exclude> and -<patternset> elements.

        - +

        This task forms an implicit FileSet and supports most +attributes of <fileset> as well as the +nested <include>, <exclude> +and <patternset> elements.

        ImageOperation

        Adds an ImageOperation to chain.

        -
        Nested Elements
        -ImageOperation can handle nested Rotate, Draw, Rectangle, Text and Scale objects. +
        Nested elements
        +

        ImageOperation can handle +nested Rotate, Draw, Rectangle, Text +and Scale objects.

        Rotate

        Adds a Rotate ImageOperation to chain.

        Parameters
        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        angle Float value. Sets the angle of rotation in degrees. no (defaults to 0.0F) angleFloat value. Sets the angle of rotation in degrees.No; defaults to 0.0F

        Scale

        Adds a Scale ImageOperation to chain.

        Parameters
        - +
        - - - - - - - + + + + + + + + + - - + + - + - - + + - +
        AttributeDescriptionRequired
        proportions Sets which dimension to control proportions from. Valid values are:
          -
        • "ignore" - treat the dimensions independently.
        • -
        • "height" - keep proportions based on the width.
        • -
        • "width" - keep proportions based on the height.
        • -
        • "cover" - keep proportions and fit in the supplied dimensions.
        • -
        • "fit" - keep proportions and cover the supplied dimensions.
        • -
        no (defaults to ignore) AttributeDescriptionRequired
        proportionsSets which dimension to control proportions from. Valid values are: +
          +
        • ignore— treat the dimensions independently.
        • +
        • height—keep proportions based on the width.
        • +
        • width—keep proportions based on the height.
        • +
        • cover—keep proportions and fit in the supplied dimensions.
        • +
        • fit—keep proportions and cover the supplied dimensions.
        • +
        +
        No; defaults to ignore
        width Sets the width of the image, either as an integer or a %. widthSets the width of the image, either as an integer or a %. no (defaults to 100%) No; defaults to 100%
        height Sets the height of the image, either as an integer or a %. heightSets the height of the image, either as an integer or a %. no (defaults to 100%) No; defaults to 100%

        Draw

        -

        Adds a Draw ImageOperation to chain. DrawOperation DataType objects can be -nested inside the Draw object.

        +

        Adds a Draw ImageOperation to chain. DrawOperation DataType objects can be nested inside the Draw +object.

        Parameters
        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        xloc X-Position where to draw nested image elements. no (defaults to 0) xlocX-Position where to draw nested image elements.No; defaults to 0
        yloc Y-Position where to draw nested image elements. no (defaults to 0) ylocY-Position where to draw nested image elements.No; defaults to 0
        @@ -204,58 +200,44 @@

        Since Apache Ant 1.8.0

        You can define filename transformations by using a - nested mapper element. The - default mapper used by - <image> is - the identity - mapper.

        +nested mapper element. The default mapper used +by <image> is the identity +mapper.

        -

        You can also use a filenamemapper type in place of the mapper - element.

        +

        You can also use a filenamemapper type in place of the mapper +element.

        Examples

        -
        - <image destdir="samples/low" overwrite="yes">
        -     <fileset dir="samples/full">
        -         <include name="**/*.jpg"/>
        -     </fileset>
        -     <scale width="160" height="160" proportions="fit"/>
        - </image>
        -
        +
        +<image destdir="samples/low" overwrite="yes">
        +    <fileset dir="samples/full">
        +        <include name="**/*.jpg"/>
        +    </fileset>
        +    <scale width="160" height="160" proportions="fit"/>
        +</image>

        Create thumbnails of my images and make sure they all fit within the 160x160 size whether the image is portrait or landscape.

        -
        +
         <image srcdir="src" includes="*.png">
             <scale proportions="width" width="40"/>
        -</image>
        -
        -

        Creates a thumbnail for all PNG-files in src in the size of 40 pixel keeping the proportions -and stores the src.

        +</image> +

        Creates a thumbnail for all PNG files in src of the size of 40 pixel keeping the +proportions and stores the src.

        -
        +
         <image srcdir="src" destdir="dest" includes="*.png">
             <scale proportions="width" width="40"/>
        -</image>
        -
        -

        Same as above but stores the result in dest.

        +</image> +

        Same as above but stores the result in dest.

        -
        +
         <image srcdir="src" destdir="dest" includes="*.png">
             <scale proportions="width" width="40"/>
             <globmapper from="*" to="scaled-*"/>
        -</image>
        -
        -

        Same as above but stores the resulting file names will be prefixed - by "scaled-".

        - -
        -
        - - +</image> +

        Same as above but stores the resulting file names will be prefixed by scaled-.

        - - diff -Nru ant-1.9.10/manual/Tasks/import.html ant-1.10.3/manual/Tasks/import.html --- ant-1.9.10/manual/Tasks/import.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/import.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -22,262 +21,205 @@ Import Task -

        Import

        +

        Import

        Description

        -

        - Imports another build file into the current project. -

        - -

        - On execution it will select the proper ProjectHelper to parse the imported - file, using the same algorithm as the one executed at - startup. The selected ProjectHelper - instance will then be responsible to actually parse the imported file. -

        - -

        - Note as seen above, this task heavily relies on the ProjectHelper - implementation and doesn't really perform any work of its own. If - you have configured Apache Ant to use a ProjectHelper other than Ant's - default, this task may or may not work. -

        - -

        - In the common use case where only Ant's default project helper is - used, it basically works like the - Entity - Includes as explained in the Ant FAQ, as if the imported file was - contained in the importing file, minus the top <project> - tag. -

        - -

        - The import task may only be used as a top-level task. This means that - it may not be used in a target. -

        -

        -There are two further functional aspects that pertain to this task and -that are not possible with entity includes: -

          -
        • target overriding
        • -
        • special properties
        • -
        -

        -

        Target overriding

        - -

        If a target in the main file is also present in at least one of the -imported files, the one from the main file takes precedence.

        - -

        So if I import for example a docsbuild.xml file named builddocs, -that contains a "docs" target, I can redefine it in my main -buildfile and that is the one that will be called. This makes it easy to -keep the same target name, so that the overriding target is still called -by any other targets--in either the main or imported buildfile(s)--for which -it is a dependency, with a different implementation. The target from docsbuild.xml is -made available by the name "builddocs.docs". -This enables the new implementation to call the old target, thus -enhancing it with tasks called before or after it.

        - -

        If you use the as attribute of the task, its value will be - used to prefix the overridden target's name instead of the name - attribute of the project tag.

        - -

        Special Properties

        - -

        Imported files are treated as they are present in the main -buildfile. This makes it easy to understand, but it makes it impossible -for them to reference files and resources relative to their path. -Because of this, for every imported file, Ant adds a property that -contains the path to the imported buildfile. With this path, the -imported buildfile can keep resources and be able to reference them -relative to its position.

        - -

        So if I import for example a docsbuild.xml file named builddocs, -I can get its path as ant.file.builddocs, similarly to the ant.file -property of the main buildfile.

        - -

        Note that "builddocs" is not the filename, but the name attribute -present in the imported project tag.

        -

        - If the imported file does not have a name attribute, the ant.file.projectname - property will not be set. -

        - -

        Since Ant 1.8.0 the task can also import resources from URLs or - classpath resources (which are URLs, really). If you need to know - whether the current build file's source has been a file or an URL - you can consult the - property ant.file.type.projectname (using the same - example as above ant.file.type.builddocs) which either have - the value "file" or "url".

        - -

        Resolving files against the imported file

        - -

        Suppose your main build file called importing.xml -imports a build file imported.xml, located anywhere on -the file system, and imported.xml reads a set of -properties from imported.properties:

        +

        Imports another build file into the current project.

        -
        <!-- importing.xml -->
        +  

        On execution it will select the proper ProjectHelper to parse the imported file, using the same + algorithm as the one executed at startup. The selected + ProjectHelper instance will then be responsible to actually parse the imported file.

        + +

        Note as seen above, this task heavily relies on the ProjectHelper + implementation and doesn't really perform any work of its own. If you have configured Apache + Ant to use a ProjectHelper other than Ant's default, this task may or may not work.

        + +

        In the common use case where only Ant's default project helper is used, it basically works like + the Entity Includes + as explained in the Ant FAQ, as if the imported file was contained in the importing file, + minus the top <project> tag.

        + +

        The import task may only be used as a top-level task. This means that it may not + be used in a target.

        + +

        There are two further functional aspects that pertain to this task and that are not possible + with entity includes:

        +
          +
        • target overriding
        • +
        • special properties
        • +
        +

        Target overriding

        + +

        If a target in the main file is also present in at least one of the imported files, the one + from the main file takes precedence.

        + +

        So if I import for example a docsbuild.xml file named builddocs, that + contains a docs target, I can redefine it in my main buildfile and that is the one that + will be called. This makes it easy to keep the same target name, so that the overriding target + is still called by any other targets—in either the main or imported buildfile(s)—for + which it is a dependency, with a different implementation. The target + from docsbuild.xml is made available by the name builddocs.docs. This + enables the new implementation to call the old target, thus enhancing it with tasks + called before or after it.

        + +

        If you use the as attribute of the task, its value will be used to prefix the + overridden target's name instead of the name attribute of the project + tag.

        + +

        Special properties

        + +

        Imported files are treated as they are present in the main buildfile. This makes it easy to + understand, but it makes it impossible for them to reference files and resources relative to + their path. Because of this, for every imported file, Ant adds a property that contains the + path to the imported buildfile. With this path, the imported buildfile can keep resources and be + able to reference them relative to its position.

        + +

        So if I import for example a docsbuild.xml file named builddocs, I can get + its path as ant.file.builddocs, similarly to the ant.file property of + the main buildfile.

        + +

        Note that builddocs is not the filename, but the name attribute present in + the imported project tag.

        + +

        If the imported file does not have a name attribute, + the ant.file.projectname property will not be set.

        + +

        Since Ant 1.8.0, the task can also import resources from URLs or classpath resources + (which are URLs, really). If you need to know whether the current build file's source has been + a file or an URL you can consult the property ant.file.type.projectname + (using the same example as above ant.file.type.builddocs) which either have the + value file or url.

        + +

        Resolving files against the imported file

        + +

        Suppose your main build file called importing.xml imports a build + file imported.xml, located anywhere on the file system, + and imported.xml reads a set of properties + from imported.properties:

        + +
        +<!-- importing.xml -->
         <project name="importing" basedir="." default="...">
        -  <import file="${path_to_imported}/imported.xml"/>
        +  <import file="${path_to_imported}/imported.xml"/>
         </project>
         
         <!-- imported.xml -->
         <project name="imported" basedir="." default="...">
        -  <property file="imported.properties"/>
        -</project>
        -
        + <property file="imported.properties"/> +</project>
        -

        This snippet however will resolve imported.properties -against the basedir of importing.xml, because the basedir -of imported.xml is ignored by Ant. The right way to use -imported.properties is:

        +

        This snippet however will resolve imported.properties against + the basedir of importing.xml, because the basedir + of imported.xml is ignored by Ant. The right way to + use imported.properties is:

        -
        +  
         <!-- imported.xml -->
         <project name="imported" basedir="." default="...">
        -  <dirname property="imported.basedir" file="${ant.file.imported}"/>
        -  <property file="${imported.basedir}/imported.properties"/>
        -</project>
        -
        - -

        As explained above ${ant.file.imported} stores the -path of the build script, that defines the project called -imported, (in short it stores the path to -imported.xml) and <dirname> takes its -directory. This technique also allows imported.xml to be -used as a standalone file (without being imported in other -project).

        - -

        The above description only works for imported files that actually - are imported from files and not from URLs. For files imported from - URLs using resources relative to the imported file requires you to - use tasks that can work on non-file resources in the first place. - To create a relative resource you'd use something like:

        - -
        -  <loadproperties>
        -    <url baseUrl="${ant.file.imported}"
        -         relativePath="imported.properties"/>
        -  </loadproperties>
        -
        + <dirname property="imported.basedir" file="${ant.file.imported}"/> + <property file="${imported.basedir}/imported.properties"/> +</project>
        + +

        As explained above ant.file.imported stores the path of the build script, that + defines the project called imported, (in short it stores the path + to imported.xml) and <dirname> takes + its directory. This technique also allows imported.xml to be used as a standalone + file (without being imported in other project).

        + +

        The above description only works for imported files that actually are imported from files and + not from URLs. For files imported from URLs using resources relative to the imported file + requires you to use tasks that can work on non-file resources in the first place. To create a + relative resource you'd use something like:

        + +
        +<loadproperties>
        +  <url baseUrl="${ant.file.imported}"
        +       relativePath="imported.properties"/>
        +</loadproperties>

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        - file - - The file to import. If this is a relative file name, the file name will be resolved - relative to the importing file. Note, this is unlike most other - ant file attributes, where relative files are resolved relative to ${basedir}. - Yes or a nested resource collectionfileThe file to import. If this is a relative file name, the file name will be resolved + relative to the importing file. Note: this is unlike most other + Ant file attributes, where relative files are resolved relative to basedir.Yes or a nested resource collection
        - optional - - If true, do not stop the build if the file does not exist, - default is false. - NooptionalIf true, do not stop the build if the file does not exist.No; default is false
        - as - - Specifies the prefix prepended to the target names. If - omitted, the name attribute of the project tag of the - imported file will be used. - NoasSpecifies the prefix prepended to the target names.No; defaults to name attribute of the project tag of the imported + file
        - prefixSeparator - - Specifies the separator to be used between the prefix and the - target name. Defaults to ".". - NoprefixSeparatorSpecifies the separator to be used between the prefix and the target name.No; defaults to .

        Parameters specified as nested elements

        -

        any resource or resource -collection

        - -

        The specified resources will be imported. Since Ant - 1.8.0

        +

        any resource or resource collection

        +

        Since Ant 1.8.0

        +

        The specified resources will be imported.

        Examples

        -
          <import file="../common-targets.xml"/>
        -
        +
        <import file="../common-targets.xml"/>
        -

        Imports targets from the common-targets.xml file that is in a parent -directory.

        +

        Imports targets from the common-targets.xml file that is in a parent directory.

        -
          <import file="${deploy-platform}.xml"/>
        -
        +
        <import file="${deploy-platform}.xml"/>
        -

        Imports the project defined by the property deploy-platform

        +

        Imports the project defined by the property deploy-platform

        -  <import>
        -    <javaresource name="common/targets.xml">
        -      <classpath location="common.jar"/>
        -    </javaresource>
        -  </import>
        -
        +<import> + <javaresource name="common/targets.xml"> + <classpath location="common.jar"/> + </javaresource> +</import> + +

        Imports targets from the targets.xml file that is inside the +directory common inside the jar file common.jar.

        + +

        How is <import> different from <include>?

        + +

        The short version: Use import if you intend to override a target, otherwise +use include.

        -

        Imports targets from the targets.xml file that is inside the - directory common inside the jar file common.jar.

        +

        When using import the imported targets are available by up to two names. Their +"normal" name without any prefix and potentially with a prefixed name (the value of +the as attribute or the imported project's name attribute, if any).

        -

        How is <import> different - from <include>?

        +

        When using include the included targets are only available in the prefixed form.

        -

        The short version: Use import if you intend to override a target, - otherwise use include.

        +

        When using import, the imported target's depends attribute remains +unchanged, i.e. it uses "normal" names and allows you to override targets in the dependency +list.

        -

        When using import the imported targets are available by up to two - names. Their "normal" name without any prefix and potentially with - a prefixed name (the value of the as attribute or the imported - project's name attribute, if any).

        - -

        When using include the included targets are only available in the - prefixed form.

        - -

        When using import, the imported target's depends attribute - remains unchanged, i.e. it uses "normal" names and allows you to - override targets in the dependency list.

        - -

        When using include, the included targets cannot be overridden and - their depends attributes are rewritten so that prefixed names are - used. This allows writers of the included file to control which - target is invoked as part of the dependencies.

        - -

        It is possible to include the same file more than once by using - different prefixes, it is not possible to import the same file more - than once.

        +

        When using include, the included targets cannot be overridden and +their depends attributes are rewritten so that prefixed names are used. This allows +writers of the included file to control which target is invoked as part of the dependencies.

        + +

        It is possible to include the same file more than once by using different prefixes, +it is not possible to import the same file more than once.

        Examples

        -

        nested.xml shall be:

        +

        nested.xml shall be:

         <project>
        @@ -288,10 +230,9 @@
           <target name="echo" depends="setUp">
             <echo>prop has the value ${prop}</echo>
           </target>
        -</project>
        -
        +</project> -

        When using import like in

        +

        When using import like in

         <project default="test">
        @@ -302,12 +243,11 @@
           <import file="nested.xml" as="nested"/>
         
           <target name="test" depends="nested.echo"/>
        -</project>
        -
        +</project> -

        Running the build file will emit: +

        Running the build file will emit:

        -
        +
         setUp:
         
         nested.echo:
        @@ -317,7 +257,7 @@
         
         
        -

        When using include like in

        +

        When using include like in

         <project default="test">
        @@ -328,12 +268,11 @@
           <include file="nested.xml" as="nested"/>
         
           <target name="test" depends="nested.echo"/>
        -</project>
        -
        +</project>
        -

        Running the target build file will emit: +

        Running the target build file will emit:

        -
        +
         nested.setUp:
         
         nested.echo:
        @@ -343,7 +282,7 @@
         
         
        -

        and there won't be any target named "echo" on the including build file.

        +

        and there won't be any target named echo on the including build file.

        diff -Nru ant-1.9.10/manual/Tasks/include.html ant-1.10.3/manual/Tasks/include.html --- ant-1.9.10/manual/Tasks/include.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/include.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -22,257 +21,200 @@ Include Task -

        Include

        +

        Include

        +

        Since Apache Ant 1.8.0

        Description

        -

        - Include another build file into the current project. -

        - -

        since Apache Ant 1.8.0

        - -

        - Note this task heavily relies on the ProjectHelper - implementation and doesn't really perform any work of its own. If - you have configured Ant to use a ProjectHelper other than Ant's - default, this task may or may not work. -

        - -

        - On execution it will read another Ant file into the same Project - rewriting the included target names and depends lists. This is - different - from Entity - Includes as explained in the Ant FAQ insofar as the target - names get prefixed by the included project's name or the as - attribute and do not appear as if the file was contained in the - including file. -

        -

        - The include task may only be used as a top-level task. This means that - it may not be used in a target. -

        -

        -There are two further functional aspects that pertain to this task and -that are not possible with entity includes: -

          -
        • target rewriting
        • -
        • special properties
        • -
        -

        -

        Target rewriting

        - -

        Any target in the included file will be renamed - to prefix.name where name is the original target's - name and prefix is either the value of the as - attribute or the name attribute of the project tag of - the included file.

        - -

        The depends attribute of all included targets is rewritten so that - all target names are prefixed as well. This makes the included file - self-contained.

        - -

        Note that prefixes nest, so if a build file includes a file with - prefix "a" and the included file includes another file with prefix - "b", then the targets of that last build file will be prefixed by - "a.b.".

        - -

        <import> contribute to the prefix as well, but - only if their as attribute has been specified. - -

        Special Properties

        - -

        Included files are treated as they are present in the main -buildfile. This makes it easy to understand, but it makes it impossible -for them to reference files and resources relative to their path. -Because of this, for every included file, Ant adds a property that -contains the path to the included buildfile. With this path, the -included buildfile can keep resources and be able to reference them -relative to its position.

        - -

        So if I include for example a docsbuild.xml file named builddocs, -I can get its path as ant.file.builddocs, similarly to the ant.file -property of the main buildfile.

        - -

        Note that "builddocs" is not the filename, but the name attribute -present in the included project tag.

        -

        - If the included file does not have a name attribute, the ant.file.projectname - property will not be set. -

        - -

        If you need to know whether the current build file's source has - been a file or an URL you can consult the - property ant.file.type.projectname (using the same - example as above ant.file.type.builddocs) which either have - the value "file" or "url".

        - -

        Resolving files against the included file

        - -

        Suppose your main build file called including.xml -includes a build file included.xml, located anywhere on -the file system, and included.xml reads a set of -properties from included.properties:

        +

        Include another build file into the current project.

        -
        <!-- including.xml -->
        +  

        Note this task heavily relies on the ProjectHelper implementation and doesn't + really perform any work of its own. If you have configured Ant to use a ProjectHelper other + than Ant's default, this task may or may not work.

        + +

        On execution it will read another Ant file into the same project rewriting the included + target names and depends lists. This is different + from Entity Includes + as explained in the Ant FAQ insofar as the target names get prefixed by the included + project's name or as attribute and do not appear as if the file was + contained in the including file.

        + +

        The include task may only be used as a top-level task. This means that + it may not be used in a target.

        + +

        There are two further functional aspects that pertain to this task and that are not possible + with entity includes:

        +
          +
        • target rewriting
        • +
        • special properties
        • +
        +

        Target rewriting

        + +

        Any target in the included file will be renamed to prefix.name where name is the + original target's name and prefix is either the value of the as attribute or + the name attribute of the project tag of the included file.

        + +

        The depends attribute of all included targets is rewritten so that all target names + are prefixed as well. This makes the included file self-contained.

        + +

        Note that prefixes nest, so if a build file includes a file with prefix q and the + included file includes another file with prefix b, then the targets of that last build + file will be prefixed by a.b..

        + +

        <import> contribute to the prefix as well, but only if their as + attribute has been specified. + +

        Special properties

        + +

        Included files are treated as they are present in the main buildfile. This makes it easy to + understand, but it makes it impossible for them to reference files and resources relative to + their path. Because of this, for every included file, Ant adds a property that contains the + path to the included buildfile. With this path, the included buildfile can keep resources and be + able to reference them relative to its position.

        + +

        So if I include for example a docsbuild.xml file named builddocs, I can get + its path as ant.file.builddocs, similarly to the ant.file property of + the main buildfile.

        + +

        Note that builddocs is not the filename, but the name attribute present in + the included project tag.

        +

        If the included file does not have a name attribute, + the ant.file.projectname property will not be set.

        + +

        If you need to know whether the current build file's source has been a file or an URL you can + consult the property ant.file.type.projectname (using the same example as + above ant.file.type.builddocs) which either have the value file + or url.

        + +

        Resolving files against the included file

        + +

        Suppose your main build file called including.xml includes a build + file included.xml, located anywhere on the file system, + and included.xml reads a set of properties + from included.properties:

        + +
        +<!-- including.xml -->
         <project name="including" basedir="." default="...">
        -  <include file="${path_to_included}/included.xml"/>
        +  <include file="${path_to_included}/included.xml"/>
         </project>
         
         <!-- included.xml -->
         <project name="included" basedir="." default="...">
        -  <property file="included.properties"/>
        -</project>
        -
        + <property file="included.properties"/> +</project>
        -

        This snippet however will resolve included.properties -against the basedir of including.xml, because the basedir -of included.xml is ignored by Ant. The right way to use -included.properties is:

        +

        This snippet however will resolve included.properties against + the basedir of including.xml, because the basedir + of included.xml is ignored by Ant. The right way to + use included.properties is:

        -
        +  
         <!-- included.xml -->
         <project name="included" basedir="." default="...">
        -  <dirname property="included.basedir" file="${ant.file.included}"/>
        -  <property file="${included.basedir}/included.properties"/>
        -</project>
        -
        - -

        As explained above ${ant.file.included} stores the -path of the build script, that defines the project called -included, (in short it stores the path to -included.xml) and <dirname> takes its -directory. This technique also allows included.xml to be -used as a standalone file (without being included in other -project).

        - -

        The above description only works for included files that actually - are included from files and not from URLs. For files included from - URLs using resources relative to the included file requires you to - use tasks that can work on non-file resources in the first place. - To create a relative resource you'd use something like:

        - -
        -  <loadproperties>
        -    <url baseUrl="${ant.file.included}"
        -         relativePath="included.properties"/>
        -  </loadproperties>
        -
        + <dirname property="included.basedir" file="${ant.file.included}"/> + <property file="${included.basedir}/included.properties"/> +</project>
        + +

        As explained above ant.file.included stores the path of the build script, that + defines the project called included, (in short it stores the path + to included.xml) and <dirname> takes + its directory. This technique also allows included.xml to be used as a standalone + file (without being included in other project).

        + +

        The above description only works for included files that actually are included from files and + not from URLs. For files included from URLs using resources relative to the included file + requires you to use tasks that can work on non-file resources in the first place. To create a + relative resource you'd use something like:

        + +
        +<loadproperties>
        +  <url baseUrl="${ant.file.included}"
        +       relativePath="included.properties"/>
        +</loadproperties>

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        - file - - The file to include. If this is a relative file name, the file name will be resolved - relative to the including file. Note, this is unlike most other - ant file attributes, where relative files are resolved relative to ${basedir}. - Yes or a nested resource collectionfileThe file to include. If this is a relative file name, the file name will be resolved + relative to the including file. Note, this is unlike most other + ant file attributes, where relative files are resolved relative to ${basedir}.Yes or a nested resource collection
        - optional - - If true, do not stop the build if the file does not exist, - default is false. - NooptionalIf true, do not stop the build if the file does not exist.No; default is false
        - as - - Specifies the prefix prepended to the target names. If - omitted, the name attribute of the project tag of the - included file will be used. - Yes, if the included file's - project tag doesn't specify a name attribute.asSpecifies the prefix prepended to the target names.Yes, if the included file's project tag doesn't specify a name + attribute (which is otherwise taken as default)
        - prefixSeparator - - Specifies the separator to be used between the prefix and the - target name. Defaults to ".". - NoprefixSeparatorSpecifies the separator to be used between the prefix and the target name.No; defaults to .

        Parameters specified as nested elements

        -

        any resource or resource -collection

        +

        any resource or resource collection

        The specified resources will be included.

        Examples

        -
          <include file="../common-targets.xml"/>
        -
        +
        <include file="../common-targets.xml"/>
        -

        Includes targets from the common-targets.xml file that is in a parent -directory.

        +

        Includes targets from the common-targets.xml file that is in a parent directory.

        -
          <include file="${deploy-platform}.xml"/>
        -
        +
        <include file="${deploy-platform}.xml"/>

        Includes the project defined by the property deploy-platform

        -  <include>
        -    <javaresource name="common/targets.xml">
        -      <classpath location="common.jar"/>
        -    </javaresource>
        -  </include>
        -
        +<include> + <javaresource name="common/targets.xml"> + <classpath location="common.jar"/> + </javaresource> +</include>
        -

        Includes targets from the targets.xml file that is inside the - directory common inside the jar file common.jar.

        +

        Includes targets from the targets.xml file that is inside the +directory common inside the jar file common.jar.

        -

        How is <import> different - from <include>?

        +

        How is <import> different from <include>?

        -

        The short version: Use import if you intend to override a target, - otherwise use include.

        +

        The short version: Use import if you intend to override a target, otherwise +use include.

        -

        When using import the imported targets are available by up to two - names. Their "normal" name without any prefix and potentially with - a prefixed name (the value of the as attribute or the imported - project's name attribute, if any).

        - -

        When using include the included targets are only available in the - prefixed form.

        - -

        When using import, the imported target's depends attribute - remains unchanged, i.e. it uses "normal" names and allows you to - override targets in the dependency list.

        - -

        When using include, the included targets cannot be overridden and - their depends attributes are rewritten so that prefixed names are - used. This allows writers of the included file to control which - target is invoked as part of the dependencies.

        - -

        It is possible to include the same file more than once by using - different prefixes, it is not possible to import the same file more - than once.

        +

        When using import the imported targets are available by up to two names. Their +"normal" name without any prefix and potentially with a prefixed name (the value of +the as attribute or the imported project's name attribute, if any).

        + +

        When using include the included targets are only available in the prefixed form.

        + +

        When using import, the imported target's depends attribute remains +unchanged, i.e. it uses "normal" names and allows you to override targets in the dependency +list.

        + +

        When using include, the included targets cannot be overridden and +their depends attributes are rewritten so that prefixed names are used. This allows +writers of the included file to control which target is invoked as part of the dependencies.

        + +

        It is possible to include the same file more than once by using different prefixes, +it is not possible to import the same file more than once.

        Examples

        -

        nested.xml shall be:

        +

        nested.xml shall be:

         <project>
        @@ -283,10 +225,9 @@
           <target name="echo" depends="setUp">
             <echo>prop has the value ${prop}</echo>
           </target>
        -</project>
        -
        +</project> -

        When using import like in

        +

        When using import like in

         <project default="test">
        @@ -297,12 +238,11 @@
           <import file="nested.xml" as="nested"/>
         
           <target name="test" depends="nested.echo"/>
        -</project>
        -
        +</project> -

        Running the build file will emit: +

        Running the build file will emit:

        -
        +
         setUp:
         
         nested.echo:
        @@ -312,7 +252,7 @@
         
         
        -

        When using include like in

        +

        When using include like in

         <project default="test">
        @@ -323,12 +263,11 @@
           <include file="nested.xml" as="nested"/>
         
           <target name="test" depends="nested.echo"/>
        -</project>
        -
        +</project>
        -

        Running the target build file will emit: +

        Running the target build file will emit:

        -
        +
         nested.setUp:
         
         nested.echo:
        @@ -338,7 +277,7 @@
         
         
        -

        and there won't be any target named "echo" on the including build file.

        +

        and there won't be any target named echo on the including build file.

        diff -Nru ant-1.9.10/manual/Tasks/input.html ant-1.10.3/manual/Tasks/input.html --- ant-1.9.10/manual/Tasks/input.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/input.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,175 +24,153 @@ -

        Input

        +

        Input

        Description

        -

        Allows user interaction during the build process by prompting for -input. To do so, it uses the configured -InputHandler.

        - -

        The prompt can be set via the message attribute or as character -data nested into the element.

        - -

        Optionally a set of valid input arguments can be defined via the -validargs attribute. Input task will not accept a value that doesn't match -one of the predefined.

        - -

        Optionally a property can be created from the value entered by the -user. This property can then be used during the following build -run. Input behaves according to property -task which means that existing properties cannot be overridden. -Since Apache Ant 1.6, <input> will not prompt for input if -a property should be set by the task that has already been set in the -project (and the task wouldn't have any effect).

        - -

        Historically, a regular complaint about this task has been that it echoes -characters to the console, this is a critical security defect, we must fix it -immediately, etc, etc. This problem was due to the lack in early versions of -Java of a (fully functional) facility for handling secure console input. -In Java 1.6 that shortcoming in Java's API was addressed and Ant versions 1.7.1 -and 1.8 have added support for Java 1.6's secure console input feature -(see handler type).

        - -

        -IDE behaviour depends upon the IDE: some hang waiting for input, some let you -type it in. For this situation, place the password in a (secured) property -file and load in before the input task.

        +

        Allows user interaction during the build process by prompting for input. To do so, it uses the +configured InputHandler.

        + +

        The prompt can be set via the message attribute or as character data nested into the +element.

        + +

        Optionally a set of valid input arguments can be defined via the validargs +attribute. Input task will not accept a value that doesn't match one of the +predefined.

        + +

        Optionally a property can be created from the value entered by the user. This property can then +be used during the following build run. Input then behaves +as property task which means that existing properties cannot be +overridden. Since Apache Ant 1.6, <input> will not prompt for input if +a property should be set by the task that has already been set in the project (and the task wouldn't +have any effect).

        + +

        Historically, a regular complaint about this task has been that it echoes characters to the +console, this is a critical security defect, we must fix it immediately, etc, etc. This problem was +due to the lack in early versions of Java of a (fully functional) facility for handling secure +console input. In Java 6 that shortcoming in Java's API was addressed and Ant versions 1.7.1 and +1.8 have added support for Java 6 secure console input feature (see handler +type).

        + +

        IDE behaviour depends upon the IDE: some hang waiting for input, some let you type it in. For +this situation, place the password in a (secured) property file and load in before +the input task.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        messagethe Message which gets displayed to the user - during the build run.Nomessagethe Message which gets displayed to the user during the build run.No
        validargscomma separated String containing valid input - arguments. If set, input task will reject any input not defined - here. Validargs are compared case sensitive. If you want 'a' and - 'A' to be accepted you will need to define both arguments within - validargs.Novalidargscomma separated String containing valid input arguments. If set, input task + will reject any input not defined here. Comparison of input to validargs is case + sensitive. If you want a and + A to be accepted you will need to define both arguments within validargs.No
        addpropertythe name of a property to be created from - input. Behaviour is equal to property - task which means that existing properties cannot be - overridden.Noaddpropertythe name of a property to be created from input. Behaviour is equal + to property task which means that existing properties cannot be + overridden.No
        defaultvalueDefines the default value of the property to be - created from input. Property value will be set to default if no - input is received.NodefaultvalueDefines the default value of the property to be created from input. Property value will be + set to default if no input is received.No
        -

        Parameters Specified as Nested Elements

        +

        Parameters specified as nested elements

        Handler

        -

        Since Ant 1.7, a nested <handler> element can be used to -specify an InputHandler, so that different InputHandlers may be used -among different Input tasks. +

        Since Ant 1.7, a nested <handler> element can be used to specify +an InputHandler, so that different InputHandlers may be used among +different Input tasks.

        - +
        - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - + - +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        typeone of "default","propertyfile", "greedy", or "secure" (since Ant 1.8). - One of these
        typeone of default, propertyfile, greedy, or secure (since Ant + 1.8).One of these
        refidReference to an InputHandler - defined elsewhere in the project. - refidReference to an InputHandler defined elsewhere in the + project.
        classnameThe name of an InputHandler subclass.classnameThe name of an InputHandler subclass.
        classpathThe classpath to use with classname.NoclasspathThe classpath to use with classname.No
        classpathrefThe refid of a classpath to use with classname.NoclasspathrefThe refid of a classpath to use with classname.No
        loaderrefThe refid of a classloader to use with classname. + loaderrefThe refid of a classloader to use with classname. NoNo
        -
        -The classpath can also be specified by means of one or more nested -<classpath> elements.

        +

        The classpath can also be specified by means of one or more nested <classpath> +elements.

        Examples

        -
          <input/>
        -

        Will pause the build run until return key is pressed when using the -default -InputHandler, the concrete behavior is defined by the InputHandler -implementation you use.

        -
          <input>Press Return key to continue...</input>
        -

        Will display the message "Press Return key to -continue..." and pause the build run until return key is pressed -(again, the concrete behavior is implementation dependent).

        -
          <input
        -    message="Press Return key to continue..."
        -  />
        -

        Will display the message "Press Return key to -continue..." and pause the build run until return key is pressed -(see above).

        +
        <input/>
        +

        Will pause the build run until return key is pressed when using +the default InputHandler, the concrete behavior is +defined by the InputHandler implementation you use.

        +
        <input>Press Return key to continue...</input>
        +

        Will display the message Press Return key to continue... and pause the build run until +return key is pressed (again, the concrete behavior is implementation dependent).

        +
        <input message="Press Return key to continue..."/>
        +

        Will display the message Press Return key to continue... and pause the build run until +return key is pressed (see above).

        -  <input
        -    message="All data is going to be deleted from DB continue (y/n)?"
        -    validargs="y,n"
        -    addproperty="do.delete"
        -  />
        -  <condition property="do.abort">
        -    <equals arg1="n" arg2="${do.delete}"/>
        -  </condition>
        -  <fail if="do.abort">Build aborted by user.</fail>
        +<input message="All data is going to be deleted from DB continue (y/n)?"
        +       validargs="y,n"
        +       addproperty="do.delete"/>
        +<condition property="do.abort">
        +  <equals arg1="n" arg2="${do.delete}"/>
        +</condition>
        +<fail if="do.abort">Build aborted by user.</fail>
         
        -

        Will display the message "All data is going to be deleted from -DB continue (y/n)?" and require 'y' to continue build or 'n' to -exit build with following message "Build aborted by -user.".

        -
          <input
        -    message="Please enter db-username:"
        -    addproperty="db.user"
        -  />
        -

        Will display the message "Please enter db-username:" and set the +

        Will display the message All data is going to be deleted from DB continue (y/n)? and +require y to continue build or n to exit build with following message Build aborted +by user..

        +
        +<input message="Please enter db-username:"
        +       addproperty="db.user"/>
        +

        Will display the message Please enter db-username: and set the property db.user to the value entered by the user.

        -
          <input
        -    message="Please enter db-username:"
        -    addproperty="db.user"
        -    defaultvalue="Scott-Tiger"
        -  />
        -

        Same as above, but will set db.user to the value -Scott- Tiger if the user enters no value (simply types -<return>).

        - +
        +<input message="Please enter db-username:"
        +       addproperty="db.user"
        +       defaultvalue="Scott-Tiger"/>
        +

        Same as above, but will set db.user to the value Scott-Tiger if the user +enters no value (simply presses return).

        diff -Nru ant-1.9.10/manual/Tasks/jar.html ant-1.10.3/manual/Tasks/jar.html --- ant-1.9.10/manual/Tasks/jar.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jar.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,524 +24,468 @@ -

        Jar

        +

        Jar

        Description

        Jars a set of files.

        -

        The basedir attribute is the reference directory from where to jar.

        +

        The basedir attribute is the reference directory from where to jar.

        Note that file permissions will not be stored in the resulting jarfile.

        -

        It is possible to refine the set of files that are being jarred. This can be -done with the includes, includesfile, excludes, excludesfile and defaultexcludes -attributes. With the includes or includesfile attribute you specify the files you want to -have included by using patterns. The exclude or excludesfile attribute is used to specify -the files you want to have excluded. This is also done with patterns. And -finally with the defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the + +

        It is possible to refine the set of files that are being jarred. This can be done with +the includes, includesfile, excludes, excludesfile +and defaultexcludes attributes. With the includes or includesfile +attribute you specify the files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This is +also done with patterns. And finally with the defaultexcludes attribute, you can specify +whether you want to use default exclusions or not. See the section +on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.

        -

        This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes basedir) as well as the nested -<include>, <exclude> and -<patternset> elements.

        -

        You can also use nested file sets for more flexibility, and specify -multiple ones to merge together different trees of files into one JAR. -The extended fileset and groupfileset child elements from the zip task are -also available in the jar task. -See the Zip task for more details and examples.

        - -

        The update parameter controls what happens if the JAR -file already exists. When set to yes, the JAR file is -updated with the files specified. When set to no (the -default) the JAR file is overwritten. An example use of this is -provided in the Zip task documentation. Please -note that ZIP files store file modification times with a granularity -of two seconds. If a file is less than two seconds newer than the -entry in the archive, Ant will not consider it newer.

        -

        If the manifest is omitted, a simple one will be supplied by Apache Ant.

        +

        This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes basedir) as well as +the nested <include>, <exclude> +and <patternset> elements.

        +

        You can also use nested file sets for more flexibility, and specify multiple ones to merge +together different trees of files into one JAR. The extended fileset +and groupfileset child elements from the zip task are also available in +the jar task. See the Zip task for more details and +examples.

        + +

        The update parameter controls what happens if the JAR file already exists. When set +to yes, the JAR file is updated with the files specified. When set to no (the default) +the JAR file is overwritten. An example use of this is provided in the Zip task +documentation. Please note that ZIP files store file modification times with a granularity of 2 +seconds. If a file is less than 2 seconds newer than the entry in the archive, Ant will not +consider it newer.

        -

        The whenmanifestonly parameter controls what happens when no -files, apart from the manifest file, or nested services, match. -If skip, the JAR is not created and a warning is issued. -If fail, the JAR is not created and the build is halted with an error. -If create, (default) an empty JAR file (only containing a manifest and services) -is created.

        - -

        (The Jar task is a shortcut for specifying the manifest file of a JAR file. -The same thing can be accomplished by using the fullpath -attribute of a zipfileset in a Zip task. The one difference is that if the -manifest attribute is not specified, the Jar task will -include an empty one for you.)

        - -

        Manifests are processed by the Jar task according to the -Jar file specification. -Note in particular that this may result in manifest lines greater than 72 bytes -being wrapped and continued on the next line.

        - -

        The Jar task checks whether you specified package information according to the - -versioning specification.

        - -

        Please note that the zip format allows multiple files of the same -fully-qualified name to exist within a single archive. This has been -documented as causing various problems for unsuspecting users. If you wish -to avoid this behavior you must set the duplicate attribute -to a value other than its default, "add".

        +

        If the manifest is omitted, a simple one will be supplied by Apache Ant.

        -

        To cryptographically sign your JAR file, use the SignJar task on the JAR that you create from this task.

        +

        The whenmanifestonly parameter controls what happens when no files, apart from the +manifest file, or nested services, match. If skip, the JAR is not created and a warning is +issued. If fail, the JAR is not created and the build is halted with an error. +If create (default), an empty JAR file (only containing a manifest and services) is +created.

        + +

        (The Jar task has a shortcut for specifying the manifest file of a JAR file. The +same thing can be accomplished by using the fullpath attribute of +a zipfileset in a Zip task. The one difference is that if +the manifest attribute is not specified, the Jar task will include an empty +one for you.)

        + +

        Manifests are processed by the Jar task according to +the Jar +file specification. Note in particular that this may result in manifest lines greater than 72 +bytes being wrapped and continued on the next line.

        + +

        The Jar task checks whether you specified package information according to +the versioning specification.

        + +

        Please note that the ZIP format allows multiple files of the same fully-qualified name to +exist within a single archive. This has been documented as causing various problems for unsuspecting +users. If you wish to avoid this behavior you must set the duplicate attribute to a value +other than its default, add.

        + +

        To cryptographically sign your JAR file, use the SignJar task on the +JAR that you create from this task.

        + +

        For creating a simple version of a JEP +238 multi-release jar, you don't need any special tools. Just set the +required manifest entry and place the files where required, as you could see in +the JEP 238 example. If you want to tune this kind of jar, +e.g. decreasing the size by deleting 'same' classes from the versions-branches, you have to do more +...

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        destfilethe JAR file to create.Yesdestfilethe JAR file to create.Yes
        basedirthe directory from which to jar the files.Nobasedirthe directory from which to jar the files.No
        compressNot only store data but also compress them, - defaults to true. Unless you set the keepcompression - attribute to false, this will apply to the entire archive, not - only the files you've added while updating.NocompressNot only store data but also compress them. Unless you set the keepcompression + attribute to false, this will apply to the entire archive, not only the files you've + added while updating.No; defaults to true
        keepcompressionFor entries coming from existing archives (like - nested zipfilesets or while updating the archive), keep - the compression as it has been originally instead of using the - compress attribute. Defaults false. Since Ant - 1.6NokeepcompressionFor entries coming from existing archives (like nested zipfilesets or while + updating the archive), keep the compression as it has been originally instead of using the + compress attribute. Since Ant 1.6No; defaults to false
        encodingThe character encoding to use for filenames - inside the archive. Defaults to UTF8. It is not - recommended to change this value as the created archive will - most likely be unreadable for Java otherwise. -
        See also the discussion in the - zip task page
        NoencodingThe character encoding to use for filenames inside the archive. It is not + recommended to change this value as the created archive will most likely be unreadable for + Java otherwise.
        See also the discussion in the zip + task page
        No; defaults to UTF8
        filesonlyStore only file entries, defaults to falseNofilesonlyStore only file entriesNo; defaults to false
        includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be includedNo; defaults to all (**)
        includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
        excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excludedNo; defaults to default excludes or none if defaultexcludes is no
        excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfileName of a file. Each line of this file is taken to be an exclude patternNo
        defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no)No; defaults to yes
        manifestthe manifest file to use. This can be either the location of a manifest, or the name of a jar added through a fileset. If its the name of an added jar, the task expects the manifest to be in the jar at META-INF/MANIFEST.MFNomanifestthe manifest file to use. This can be either the location of a manifest, or the name of a + jar added through a fileset. If its the name of an added jar, the task expects the manifest + to be in the jar at META-INF/MANIFEST.MFNo
        filesetmanifestbehavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. Valid values are "skip", "merge", and "mergewithoutmain". "merge" will merge all of the manifests together, and merge this into any other specified manifests. "mergewithoutmain" merges everything but the Main section of the manifests. Default value is "skip". + filesetmanifestbehavior when a manifest is found in a zipfileset + or zipgroupfileset file. Valid values are skip, merge, + and mergewithoutmain. merge will merge all of the manifests together, and merge + this into any other specified manifests. mergewithoutmain merges everything but the + Main section of the manifests. NoNo; defaults to skip
        updateindicates whether to update or overwrite the destination file if it already existsNo; defaults to false
        whenmanifestonlybehavior when no files match. Valid values are fail, skip, + and create.No; defaults to create
        duplicatebehavior when a duplicate file is found. Valid values are add, preserve, + and fail.No; defaults to add
        indexwhether to create + an index list to speed up classloading. This is a JDK 1.3+ specific feature. + Unless you specify additional jars with nested indexjars + elements, only the contents of this jar will be included in the index.No; defaults to false
        indexMetaInfwhether to include META-INF and its children in the index. Doesn't have any + effect if index is false.
        Sun's jar implementation used to skip + the META-INF directory and Ant followed that example. The behavior has been + changed with Java + 5. In order to avoid problems with Ant generated jars on Java 1.4 or earlier Ant will not + include META-INF unless explicitly asked to. Since Ant 1.8.0
        No; defaults to false
        manifestencodingThe encoding used to read the JAR manifest, when a manifest file is specified. The task + will always use UTF-8 when writing the manifest.No; defaults to default JVM character encoding
        roundupWhether the file modification times will be rounded up to the next even number of + seconds.
        Zip archives store file modification times with a granularity of 2 seconds, so + the times will either be rounded up or down. If you round down, the archive will always seem + out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a + different type of problems like JSPs inside a web archive that seem to be slightly more recent + than precompiled pages, rendering precompilation useless. Since Ant 1.6.2
        No; defaults to true
        levelNon-default level at which file compression should be performed. Valid values range + from 0 (no compression/fastest) to 9 (maximum compression/slowest). Since + Ant 1.7No
        strictConfigures how to handle breaks of the packaging version specification: +
          +
        • fail = throws a BuildException
        • +
        • warn = logs a message on warn level
        • +
        • ignore = logs a message on verbose level (default)
        • +
        Since Ant 1.7.1
        No; defaults to ignore
        updateindicates whether to update or overwrite - the destination file if it already exists. Default is "false".No
        whenmanifestonlybehavior when no files match. Valid values are "fail", "skip", and "create". Default is "create".No
        duplicatebehavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". No
        indexwhether to create an index - list to speed up classloading. This is a JDK 1.3+ specific - feature. Unless you specify additional jars with nested indexjars elements, only the - contents of this jar will be included in the index. Defaults to - false.No
        indexMetaInfwhether to include META-INF and its children in - the index. Doesn't have any effect if index is - false.
        - Sun's jar implementation used to skip the META-INF directory and - Ant followed that example. The behavior has been changed with - Java - 5. In order to avoid problems with Ant generated jars on - Java 1.4 or earlier Ant will not include META-INF unless - explicitly asked to.
        - Ant 1.8.0 - Defaults to false.
        No
        manifestencodingThe encoding used to read the JAR manifest, when - a manifest file is specified. The task will always use UTF-8 - when writing the manifest.No, defaults to the platform encoding.
        roundupWhether the file modification times will be - rounded up to the next even number of seconds.
        - Zip archives store file modification times with a granularity of - two seconds, so the times will either be rounded up or down. If - you round down, the archive will always seem out-of-date when you - rerun the task, so the default is to round up. Rounding up may - lead to a different type of problems like JSPs inside a web - archive that seem to be slightly more recent than precompiled - pages, rendering precompilation useless.
        - Defaults to true. Since Ant 1.6.2
        No
        levelNon-default level at which file compression should be - performed. Valid values range from 0 (no compression/fastest) to 9 - (maximum compression/slowest). Since Ant 1.7No
        strictConfigures how to handle breaks of the packaging version - specification:
          -
        • fail = throws a BuildException
        • -
        • warn = logs a message on warn level
        • -
        • ignore = logs a message on verbose level (default)
        • -
        - Since Ant 1.7.1
        No, defaults to ignore.
        preserve0permissionswhen updating an archive or adding entries from a - different archive Ant will assume that a Unix permissions value of - 0 (nobody is allowed to do anything to the file/directory) means - that the permissions haven't been stored at all rather than real - permissions and will instead apply its own default values.
        - Set this attribute to true if you really want to preserve the - original permission field.since Ant 1.8.0 +
        preserve0permissionswhen updating an archive or adding entries from a different archive Ant will assume that a + Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means + that the permissions haven't been stored at all rather than real permissions and will instead + apply its own default values.
        Set this attribute to true if you really want to + preserve the original permission field. since Ant 1.8.0
        No, default is falseNo; defaults to false
        useLanguageEncodingFlagWhether to set the language encoding flag if the encoding is UTF-8. This setting doesn't + have any effect if the encoding is not UTF-8. Since Ant 1.8.0.
        See also + the discussion in the zip task page
        No; defaults to true
        createUnicodeExtraFieldsWhether to create Unicode extra fields to store the file names a second time inside the + entry's metadata.
        Possible values are never, always + and not-encodeable which will only add Unicode extra fields if the file name + cannot.
        See also the discussion in the zip task page
        No; defaults to never
        fallbacktoUTF8Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a + file name cannot be encoded using the specified encoding. Since Ant 1.8.0.
        See + also the discussion in the zip task page
        No; defaults to false
        mergeClassPathAttributesWhether to merge the Class-Path attributes found in different manifests (if + merging manifests). If false, only the attribute of the last merged manifest will be + preserved. Since Ant 1.8.0.
        Unless you also set flattenAttributes + to true, this may result in manifests containing multiple Class-Path + attributes which violates the manifest specification.
        No; defaults to false
        flattenAttributesWhether to merge attributes occurring more than once in a section (this can only happen for + the Class-Path attribute) into a single attribute. Since Ant + 1.8.0.No; defaults to false
        useLanguageEncodingFlagWhether to set the language encoding flag if the - encoding is UTF-8. This setting doesn't have any effect if the - encoding is not UTF-8. - Since Ant 1.8.0. -
        See also the discussion in the - zip task page
        No, default is true
        createUnicodeExtraFieldsWhether to create unicode extra fields to store - the file names a second time inside the entry's metadata. -
        Possible values are "never", "always" and "not-encodeable" - which will only add Unicode extra fields if the file name cannot - be encoded using the specified encoding. - Since Ant 1.8.0. -
        See also the discussion in the - zip task page
        No, default is "never"
        fallbacktoUTF8Whether to use UTF-8 and the language encoding - flag instead of the specified encoding if a file name cannot be - encoded using the specified encoding. - Since Ant 1.8.0. -
        See also the discussion in the - zip task page
        No, default is false
        mergeClassPathAttributesWhether to merge the Class-Path attributes found - in different manifests (if merging manifests). If false, only - the attribute of the last merged manifest will be preserved. - Since Ant 1.8.0. -
        unless you also set flattenAttributes to true this may - result in manifests containing multiple Class-Path attributes - which violates the manifest specification.
        No, default is false
        flattenAttributesWhether to merge attributes occurring more than - once in a section (this can only happen for the Class-Path - attribute) into a single attribute. - Since Ant 1.8.0.No, default is false
        zip64ModeWhen to use Zip64 extensions for entries. The - possible values are "never", "always" and "as-needed". - Since Ant 1.9.1. -
        See also the discussion in the - zip task page
        No, default is "never"zip64ModeWhen to use Zip64 extensions for entries. The possible values + are never, always and as-needed. Since Ant 1.9.1.
        See also + the discussion in the zip task page
        No; defaults to never
        -

        Nested elements

        +

        Parameters specified as nested elements

        metainf

        -

        The nested metainf element specifies a FileSet. All files included in this fileset will -end up in the META-INF directory of the jar file. If this -fileset includes a file named MANIFEST.MF, the file is -ignored and you will get a warning.

        +

        The nested metainf element specifies +a FileSet. All files included in this fileset will end up in +the META-INF directory of the jar file. If this fileset includes a file +named MANIFEST.MF, the file is ignored and you will get a warning.

        manifest

        -

        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 -manifest task, but the file and mode +

        The nested manifest 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 +manifest task, but the file and mode attributes must be omitted.

        -

        -If both an inline manifest and an external file are both specified, the -manifests are merged. -

        - -

        When using inline manifests, the Jar task will check whether the manifest -contents have changed (i.e. the manifest as specified is different in any way -from the manifest that exists in the Jar, if it exists. -If the manifest values have changed the jar will be updated or rebuilt, as -appropriate. -

        - -

        indexjars

        - -

        since ant 1.6.2

        - -

        The nested indexjars element specifies a PATH like structure. Its content is -completely ignored unless you set the index attribute of the task to -true.

        - -

        The index created by this task will contain indices for the -archives contained in this path, the names used for the archives -depend on your manifest:

        +

        If both an inline manifest and an external file are both specified, the manifests are merged.

        + +

        When using inline manifests, the Jar task will check whether the manifest contents +have changed (i.e. the manifest as specified is different in any way from the manifest that exists +in the jar, if it exists. If the manifest values have changed, the jar will be updated or rebuilt, +as appropriate.

        + +

        indexjars

        + +

        Since Ant 1.6.2

        + +

        The nested indexjars element specifies a path-like +structure. Its content is completely ignored unless you set the index attribute of +the task to true.

        + +

        The index created by this task will contain indices for the archives contained in this path, the +names used for the archives depend on your manifest:

          -
        • If the generated jar's manifest contains no Class-Path - attribute, the file name without any leading directory path will be - used and all parts of the path will get indexed.
        • -
        • If the manifest contains a Class-Path attribute, this task will - try to guess which part of the Class-Path belongs to a given - archive. If it cannot guess a name, the archive will be skipped, - otherwise the name listed inside the Class-Path attribute will be - used.
        • +
        • If the generated jar's manifest contains no Class-Path attribute, the file name + without any leading directory path will be used and all parts of the path will get indexed.
        • +
        • If the manifest contains a Class-Path attribute, this task will try to guess + which part of the Class-Path belongs to a given archive. If it cannot guess a name, + the archive will be skipped, otherwise the name listed inside the Class-Path + attribute will be used.
        -

        This task will not create any index entries for archives that are - empty or only contain files inside the META-INF directory unless - the indexmetainf attribute has been set - to true.

        - -

        service

        - -

        since ant 1.7.0

        - -

        - The nested service element specifies a service. - Services are described in the - service provider overview. - The approach is to have providers JARs include files named by the service - provided, for example, - META-INF/services/javax.script.ScriptEngineFactory - which can include implementation class names, one per line (usually just one per JAR). - - The name of the - service is set by the "type" attribute. The classname implementing - the service is the the "provider" attribute, or it one wants to - specify a number of classes that implement the service, by - "provider" nested elements. -

        -

        - - - - - - - - - - - - - - - +

        This task will not create any index entries for archives that are empty or only contain files +inside the META-INF directory unless the indexmetainf attribute has been set +to true.

        + +

        service

        + +

        Since Ant 1.7.0

        + +

        The nested service element specifies a service. Services are described in +the service provider overview. The approach is to have providers JARs include files +named by the service provided, for +example, META-INF/services/javax.script.ScriptEngineFactory which can include +implementation class names, one per line (usually just one per JAR).

        + +

        The name of the service is set by the type attribute. The classname implementing the +service is the the provider attribute, or if one wants to specify a number of classes +that implement the service, by provider nested elements.

        +
        AttributeDescriptionRequired
        typeThe name of the service.Yes
        provider - The classname of the class implementing the service. - Yes, unless there is a nested - <provider> element.
        + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        typeThe name of the service.Yes
        providerThe classname of the class implementing the service.Yes, unless there is a nested <provider> element.
        -

        - The provider classname is specified either by the "provider" attribute, or - by a nested <provider> element, which has a single "classname" attribute. - If a JAR file has more that one implementation of the service, a number of - nested <provider> elements may be used. -

        - - +

        The provider classname is specified either by the provider attribute, or by a +nested <provider> element, which has a single classname attribute. If +a JAR file has more that one implementation of the service, a number of +nested <provider> elements may be used.

        +

        Examples

        Simple

        -
          <jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/>
        -

        jars all files in the ${build}/classes directory into a file -called app.jar in the ${dist}/lib directory.

        - +
        <jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/>
        +

        jars all files in the ${build}/classes directory into a file +called app.jar in the ${dist}/lib directory.

        With filters

        -
          <jar destfile="${dist}/lib/app.jar"
        -       basedir="${build}/classes"
        -       excludes="**/Test.class"
        -  />
        -

        jars all files in the ${build}/classes directory into a file -called app.jar in the ${dist}/lib directory. Files -with the name Test.class are excluded.

        - -
          <jar destfile="${dist}/lib/app.jar"
        -       basedir="${build}/classes"
        -       includes="mypackage/test/**"
        -       excludes="**/Test.class"
        -  />
        -

        jars all files in the ${build}/classes directory into a file -called app.jar in the ${dist}/lib directory. Only -files under the directory mypackage/test are used, and files with -the name Test.class are excluded.

        +
        <jar destfile="${dist}/lib/app.jar"
        +     basedir="${build}/classes"
        +     excludes="**/Test.class"/>
        +

        jars all files in the ${build}/classes directory into a file +called app.jar in the ${dist}/lib directory. Files with the +name Test.class are excluded.

        + +
        +<jar destfile="${dist}/lib/app.jar"
        +     basedir="${build}/classes"
        +     includes="mypackage/test/**"
        +     excludes="**/Test.class"/>
        +

        jars all files in the ${build}/classes directory into a file +called app.jar in the ${dist}/lib directory. Only files under the +directory mypackage/test are used, and files with the name Test.class are +excluded.

        Multiple filesets

        -
          <jar destfile="${dist}/lib/app.jar">
        +
        +<jar destfile="${dist}/lib/app.jar">
             <fileset dir="${build}/classes"
        -             excludes="**/Test.class"
        -    />
        +             excludes="**/Test.class"/>
             <fileset dir="${src}/resources"/>
        -  </jar>
        -

        jars all files in the ${build}/classes directory and also -in the ${src}/resources directory together into a file -called app.jar in the ${dist}/lib directory. -Files with the name Test.class are excluded. -If there are files such as ${build}/classes/mypackage/MyClass.class -and ${src}/resources/mypackage/image.gif, they will appear -in the same directory in the JAR (and thus be considered in the same package -by Java).

        +</jar>
        +

        jars all files in the ${build}/classes directory and also in +the ${src}/resources directory together into a file called app.jar in +the ${dist}/lib directory. Files with the name Test.class are excluded. +If there are files such as ${build}/classes/mypackage/MyClass.class +and ${src}/resources/mypackage/image.gif, they will appear in the same directory in the +JAR (and thus be considered in the same package by Java).

        Merging archives

        -
         <jar destfile="build/main/checksites.jar">
        +
        +<jar destfile="build/main/checksites.jar">
             <fileset dir="build/main/classes"/>
             <zipfileset includes="**/*.class" src="lib/main/some.jar"/>
             <manifest>
               <attribute name="Main-Class"
        -            value="com.acme.checksites.Main"/>
        +                 value="com.acme.checksites.Main"/>
             </manifest>
        -  </jar>
        -

        - Creates an executable jar file with a main class "com.acme.checksites.Main", and - embeds all the classes from the jar lib/main/some.jar. -

        +</jar> +

        Creates an executable jar file with a main class com.acme.checksites.Main, and +embeds all the classes from the jar lib/main/some.jar.

        -
         <jar destfile="build/main/checksites.jar">
        +
        +<jar destfile="build/main/checksites.jar">
             <fileset dir="build/main/classes"/>
             <restrict>
        -     <name name="**/*.class"/>
        -     <archives>
        -       <zips>
        -         <fileset dir="lib/main" includes="**/*.jar"/>
        -       </zips>
        -     </archives>
        +       <name name="**/*.class"/>
        +       <archives>
        +           <zips>
        +               <fileset dir="lib/main" includes="**/*.jar"/>
        +           </zips>
        +       </archives>
             </restrict>
             <manifest>
        -      <attribute name="Main-Class"
        -            value="com.acme.checksites.Main"/>
        +        <attribute name="Main-Class"
        +              value="com.acme.checksites.Main"/>
             </manifest>
        -  </jar>
        -

        - Creates an executable jar file with a main class "com.acme.checksites.Main", and - embeds all the classes from all the jars in lib/main. -

        +</jar> +

        Creates an executable jar file with a main class com.acme.checksites.Main, and +embeds all the classes from all the jars in lib/main.

        Inline manifest

        -
          <jar destfile="test.jar" basedir=".">
        +
        +<jar destfile="test.jar" basedir=".">
             <include name="build"/>
             <manifest>
        -      <!-- If this is an Applet or Web Start application, include
        -           the proper attributes from http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/index.html -->
        -      <attribute name="Permissions" value="sandbox"/>
        -      <attribute name="Codebase" value="example.com"/>
        -      <!-- Who is building this jar? -->
        -      <attribute name="Built-By" value="${user.name}"/>
        -      <!-- Information about the program itself -->
        -      <attribute name="Implementation-Vendor" value="ACME inc."/>
        -      <attribute name="Implementation-Title" value="GreatProduct"/>
        -      <attribute name="Implementation-Version" value="1.0.0beta2"/>
        -      <!-- details -->
        -      <section name="common/MyClass.class">
        -        <attribute name="Sealed" value="false"/>
        -      </section>
        +        <!-- If this is an Applet or Web Start application, include
        +             the proper attributes from https://docs.oracle.com/javase/8/docs/technotes/guides/jweb/index.html -->
        +        <attribute name="Permissions" value="sandbox"/>
        +        <attribute name="Codebase" value="example.com"/>
        +        <!-- Who is building this jar? -->
        +        <attribute name="Built-By" value="${user.name}"/>
        +        <!-- Information about the program itself -->
        +        <attribute name="Implementation-Vendor" value="ACME inc."/>
        +        <attribute name="Implementation-Title" value="GreatProduct"/>
        +        <attribute name="Implementation-Version" value="1.0.0beta2"/>
        +        <!-- details -->
        +        <section name="common/MyClass.class">
        +            <attribute name="Sealed" value="false"/>
        +        </section>
             </manifest>
        -  </jar>
        -

        -This is an example of an inline manifest specification including the version of the build -program (Implementation-Version). Note that the Built-By attribute will take the value of the Ant -property ${user.name}. The manifest produced by the above would look like this: -

        +</jar> +

        This is an example of an inline manifest specification including the version of the build program +(Implementation-Version). Note that the Built-By attribute will take the +value of the Ant property user.name. The manifest produced by the above would look like +this:

        -
        Manifest-Version: 1.0
        +
        +Manifest-Version: 1.0
         Permissions: sandbox
         Codebase: example.com
         Built-By: conor
        @@ -551,38 +495,52 @@
         Created-By: Apache Ant 1.9.2
         
         Name: common/MyClass.class
        -Sealed: false
        +Sealed: false

        Service Provider

        -

        - The following shows how to create a jar file specifying a service - with an implementation of the JDK6 scripting interface: -

        -
        <jar destfile="pinky.jar">
        -  <fileset dir="build/classes"/>
        -  <service type="javax.script.ScriptEngineFactory"
        -           provider="org.acme.PinkyLanguage"/>
        -</jar>
        -
        - - - -

        - The following shows how to create a jar file specifing a service - with two implementations of the JDK6 scripting interface: -

        -
        +

        The following shows how to create a jar file specifying a service with an implementation of the +JDK 6 scripting interface:

        +
        +<jar destfile="pinky.jar">
        +    <fileset dir="build/classes"/>
        +    <service type="javax.script.ScriptEngineFactory"
        +             provider="org.acme.PinkyLanguage"/>
        +</jar>
        + +

        The following shows how to create a jar file specifying a service with two implementations of the +JDK 6 scripting interface:

        +
         <jar destfile="pinkyandbrain.jar">
        -  <fileset dir="classes"/>
        -  <service type="javax.script.ScriptEngineFactory">
        -    <provider classname="org.acme.PinkyLanguage"/>
        -    <provider classname="org.acme.BrainLanguage"/>
        -  </service>
        -</jar>
        -
        - - + <fileset dir="classes"/> + <service type="javax.script.ScriptEngineFactory"> + <provider classname="org.acme.PinkyLanguage"/> + <provider classname="org.acme.BrainLanguage"/> + </service> +</jar> + +

        JEP 238 example: a Multi-Release JAR Files

        +

        Here we want to create a Multi-Release JAR File according the +specification JEP 238. It defines on +top of a JAR the possibility to place additional or overwriting classes in a jar, which are +available according to the Java version you run.
        Basically it says, that you have to set the +manifest entry Multi-Release: true and place all additional or overwriting classes +in META-INF/versions/number/package-structure, +e.g. META-INF/versions/9/org/apache/ant/MyClass.class

        +

        In this example we expect that the normal classes are compiled into ${java.classes} +and the Java 9 classes are compiled into ${java9.classes}.

        +
        +<jar destfile="mrjar.jar">
        +    <manifest>
        +        <!-- special mf-entry according to the spec -->
        +        <attribute name="Multi-Release" value="true"/>
        +    </manifest>
        +    <!-- directory structure according to the spec ... -->
        +    <!-- ... default classes loadable by old (<Java 9) versions -->
        +    <fileset dir="${java.classes}"/>
        +    <!-- ... per release classes, require Java 9+ for loadable via standard ClassLoader -->
        +    <zipfileset prefix="META-INF/versions/9/" dir="${java9.classes}"/>
        +</jar>
        diff -Nru ant-1.9.10/manual/Tasks/jarlib-available.html ant-1.10.3/manual/Tasks/jarlib-available.html --- ant-1.9.10/manual/Tasks/jarlib-available.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jarlib-available.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,110 +24,100 @@ -

        jarlib-available

        +

        jarlib-available

        Description

        -

        Check whether an extension is present in a fileset or an extensionSet. +

        Check whether an extension is present in a fileset or an extensionSet. If the extension is present then a property is set.

        -

        Note that this task -works with extensions as defined by the "Optional Package" specification. - For more information about optional packages, see the document -Optional Package Versioning in the documentation bundle for your -Java Standard Edition package, in file -guide/extensions/versioning.html or the online - -Extension and ExtensionSet documentation for further details

        +

        Note that this task works with extensions as defined by the "Optional Package" specification. +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        propertyThe name of property to set if extensions is available.YespropertyThe name of property to set if extensions is availableYes
        fileThe file to check for extensionNo, one of file, nested - ExtensionSet or nested fileset must be present.fileThe file to check for extensionYes, unless a nested + <extensionSet> or <fileset> is specified

        Parameters specified as nested elements

        extension

        -

        Extension the extension - to search for.

        +

        Extension the extension to search for.

        fileset

        -

        FileSets are used to select -sets of files to check for extension.

        +

        FileSets are used to select sets of files to check for +extension.

        extensionSet

        -

        ExtensionSets is the set - of extensions to search for extension in.

        +

        ExtensionSets is the set of extensions to search for +extension in.

        Examples

        -

        Search for extension in single file

        +

        Search for extension in single file

        -  <jarlib-available property="myext.present" file="myfile.jar">
        -    <extension
        -      extensionName="org.apache.tools.ant"
        -      specificationVersion="1.4.9"
        -      specificationVendor="Apache Software Foundation"/>
        -  </jarlib-available>
        +<jarlib-available property="myext.present" file="myfile.jar">
        +  <extension extensionName="org.apache.tools.ant"
        +             specificationVersion="1.4.9"
        +             specificationVendor="Apache Software Foundation"/>
        +</jarlib-available>
         
        -

        Search for extension in single file referencing external Extension

        +

        Search for extension in single file referencing external Extension

        -  <extension id="myext"
        -    extensionName="org.apache.tools.ant"
        -    specificationVersion="1.4.9"
        -    specificationVendor="Apache Software Foundation"/>
        -
        -  <jarlib-available property="myext.present" file="myfile.jar">
        -    <extension refid="myext"/>
        -  </jarlib-available>
        -
        -

        Search for extension in fileset

        +<extension id="myext" + extensionName="org.apache.tools.ant" + specificationVersion="1.4.9" + specificationVendor="Apache Software Foundation"/> + +<jarlib-available property="myext.present" file="myfile.jar"> + <extension refid="myext"/> +</jarlib-available> +

        Search for extension in fileset

        -  <extension id="myext"
        -    extensionName="org.apache.tools.ant"
        -    specificationVersion="1.4.9"
        -    specificationVendor="Apache Software Foundation"/>
        -
        -  <jarlib-available property="myext.present">
        -    <extension refid="myext"/>
        -    <fileset dir="lib">
        -      <include name="*.jar"/>
        -    </fileset>
        -  </jarlib-available>
        -
        -

        Search for extension in extensionSet

        +<extension id="myext" + extensionName="org.apache.tools.ant" + specificationVersion="1.4.9" + specificationVendor="Apache Software Foundation"/> + +<jarlib-available property="myext.present"> + <extension refid="myext"/> + <fileset dir="lib"> + <include name="*.jar"/> + </fileset> +</jarlib-available> +

        Search for extension in extensionSet

        -  <extension id="myext"
        -    extensionName="org.apache.tools.ant"
        -    specificationVersion="1.4.9"
        -    specificationVendor="Apache Software Foundation"/>
        -
        -  <jarlib-available property="myext.present">
        -    <extension refid="myext"/>
        -    <extensionSet id="exts3">
        -      <libfileset
        -        includeUrl="false"
        -        includeImpl="true"
        -        dir="lib">
        -        <include name="*.jar"/>
        -      </libfileset>
        -    </extensionSet>
        -  </jarlib-available>
        -
        - - +<extension id="myext" + extensionName="org.apache.tools.ant" + specificationVersion="1.4.9" + specificationVendor="Apache Software Foundation"/> + +<jarlib-available property="myext.present"> + <extension refid="myext"/> + <extensionSet id="exts3"> + <libfileset includeUrl="false" + includeImpl="true" + dir="lib"> + <include name="*.jar"/> + </libfileset> + </extensionSet> +</jarlib-available> diff -Nru ant-1.9.10/manual/Tasks/jarlib-display.html ant-1.10.3/manual/Tasks/jarlib-display.html --- ant-1.9.10/manual/Tasks/jarlib-display.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jarlib-display.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,57 +24,48 @@ -

        jarlib-display

        +

        jarlib-display

        Description

        -

        Display the "Optional Package" and "Package Specification" information - contained within the specified jars.

        +

        Display the "Optional Package" and "Package Specification" information contained within the +specified jars.

        -

        Note that this task -works with extensions as defined by the "Optional Package" specification. - For more information about optional packages, see the document -Optional Package Versioning in the documentation bundle for your -Java Standard Edition package, in file -guide/extensions/versioning.html or the online - -Extension and ExtensionSet documentation for further details

        +

        Note that this task works with extensions as defined by the "Optional Package" specification. +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

        Parameters

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        fileThe file to display extension information about.No, but one of file or fileset must be - present.fileThe file to display extension information aboutYes, unless a nested <fileset> is specified

        Parameters specified as nested elements

        fileset

        -

        FileSets contain list of files to - display Extension information about.

        +

        FileSets contain list of files to display Extension +information about.

        Examples

        -

        Display Extension info for a single file

        -
        -  <jarlib-display file="myfile.jar">
        -
        +

        Display Extension info for a single file

        +
        <jarlib-display file="myfile.jar">
        -

        Display Extension info for a fileset

        +

        Display Extension info for a fileset

        -  <jarlib-display>
        -    <fileset dir="lib">
        -      <include name="*.jar"/>
        -    </fileset>
        -  </jarlib-display>
        -
        - - +<jarlib-display> + <fileset dir="lib"> + <include name="*.jar"/> + </fileset> +</jarlib-display> - diff -Nru ant-1.9.10/manual/Tasks/jarlib-manifest.html ant-1.10.3/manual/Tasks/jarlib-manifest.html --- ant-1.9.10/manual/Tasks/jarlib-manifest.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jarlib-manifest.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,78 +24,71 @@ -

        jarlib-manifest

        +

        jarlib-manifest

        Description

        -

        Task to generate a manifest that declares all the dependencies - in manifest. The dependencies are determined by looking in the - specified path and searching for Extension / "Optional Package" - specifications in the manifests of the jars.

        - -

        Note that this task -works with extensions as defined by the "Optional Package" specification. - For more information about optional packages, see the document -Optional Package Versioning in the documentation bundle for your -Java Standard Edition package, in file -guide/extensions/versioning.html or the online - -Extension and ExtensionSet documentation for further details

        +

        Task to generate a manifest that declares all the dependencies in manifest. The dependencies are +determined by looking in the specified path and searching for Extension / "Optional Package" +specifications in the manifests of the jars.

        + +

        Note that this task works with extensions as defined by the "Optional Package" specification. +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

        Parameters

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        destfileThe file to generate Manifest intoYes.destfileThe file to generate Manifest intoYes

        Parameters specified as nested elements

        extension

        -

        Extension the extension - that this library implements.

        +

        Extension the extension that this library implements.

        depends

        -

        ExtensionSets containing - all dependencies for jar.

        +

        ExtensionSets containing all dependencies for jar.

        options

        -

        ExtensionSets containing - all optional dependencies for jar. (Optional dependencies will be used if - present else they will be ignored)

        +

        ExtensionSets containing all optional dependencies for +jar. (Optional dependencies will be used if present else they will be ignored)

        Examples

        -

        Basic Manifest generated for single Extension

        +

        Basic Manifest generated for single Extension

         <extension id="e1"
        -    extensionName="MyExtensions"
        -    specificationVersion="1.0"
        -    specificationVendor="Peter Donald"
        -    implementationVendorID="vv"
        -    implementationVendor="Apache"
        -    implementationVersion="2.0"
        -    implementationURL="http://somewhere.com"/>
        +           extensionName="MyExtensions"
        +           specificationVersion="1.0"
        +           specificationVendor="Peter Donald"
        +           implementationVendorID="vv"
        +           implementationVendor="Apache"
        +           implementationVersion="2.0"
        +           implementationURL="http://somewhere.com"/>
         
         <jarlib-manifest destfile="myManifest.txt">
             <extension refid="e1"/>
        -</jarlib-manifest>
        -
        +</jarlib-manifest> -

        Search for extension in fileset

        -

        A large example with required and optional dependencies

        +

        Search for extension in fileset

        +

        A large example with required and optional dependencies

         <extension id="e1"
        -    extensionName="MyExtensions"
        -    specificationVersion="1.0"
        -    specificationVendor="Peter Donald"
        -    implementationVendorID="vv"
        -    implementationVendor="Apache"
        -    implementationVersion="2.0"
        -    implementationURL="http://somewhere.com"/>
        +           extensionName="MyExtensions"
        +           specificationVersion="1.0"
        +           specificationVendor="Peter Donald"
        +           implementationVendorID="vv"
        +           implementationVendor="Apache"
        +           implementationVersion="2.0"
        +           implementationURL="http://somewhere.com"/>
         
         <extensionSet id="option.ext">
             <libfileset dir="lib/option">
        @@ -113,11 +106,7 @@
             <extension refid="e1"/>
             <depends refid="depends.ext"/>
             <options refid="option.ext"/>
        -</jarlib-manifest>
        -
        - - +</jarlib-manifest> - diff -Nru ant-1.9.10/manual/Tasks/jarlib-resolve.html ant-1.10.3/manual/Tasks/jarlib-resolve.html --- ant-1.9.10/manual/Tasks/jarlib-resolve.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jarlib-resolve.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,188 +24,173 @@ -

        jarlib-resolve

        +

        jarlib-resolve

        Description

        -

        Try to locate a jar to satisfy an extension and place - location of jar into property. The task allows you to - add a number of resolvers that are capable of locating a - library for a specific extension. Each resolver will be attempted - in specified order until library is found or no resolvers are left. - If no resolvers are left and failOnError is true then a BuildException - will be thrown.

        - -

        Note that this task -works with extensions as defined by the "Optional Package" specification. - For more information about optional packages, see the document -Optional Package Versioning in the documentation bundle for your -Java2 Standard Edition package, in file -guide/extensions/versioning.html or the online - -Extension and ExtensionSet documentation for further details

        +

        Try to locate a jar to satisfy an extension and place location of jar into property. The task +allows you to add a number of resolvers that are capable of locating a library for a specific +extension. Each resolver will be attempted in specified order until library is found or no resolvers +are left. If no resolvers are left and failOnError is true then +a BuildException will be thrown.

        + +

        Note that this task works with extensions as defined by the "Optional Package" specification. +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        propertyThe name of property to set to library location.YespropertyThe name of property to set to library location.Yes
        failOnErrorTrue if failure to locate library should result in build exception.No, defaults to true.failOnErrortrue if failure to locate library should result in build exception.No; defaults to true
        checkExtensionTrue if libraries returned by nested resolvers should be checked to see if - they supply extension.No, defaults to true.checkExtensiontrue if libraries returned by nested resolvers should be checked to see if they + supply extension.No; defaults to true

        Parameters specified as nested elements

        extension

        -

        Extension the extension - to resolve. Must be present

        +

        Extension the extension to resolve. Must be present

        location

        -

        The location sub element allows you to look for a library in a - location relative to project directory.

        - - - - - +

        The location nested element allows you to look for a library in a location relative +to project directory.

        +
        AttributeDescriptionRequired
        + + + + - - - + + +
        AttributeDescriptionRequired
        locationThe pathname of library.YeslocationThe pathname of library.Yes

        url

        -

        The url resolver allows you to download a library from a URL to a - local file.

        - +

        The url resolver allows you to download a library from a URL to a local file.

        +
        - - - + + + - - - + + + - - - + + + - - - + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        urlThe URL to download.YesurlThe URL to download.Yes
        destfileThe file to download URL into.No, But one of destfile or - destdir must be presentdestfileThe file to download URL into.Exactly one of the two
        destdirThe directory in which to place downloaded file.No, But one of destfile or - destdir must be presentdestdirThe directory in which to place downloaded file.

        ant

        -

        The ant resolver allows you to run an Apache Ant build file to generate a library.

        - +

        The ant resolver allows you to run an Apache Ant build file to generate a +library.

        +
        - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        antfileThe build file.YesantfileThe build file.Yes
        destfileThe file that the ant build creates.YesdestfileThe file that the ant build creates.Yes
        targetThe target to run in build file.NotargetThe target to run in build file.No

        Examples

        -

        Resolve Extension to file. If file does not exist or file - does not implement extension then throw an exception.

        +

        Resolve Extension to file. If file does not exist or file does not implement +extension then throw an exception.

        -  <extension id="dve.ext"
        -    extensionName="org.realityforge.dve"
        -    specificationVersion="1.2"
        -    specificationVendor="Peter Donald"/>
        -
        -  <jarlib-resolve property="dve.library">
        -    <extension refid="dve.ext"/>
        -    <location location="/opt/jars/dve.jar"/>
        -  </jarlib-resolve>
        -
        +<extension id="dve.ext" + extensionName="org.realityforge.dve" + specificationVersion="1.2" + specificationVendor="Peter Donald"/> + +<jarlib-resolve property="dve.library"> + <extension refid="dve.ext"/> + <location location="/opt/jars/dve.jar"/> +</jarlib-resolve> -

        Resolve Extension to url. If url does not exist or can not write - to destfile or files does not implement extension then throw an exception.

        +

        Resolve Extension to URL. If URL does not exist or can not write +to destfile or file does not implement extension then throw an exception.

        -  <extension id="dve.ext"
        -    extensionName="org.realityforge.dve"
        -    specificationVersion="1.2"
        -    specificationVendor="Peter Donald"/>
        -
        -  <jarlib-resolve property="dve.library">
        -    <extension refid="dve.ext"/>
        -    <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/>
        -  </jarlib-resolve>
        -
        - -

        Resolve Extension to file produce by ant build. If file does not get produced - or ant file is missing or build fails then throw an exception (Note does not check - that library implements extension).

        +<extension id="dve.ext" + extensionName="org.realityforge.dve" + specificationVersion="1.2" + specificationVendor="Peter Donald"/> + +<jarlib-resolve property="dve.library"> + <extension refid="dve.ext"/> + <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/> +</jarlib-resolve> + +

        Resolve Extension to file produce by Ant build. If file does not get produced or +Ant file is missing or build fails then throw an exception. (Note: does not check +that library implements extension.)

        -  <extension id="dve.ext"
        -    extensionName="org.realityforge.dve"
        -    specificationVersion="1.2"
        -    specificationVendor="Peter Donald"/>
        -
        -  <jarlib-resolve property="dve.library" checkExtension="false">
        -    <extension refid="dve.ext"/>
        -    <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
        -  </jarlib-resolve>
        -
        - -

        Resolve Extension via multiple methods. First check local file to see if it implements - extension. If it does not then try to build it from source in parallel directory. If that - fails then finally try to download it from a website. If all steps fail then throw a build - exception.

        +<extension id="dve.ext" + extensionName="org.realityforge.dve" + specificationVersion="1.2" + specificationVendor="Peter Donald"/> + +<jarlib-resolve property="dve.library" checkExtension="false"> + <extension refid="dve.ext"/> + <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/> +</jarlib-resolve> + +

        Resolve Extension via multiple methods. First check local file to see if it +implements extension. If it does not then try to build it from source in parallel directory. If that +fails then finally try to download it from a website. If all steps fail then throw a build +exception.

        -  <extension id="dve.ext"
        -    extensionName="org.realityforge.dve"
        -    specificationVersion="1.2"
        -    specificationVendor="Peter Donald"/>
        -
        -  <jarlib-resolve property="dve.library">
        -    <extension refid="dve.ext"/>
        -    <location location="/opt/jars/dve.jar"/>
        -    <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
        -    <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/>
        -  </jarlib-resolve>
        -
        - - +<extension id="dve.ext" + extensionName="org.realityforge.dve" + specificationVersion="1.2" + specificationVendor="Peter Donald"/> + +<jarlib-resolve property="dve.library"> + <extension refid="dve.ext"/> + <location location="/opt/jars/dve.jar"/> + <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/> + <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/> +</jarlib-resolve> - diff -Nru ant-1.9.10/manual/Tasks/javacc.html ant-1.10.3/manual/Tasks/javacc.html --- ant-1.9.10/manual/Tasks/javacc.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/javacc.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,187 +24,169 @@ -

        JavaCC

        +

        JavaCC

        Description

        -

        - Invokes the JavaCC compiler - compiler on a grammar file. -

        -

        - To use the javacc task, set the target attribute to the name of the - grammar file to process. You also need to specify the directory containing - the JavaCC installation using the javacchome attribute, so that Apache Ant - can find the JavaCC classes. Optionally, you can also set the - outputdirectory to write the generated file to a specific directory. - Otherwise javacc writes the generated files to the directory containing - the grammar file. -

        -

        - This task only invokes JavaCC if the grammar file is newer than the generated - Java files. javacc assumes that the Java class name of the generated parser - is the same as the name of the grammar file, ignoring the .jj. - If this is not the case, the javacc task will still work, but it will always - generate the output files. -

        +

        Invokes the JavaCC compiler compiler on a grammar +file.

        +

        To use the javacc task, set the target attribute to the name of the +grammar file to process. You also need to specify the directory containing the JavaCC installation +using the javacchome attribute, so that Apache Ant can find the JavaCC classes. +Optionally, you can also set the outputdirectory to write the generated file to a +specific directory. Otherwise JavaCC writes the generated files to the directory containing the +grammar file.

        +

        This task only invokes JavaCC if the grammar file is newer than the generated .java +files. JavaCC assumes that the Java class name of the generated parser is the same as the name of +the grammar file, ignoring the .jj. If this is not the case, the javacc +task will still work, but it will always generate the output files.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        targetThe grammar file to process.YestargetThe grammar file to process.Yes
        javacchomeThe directory containing the JavaCC distribution.YesjavacchomeThe directory containing the JavaCC distribution.Yes
        outputdirectory - The directory to write the generated files to. If not set, the files - are written to the directory containing the grammar file. - NooutputdirectoryThe directory to write the generated files to. If not set, the files are written to the + directory containing the grammar file.No
        buildparserSets the BUILD_PARSER grammar option. This is a boolean option.NobuildparserSets the BUILD_PARSER grammar option. This is a boolean option.No
        buildtokenmanagerSets the BUILD_TOKEN_MANAGER grammar option. This is a boolean option.NobuildtokenmanagerSets the BUILD_TOKEN_MANAGER grammar option. This is a boolean option.No
        cachetokensSets the CACHE_TOKENS grammar option. This is a boolean option.NocachetokensSets the CACHE_TOKENS grammar option. This is a boolean option.No
        choiceambiguitycheckSets the CHOICE_AMBIGUITY_CHECK grammar option. This is an integer option.NochoiceambiguitycheckSets the CHOICE_AMBIGUITY_CHECK grammar option. This is an integer option.No
        commontokenactionSets the COMMON_TOKEN_ACTION grammar option. This is a boolean option.NocommontokenactionSets the COMMON_TOKEN_ACTION grammar option. This is a boolean option.No
        debuglookaheadSets the DEBUG_LOOKAHEAD grammar option. This is a boolean option.NodebuglookaheadSets the DEBUG_LOOKAHEAD grammar option. This is a boolean option.No
        debugparserSets the DEBUG_PARSER grammar option. This is a boolean option.NodebugparserSets the DEBUG_PARSER grammar option. This is a boolean option.No
        debugtokenmanagerSets the DEBUG_TOKEN_MANAGER grammar option. This is a boolean option.NodebugtokenmanagerSets the DEBUG_TOKEN_MANAGER grammar option. This is a boolean option.No
        errorreportingSets the ERROR_REPORTING grammar option. This is a boolean option.NoerrorreportingSets the ERROR_REPORTING grammar option. This is a boolean option.No
        forcelacheckSets the FORCE_LA_CHECK grammar option. This is a boolean option.NoforcelacheckSets the FORCE_LA_CHECK grammar option. This is a boolean option.No
        ignorecaseSets the IGNORE_CASE grammar option. This is a boolean option.NoignorecaseSets the IGNORE_CASE grammar option. This is a boolean option.No
        javaunicodeescapeSets the JAVA_UNICODE_ESCAPE grammar option. This is a boolean option.NojavaunicodeescapeSets the JAVA_UNICODE_ESCAPE grammar option. This is a boolean option.No
        jdkversionSets the JDK_VERSION option. This is a string option.No
        keeplinecolumnSets the KEEP_LINE_COLUMN grammar option. This is a boolean option.NojdkversionSets the JDK_VERSION option. This is a string option.No
        lookaheadSets the LOOKAHEAD grammar option. This is an integer option.NokeeplinecolumnSets the KEEP_LINE_COLUMN grammar option. This is a boolean option.No
        optimizetokenmanagerSets the OPTIMIZE_TOKEN_MANAGER grammar option. This is a boolean option.NolookaheadSets the LOOKAHEAD grammar option. This is an integer option.No
        otherambiguitycheckSets the OTHER_AMBIGUITY_CHECK grammar option. This is an integer option.NooptimizetokenmanagerSets the OPTIMIZE_TOKEN_MANAGER grammar option. This is a boolean option.No
        sanitycheckSets the SANITY_CHECK grammar option. This is a boolean option.NootherambiguitycheckSets the OTHER_AMBIGUITY_CHECK grammar option. This is an integer option.No
        staticSets the STATIC grammar option. This is a boolean option.NosanitycheckSets the SANITY_CHECK grammar option. This is a boolean option.No
        unicodeinputSets the UNICODE_INPUT grammar option. This is a boolean option.NostaticSets the STATIC grammar option. This is a boolean option.No
        usercharstreamSets the USER_CHAR_STREAM grammar option. This is a boolean option.NounicodeinputSets the UNICODE_INPUT grammar option. This is a boolean option.No
        usertokenmanagerSets the USER_TOKEN_MANAGER grammar option. This is a boolean option.NousercharstreamSets the USER_CHAR_STREAM grammar option. This is a boolean option.No
        maxmemoryMax amount of memory to allocate to the forked - VM. since Ant 1.8.3NousertokenmanagerSets the USER_TOKEN_MANAGER grammar option. This is a boolean option.No
        maxmemoryMax amount of memory to allocate to the forked JVM. since Ant 1.8.3No

        Example

        -
        -<javacc
        -    target="src/Parser.jj"
        -    outputdirectory="build/src"
        -    javacchome="c:/program files/JavaCC"
        -    static="true"
        -/>
        -
        -

        - This invokes JavaCC on grammar file src/Parser.jj, writing the generated - files to build/src. The grammar option STATIC is set to true when - invoking JavaCC. -

        - +
        +<javacc target="src/Parser.jj"
        +        outputdirectory="build/src"
        +        javacchome="c:/program files/JavaCC"
        +        static="true"/>
        +

        This invokes JavaCC on grammar file src/Parser.jj, writing the generated files +to build/src. The grammar option STATIC is set to true when invoking +JavaCC.

        - - diff -Nru ant-1.9.10/manual/Tasks/javac.html ant-1.10.3/manual/Tasks/javac.html --- ant-1.9.10/manual/Tasks/javac.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/javac.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + @@ -24,942 +24,750 @@ -

        Javac

        +

        Javac

        Description

        Compiles a Java source tree.

        -

        The source and destination directory will be recursively scanned for Java -source files to compile. Only Java files that have no corresponding -.class file -or where the class file is older than the -.java file will be compiled.

        -

        Note: Apache Ant uses only the names of the source and class files to find -the classes that need a rebuild. It will not scan the source and therefore -will have no knowledge about nested classes, classes that are named different -from the source file, and so on. See the -<depend> task -for dependency checking based on other than just -existence/modification times.

        -

        When the source files are part of a package, the directory structure of -the source tree should follow the package -hierarchy.

        -

        It is possible to refine the set of files that are being compiled. -This can be done with the includes, includesfile, -excludes, and excludesfile -attributes. With the includes or -includesfile attribute, you specify the files you want to -have included. -The exclude or excludesfile attribute is used -to specify -the files you want to have excluded. In both cases, the list of files -can be specified by either the filename, relative to the directory(s) specified -in the srcdir attribute or nested <src> -element(s), or by using wildcard patterns. See the section on -directory-based tasks, -for information on how the -inclusion/exclusion of files works, and how to write wildcard patterns.

        -

        It is possible to use different compilers. This can be specified by -either setting the global build.compiler property, which will -affect all <javac> tasks throughout the build, by -setting the compiler attribute, specific to the current -<javac> task or by using a nested element of any -typedeffed or -componentdeffed type that implements -org.apache.tools.ant.taskdefs.compilers.CompilerAdapter. -Valid values for either the -build.compiler property or the compiler -attribute are:

        +

        The source and destination directory will be recursively scanned for Java source files to +compile. Only .java files that have no corresponding .class file or where +the .class file is older than the .java file will be compiled.

        +

        Note: Apache Ant uses only the names of the source and class files to find the +classes that need a rebuild. It will not scan the source and therefore will have no knowledge about +nested classes, classes that are named differently from the source file, and so on. See +the <depend> task for dependency checking +based on other than just existence/modification times.

        +

        When the source files are part of a package, the directory structure of the source tree should +follow the package hierarchy.

        +

        It is possible to refine the set of files that are being compiled. This can be done with +the includes, includesfile, excludes, and excludesfile +attributes. With the includes or includesfile attribute, you specify the files +you want to have included. The exclude or excludesfile attribute is used to +specify the files you want to have excluded. In both cases, the list of files can be specified by +either the filename, relative to the directory(s) specified in the srcdir attribute or +nested <src> element(s), or by using wildcard patterns. See the section +on directory-based tasks, for information on how +the inclusion/exclusion of files works, and how to write wildcard patterns.

        +

        It is possible to use different compilers. This can be specified by either +setting the global build.compiler property, which will affect +all <javac> tasks throughout the build, by setting the compiler +attribute, specific to the current <javac> task or by using a nested element of +any typedeffed or componentdeffed type +that implements org.apache.tools.ant.taskdefs.compilers.CompilerAdapter. Valid values +for either the build.compiler property or the compiler attribute are:

          -
        • classic (the standard compiler of JDK 1.1/1.2) – - javac1.1 and - javac1.2 can be used as aliases.
        • -
        • modern (the standard compiler of JDK 1.3 and later) – - javac1.3 and - javac1.4 and - javac1.5 and - javac1.6 and - javac1.7 (since Ant 1.8.2) and - javac1.8 (since Ant 1.8.3) and - javac1.9 (since Ant 1.9.5) and - javac9 (since Ant 1.9.8) and - javac10+ (since Ant 1.9.10) can be used as aliases.
        • -
        • jikes (the Jikes +
        • classic (the standard compiler of JDK 1.1/1.2) – javac1.1 + and javac1.2 can be used as aliases.
        • +
        • modern (the standard compiler of JDK 1.3 and later) + – javac1.3, javac1.4, javac1.5 and javac1.6, javac1.7 + (since Ant 1.8.2), javac1.8 (since Ant 1.8.3), javac1.9 + (since Ant 1.9.5), javac9 (since Ant 1.9.8) and javac10+ + (since Ant 1.10.2) can be used as aliases.
        • +
        • jikes (the Jikes compiler).
        • -
        • jvc (the Command-Line Compiler from Microsoft's SDK - for Java / Visual J++) – microsoft can be used - as an alias.
        • -
        • kjc (the kopi - compiler).
        • -
        • gcj (the gcj compiler from gcc).
        • -
        • sj (Symantec java compiler) – - symantec can be used as an alias.
        • -
        • extJavac (run either modern or classic in a JVM of - its own).
        • +
        • jvc (the Command-Line Compiler from Microsoft's SDK for Java / Visual J++) + – microsoft can be used as an alias.
        • +
        • kjc + (the kopi compiler).
        • +
        • gcj (the gcj compiler + from GCC).
        • +
        • sj (Symantec Java compiler) – symantec can be used as an alias.
        • +
        • extJavac (run either modern or classic in a JVM of its own).
        -

        The default is javac1.x with x depending -on the JDK version you use while you are running Ant. -If you wish to use a different compiler interface than those -supplied, you can write a class that implements the CompilerAdapter interface -(package org.apache.tools.ant.taskdefs.compilers). Supply the full -classname in the build.compiler property or the -compiler attribute. -

        -

        The fork attribute overrides the build.compiler property -or compiler attribute setting and -expects a JDK1.1 or higher to be set in JAVA_HOME. -

        -

        You can also use the compiler attribute to tell Ant -which JDK version it shall assume when it puts together the command -line switches - even if you set fork="true". -This is useful if you want to run the compiler of JDK 1.1 while you -current JDK is 1.2+. If you use -compiler="javac1.1" and (for example) -depend="true" Ant will use the command line -switch -depend instead of -Xdepend.

        -

        This task will drop all entries that point to non-existent -files/directories from the classpath it passes to the compiler.

        -

        The working directory for a forked executable (if any) is the - project's base directory.

        -

        Windows Note:When the modern compiler is used -in unforked mode on Windows, it locks up the files present in the -classpath of the <javac> task, and does not release them. -The side effect of this is that you will not be able to delete or move -those files later on in the build. The workaround is to fork when -invoking the compiler.

        -

        If you are using Java 8 or above and your source contains native - methods or fields annotated with the @Native annotation - you can set the nativeheaderdir attribute in order to - use the -h switch of javac to generate the - native header files. Note that the logic Ant uses to determine which - files to compile does not take native headers into account, i.e. if - the .class is more recent than the - corresponding .java file the file will not get compiled - even if a native header file generated for it would be outdated.

        +

        The default is javac1.x with x depending on the JDK version you use while you are +running Ant. If you wish to use a different compiler interface than those supplied, you can write a +class that implements the CompilerAdapter interface +(package org.apache.tools.ant.taskdefs.compilers). Supply the full classname in +the build.compiler property or the compiler attribute.

        +

        The fork attribute overrides the build.compiler property +or compiler attribute setting and expects a JDK 1.1 or higher to be set +in JAVA_HOME.

        +

        You can also use the compiler attribute to tell Ant which JDK version it shall assume +when it puts together the command line switches—even if you set fork=true. +This is useful if you want to run the compiler of JDK 1.1 while your current JDK is 1.2+. If you +use compiler=javac1.1 and (for example) depend=true, Ant will +use the command line switch -depend instead of -Xdepend.

        +

        This task will drop all entries that point to non-existent files/directories from the classpath +it passes to the compiler.

        +

        The working directory for a forked executable (if any) is the project's base directory.

        +

        Windows Note: When the modern compiler is used in unforked mode on Windows, it +locks up the files present in the classpath of the <javac> task, and does not +release them. The side effect of this is that you will not be able to delete or move those files +later on in the build. The workaround is to fork when invoking the compiler.

        +

        If you are using Java 8 or above and your source contains native methods or fields annotated with +the @Native annotation you can set the nativeheaderdir attribute in order to +use the -h switch of javac to generate the native header files. Note that +the logic Ant uses to determine which files to compile does not take native headers into account, +i.e. if the .class is more recent than the corresponding .java file the +file will not get compiled even if a native header file generated for it would be outdated.

        Parameters

        - +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        srcdirLocation of the java files. (See the note below.)Yes, unless nested <src> elements or modulesourcepath + attribute or corresponding elements are present
        destdirLocation to store the class files.No
        includesComma- or space-separated list of patterns of files that must be included.No; defaults to all .java files
        includesfileName of a file. Each line of this file is taken to be an include pattern.No
        excludesComma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
        excludesfileName of a file. Each line of this file is taken to be an exclude pattern.No
        defaultexcludesIndicates whether default excludes should be used or not (yes|no).No; defaults to yes
        classpathThe classpath to use.No
        sourcepathThe sourcepath to use. To suppress the sourcepath switch, + use sourcepath=.No; defaults to srcdir unless nested <src> elements are + specified
        bootclasspathLocation of bootstrap class files. (See below for using + the -X and -J-X parameters for specifying the bootstrap + classpath).No
        classpathrefThe classpath to use, given as a reference + to a path defined elsewhere.No
        sourcepathrefThe sourcepath to use, given as + a reference to a path defined elsewhere.No
        bootclasspathrefThe bootstrapclasspath to use, given as + a reference to a path defined elsewhere.No
        extdirsLocation of installed extensions.No
        encodingEncoding of source files. (Note: gcj doesn't support this + option yet.)No
        nowarnIndicates whether the -nowarn switch should be passed to the compiler.No; defaults to off
        debugIndicates whether source should be compiled with debug information. If set + to off, -g:none will be passed on the command line for compilers that + support it (for other compilers, no command line argument will be used). If set + to true, the value of the debuglevel attribute determines the command line + argument.No; defaults to off
        debuglevelKeyword list to be appended to the -g command-line switch. Legal values + are none or a comma-separated list of the following + keywords: lines, vars, and source.No; ignored when debug is false or any implementation other + than modern, javac1.2 and jikes; by default, nothing will be appended + to -g
        optimizeIndicates whether source should be compiled with optimization. Note that + this flag is just ignored by Sun's javac since JDK 1.3 (because compile-time + optimization is unnecessary).No; defaults to off
        deprecationIndicates whether source should be compiled with deprecation information.No; defaults to off
        verboseAsks the compiler for verbose output.No; defaults to no
        dependEnables dependency tracking for compilers that support this (jikes + and classic).No
        includeAntRuntimeWhether to include the Ant run-time libraries in the classpath. It is usually best + to set this to false so the script's behavior is not sensitive to the environment in + which it is run.No; defaults to yes, + unless build.sysclasspath property is set
        includeJavaRuntimeWhether to include the default run-time libraries from the executing JVM in the + classpath.
        Note: In some setups the run-time libraries may be part of the + "Ant run-time libraries" so you may need to explicitly set includeAntRuntime + to false to ensure that the Java run-time libraries are not included.
        No; defaults to no
        forkWhether to execute javac using the JDK compiler externally.No; defaults to no
        executableComplete path to the javac executable to use in case of fork + is yes.
        Since Ant 1.6 this attribute can also be used to specify the path + to the executable when using jikes, jvc, gcj or sj.
        No; defaults to the compiler of current JDK, ignored if fork is no
        memoryInitialSizeThe initial size of the memory for the underlying JVM, if javac is run + externally. (Examples: 83886080, 81920k, or 80m)No; defaults to the standard JVM memory setting, ignored if fork + is no
        memoryMaximumSizeThe maximum size of the memory for the underlying JVM, if javac is run + externally; ignored otherwise. (Examples: 83886080, 81920k, or 80m)No; defaults to the standard JVM memory setting, ignored if fork + is no
        failonerrorIndicates whether compilation errors will fail the build>.No; defaults to true
        errorPropertyThe property to set to true if compilation fails. Since Ant 1.7.1.No
        AttributeDescriptionRequired
        srcdirLocation of the java files. (See the - note below.)Yes, unless nested <src> elements or modulesourcepath attribute or elements are present.
        destdirLocation to store the class files.No
        includesComma- or space-separated list of files (may be specified using - wildcard patterns) that must be - included; all .java files are included when omitted.No
        includesfileThe name of a file that contains a list of files to - include (may be specified using wildcard patterns).No
        excludesComma- or space-separated list of files (may be specified using - wildcard patterns) that must be excluded; no files (except default - excludes) are excluded when omitted.No
        excludesfileThe name of a file that contains a list of files to - exclude (may be specified using wildcard patterns).No
        classpathThe classpath to use.No
        sourcepathThe sourcepath to use; defaults to the value of the srcdir attribute (or nested <src> elements). - To suppress the sourcepath switch, use sourcepath="".No
        bootclasspath - Location of bootstrap class files. (See below - for using the -X and -J-X parameters for specifying - the bootstrap classpath). - No
        classpathrefThe classpath to use, given as a - reference to a path defined elsewhere.No
        sourcepathrefThe sourcepath to use, given as a - reference to a path defined elsewhere.No
        bootclasspathrefLocation of bootstrap class files, given as a - reference to a path defined elsewhere.No
        extdirsLocation of installed extensions.No
        encodingEncoding of source files. (Note: gcj doesn't support - this option yet.)No
        nowarnIndicates whether the -nowarn switch - should be passed to the compiler; defaults to off.No
        debugIndicates whether source should be compiled with - debug information; defaults to off. If set to - off, -g:none will be passed on the - command line for compilers that support it (for other compilers, no - command line argument will be used). If set to true, - the value of the debuglevel attribute determines the - command line argument.No
        debuglevelKeyword list to be appended to the -g - command-line switch. This will be ignored by all implementations except - modern, classic(ver >= 1.2) and jikes. - Legal values are none or a comma-separated list of the - following keywords: - lines, vars, and source. - If debuglevel is not specified, by default, - nothing will be - appended to -g. If debug is not turned on, - this attribute will be ignored. - No
        optimize - Indicates whether source should be compiled with - optimization; defaults to off. Note - that this flag is just ignored by Sun's javac starting - with JDK 1.3 (since compile-time optimization is unnecessary). - No
        deprecationIndicates whether source should be compiled with - deprecation information; defaults to off.No
        targetGenerate class files for specific VM version - (e.g., 1.1 or 1.2). 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). We highly recommend to always specify this - attribute.
        - A default value for this attribute can be provided using the magic - ant.build.javac.target - property.
        No
        verboseAsks the compiler for verbose output; defaults to - no.No
        depend Enables dependency-tracking - for compilers that support this (jikes and - classic).No
        includeAntRuntimeWhether to include the Ant run-time libraries in the - classpath; defaults to yes, unless - build.sysclasspath is set. - It is usually best to set this to false so the script's behavior is not - sensitive to the environment in which it is run.No
        includeJavaRuntimeWhether to include the default run-time - libraries from the executing VM in the classpath; - defaults to no.
        - Note: In some setups the run-time libraries may be part - of the "Ant run-time libraries" so you may need to explicitly - set includeAntRuntime to false to ensure that the Java - run-time libraries are not included.
        No
        forkWhether to execute javac using the - JDK compiler externally; defaults to no.No
        executableComplete path to the javac - executable to use in case of fork="yes". - Defaults to the compiler of the Java version that is currently - running Ant. Ignored if fork="no".
        - Since Ant 1.6 this attribute can also be used to specify the - path to the executable when using jikes, jvc, gcj or sj.
        No
        memoryInitialSizeThe initial size of the memory for the underlying VM, - if javac is run externally; ignored otherwise. Defaults - to the standard VM memory setting. - (Examples: 83886080, 81920k, or - 80m)No
        memoryMaximumSizeThe maximum size of the memory for the underlying VM, - if javac is run externally; ignored otherwise. Defaults - to the standard VM memory setting. - (Examples: 83886080, 81920k, or - 80m)No
        failonerrorIndicates whether compilation errors - will fail the build; defaults to true.No
        errorProperty - The property to set (to the value "true") if compilation fails. - Since Ant 1.7.1. - No
        sourceValue of the -source command-line - switch; will be ignored by all implementations prior to - javac1.4 (or modern when Ant is not - running in a 1.3 VM), gcj and jikes.
        - If you use this attribute together with gcj - or jikes, you must make sure that your version - supports the -source (or -fsource for - gcj) - switch. By default, no -source argument will be used - at all.
        - Note that the default value depends on the JVM that is running - Ant. We highly recommend to always specify this - attribute.
        - A default value for this attribute can be provided using the magic - ant.build.javac.source - property.
        No
        compilerThe compiler implementation to use. - If this attribute is not set, the value of the - build.compiler property, if set, will be used. - Otherwise, the default compiler for the current VM will be used. - (See the above list of valid - compilers.)No
        listfilesIndicates whether the source files to be compiled will - be listed; defaults to no.No
        tempdirWhere Ant should place temporary files. - This is only used if the task is forked and the - command line args length exceeds 4k. - Since Ant 1.6. - No; default is java.io.tmpdir. -
        updatedProperty - The property to set (to the value "true") - if compilation has taken place - and has been successful. - Since Ant 1.7.1. - No
        includeDestClasses - This attribute controls whether to include the - destination classes directory in the classpath - given to the compiler. - The default value of this is "true" and this - means that previously compiled classes are on - the classpath for the compiler. This means that "greedy" compilers - will not recompile dependent classes that are already compiled. - In general this is a good thing as it stops the compiler - for doing unnecessary work. However, for some edge cases, - involving generics, the javac compiler - needs to compile the dependent classes to get the generics - information. One example is documented in the bug report: - - Bug 40776 - a problem compiling a Java 5 project with generics. - Setting the attribute to "false" will cause the compiler - to recompile dependent classes. - Since Ant 1.7.1. - No - default is "true"
        createMissingPackageInfoClass - Some package level annotations in package-info.java - files don't create any package-info.class files so - Ant would recompile the same file every time.
        - Starting with Ant 1.8 Ant will create an - empty package-info.class for - each package-info.java if there isn't one created - by the compiler.
        - In some setups this additional class causes problems and it can - be suppressed by setting this attribute to "false". - Since Ant 1.8.3. -
        No - default is "true"
        modulepath - Specify where to find application modules. A list of directories of modules, module files or exploded modules. - since Ant 1.9.7 - No
        modulepathref - The modulepath to use, given as reference to a PATH defined elsewhere. - since Ant 1.9.7No
        modulesourcepath - Specify where to find input source files for multiple module compilation. - since Ant 1.9.7 - Yes, unless srcdir attribute or nested <src> elements are present
        modulesourcepathref - The modulesourcepath to use, given as reference to a PATH defined elsewhere. - since Ant 1.9.7No
        upgrademodulepath - Specify the location of modules that replace upgradeable modules in the runtime image. - since Ant 1.9.7 - No
        upgrademodulepathref - The upgrademodulepath to use, given as reference to a PATH defined elsewhere. - since Ant 1.9.7No
        nativeheaderdir - Specify where to place generated native header files. Ignored - when running on JDK < 8. - Since Ant 1.9.8. - No
        release - Specify the value for the --release switch. Ignored - when running on JDK < 9.
        - When set and running on JDK >= 9 the source and target - attributes as well as the bootclasspath will be ignored. - Since Ant 1.9.8. -
        NosourceJava language features accepted by compiler, as specified by the -source + command-line switch. Valid feature versions are 1.3, 1.4, 1.5 + or 5, etc. The attribute will be ignored by all implementations prior + to javac1.4 (or modern when Ant is not running in a JVM 1.3), gcj + and jikes.
        If you use this attribute together with gcj or jikes, you + must make sure that your version supports the -source (or -fsource + for gcj) switch.
        No; by default, no -source argument will be used at all unless the magic + ant.build.javac.source property is + set
        Note that the default value depends on JDK that is running Ant. We highly + recommend to always specify this attribute.
        targetGenerate class files for specific JVM version (cross-compile).No; by default, no -target argument will be used at all unless the + magic ant.build.javac.target property is + set
        Note that the default value depends on JDK that is running Ant and + on source + (see Cross-Compilation Options). We highly recommend to always specify this + attribute.
        compilerThe compiler implementation to use. See the above list of + valid compilers.No; defaults to the value of the build.compiler property, if set, or default + compiler for the current JDK otherwise
        listfilesIndicates whether the source files to be compiled will be listed.No; defaults to no
        tempdirWhere Ant should place temporary files. This is only used if the task is forked and the + command line args length exceeds 4 kB. Since Ant 1.6.No; default is java.io.tmpdir
        updatedPropertyThe property to set to true if compilation has taken place and has been + successful. Since Ant 1.7.1.No
        includeDestClassesThis attribute controls whether to include the destination classes directory in the + classpath given to the compiler. If set to true (default), previously compiled classes + are on the classpath for the compiler. This means that "greedy" compilers will not recompile + dependent classes that are already compiled. In general this is a good thing as it stops the + compiler for doing unnecessary work. However, for some edge cases, involving generics, + the javac compiler needs to compile the dependent classes to get the generics + information. One example is documented in the bug + report: Bug + 40776 - a problem compiling a Java 5 project with generics. Setting the attribute + to false will cause the compiler to recompile dependent classes. Since Ant + 1.7.1.No; default is true
        createMissingPackageInfoClassSome package level annotations in package-info.java files don't create + any package-info.class files so Ant would recompile the same file every + time.
        Since Ant 1.8, an empty package-info.class is created for + each package-info.java if there isn't one created by the compiler.
        In some + setups this additional class causes problems and it can be suppressed by setting this + attribute to false. Since Ant 1.8.3.
        No; default is true
        modulepathSpecify where to find application modules. A list of directories of modules, module files or + exploded modules. since Ant 1.9.7No
        modulepathrefThe modulepath to use, given as reference + to a path defined elsewhere. since Ant 1.9.7No
        modulesourcepathSpecify where to find input source files for multiple module compilation. since Ant + 1.9.7Yes, unless srcdir attribute or nested <src> elements are + present
        modulesourcepathrefThe modulesourcepath to use, given + as reference to a path defined elsewhere. since + Ant 1.9.7No
        upgrademodulepathSpecify the location of modules that replace upgradeable modules in the runtime + image. since Ant 1.9.7No
        upgrademodulepathrefThe upgrademodulepath to use, given + as reference to a path defined elsewhere. since Ant + 1.9.7No
        nativeheaderdirSpecify where to place generated native header files. Since Ant 1.9.8. + No, ignored when running on JDK 7 or earlier
        releaseSpecify the value for the --release switch.
        When set and running on JDK 9+ + the source and target attributes as well as the bootclasspath + will be ignored. Since Ant 1.9.8. +
        No, ignored when running on JDK 8 or earlier

        Parameters specified as nested elements

        -

        This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes srcdir) as well as the nested -<include>, <exclude> and -<patternset> elements.

        -

        srcdir, classpath, sourcepath, -bootclasspath, modulepath, modulesourcepath, -upgrademodulepath and extdirs

        -

        <javac>'s srcdir, classpath, -sourcepath, bootclasspath, -extdirs, modulepath, modulesourcepath, -and upgrademodulepath attributes are -path-like structures -and can also be set via nested -<src> (note the different name!), -<classpath>, -<sourcepath>, -<bootclasspath>, -<extdirs>, -<modulepath>, -<modulesourcepath> and -<upgrademodulepath> -elements, respectively.

        +

        This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes srcdir) as well as the +nested <include>, <exclude> +and <patternset> elements.

        +

        srcdir, classpath, sourcepath, bootclasspath, +modulepath, modulesourcepath, upgrademodulepath and extdirs

        +

        <javac>'s srcdir, classpath, sourcepath, +bootclasspath, extdirs, modulepath, modulesourcepath, +and upgrademodulepath attributes are path-like +structures and can also be set via nested <src> (note the different +name!), <classpath>, <sourcepath>, <bootclasspath>, +<extdirs>, <modulepath>, <modulesourcepath> +and <upgrademodulepath> elements, respectively.

        compilerarg

        -

        You can specify additional command line arguments for the compiler -with nested <compilerarg> elements. These elements -are specified like Command-line -Arguments but have an additional attribute that can be used to -enable arguments only if a given compiler implementation will be -used.

        - +

        You can specify additional command line arguments for the compiler with +nested <compilerarg> elements. These elements are specified +like Command-line Arguments but have an additional attribute that +can be used to enable arguments only if a given compiler implementation will be used.

        +
        - - - + + + - - - + + + - + - + - + - - - + + + - - + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        valueSee - Command-line Arguments.Exactly one of these.valueSee Command-line Arguments.Exactly one of these
        lineline
        filefile
        pathpath
        prefixSee - Command-line Arguments. - Since Ant 1.8.NoprefixSee Command-line Arguments. Since Ant + 1.8.No
        suffixNosuffixNo
        compilerOnly pass the specified argument if the chosen - compiler implementation matches the value of this attribute. - Legal values are the - same as those in the above list of valid - compilers.)NocompilerOnly pass the specified argument if the chosen compiler implementation matches the value of + this attribute. Legal values are the same as those in the + above list of valid compilers.)No
        -

        compilerclasspath since Ant 1.8.0

        - -

        A PATH like structure holding the - classpath to use when loading the compiler implementation if a - custom class has been specified. Doesn't have any effect when - using one of the built-in compilers.

        - -

        Any nested element of a type that implements CompilerAdapter - since Ant 1.8.0

        - -

        If a defined type implements the CompilerAdapter - interface a nested element of that type can be used as an - alternative to the compiler attribute.

        +

        compilerclasspath

        +

        Since Ant 1.8.0

        +

        A path-like structure holding the classpath to use when loading +the compiler implementation if a custom class has been specified. Doesn't have any effect when +using one of the built-in compilers.

        + +

        Any nested element of a type that implements CompilerAdapter

        +

        Since Ant 1.8.0

        +

        If a defined type implements the CompilerAdapter interface a nested element of that +type can be used as an alternative to the compiler attribute.

        Examples

        -
          <javac srcdir="${src}"
        -         destdir="${build}"
        -         classpath="xyz.jar"
        -         debug="on"
        -         source="1.4"
        -  />
        -

        compiles all .java files under the ${src} -directory, and stores -the .class files in the ${build} directory. -The classpath used includes xyz.jar, and compiling with -debug information is on. The source level is 1.4, -so you can use assert statements.

        - -
          <javac srcdir="${src}"
        -         destdir="${build}"
        -         fork="true"
        -         source="1.2"
        -         target="1.2"
        -  />
        -

        compiles all .java files under the ${src} -directory, and stores the .class files in the -${build} directory. This will fork off the javac -compiler using the default javac executable. -The source level is 1.2 (similar to 1.1 or 1.3) and -the class files should be runnable under JDK 1.2+ as well.

        - -
          <javac srcdir="${src}"
        -         destdir="${build}"
        -         fork="java$$javac.exe"
        -         source="1.5"
        -  />
        -

        compiles all .java files under the ${src} -directory, and stores the .class files in the -${build} directory. This will fork off the javac -compiler, using the executable named java$javac.exe. Note -that the $ sign needs to be escaped by a second one. -The source level is 1.5, so you can use generics.

        - -
          <javac srcdir="${src}"
        -         destdir="${build}"
        -         includes="mypackage/p1/**,mypackage/p2/**"
        -         excludes="mypackage/p1/testpackage/**"
        -         classpath="xyz.jar"
        -         debug="on"
        -  />
        -

        compiles .java files under the ${src} -directory, and stores the -.class files in the ${build} directory. -The classpath used includes xyz.jar, and debug information is on. -Only files under mypackage/p1 and mypackage/p2 are -used. All files in and below the mypackage/p1/testpackage -directory are excluded from compilation. -You didn't specify a source or target level, -so the actual values used will depend on which JDK you ran Ant with.

        - -
          <javac srcdir="${src}:${src2}"
        -         destdir="${build}"
        -         includes="mypackage/p1/**,mypackage/p2/**"
        -         excludes="mypackage/p1/testpackage/**"
        -         classpath="xyz.jar"
        -         debug="on"
        -  />
        - -

        is the same as the previous example, with the addition of a second -source path, defined by -the property src2. This can also be represented using nested -<src> elements as follows:

        - -
          <javac destdir="${build}"
        -         classpath="xyz.jar"
        -         debug="on">
        -    <src path="${src}"/>
        -    <src path="${src2}"/>
        -    <include name="mypackage/p1/**"/>
        -    <include name="mypackage/p2/**"/>
        -    <exclude name="mypackage/p1/testpackage/**"/>
        -  </javac>
        - -

        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:

        - -
          <javac srcdir="${src}"
        -         destdir="${build}"
        -         fork="yes"
        -         executable="/opt/java/jdk1.1/bin/javac"
        -         compiler="javac1.1"
        -  />
        - -

        Note: -If you wish to compile only source files located in certain packages below a -common root, use the include/exclude attributes -or <include>/<exclude> nested elements -to filter for these packages. Do not include part of your package structure -in the srcdir attribute -(or nested <src> elements), or Ant will recompile your -source files every time you run your compile target. See the -Ant FAQ -for additional information.

        - -

        -If you wish to compile only files explicitly specified and disable -javac's default searching mechanism then you can unset the sourcepath -attribute: -

          <javac sourcepath="" srcdir="${src}"
        -         destdir="${build}" >
        -    <include name="**/*.java"/>
        -    <exclude name="**/Example.java"/>
        -  </javac>
        -That way the javac will compile all java source files under "${src}" -directory but skip the examples. The compiler will even produce errors if some of -the non-example files refers to them. -

        - -

        -If you wish to compile with a special JDK (another than the one Ant is currently using), -set the executable and fork attribute. Using taskname -could show in the log, that these settings are fix. -

          <javac srcdir="" 
        -         destdir=""
        -         executable="path-to-java14-home/bin/javac" 
        -         fork="true"
        -         taskname="javac1.4" />
        -

        - - -

        Note: If you are using Ant on Windows and a new DOS window pops up -for every use of an external compiler, this may be a problem of the JDK you are -using. This problem may occur with all JDKs < 1.2.

        - - -

        -If you want to activate other compiler options like lint you could use -the <compilerarg> element: -

          <javac srcdir="${src.dir}"
        -         destdir="${classes.dir}"
        -         classpathref="libraries">
        -    <compilerarg value="-Xlint"/>
        -  </javac> 
        -

        - -

        If you want to use a custom - CompilerAdapter org.example.MyAdapter you can either - use the compiler attribute:

        + +
        +<javac srcdir="${src}"
        +       destdir="${build}"
        +       classpath="xyz.jar"
        +       debug="on"
        +       source="1.4"/>
        + +

        compiles all .java files under the ${src} directory, and stores +the .class files in the ${build} directory. The classpath used +includes xyz.jar, and compiling with debug information is on. The source level +is 1.4, so you can use assert statements.

        + +
        +<javac srcdir="${src}"
        +       destdir="${build}"
        +       fork="true"
        +       source="1.2"
        +       target="1.2"/>
        + +

        compiles all .java files under the ${src} directory, and stores +the .class files in the ${build} directory. This will fork off the Java +compiler using the default javac executable. The source level is 1.2 (similar +to 1.1 or 1.3) and the class files should be runnable under JDK 1.2+ as well.

        + +
        +<javac srcdir="${src}"
        +       destdir="${build}"
        +       fork="java$$javac.exe"
        +       source="1.5"/>
        + +

        compiles all .java files under the ${src} directory, and stores +the .class files in the ${build} directory. This will fork off the Java +compiler, using the executable named java$javac.exe. Note that the $ sign needs +to be escaped by a second one. The source level is 1.5, so you can use generics.

        + +
        +<javac srcdir="${src}"
        +       destdir="${build}"
        +       includes="mypackage/p1/**,mypackage/p2/**"
        +       excludes="mypackage/p1/testpackage/**"
        +       classpath="xyz.jar"
        +       debug="on"/>
        + +

        compiles .java files under the ${src} directory, and stores +the .class files in the ${build} directory. The classpath used +includes xyz.jar, and debug information is on. Only files +under mypackage/p1 and mypackage/p2 are used. All files in and below +the mypackage/p1/testpackage directory are excluded from compilation. You didn't +specify a source or target level, so the actual values used will depend on which JDK you ran Ant +with.

        + +
        +<javac srcdir="${src}:${src2}"
        +       destdir="${build}"
        +       includes="mypackage/p1/**,mypackage/p2/**"
        +       excludes="mypackage/p1/testpackage/**"
        +       classpath="xyz.jar"
        +       debug="on"/>
        + +

        is the same as the previous example, with the addition of a second source path, defined by the +property src2. This can also be represented using nested <src> +elements as follows:

        + +
        +<javac destdir="${build}"
        +       classpath="xyz.jar"
        +       debug="on">
        +  <src path="${src}"/>
        +  <src path="${src2}"/>
        +  <include name="mypackage/p1/**"/>
        +  <include name="mypackage/p2/**"/>
        +  <exclude name="mypackage/p1/testpackage/**"/>
        +</javac>
        + +

        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 JVM of a different version:

        + +
        +<javac srcdir="${src}"
        +       destdir="${build}"
        +       fork="yes"
        +       executable="/opt/java/jdk1.1/bin/javac"
        +       compiler="javac1.1"/>
        + +

        Note: If you wish to compile only source files located in +certain packages below a common root, use the include/exclude attributes +or <include>/<exclude> nested elements to filter for these +packages. Do not include part of your package structure in the srcdir attribute (or +nested <src> elements), or Ant will recompile your source files every time you +run your compile target. See the Ant FAQ for additional information.

        + +

        If you wish to compile only files explicitly specified and disable javac's default +searching mechanism then you can unset the sourcepath attribute:

        + +
        +<javac sourcepath="" srcdir="${src}"
        +       destdir="${build}" >
        +  <include name="**/*.java"/>
        +  <exclude name="**/Example.java"/>
        +</javac>
        + +

        That way the javac will compile all Java source files under ${src} +directory but skip the examples. The compiler will even produce errors if some of the non-example +files refers to them.

        + +

        If you wish to compile with a special JDK (another than the one Ant is currently using), set +the executable and fork attribute. Using taskname could show in the +log, that these settings are fix.

        + +
        +<javac srcdir=""
        +       destdir=""
        +       executable="path-to-java14-home/bin/javac"
        +       fork="true"
        +       taskname="javac1.4"/>
        + +

        Note: If you are using Ant on Windows and a new DOS window pops up for every use +of an external compiler, this may be a problem of the JDK you are using. This problem may occur +with all JDKs prior to 1.2.

        + +

        If you want to activate other compiler options like lint you could use +the <compilerarg> element:

        + +
        +<javac srcdir="${src.dir}"
        +       destdir="${classes.dir}"
        +       classpathref="libraries">
        +  <compilerarg value="-Xlint"/>
        +</javac>
        + +

        If you want to use a custom CompilerAdapter org.example.MyAdapter you can either use +the compiler attribute:

        +
         <javac srcdir="${src.dir}"
                destdir="${classes.dir}"
        -       compiler="org.example.MyAdapter"/>
        -
        + compiler="org.example.MyAdapter"/> +

        or a define a type and nest this into the task like in:

        +
         <componentdef classname="org.example.MyAdapter"
                       name="myadapter"/>
         <javac srcdir="${src.dir}"
                destdir="${classes.dir}">
           <myadapter/>
        -</javac>
        -
        -

        in which case your compiler adapter can support attributes and - nested elements of its own.

        - -
          <javac srcdir="${src}"
        -         destdir="${build}"
        -         includeantruntime="false"
        -         modulepath="modules"
        -         source="9"
        -  />
        -

        compiles all .java files in a single module under the ${src} directory, - and stores the .class files in the ${build} directory. The compilation uses - application modules located in modules folder.The source level is 9 to enable modules.

        - -
          <javac modulesourcepath="${src}/*/{gen,lin{32,64}}/classes"
        -         destdir="${build}"
        -         includeantruntime="false"
        -         modulepath="modules"
        -         source="9"
        -  />
        -

        compiles all .java files in gen/classes, lin32/classes and - lin64/classes in all source modules under the ${src} directory. - Generates module directories in the ${build} directory. Each generated module directory under - the ${build} directory contains .class files from corresponding source module. - The * is a token representing the name of any of the modules in the compilation module set. - The { ... , ... } express alternates for expansion. - The compilation uses application modules located in modules folder.The source level is - 9 to enable modules.

        +</javac> -

        Jikes Notes

        +

        in which case your compiler adapter can support attributes and nested elements of its own.

        + +
        +<javac srcdir="${src}"
        +       destdir="${build}"
        +       includeantruntime="false"
        +       modulepath="modules"
        +       source="9"/>
        + +

        compiles all .java files in a single module under the ${src} directory, +and stores the .class files in the ${build} directory. The compilation +uses application modules located in modules folder.The source level is 9 to +enable modules.

        + +
        +<javac modulesourcepath="${src}/*/{gen,lin{32,64}}/classes"
        +       destdir="${build}"
        +       includeantruntime="false"
        +       modulepath="modules"
        +       source="9"/>
        + +

        compiles all .java files in gen/classes, lin32/classes +and lin64/classes in all source modules under the ${src} directory. +Generates module directories in the ${build} directory. Each generated module directory +under the ${build} directory contains .class files from corresponding +source module. The * is a token representing the name of any of the modules in the +compilation module set. The { ... , ... } express alternates for expansion. The +compilation uses application modules located in modules folder.The source level +is 9 to enable modules.

        + +

        Jikes notes

        You need Jikes 1.15 or later.

        -

        Jikes supports some extra options, which can be set be defining -the properties shown below prior to invoking the task. The setting -for each property will be in affect for all <javac> -tasks throughout the build. -The Ant developers are aware that -this is ugly and inflexible – expect a better solution in the future. -All the options are boolean, and must be set to true or -yes to be -interpreted as anything other than false. By default, -build.compiler.warnings is true, -while all others are false.

        - - - - - - - - - - - - - - - - - - - - - - - - - - +

        Jikes supports some extra options, which can be set be defining the properties shown below prior +to invoking the task. The setting for each property will be in effect for +all <javac> tasks throughout the build. The Ant developers are aware that this +is ugly and inflexible – expect a better solution in the future. All the options are boolean, +and must be set to true or yes to be interpreted as anything other +than false. By default, build.compiler.warnings is true, while all others +are false.

        + +
        PropertyDescriptionDefault
        - build.compiler.emacs - - Enable emacs-compatible error messages. - - false -
        - build.compiler.fulldepend - - Enable full dependency checking; see
        - the +F switch in the Jikes manual. -
        - false -
        - build.compiler.pedantic - - Enable pedantic warnings. - - false -
        - build.compiler.warnings
        - Deprecated. Use - <javac>'s nowarn - attribute instead. -
        - Don't disable warning messages. - - true -
        + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDescriptionDefault
        build.compiler.emacsEnable emacs-compatible error messages.false
        build.compiler.fulldependEnable full dependency checking; see
        the +F switch in the Jikes + manual.
        false
        build.compiler.pedanticEnable pedantic warnings.false
        build.compiler.warnings
        Deprecated. + Use <javac>'s nowarn attribute instead.
        Don't disable warning messages.true
        -

        Jvc Notes

        +

        Jvc notes

        + +

        Jvc will enable Microsoft extensions unless you set the +property build.compiler.jvc.extensions to false before +invoking <javac>.

        + +

        Bootstrap options

        +

        The Sun javac compiler has a -bootclasspath command line +option—this corresponds to the bootclasspath attribute/element of +the <javac> task. The Sun compiler also allows more control over the boot +classpath using the -X and -J-X attributes. One can set these by using +the <compilerarg>. Since Ant 1.6.0, there is a shortcut to convert path +references to strings that can by used in an OS independent fashion +(see pathshortcut). For example:

        + +
        +<path id="lib.path.ref">
        +  <fileset dir="lib" includes="*.jar"/>
        +</path>
        +<javac srcdir="src" destdir="classes">
        +  <compilerarg arg="-Xbootclasspath/p:${toString:lib.path.ref}"/>
        +</javac>
        + +

        OpenJDK notes

        +

        The OpenJDK project has provided +the javac compiler +as an open source project. The output of this project is a javac.jar which contains +the javac compiler. This compiler may be used with the <javac> task +with the use of a -Xbootclasspath/p Java argument. The argument needs to be given to the +runtime system of the javac executable, so it needs to be prepended with a -J, +for example:

        + +
        +<property name="patched.javac.jar"
        +          location="${my.patched.compiler}/dist/lib/javac.jar"/>
         
        -

        Jvc will enable Microsoft extensions unless you set the property -build.compiler.jvc.extensions to false before invoking -<javac>.

        - -

        Bootstrap Options

        -

        - The Sun javac compiler has a bootclasspath command - line option - this corresponds to the "bootclasspath" attribute/element - of the <javac> task. The Sun compiler also allows more - control over the boot classpath using the -X and -J-X attributes. - One can set these by using the <compilerarg>. Since Ant 1.6.0, - there is a shortcut to convert path references to strings that - can by used in an OS independent fashion (see - pathshortcut). For example: -

        -
        -  <path id="lib.path.ref">
        -    <fileset dir="lib" includes="*.jar"/>
        -  </path>
        -  <javac srcdir="src" destdir="classes">
        -    <compilerarg arg="-Xbootclasspath/p:${toString:lib.path.ref}"/>
        +<presetdef name="patched.javac">
        +  <javac fork="yes">
        +    <compilerarg value="-J-Xbootclasspath/p:${patched.javac.jar}"/>
           </javac>
        -
        +</presetdef> + - -

        +<patched.javac srcdir="src/java" destdir="build/classes" + debug="yes"/>
        -

        OpenJDK Notes

        -

        - The openjdk - project has provided the javac - compiler - as an opensource project. The output of this project is a - javac.jar which contains the javac compiler. - This compiler may be used with the <javac> task with - the use of a -Xbootclasspath/p java argument. The argument needs - to be given to the runtime system of the javac executable, so it needs - to be prepended with a "-J". For example: - -

        -  <property name="patched.javac.jar"
        -            location="${my.patched.compiler}/dist/lib/javac.jar"/>
        -
        -  <presetdef name="patched.javac">
        -    <javac fork="yes">
        -      <compilerarg value="-J-Xbootclasspath/p:${patched.javac.jar}"/>
        -    </javac>
        -  </presetdef>
        -
        -
        -  <patched.javac srcdir="src/java" destdir="build/classes"
        -                 debug="yes"/>
        -
        - -

        Note on package-info.java

        -

        - package-info.java files were introduced in Java5 to - allow package level annotations. On compilation, if the java file - does not contain runtime annotations, there will be no .class file - for the java file. Up to Ant 1.7.1, when the <javac> - task is run again, the - task will try to compile the package-info java files again. -

        -

        With Ant 1.7.1 a different kind of logic was introduced that - involved the timestamp of the directory that would normally - contain the .class file. This logic turned out to lead to Ant not - recompiling package-info.java in certain setup.

        -

        Starting with Ant 1.8.0 Ant will create - "empty" package-info.class files if it compiles - a package-info.java and - no package-info.class file has been created by the - compiler itself.

        +

        Note on package-info.java

        +

        package-info.java files were introduced in Java 5 to allow package level +annotations. On compilation, if the .java file does not contain runtime annotations, +there will be no corresponding .class file. Prior to Ant 1.7.1, when +the <javac> task is run again, the task will try to compile +the package-info.java files again.

        +

        With Ant 1.7.1, a different kind of logic was introduced that involved the timestamp of the +directory that would normally contain the .class file. This logic turned out to lead +to Ant not recompiling package-info.java in certain setup.

        +

        Since Ant 1.8.0, an "empty" package-info.class file is created if Ant +compiles a package-info.java and no package-info.class file has been +created by the compiler itself.

        diff -Nru ant-1.9.10/manual/Tasks/javadoc.html ant-1.10.3/manual/Tasks/javadoc.html --- ant-1.9.10/manual/Tasks/javadoc.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/javadoc.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,613 +24,572 @@ -

        Javadoc/Javadoc2

        +

        Javadoc/Javadoc2

        +

        Deprecation: the javadoc2 task simply points to the javadoc +task and it's there for backwards compatibility reasons. Since this task will be removed in future +versions, you are strongly encouraged to use javadoc instead.

        Description

        -

        Generates code documentation using the javadoc tool.

        -

        The source directory will be recursively scanned for Java source files to process -but only those matching the inclusion rules, and not matching the exclusions rules -will be passed to the javadoc tool. This -allows wildcards to be used to choose between package names, reducing verbosity -and management costs over time. This task, however, has no notion of -"changed" files, unlike the javac task. This means -all packages will be processed each time this task is run. In general, however, -this task is used much less frequently.

        -

        NOTE: since javadoc calls System.exit(), javadoc cannot be run inside the -same VM as Apache Ant without breaking functionality. For this reason, this task -always forks the VM. This overhead is not significant since javadoc is normally a heavy -application and will be called infrequently.

        -

        NOTE: the packagelist attribute allows you to specify the list of packages to -document outside of the Ant file. It's a much better practice to include everything -inside the build.xml file. This option was added in order to make it easier to -migrate from regular makefiles, where you would use this option of javadoc. -The packages listed in packagelist are not checked, so the task performs even -if some packages are missing or broken. Use this option if you wish to convert from -an existing makefile. Once things are running you should then switch to the regular -notation.

        - -

        DEPRECATION: the javadoc2 task simply points to the javadoc task and it's -there for back compatibility reasons. Since this task will be removed in future -versions, you are strongly encouraged to use javadoc -instead.

        - -

        In the table below, 1.2 means available if your current Java VM is -a 1.2 VM (but not 1.3 or later), 1.4+ for any VM of at least version 1.4, otherwise -any VM of at least version 1.2 is acceptable. JDKs <1.4 are no longer supported. -If you specify the executable attribute it is up to you -to ensure that this command supports the attributes you wish to use.

        - -

        Note:
        When generating the JavaDocs for classes which contains annotations -you maybe get a java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl. -This is due bug-6442982. The cause is that JavaDoc cannot find the implementations of used annotations. -The workaround is providing the jars with these implementations (like JAXBs @XmlType, ...) -to <javadoc> using classpath, classpathref attributes or nested -<classpath> element.

        - -

        Note: many problems with running javadoc stem from command - lines that have become too long - even though the error message - doesn't give the slightest hint this may be the problem. If you - encounter problems with the task, try to set - the useexternalfile attribute to true - first.

        - -

        If you use multiple ways to specify where javadoc should be looking - for sources your result will be the union of all specified - documentations. If you, e.g., specify a sourcepath attribute and - also a nested packageset both pointing at the same directory your - excludepackagenames attribute won't have any effect unless it agrees - with the exclude patterns of the packageset (and vice versa).

        +

        Generates code documentation using the javadoc tool.

        +

        The source directory will be recursively scanned for Java source files to process but only those +matching the inclusion rules, and not matching the exclusions rules will be passed to +the javadoc tool. This allows wildcards to be used to choose between package names, +reducing verbosity and management costs over time. This task, however, has no notion of +"changed" files, unlike the javac task. This means all packages +will be processed each time this task is run. In general, however, this task is used much less +frequently.

        +

        Note: since javadoc +calls System.exit(), javadoc cannot be run inside the same +JVM as Apache Ant without breaking functionality. For this reason, this task always forks JVM. This +overhead is not significant since javadoc is normally a heavy application and will be +called infrequently.

        +

        Note: the packagelist attribute allows you to specify the list of +packages to document outside of the Ant file. It's a much better practice to include everything +inside the build.xml file. This option was added in order to make it easier to migrate +from regular makefiles, where you would use this option of javadoc. The packages +listed in packagelist are not checked, so the task performs even if some packages are +missing or broken. Use this option if you wish to convert from an existing makefile. Once things are +running you should then switch to the regular notation.

        + +

        In the table below, 1.2 means available if your current JVM is exactly of version 1.2 (not 1.3 or +later), 1.4+ for any JVM of at least version 1.4, otherwise any JVM of at least version 1.2 is +acceptable. JDKs prior to 1.4 are no longer supported. If you specify +the executable attribute it is up to you to ensure that this command supports the +attributes you wish to use.

        + +

        Note: When generating the JavaDocs for classes which contains annotations you +maybe get a java.lang.ClassCastException: +com.sun.tools.javadoc.ClassDocImpl. This is +due bug 6442982. The +cause is that javadoc cannot find the implementations of used annotations. The +workaround is providing the jars with these implementations (like +JAXBs @XmlType, ...) to <javadoc> +using classpath, classpathref attributes or +nested <classpath> element.

        + +

        Note: many problems with running javadoc stem from command lines +that have become too long—even though the error message doesn't give the slightest hint this +may be the problem. If you encounter problems with the task, try to set +the useexternalfile attribute to true first.

        + +

        If you use multiple ways to specify where javadoc should be looking for sources, your +result will be the union of all specified documentations. If you, e.g., specify +a sourcepath attribute and also a nested packageset both pointing at the +same directory your excludepackagenames attribute won't have any effect unless it agrees +with the exclude patterns of the packageset (and vice versa).

        Parameters

        - +
        - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDescriptionAvailability on JavaRequiredAttributeDescriptionAvailability on JavaRequired
        sourcepathSpecify where to find source filesallAt least one of the three or nested - <sourcepath>, <fileset> or - <packageset>sourcepathSpecify where to find source filesallAt least one of the three or + nested <sourcepath>, <fileset> + or <packageset>
        sourcepathrefSpecify where to find source files by reference to a PATH defined elsewhere.allsourcepathrefSpecify where to find source files by reference to a + sourcepath defined elsewhere.all
        sourcefilesComma separated list of source files -- see also - the nested source element.allsourcefilesComma separated list of source files—see also the nested source + element.all
        destdirDestination directory for output filesallYes, unless a doclet has been specified.destdirDestination directory for output filesallYes, unless a doclet has been specified.
        maxmemoryMax amount of memory to allocate to the javadoc VMallNomaxmemoryMax amount of memory to allocate to the javadoc JVMallNo
        packagenamesComma separated list of package files (with terminating - wildcard) -- see also the nested package element.allNopackagenamesComma separated list of package files (with terminating wildcard)—see also the + nested package element.allNo
        packageListThe name of a file containing the packages to processallNopackageListThe name of a file containing the packages to processallNo
        classpathSpecify where to find user class filesallNoclasspathSpecify where to find user class filesallNo
        BootclasspathOverride location of class files loaded by the bootstrap - class loaderallNoBootclasspathOverride location of class files loaded by the bootstrap class loaderallNo
        classpathrefSpecify where to find user class files by reference to a PATH defined elsewhere.allNoclasspathrefSpecify where to find user class files by reference + to a classpath defined elsewhere.allNo
        bootclasspathrefOverride location of class files loaded by the - bootstrap class loader by reference to a - PATH defined elsewhere.allNobootclasspathrefOverride location of class files loaded by the bootstrap class loader + by reference to a bootclasspath defined + elsewhere.allNo
        ExtdirsOverride location of installed extensionsallNoExtdirsOverride location of installed extensionsallNo
        OverviewRead overview documentation from HTML fileallNoOverviewRead overview documentation from HTML fileallNo
        accessAccess mode: one of public, protected, - package, or privateallNo (default protected)accessAccess mode: one of public, protected, package, or privateallNo; default is protected
        PublicShow only public classes and membersallNoPublicShow only public classes and membersallNo
        ProtectedShow protected/public classes and members (default)allNoProtectedShow protected/public classes and members (default)allNo
        PackageShow package/protected/public classes and membersallNoPackageShow package/protected/public classes and membersallNo
        PrivateShow all classes and membersallNoPrivateShow all classes and membersallNo
        OldGenerate output using JDK 1.1 emulating - doclet.
        - Note: as of Ant 1.8.0 this attribute doesn't have any - effect since the javadoc of Java 1.4 (required by Ant 1.8.0) - doesn't support the -1.1 switch anymore.
        1.2NoOldGenerate output using JDK 1.1 emulating doclet.
        Note: Since Ant + 1.8.0 this attribute has no effect because javadoc of Java 1.4 and later + does not support the -1.1 switch anymore.
        1.2No
        VerboseOutput messages about what Javadoc is doingallNoVerboseOutput messages about what javadoc is doingallNo
        LocaleLocale to be used, e.g. en_US or en_US_WINallNoLocaleLocale to be used, e.g. en_US or en_US_WINallNo
        EncodingSource file encoding nameallNoEncodingSource file encoding nameallNo
        VersionInclude @version paragraphsallNoVersionInclude @version paragraphsallNo
        UseCreate class and package usage pagesallNoUseCreate class and package usage pagesallNo
        AuthorInclude @author paragraphsallNoAuthorInclude @author paragraphsallNo
        SplitindexSplit index into one file per letterallNoSplitindexSplit index into one file per letterallNo
        WindowtitleBrowser window title for the documentation (text)allNoWindowtitleBrowser window title for the documentation (text)allNo
        DoctitleInclude title for the package index(first) page (html-code)allNoDoctitleInclude title for the package index (first) page (HTML code)allNo
        HeaderInclude header text for each page (html-code)allNoHeaderInclude header text for each page (HTML code)allNo
        FooterInclude footer text for each page (html-code)allNoFooterInclude footer text for each page (HTML code)allNo
        bottomInclude bottom text for each page (html-code)allNobottomInclude bottom text for each page (HTML code)allNo
        linkCreate links to javadoc output at the given URL - -- see also the nested link element.allNolinkCreate links to javadoc output at the given URL—see also the + nested link element.allNo
        linkofflineLink to docs at <url> using package list at - <url2> - separate the URLs by using a space character -- see - also the nested link element.allNolinkofflineLink to docs at url using package list + at alt-url by specifying a + value url alt-url (space as separator). A shorthand for the + nested link element with offline=true.allNo
        groupGroup specified packages together in overview - page. The format is as described below -- see also the nested - group element.allNogroupGroup specified packages together in overview page. The format is as + described below—see also the nested group + element.allNo
        nodeprecatedDo not include @deprecated informationallNonodeprecatedDo not include @deprecated informationallNo
        nodeprecatedlistDo not generate deprecated listallNonodeprecatedlistDo not generate deprecated listallNo
        notreeDo not generate class hierarchyallNonotreeDo not generate class hierarchyallNo
        noindexDo not generate indexallNonoindexDo not generate indexallNo
        nohelpDo not generate help linkallNonohelpDo not generate help linkallNo
        nonavbarDo not generate navigation barallNononavbarDo not generate navigation barallNo
        serialwarnGenerate warning about @serial tagallNoserialwarnGenerate warning about @serial tagallNo
        helpfileSpecifies the HTML help file to useallNohelpfileSpecifies the HTML help file to useallNo
        stylesheetfileSpecifies the CSS stylesheet to useallNostylesheetfileSpecifies the CSS stylesheet to useallNo
        charsetCharset for cross-platform viewing of generated - documentationallNocharsetCharset for cross-platform viewing of generated documentationallNo
        docencodingOutput file encoding nameallNo
        docletSpecifies the class file that starts the doclet - used in generating the documentation -- see also the nested - doclet element.allNo
        docletpathSpecifies the path to the doclet class file that is specified with the -doclet option.allNo
        docletpathrefSpecifies the path to the doclet class file that - is specified with the -doclet option by reference to a PATH defined elsewhere.allNo
        additionalparamLets you add additional parameters to the javadoc - command line. Useful for doclets. Parameters containing spaces - need to be quoted using &quot; -- see also the nested - arg element.allNo
        failonerrorStop the buildprocess if the command exits with a - returncode other than 0.allNo
        failonwarningStop the buildprocess if a warning is emitted - - i.e. if javadoc's output contains the word "warning". since - Ant 1.9.4allNo
        excludepackagenamescomma separated list of packages you don't want - docs for -- see also the nested excludepackage element.allNo
        defaultexcludesindicates whether default excludes should be used - (yes | no); default excludes are used when omitted.allNo
        useexternalfileindicates whether the sourcefile name specified - in srcfiles or as nested source elements should be written to a - temporary file to make the command line shorter. Also applies to - the package names specified via the packagenames attribute or - nested package elements. Since Ant 1.7.0, also applies - to all the other command line options. - (yes | no). Default is no.allNo
        sourceNecessary to enable javadoc to handle assertions - present in J2SE v 1.4 source code. Set this to "1.4" to - documents code that compiles using "javac -source - 1.4".
        - A default value for this attribute can be provided using the magic - ant.build.javac.source - property.
        1.4+No
        linksourceGenerate hyperlinks to source files. - since Ant 1.6. - (yes | no). Default is no.1.4+No
        breakiteratorUse the new breakiterator algorithm. - since Ant 1.6. - (yes | no). Default is no.1.4+No
        noqualifierEnables the -noqualifier argument - - must be all or a colon separated list of packages. - since Ant 1.6.1.4+No
        includenosourcepackagesIf set to true, packages that don't contain Java - source but a package.html will get documented as well. - since Ant 1.6.3.allNo (default is false)
        executableSpecify a particular javadoc executable - to use in place of the default binary (found in the same JDK as Ant is running in). - since Ant 1.6.3.allNo
        docfilessubdirsEnables deep-copying of doc-files - subdirectories. Defaults to false. since Ant 1.8.0.1.4No
        excludedocfilessubdirColon-separated list of doc-files' - subdirectories to exclude if docfilessubdirs is - true. since Ant 1.8.0.1.4No
        postProcessGeneratedJavadocsWhether to post-process the generated javadocs in - order to mitigate CVE-2013-1571. Defaults to true. Since Ant - 1.9.2
        - There is a frame injection attack possible in javadocs generated by Oracle - JDKs prior to Java7 Update 25 (details). - When this flag is set to true, Ant will check whether the docs are vulnerable - and will try to fix them. -
        1.4NodocencodingOutput file encoding nameallNo
        docletSpecifies the class file that starts the doclet used in generating the + documentation—see also the nested doclet element.allNo
        docletpathSpecifies the path to the doclet class file that is specified with the -doclet + option.allNo
        docletpathrefSpecifies the path to the doclet class file that is specified with the -doclet + option by reference to a path defined elsewhere.allNo
        additionalparamLets you add additional parameters to the javadoc command line. Useful for + doclets. Parameters containing spaces need to be quoted using &quot;—see also the + nested arg element.allNo
        failonerrorStop the build process if the command exits with a return code other than 0.allNo
        failonwarningStop the build process if a warning is emitted—i.e. if javadoc's output + contains the word warning. since Ant 1.9.4allNo
        excludepackagenamescomma separated list of packages you don't want docs for—see also the + nested excludepackage element.allNo
        defaultexcludesindicates whether default excludes should be used (yes|no).allNo; defaults to yes
        useexternalfileindicates whether the source file names specified in srcfiles or as + nested source elements should be written to a temporary file to make the command + line shorter. Also applies to the package names specified via the packagenames + attribute or nested package elements. Since Ant 1.7.0, also applies to + all the other command line options. (yes|no).allNo; default is no
        sourceEnable javadoc to handle Java language features. Set this to 1.4 to + document code that compiles using javac -source 1.4, etc.1.4+No; default can be provided using the magic + ant.build.javac.source property.
        linksourceGenerate hyperlinks to source files. since Ant 1.6. (yes|no).1.4+No; default is no
        breakiteratorUse the new break iterator algorithm. since Ant 1.6. (yes|no).1.4+No; default is no
        noqualifierEnables the -noqualifier argument—must be all or a colon separated + list of packages. since Ant 1.6.1.4+No
        includenosourcepackagesIf set to true, packages that don't contain Java source but + a package.html will get documented as well. since Ant 1.6.3.allNo; default is false
        executableSpecify a particular javadoc executable to use in place of the default binary + (found in the same JDK as Ant is running in). since Ant 1.6.3.allNo
        docfilessubdirsEnables deep-copying of doc-files subdirectories. since Ant + 1.8.0.1.4No; defaults to false
        excludedocfilessubdirColon-separated list of doc-files subdirectories to exclude + if docfilessubdirs is true. since Ant 1.8.0.1.4No
        postProcessGeneratedJavadocsWhether to post-process the generated javadocs in order to mitigate + CVE-2013-1571. Since Ant 1.9.2
        There is a frame injection attack possible in + javadocs generated by Oracle JDKs prior to Java 7 update 25 + (details). When this flag is set to true, Ant will check whether the + docs are vulnerable and will try to fix them.
        1.4No; defaults to true
        -

        Format of the group attribute

        -

        The arguments are comma-delimited. Each single argument is 2 -space-delimited strings, where the first one is the group's title and -the second one a colon delimited list of packages.

        -

        If you need to specify more than one group, or a group whose title -contains a comma or a space character, using nested group elements is highly +

        Format of the group attribute

        +

        The arguments are comma-delimited. Each single argument is 2 space-delimited strings, where the +first one is the group's title and the second one a colon delimited list of packages.

        +

        If you need to specify more than one group, or a group whose title contains a comma or a space +character, using nested group elements is highly recommended.

        E.g.:

        -
            group="XSLT_Packages org.apache.xalan.xslt*,XPath_Packages org.apache.xalan.xpath*"
        +
        group="XSLT_Packages org.apache.xalan.xslt*,XPath_Packages org.apache.xalan.xpath*"

        Parameters specified as nested elements

        packageset

        -

        A DirSet. All matched -directories that contain Java source files will be passed to javadoc -as package names. Package names are created from the directory names -by translating the directory separator into dots. Ant assumes the -base directory of the packageset points to the root of a package -hierarchy.

        - -

        The packagenames, excludepackagenames and -defaultexcludes attributes of the task have no effect on -the nested <packageset> elements.

        +

        A DirSet. All matched directories that contain Java source +files will be passed to javadoc as package names. Package names are created from the +directory names by translating the directory separator into dots. Ant assumes the base directory of +the packageset points to the root of a package hierarchy.

        + +

        The packagenames, excludepackagenames and defaultexcludes +attributes of the task have no effect on the nested <packageset> elements.

        fileset

        -

        A FileSet. All matched -files will be passed to javadoc as source files. Ant will -automatically add the include pattern **/*.java (and -**/package.html if includenosourcepackages is true) to -these filesets.

        - -

        Nested filesets can be used to document sources that are in the -default package or if you want to exclude certain files from -documentation. If you want to document all source files and don't use -the default package, packagesets should be used instead as this -increases javadocs performance.

        - -

        The packagenames, excludepackagenames and -defaultexcludes attributes of the task have no effect on -the nested <fileset> elements.

        +

        A FileSet. All matched files will be passed +to javadoc as source files. Ant will automatically add the include +pattern **/*.java (and **/package.html +if includenosourcepackages is true) to these filesets.

        + +

        Nested filesets can be used to document sources that are in the default package or if you want to +exclude certain files from documentation. If you want to document all source files and don't use +the default package, packagesets should be used instead as this increases performance +of javadoc.

        + +

        The packagenames, excludepackagenames and defaultexcludes +attributes of the task have no effect on the nested <fileset> elements.

        sourcefiles

        -

        A container for arbitrary file system based resource -collections. All files contained in any of the nested collections -(this includes nested filesets, filelists or paths) will be passed to -javadoc as source files.

        +

        A container for arbitrary file system based resource +collections. All files contained in any of the nested collections (this includes nested +filesets, filelists or paths) will be passed to javadoc as source files.

        package

        -

        Same as one entry in the list given by packagenames.

        +

        Same as one entry in the list given by packagenames.

        Parameters
        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe package name (may be a wildcard)YesnameThe package name (may be a wildcard)Yes

        excludepackage

        -

        Same as one entry in the list given by excludepackagenames.

        +

        Same as one entry in the list given by excludepackagenames.

        Parameters
        Same as for package.

        source

        -

        Same as one entry in the list given by sourcefiles.

        +

        Same as one entry in the list given by sourcefiles.

        Parameters
        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        fileThe source file to documentYesfileThe source file to documentYes

        doctitle

        -

        Same as the doctitle attribute, but you can nest text -inside the element this way.

        +

        Same as the doctitle attribute, but you can nest text inside the element this way.

        -

        If the nested text contains line breaks, you must use the - useexternalfile attribute and set it to true.

        +

        If the nested text contains line breaks, you must use the useexternalfile attribute +and set it to true.

        header

        @@ -645,271 +604,264 @@

        Similar to <doctitle>.

        link

        -

        Create link to javadoc output at the given URL. This performs the -same role as the link and linkoffline attributes. You can use either -syntax (or both at once), but with the nested elements you can easily -specify multiple occurrences of the arguments.

        +

        Create link to javadoc output at the given URL. This performs the same role as +the link and linkoffline attributes. You can use either syntax (or both at +once), but with the nested elements you can easily specify multiple occurrences of the +arguments.

        Parameters
        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        hrefThe URL for the external documentation you wish - to link to. This can be an absolute URL, or a relative file - name.YeshrefThe URL for the external documentation you wish to link to. This can be an absolute URL, or + a relative file name.Yes
        offlineTrue if this link is not available online at the time of - generating the documentationNoofflinetrue if this link is not available online at the time of generating the + documentationNo
        packagelistLocThe location to the directory containing the package-list file for - the external documentationOne of the two if the offline attribute is truepackagelistLocThe location to the directory containing the package-list file for the external + documentationOne of the two if the offline attribute is true
        packagelistURLThe URL of the the directory containing the package-list file for - the external documentationpackagelistURLThe URL of the the directory containing the package-list file for the external + documentation
        resolveLinkIf the link attribute is a relative file name, - Ant will first try to locate the file relative to the current - project's basedir and if it finds a file there use an absolute URL - for the link attribute, otherwise it will pass the file name - verbatim to the javadoc command.No, default is false.resolveLinkIf the link attribute is a relative file name, Ant will first try to locate the + file relative to the current project's basedir and if it finds a file there use an + absolute URL for the link attribute, otherwise it will pass the file name verbatim + to the javadoc command.No; default is false
        -

        group

        -

        Separates packages on the overview page into whatever groups you -specify, one group per table. This performs the same role as the group -attribute. You can use either syntax (or both at once), but with the -nested elements you can easily specify multiple occurrences of the +

        group

        +

        Separates packages on the overview page into whatever groups you specify, one group per +table. This performs the same role as the group attribute. You can use either syntax (or +both at once), but with the nested elements you can easily specify multiple occurrences of the arguments.

        Parameters
        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        titleTitle of the groupYes, unless nested <title> giventitleTitle of the groupYes, unless nested <title> given
        packagesList of packages to include in that group. Multiple packages are separated with ':'.Yes, unless nested <package>s givenpackagesList of packages to include in that group. Multiple packages are separated with :.Yes, unless nested <package>s given
        -

        The title may be specified as a nested <title> element -with text contents, and the packages may be listed with nested -<package> elements as for the main task.

        +

        The title may be specified as a nested <title> element with text contents, and +the packages may be listed with nested <package> elements as for the main +task.

        doclet

        -

        The doclet nested element is used to specify the -doclet -that javadoc will use to process the input source files. A number of the standard javadoc arguments -are actually arguments of the standard doclet. If these are specified in the javadoc -task's attributes, they will be passed to the doclet specified in the -<doclet> nested element. Such attributes should only be specified, -therefore, if they can be interpreted by the doclet in use.

        - -

        If the doclet requires additional parameters, these can be specified with -<param> elements within the <doclet> -element. These parameters are restricted to simple strings. An example usage -of the doclet element is shown below:

        - -
          <javadoc ... >
        -     <doclet name="theDoclet"
        -             path="path/to/theDoclet">
        -        <param name="-foo" value="foovalue"/>
        -        <param name="-bar" value="barvalue"/>
        -     </doclet>
        -  </javadoc>
        -
        - -

        tag

        - -

        If you want to specify a standard tag using a nested tag element -because you want to determine the order the tags are output, you must -not set the description attribute for those tags.

        +

        The doclet nested element is used to specify +the doclet that javadoc will use to process the input source files. A +number of the standard javadoc arguments are actually arguments of the standard +doclet. If these are specified in the javadoc task's attributes, they will be passed to +the doclet specified in the <doclet> nested element. Such attributes should only +be specified, therefore, if they can be interpreted by the doclet in use.

        + +

        If the doclet requires additional parameters, these can be specified +with <param> elements within the <doclet> element. These +parameters are restricted to simple strings. An example usage of the doclet element is +shown below:

        + +
        +<javadoc ... >
        +   <doclet name="theDoclet"
        +           path="path/to/theDoclet">
        +      <param name="-foo" value="foovalue"/>
        +      <param name="-bar" value="barvalue"/>
        +   </doclet>
        +</javadoc>
        + +

        tag

        + +

        If you want to specify a standard tag using a nested tag element because you want to +determine the order the tags are output, you must not set the description attribute for +those tags.

        Parameters
        - +
        - - - + + + - - - + + + - - - + + - - - - - - - - - - - - + + + + + + + + + + + - + Note: The Javadoc reference quide has double quotes around the description + part of the definition. This will not work when used in a file, as the definition is quoted + again when given to the javadoc program.
        + Note: If this attribute is specified, all the other attributes in this + element will be ignored. +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameName of the tag (e.g. todo)Yes, unless the dir attribute is specified.nameName of the tag (e.g. todo)Yes, unless the dir attribute is specified
        descriptionDescription for tag (e.g. To do:) - No, the javadoc executable will pick a default if this is not specified. + descriptionDescription for tag (e.g. To do:) + No, the javadoc executable will pick a default if this is not specified
        enabledWhether or not the tag is enabled (defaults to true)No
        scopeScope for the tag - the elements in which it can be used. This - is a comma separated list of some of the elements: overview, - packages, types, constructors, - methods, fields or the default, all.No
        dirIf this attribute is specified, this element will behave as an implicit - fileset. The files included by this fileset should - contain each tag definition on a separate line, as described in the - Javadoc reference guide: -
        ejb.bean:t:XDoclet EJB Tag
        +    
        enabledWhether or not the tag is enabledNo; defaults to true
        scopeScope for the tag—the elements in which it can be used. This is a comma separated list + of some of the + elements: overview, packages, types, constructors, methods, fields + or the default, all.No; defaults to all
        dirIf this attribute is specified, this element will behave as an + implicit fileset. The files included by this fileset + should contain each tag definition on a separate line, as described in + the Javadoc reference guide: +
        ejb.bean:t:XDoclet EJB Tag
         todo:a:To Do
        - Note: The Javadoc reference quide has double quotes around -the description part of the definition. This will not work when used in -a file, as the definition is quoted again when given to -the javadoc program. -
        - Note: If this attribute is specified, all the other attributes in this - element will be ignored. -
        NoNo
        -

        taglet

        -

        The taglet nested element is used to specify custom - taglets beyond the default taglets.

        +

        taglet

        +

        The taglet nested element is used to specify +custom taglets +beyond the default taglets.

        Parameters
        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe name of the taglet class - (e.g. - com.sun.tools.doclets.ToDoTaglet)YesnameThe name of the taglet class + (e.g. com.sun.tools.doclets.ToDoTaglet)Yes
        pathA path specifying the search path for the taglet class - (e.g. /home/taglets). - The path may also be specified by a nested <path> elementNopathA path specifying the search path for the taglet class (e.g. /home/taglets). + The path may also be specified by a nested <path> elementNo

        sourcepath, classpath and bootclasspath

        -

        Javadoc's sourcepath, classpath and -bootclasspath attributes are PATH like -structure and can also be set via nested sourcepath, -classpath and bootclasspath elements +

        Javadoc's sourcepath, classpath and bootclasspath +attributes are path-like structure and can also be set via +nested sourcepath, classpath and bootclasspath elements respectively.

        arg

        - -

        Use nested <arg> to specify additional -arguments. See Command line -arguments. Since Ant 1.6

        +

        Since Ant 1.6

        +

        Use nested <arg> to specify additional arguments. +See Command line arguments.

        Example

        -
          <javadoc packagenames="com.dummy.test.*"
        -           sourcepath="src"
        -           excludepackagenames="com.dummy.test.doc-files.*"
        -           defaultexcludes="yes"
        -           destdir="docs/api"
        -           author="true"
        -           version="true"
        -           use="true"
        -           windowtitle="Test API">
        -    <doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
        -    <bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
        -    <tag name="todo" scope="all" description="To do:"/>
        -    <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
        -    <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
        -    <link offline="true" href="http://docs.oracle.com/javase/7/docs/api/" packagelistLoc="C:\tmp"/>
        -    <link href="http://docs.oracle.com/javase/7/docs/api/"/>
        -  </javadoc>
        +
        +<javadoc packagenames="com.dummy.test.*"
        +         sourcepath="src"
        +         excludepackagenames="com.dummy.test.doc-files.*"
        +         defaultexcludes="yes"
        +         destdir="docs/api"
        +         author="true"
        +         version="true"
        +         use="true"
        +         windowtitle="Test API">
        +  <doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
        +  <bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
        +  <tag name="todo" scope="all" description="To do:"/>
        +  <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
        +  <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
        +  <link offline="true" href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="C:\tmp"/>
        +  <link href="https://docs.oracle.com/javase/8/docs/api/"/>
        +</javadoc>

        is the same as

        -
          <javadoc
        -           destdir="docs/api"
        -           author="true"
        -           version="true"
        -           use="true"
        -           windowtitle="Test API">
        -
        -    <packageset dir="src" defaultexcludes="yes">
        -      <include name="com/dummy/test/**"/>
        -      <exclude name="com/dummy/test/doc-files/**"/>
        -    </packageset>
        -
        -    <doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
        -    <bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
        -    <tag name="todo" scope="all" description="To do:"/>
        -    <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
        -    <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
        -    <link offline="true" href="http://docs.oracle.com/javase/7/docs/api/" packagelistLoc="C:\tmp"/>
        -    <link href="http://docs.oracle.com/javase/7/docs/api/"/>
        -  </javadoc>
        +
        +<javadoc destdir="docs/api"
        +         author="true"
        +         version="true"
        +         use="true"
        +         windowtitle="Test API">
        +
        +  <packageset dir="src" defaultexcludes="yes">
        +    <include name="com/dummy/test/**"/>
        +    <exclude name="com/dummy/test/doc-files/**"/>
        +  </packageset>
        +
        +  <doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
        +  <bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
        +  <tag name="todo" scope="all" description="To do:"/>
        +  <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
        +  <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
        +  <link offline="true" href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="C:\tmp"/>
        +  <link href="https://docs.oracle.com/javase/8/docs/api/"/>
        +</javadoc>

        or

        -
          <javadoc
        -           destdir="docs/api"
        -           author="true"
        -           version="true"
        -           use="true"
        -           windowtitle="Test API">
        -
        -    <fileset dir="src" defaultexcludes="yes">
        -      <include name="com/dummy/test/**"/>
        -      <exclude name="com/dummy/test/doc-files/**"/>
        -    </fileset>
        -
        -    <doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
        -    <bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
        -    <tag name="todo" scope="all" description="To do:"/>
        -    <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
        -    <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
        -    <link offline="true" href="http://docs.oracle.com/javase/7/docs/api/" packagelistLoc="C:\tmp"/>
        -    <link href="http://docs.oracle.com/javase/7/docs/api/"/>
        -  </javadoc>
        - - +
        +<javadoc destdir="docs/api"
        +         author="true"
        +         version="true"
        +         use="true"
        +         windowtitle="Test API">
        +
        +  <fileset dir="src" defaultexcludes="yes">
        +    <include name="com/dummy/test/**"/>
        +    <exclude name="com/dummy/test/doc-files/**"/>
        +  </fileset>
        +
        +  <doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
        +  <bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
        +  <tag name="todo" scope="all" description="To do:"/>
        +  <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
        +  <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
        +  <link offline="true" href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="C:\tmp"/>
        +  <link href="https://docs.oracle.com/javase/8/docs/api/"/>
        +</javadoc>
        - diff -Nru ant-1.9.10/manual/Tasks/javah.html ant-1.10.3/manual/Tasks/javah.html --- ant-1.9.10/manual/Tasks/javah.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/javah.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,233 +24,219 @@ -

        Javah

        +

        Javah

        Description

        Generates JNI headers from a Java class.

        -

        When this task executes, it will generate the C header and source files that -are needed to implement native methods. JNI operates differently depending on -whether JDK1.2+ -or pre-JDK1.2 -systems are used.

        +

        When this task executes, it will generate the C header and source files that are needed to +implement native methods. JNI operates differently depending on +whether JDK 1.2+ +or pre-1.2 JDK systems are used.

        If you are building with Java 8 or above consider - using javac's nativeheaderdir - attribute instead which allows you to compile the classes and - generate the native header files with a single step.

        - -

        Note the javah has been deprecated as of Java 9 - and removed as of Java 10. Trying to use it with Java10 will - fail.

        - -

        It is possible to use different compilers. This can be selected -with the implementation attribute or a nested element. Here are the choices of the attribute:

        +using javac's nativeheaderdir attribute instead +which allows you to compile the classes and generate the native header files in a single step.

        + +

        Note: javah has been deprecated in Java 9 and removed in Java +10. Attempts to use it with Java 10 will fail.

        + +

        It is possible to use different compilers. This can be selected with +the implementation attribute or a nested element. Here are the choices of the +attribute:

          -
        • default - the default compiler for the platform.
        • -
        • sun (the standard compiler of the JDK) - default when not - running on Kaffee or gcj/gij or Java9.
        • -
        • kaffeh (the native standard compiler of Kaffe)
        • -
        • gcjh (the native standard compiler - of gcj and gij) since Apache Ant 1.8.2
        • -
        • forking - runs the javah executable via its command line - interface in a separate process. Default when running on - Java9. since Ant 1.9.8
        • +
        • default—the default compiler for the platform.
        • +
        • sun—the standard compiler of the JDK.
        • +
        • kaffeh—the native standard compiler of Kaffe.
        • +
        • gcjh—the native standard compiler + of gcj and + gij. Since Apache Ant 1.8.2
        • +
        • forking—runs the javah executable via its command line interface in + a separate process. Default when not running on Kaffe or gcj/gij since Ant 1.9.8
        -

        Note: if you are using this task to work on multiple files - the command line may become too long on some operating systems. - Unfortunately the javah command doesn't support command argument - files the way javac (for example) does, so all that can be done is - breaking the amount of classes to compile into smaller chunks.

        +

        Note: if you are using this task to work on multiple files the command line may +become too long on some operating systems. Unfortunately the javah command doesn't +support command argument files the way javac (for example) does, so all that can be +done is breaking the amount of classes to compile into smaller chunks.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        classthe fully-qualified name of the class (or classes, - separated by commas)Yesclassthe fully-qualified name of the class (or classes, separated by commas)Yes
        outputFileconcatenates the resulting header or source files for all the classes listed into this fileYesoutputFileconcatenates the resulting header or source files for all the classes listed into this + fileExactly one of the two
        destdirsets the directory where javah saves the header files or the - stub files.destdirsets the directory where javah saves the header files or the stub + files.
        forcespecifies that output files should always be written (JDK1.2 only)Noforcespecifies that output files should always be written (JDK 1.2 only)No
        oldspecifies that old JDK1.0-style header files should be generated - (otherwise output file contain JNI-style native method function prototypes) (JDK1.2 only)Nooldspecifies that old JDK 1.0-style header files should be generated (otherwise output file + contain JNI-style native method function prototypes) (JDK 1.2 only)No
        stubsgenerate C declarations from the Java object file (used with old)Nostubsgenerate C declarations from the Java object file (used with old)No
        verbosecauses Javah to print a message concerning the status of the generated filesNoverbosecauses javah to print a message concerning the status of the generated filesNo
        classpaththe classpath to use.Noclasspaththe classpath to useNo
        bootclasspathlocation of bootstrap class files.Nobootclasspathlocation of bootstrap class filesNo
        extdirs location of installed extensions.Noextdirslocation of installed extensionsNo
        implementationThe compiler implementation to use. If this - attribute is not set, the default compiler for the current VM - will be used. (See the above list of valid compilers.)NoimplementationThe compiler implementation to use. (See the above list + of valid compilers.)No; defaults to default compiler for the current JDK
        -

        Either outputFile or destdir must be supplied, but not both. 

        Parameters specified as nested elements

        arg

        -

        You can specify additional command line arguments for the compiler -with nested <arg> elements. These elements are -specified like Command-line Arguments -but have an additional attribute that can be used to enable arguments -only if a given compiler implementation will be used.

        +

        You can specify additional command line arguments for the compiler with +nested <arg> elements. These elements are specified +like Command-line Arguments but have an additional attribute that +can be used to enable arguments only if a given compiler implementation will be used.

        - +
        - - - + + + - - - + + + - + - + - + - - - + + + - - + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        valueSee - Command-line Arguments.Exactly one of these.valueSee Command-line Arguments.Exactly one of these
        lineline
        filefile
        pathpath
        prefixSee - Command-line Arguments. - Since Ant 1.8.NoprefixSee Command-line Arguments. Since Ant + 1.8.No
        suffixNosuffixNo
        implementationOnly pass the specified argument if the chosen compiler - implementation matches the value of this attribute. Legal values - are the same as those in the above list of valid compilers.)NoimplementationOnly pass the specified argument if the chosen compiler implementation matches the value of + this attribute. Legal values are the same as those in the + above list of valid compilers.)No
        -

        implementationclasspath since Ant 1.8.0

        - -

        A PATH like structure holding the - classpath to use when loading the compiler implementation if a - custom class has been specified. Doesn't have any effect when - using one of the built-in compilers.

        - -

        Any nested element of a type that implements JavahAdapter - since Ant 1.8.0

        - -

        If a defined type implements the JavahAdapter - interface a nested element of that type can be used as an - alternative to the implementation attribute.

        +

        implementationclasspath

        +

        Since Ant 1.8.0

        +

        A path-like structure holding the classpath to use when loading +the compiler implementation if a custom class has been specified. Doesn't have any effect when +using one of the built-in compilers.

        + +

        Any nested element of a type that implements JavahAdapter

        +

        Since Ant 1.8.0

        +

        If a defined type implements the JavahAdapter interface a nested +element of that type can be used as an alternative to the implementation attribute.

        Examples

        -
          <javah destdir="c" class="org.foo.bar.Wibble"/>
        -

        makes a JNI header of the named class, using the JDK1.2 JNI model. Assuming -the directory 'c' already exists, the file org_foo_bar_Wibble.h -is created there. If this file already exists, it is left unchanged.

        -
          <javah outputFile="wibble.h">
        -    <class name="org.foo.bar.Wibble,org.foo.bar.Bobble"/>
        -  </javah>
        +
        <javah destdir="c" class="org.foo.bar.Wibble"/>
        +

        makes a JNI header of the named class, using the JDK 1.2 JNI model. Assuming the +directory c already exists, the file org_foo_bar_Wibble.h is created +there. If this file already exists, it is left unchanged.

        +
        +<javah outputFile="wibble.h">
        +  <class name="org.foo.bar.Wibble,org.foo.bar.Bobble"/>
        +</javah>

        is similar to the previous example, except the output is written to a file -called wibble.h -in the current directory.

        -
          <javah destdir="c" force="yes">
        -    <class name="org.foo.bar.Wibble"/>
        -    <class name="org.foo.bar.Bobble"/>
        -    <class name="org.foo.bar.Tribble"/>
        -  </javah>
        -

        writes three header files, one for each of the classes named. Because the -force option is set, these header files are always written when the Javah task -is invoked, even if they already exist.

        -
          <javah destdir="c" verbose="yes" old="yes" force="yes">
        -    <class name="org.foo.bar.Wibble"/>
        -    <class name="org.foo.bar.Bobble"/>
        -    <class name="org.foo.bar.Tribble"/>
        -  </javah>
        -  <javah destdir="c" verbose="yes" stubs="yes" old="yes" force="yes">
        -    <class name="org.foo.bar.Wibble"/>
        -    <class name="org.foo.bar.Bobble"/>
        -    <class name="org.foo.bar.Tribble"/>
        -  </javah>
        -

        writes the headers for the three classes using the 'old' JNI format, then -writes the corresponding .c stubs. The verbose option will cause Javah to +called wibble.h in the current directory.

        +
        +<javah destdir="c" force="yes">
        +  <class name="org.foo.bar.Wibble"/>
        +  <class name="org.foo.bar.Bobble"/>
        +  <class name="org.foo.bar.Tribble"/>
        +</javah>
        +

        writes three header files, one for each of the classes named. Because the force option is set, +these header files are always written when the Javah task is invoked, even if they +already exist.

        +
        +<javah destdir="c" verbose="yes" old="yes" force="yes">
        +  <class name="org.foo.bar.Wibble"/>
        +  <class name="org.foo.bar.Bobble"/>
        +  <class name="org.foo.bar.Tribble"/>
        +</javah>
        +<javah destdir="c" verbose="yes" stubs="yes" old="yes" force="yes">
        +  <class name="org.foo.bar.Wibble"/>
        +  <class name="org.foo.bar.Bobble"/>
        +  <class name="org.foo.bar.Tribble"/>
        +</javah>
        +

        writes the headers for the three classes using the 'old' JNI format, then writes the +corresponding .c stubs. The verbose option will cause Javah to describe its progress.

        -

        If you want to use a custom - JavahAdapter org.example.MyAdapter you can either - use the implementation attribute:

        +

        If you want to use a +custom JavahAdapter org.example.MyAdapter you can either use +the implementation attribute:

         <javah destdir="c" class="org.foo.bar.Wibble"
        -       implementation="org.example.MyAdapter"/>
        -
        + implementation="org.example.MyAdapter"/>

        or a define a type and nest this into the task like in:

         <componentdef classname="org.example.MyAdapter"
                       name="myadapter"/>
         <javah destdir="c" class="org.foo.bar.Wibble">
           <myadapter/>
        -</javah>
        -
        -

        in which case your javah adapter can support attributes and - nested elements of its own.

        +</javah> +

        in which case your javah adapter can support attributes and nested elements of its +own.

        - diff -Nru ant-1.9.10/manual/Tasks/java.html ant-1.10.3/manual/Tasks/java.html --- ant-1.9.10/manual/Tasks/java.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/java.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,438 +24,385 @@ -

        Java

        +

        Java

        Description

        -

        Executes a Java class within the running (Apache Ant) VM or forks another VM if -specified.

        -

        -If odd things go wrong when you run this task, set fork="true" to use a new -JVM. - -

        As of Ant 1.6.3, you can interact with a forked VM, as well as -sending input to it via the input and inputstring -attributes.

        - -

        Running Ant as a background process on - Unix(-like) systems

        - -

        If you run Ant as a background process (like ant &) - and use the <java> task with spawn - set to false and fork - to true, you must provide explicit input to the forked - process or Ant will be suspended because it tries to read from the - standard input.

        +

        Executes a Java class within the running (Apache Ant) JVM or forks another JVM if specified.

        +

        If odd things go wrong when you run this task, set fork=true to use a new +JVM.

        + +

        Since Ant 1.6.3, you can interact with a forked JVM, as well as sending input to it via +the input and inputstring attributes.

        + +

        Running Ant as a background process on Unix(-like) systems

        + +

        If you run Ant as a background process (like ant &) and use +the <java> task with spawn set to false and fork +to true, you must provide explicit input to the forked process or Ant will be suspended +because it tries to read from the standard input.

        Parameters

        - +
        - - - - - - - - - - - - + + + + + + + + + + + - - - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequired
        classnamethe Java class to execute.Either jar, classname or module
        jarthe location of the jar file to execute (must have a - Main-Class entry in the manifest). Fork must be set to true if this option is selected. - See notes below for more details. + AttributeDescriptionRequired
        classnamethe Java class to execute.Exactly one of the three
        jarthe location of the jar file to execute (must have a Main-Class + entry in the manifest). fork must be set to true if this option is selected. + See notes below for more details. Either jar, classname or module
        argsthe arguments for the class that is - executed. deprecated, use nested <arg> - elements instead.NomoduleThe initial or main module to resolve (must have a Main-Class + entry in the manifest). fork must be set to true if this option is + selected. since Ant 1.9.7
        classpaththe classpath to use.Noargsthe arguments for the class that is executed. Deprecated, use + nested <arg> elements instead.No
        classpathrefthe classpath to use, given as reference to a PATH defined elsewhere.Noclasspaththe classpath to use.No
        forkif enabled triggers the class execution in another VM - (disabled by default)Noclasspathrefthe classpath to use, given as reference to + a Path defined elsewhere.No
        spawnif enabled allows to start a process which will outlive ant.
        - Requires fork=true, and not compatible - with timeout, input, output, error, result attributes.
        - (disabled by default)
        NomodulepathSpecify where to find application modules. A list of directories of modules, module files or + exploded modules. since Ant 1.9.7No
        jvmthe command used to invoke the Java Virtual Machine, - default is 'java'. The command is resolved by java.lang.Runtime.exec(). - Ignored if fork is disabled. - NomodulepathrefThe modulepath to use, given as reference to + a Path defined elsewhere. since Ant 1.9.7No
        jvmargsthe arguments to pass to the forked VM (ignored - if fork is disabled). deprecated, use nested - <jvmarg> elements instead.Noforkif enabled triggers the class execution in another JVM.No; default is false
        maxmemoryMax amount of memory to allocate to the forked VM - (ignored if fork is disabled)Nospawnif enabled allows to start a process which will outlive Ant.
        Requires + that fork is true, and not compatible + with timeout, input, output, error, result + attributes
        No; default is false
        moduleThe initial or main module to resolve. To specify - the module main class use the classname attribute. - Fork must be set to true if this option is selected.since Ant 1.9.7Either jar, classname or modulejvmthe command used to invoke JVM. The command is resolved + by java.lang.Runtime.exec(). Ignored if fork is false. + No, default is java
        modulepathSpecify where to find application modules. A list of directories of modules, module files or exploded modules.since Ant 1.9.7Nojvmargsthe arguments to pass to the forked JVM, ignored if fork is + disabled. Deprecated, use nested <jvmarg> elements + instead.No
        modulepathrefThe modulepath to use, given as reference to a PATH defined elsewhere. - since Ant 1.9.7NomaxmemoryMax amount of memory to allocate to the forked JVM, ignored if fork + is falseNo
        failonerrorStop the buildprocess if the command exits with a - returncode other than 0. Default is "false" (see note)NofailonerrorStop the build process if the command exits with a return code other than 0.No; default is false (see note)
        resultpropertyThe name of a property in which the return code of the - command should be stored. Only of interest if failonerror=false - and if fork=true.NoresultpropertyThe name of a property in which the return code of the command should be stored. Only of + interest if failonerror is false and if fork is true.No
        dirThe directory to invoke the VM in. (ignored if - fork is disabled)NodirThe directory to invoke the JVM in, ignored if fork is false.No
        outputName of a file to which to write the output. If the error stream - is not also redirected to a file or property, it will appear in this output.NooutputName of a file to which to write the output. If the error stream is not also redirected to a + file or property, it will appear in this output.No
        errorThe file to which the standard error of the command should be - redirected. NoerrorThe file to which the standard error of the command should be redirected.No
        logErrorThis attribute is used when you wish to see error output in Ant's - log and you are redirecting output to a file/property. The error - output will not be included in the output file/property. If you - redirect error with the "error" or "errorProperty" - attributes, this will have no effect.NologErrorThis attribute is used when you wish to see error output in Ant's log and you are + redirecting output to a file/property. The error output will not be included in the output + file/property. If you redirect error with the error or errorProperty + attributes, this will have no effect.No
        appendWhether output and error files should be appended to or overwritten. - Defaults to false.NoappendWhether output and error files should be appended to or overwritten.No; defaults to false
        outputpropertyThe name of a property in which the output of the - command should be stored. Unless the error stream is redirected to a separate - file or stream, this property will include the error output.NooutputpropertyThe name of a property in which the output of the command should be stored. Unless the error + stream is redirected to a separate file or stream, this property will include the error + output.No
        errorpropertyThe name of a property in which the standard error of the - command should be stored.NoerrorpropertyThe name of a property in which the standard error of the command should be stored.No
        inputA file from which the executed command's standard input - is taken. This attribute is mutually exclusive with the - inputstring attributeNo; default is to take standard input from console - (unless spawn="true")inputA file from which the executed command's standard input is taken. This attribute is mutually + exclusive with the inputstring attributeNo; default is to take standard input from console + unless spawn is true
        inputstringA string which serves as the input stream for the - executed command. This attribute is mutually exclusive with the - input attribute.No; default is to take standard input from console - (unless spawn="true")inputstringA string which serves as the input stream for the executed command. This attribute is + mutually exclusive with the input attribute.No; default is to take standard input from console unless spawn + is true)
        newenvironmentDo not propagate old environment when new - environment variables are specified. Default is "false" - (ignored if fork is disabled).NonewenvironmentDo not propagate old environment when new environment variables are specified.No; default is false, ignored if fork is false
        timeoutStop the command if it doesn't finish within the - specified time (given in milliseconds). It is highly - recommended to use this feature only if fork is enabled.NotimeoutStop the command if it doesn't finish within the specified time (given in + milliseconds). It is highly recommended to use this feature only if fork + is true.No
        clonevmIf set to true, then all system properties - and the bootclasspath of the forked Java Virtual Machine will be - the same as those of the Java VM running Ant. Default is - "false" (ignored if fork is disabled). - since Ant 1.7NoclonevmIf set to true, then all system properties and the bootclasspath of the + forked JVM will be the same as those of the JVM running Ant. since Ant 1.7No; default is false, ignored if fork is false

        Parameters specified as nested elements

        arg and jvmarg

        -

        Use nested <arg> and <jvmarg> -elements to specify arguments for the Java class and the forked VM respectively. -See Command line arguments.

        +

        Use nested <arg> and <jvmarg> elements to specify arguments +for the Java class and the forked JVM respectively. See Command line +arguments.

        sysproperty

        -

        Use nested <sysproperty> -elements to specify system properties required by the class. -These properties will be made available to the VM during the execution -of the class (either ANT's VM or the forked VM). The attributes -for this element are the same as for environment -variables.

        +

        Use nested <sysproperty> elements to specify system properties required by the +class. These properties will be made available to JVM during the execution of the class (either +Ant's JVM or the forked JVM). The attributes for this element are the same as +for environment variables.

        syspropertyset

        +

        Since Ant 1.6.

        +

        You can specify a set of properties to be used as system properties with syspropertysets.

        -

        since Ant 1.6.

        -

        classpath

        -

        Java's classpath attribute is a PATH like structure and can also be set via a nested -classpath element.

        +

        Java's classpath attribute is a path-like +structure and can also be set via a nested classpath element.

        bootclasspath

        -

        The location of bootstrap class files can be specified using this -PATH like structure - will be ignored -if fork is not true or the target VM doesn't -support it (i.e. Java 1.1).

        +

        Since Ant 1.6.

        -

        since Ant 1.6.

        +

        The location of bootstrap class files can be specified using +this path-like structure—will be ignored if fork +is not true or the target JVM doesn't support it (i.e. Java 1.1).

        env

        -

        It is possible to specify environment variables to pass to the -forked VM via nested env elements. See the description in the -section about exec

        -

        Settings will be ignored if fork is disabled.

        +

        It is possible to specify environment variables to pass to the forked JVM via +nested env elements. See the description in the section +about exec

        +

        Settings will be ignored if fork is false.

        permissions

        -

        Security permissions can be revoked and granted during the execution of the -class via a nested permissions element. For more information please -see permissions

        -

        When the permission RuntimePermission exitVM has not been granted (or has -been revoked) the System.exit() call will be intercepted -and treated like indicated in failonerror.

        -

        Note:
        -If you do not specify permissions, -a set of default permissions will be added to your Java invocation to make -sure that the ant run will continue or terminated as indicated by -failonerror. All permissions not granted per default will be -checked by whatever security manager was already in place. exitVM will be -disallowed. -

        -

        Settings will be ignored if fork is enabled.

        -

        since Ant 1.6.

        +

        Since Ant 1.6.

        -

        assertions

        +

        Security permissions can be revoked and granted during the execution of the class via a +nested permissions element. For more information please +see permissions.

        +

        When the permission RuntimePermission exitVM has not been granted (or has been +revoked) the System.exit() call will be intercepted and treated like indicated +in failonerror.

        +

        Note:
        If you do not specify permissions, a set of default permissions will +be added to your Java invocation to make sure that the Ant run will continue or terminated as +indicated by failonerror. All permissions not granted per default will be checked by +whatever security manager was already in place. exitVM will be disallowed.

        +

        Settings will be ignored if fork is true.

        -

        You can control enablement of Java 1.4 assertions with an -<assertions> -subelement.

        +

        assertions

        -

        Assertion statements are currently ignored in non-forked mode.

        +

        Since Ant 1.6.

        -

        since Ant 1.6.

        +

        You can control enablement of Java 1.4 assertions with +an <assertions> subelement.

        -

        redirector

        -Since Ant 1.6.2 -

        A nested I/O Redirector -can be specified. In general, the attributes of the redirector behave -as the corresponding attributes available at the task level. The most -notable peculiarity stems from the retention of the <java> -attributes for backwards compatibility. Any file mapping is done -using a null sourcefile; therefore not all -Mapper types will return -results. When no results are returned, redirection specifications -will fall back to the task level attributes. In practice this means that -defaults can be specified for input, output, and error output files. -

        -

        Errors and return codes

        -By default the return code of a <java> is ignored. -Alternatively, you can set resultproperty to the name -of a property and have it assigned to the result code (barring immutability, -of course). -When you set failonerror="true", the only possible value for -resultproperty is 0. Any non-zero response is treated as an -error and would mean the build exits. -

        Similarly, if failonerror="false" and fork="false" -, then <java> must return 0 otherwise the build will -exit, as the class was run by the build JVM.

        - -

        modulepath

        -Since Ant 1.9.7 -

        Java's modulepath attribute is a PATH like structure and can also be set via a nested -modulepath element.

        - -

        upgrademodulepath

        -Since Ant 1.9.7 -

        The location of modules that replace upgradeable modules in the runtime image -can be specified using this PATH like structure.

        - - -

        JAR file execution

        - -

        The parameter of the jar attribute is of type File; -that is, the parameter is resolved to an absolute file relative to the -base directory of the project, not the directory in which the Java -task is run. If you need to locate a JAR file relative to the directory -the task will be run in, you need to explicitly create the full path -to the JAR file.

        -

        When using the jar attribute, all classpath settings are -ignored according to Oracle's -specification. +

        Assertion statements are currently ignored in non-forked mode.

        +

        redirector

        +Since Ant 1.6.2 +

        A nested I/O Redirector can be specified. In general, the +attributes of the redirector behave as the corresponding attributes available at the task level. +The most notable peculiarity stems from the retention of the <java> attributes +for backwards compatibility. Any file mapping is done using a null sourcefile; +therefore not all Mapper types will return results. When no +results are returned, redirection specifications will fall back to the task level attributes. In +practice this means that defaults can be specified for input, output, +and error output files.

        +

        Errors and return codes

        +

        By default, the return code of a <java> is ignored. Alternatively, you can +set resultproperty to the name of a property and have it assigned to the result code +(barring immutability, of course). When you set failonerror=true, the only +possible value for resultproperty is 0. Any non-zero response is treated as an +error and would mean the build exits.

        +

        Similarly, if failonerror=false and fork=false, +then <java> must return 0 otherwise the build will exit, as the +class was run by the build JVM.

        + +

        modulepath

        +Since Ant 1.9.7 +

        Java's modulepath attribute is a path-like +structure and can also be set via a nested modulepath element.

        + +

        upgrademodulepath

        +Since Ant 1.9.7 +

        The location of modules that replace upgradeable modules in the runtime image can be specified +using this path-like structure.

        + +

        JAR file execution

        + +

        The parameter of the jar attribute is of type File; that is, the +parameter is resolved to an absolute file relative to the base directory of the +project, not the directory in which the Java task is run. If you need to locate a JAR file +relative to the directory the task will be run in, you need to explicitly create the full path to +the JAR file.

        +

        When using the jar attribute, all classpath settings are ignored according +to Oracle's specification.

        Examples

        -       <java classname="test.Main">
        -         <arg value="-h"/>
        -         <classpath>
        -           <pathelement location="dist/test.jar"/>
        -           <pathelement path="${java.class.path}"/>
        -         </classpath>
        -       </java>
        -
        +<java classname="test.Main"> + <arg value="-h"/> + <classpath> + <pathelement location="dist/test.jar"/> + <pathelement path="${java.class.path}"/> + </classpath> +</java> Run a class in this JVM with a new jar on the classpath
        -       <java jar="dist/test.jar"
        -           fork="true"
        -           failonerror="true"
        -           maxmemory="128m"
        -           >
        -         <arg value="-h"/>
        -         <classpath>
        -           <pathelement location="dist/test.jar"/>
        -           <pathelement path="${java.class.path}"/>
        -         </classpath>
        -       </java>
        -
        -Run the JAR test.jar in this project's dist/lib directory. -using the manifest supplied entry point, forking (as required), -and with a maximum memory of 128MB. Any non zero return code breaks the build. +<java jar="dist/test.jar" + fork="true" + failonerror="true" + maxmemory="128m"> + <arg value="-h"/> + <classpath> + <pathelement location="dist/test.jar"/> + <pathelement path="${java.class.path}"/> + </classpath> +</java> +

        Run the JAR test.jar in this project's dist/lib directory. using the +manifest supplied entry point, forking (as required), and with a maximum memory of 128 MB. Any non +zero return code breaks the build.

        -       <java
        -           dir="${exec.dir}"
        -           jar="${exec.dir}/dist/test.jar"
        -           fork="true"
        -           failonerror="true"
        -           maxmemory="128m"
        -           >
        -         <arg value="-h"/>
        -         <classpath>
        -           <pathelement location="dist/test.jar"/>
        -           <pathelement path="${java.class.path}"/>
        -         </classpath>
        -       </java>
        -
        -Run the JAR dist/test.jar relative to the directory -${exec.dir}, this being the same directory into which the JVM -is to start up. +<java dir="${exec.dir}" + jar="${exec.dir}/dist/test.jar" + fork="true" + failonerror="true" + maxmemory="128m"> + <arg value="-h"/> + <classpath> + <pathelement location="dist/test.jar"/> + <pathelement path="${java.class.path}"/> + </classpath> +</java> +

        Run the JAR dist/test.jar relative to the directory ${exec.dir}, this +being the same directory in which JVM is to start up.

        -
          <java classname="test.Main"/>
        -Runs a given class with the current classpath. +
        <java classname="test.Main"/>
        +

        Runs a given class with the current classpath.

        -  <java classname="test.Main"
        -        fork="yes" >
        -    <sysproperty key="DEBUG" value="true"/>
        -    <arg value="-h"/>
        -    <jvmarg value="-Xrunhprof:cpu=samples,file=log.txt,depth=3"/>
        -  </java>
        -
        -Add system properties and JVM-properties to the JVM as in -java ="-Xrunhprof:cpu=samples,file=log.txt,depth=3 -DDEBUG=true test.Main - -
          <java classname="ShowJavaVersion" classpath="."
        -        jvm="path-to-java14-home/bin/java" fork="true"
        -        taskname="java1.4" >
        -
        -Use a given Java implementation (another the one Ant is currently using) to run the class. -For documentation in the log taskname is used to change the [java] -log-prefix to [java1.4]. +<java classname="test.Main" + fork="yes" > + <sysproperty key="DEBUG" value="true"/> + <arg value="-h"/> + <jvmarg value="-Xrunhprof:cpu=samples,file=log.txt,depth=3"/> +</java> +

        Add system properties and JVM properties to JVM as in java +-Xrunhprof:cpu=samples,file=log.txt,depth=3 -DDEBUG=true test.Main +

        +<java classname="ShowJavaVersion" classpath="."
        +      jvm="path-to-java14-home/bin/java" fork="true"
        +      taskname="java1.4"/>
        +

        Use a given Java implementation (other than the one Ant is currently using) to run the class. +For documentation in the log taskname is used to change the [java] log-prefix +to [java1.4].

        -

        Note: you can not specify the (highly deprecated) MSJVM, "jview.exe" as the -JVM, as it takes different parameters for other JVMs, +

        Note: you can not specify the (highly deprecated) MS +JVM, jview.exe, as jvm, since it takes different parameters than other JVMs. That JVM can be started from <exec> if required.

        -       <java
        -           fork="true"
        -           failonerror="true"
        -           maxmemory="128m"
        -           module="TestModule"
        -           modulepath="lib:dist/test.jar"/>
        -
        -Runs the module TestModule resolved on the modulepath lib/:dist/test.jar -with a maximum memory of 128MB. Any non zero return code breaks the build. +<java fork="true" + failonerror="true" + maxmemory="128m" + module="TestModule" + modulepath="lib:dist/test.jar"/> +

        Runs the module TestModule resolved on the +modulepath lib/:dist/test.jar with a maximum memory of 128 MB. Any non zero return code +breaks the build.

        -       <java
        -           fork="true"
        -           failonerror="true"
        -           maxmemory="128m"
        -           module="TestModule"
        -           classname="Main">
        -         <modulepath>
        -           <pathelement location="lib"/>
        -           <pathelement location="dist/test.jar"/>
        -         </modulepath>
        -       </java>
        -
        -Runs the class Main in module TestModule resolved on the modulepath lib/:dist/test.jar -with a maximum memory of 128MB. Any non zero return code breaks the build. +<java fork="true" + failonerror="true" + maxmemory="128m" + module="TestModule" + classname="Main"> + <modulepath> + <pathelement location="lib"/> + <pathelement location="dist/test.jar"/> + </modulepath> +</java> +

        Runs the class Main in module TestModule resolved on the +modulepath lib/:dist/test.jar with a maximum memory of 128 MB. Any non zero return code +breaks the build.

        diff -Nru ant-1.9.10/manual/Tasks/jdepend.html ant-1.10.3/manual/Tasks/jdepend.html --- ant-1.9.10/manual/Tasks/jdepend.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jdepend.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,164 +14,147 @@ See the License for the specific language governing permissions and limitations under the License. --> - - -JDepend Task - + JDepend Task -

        JDepend

        +

        JDepend

        Description

        -

        Invokes the JDepend parser.

        - -

        This parser "traverses a set of Java source file directories and generates design quality metrics for each Java package". -It allows to "automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to -effectively manage and control package dependencies."

        +

        Invokes the JDepend +parser.

        -

        Source file directories are defined by nested -<sourcespath>; Class file directories are defined -by nested <classesespath>, see nested elements.

        +

        This parser "traverses a set of Java source file directories and generates design quality +metrics for each Java package". It allows to "automatically measure the quality of a +design in terms of its extensibility, reusability, and maintainability to effectively manage and +control package dependencies."

        + +

        Source file directories are defined by nested <sourcespath>. Class file +directories are defined by nested <classespath>. See nested +elements.

        -

        Optionally, you can also set the outputfile name where the output is stored. By default the task writes its report to the standard output.

        +

        Optionally, you can also set the outputfile name where the output is stored. By +default the task writes its report to the standard output.

        -

        The task requires at least the JDepend 1.2 version.

        +

        The task requires at least the JDepend 1.2 version.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        outputfileThe output file name. If not set, the output is printed on the standard output.NooutputfileThe output file name. If not set, the output is printed on the standard output.No
        formatThe format to write the output in. The default is "text", the alternative is "xml"NoformatThe format to write the output in, + either text (default) or xmlNo; the default is text
        forkRun the tests in a separate VM.No, default is "off"forkRun the tests in a separate JVM.No; default is off
        haltonerrorStop the build process if an error occurs during the jdepend analysis.No, default is "off"haltonerrorStop the build process if an error occurs during the jdepend analysis.No; default is off
        timeoutCancel the operation if it doesn't finish in the given time (measured in milliseconds). (Ignored if fork is disabled.)NotimeoutCancel the operation if it doesn't finish in the given time (measured in milliseconds).No, ignored if fork is false
        jvmThe command used to invoke the Java Virtual Machine, default is 'java'. The command is resolved by java.lang.Runtime.exec(). (Ignored if fork is disabled.)No, default "java"jvmThe command used to invoke JVM. The command is resolved + by java.lang.Runtime.exec().No; default java, ignored if fork is false
        dirThe directory to invoke the VM in. (Ignored if fork is disabled)NodirThe directory to invoke JVM in.No, ignored if fork is false
        includeruntimeImplicitly add the classes required to run jdepend - in forked mode. (Ignored if fork is disabled). Since Apache Ant 1.6.No, default is "no".includeruntimeImplicitly add the classes required to run jdepend in forked mode. Since + Apache Ant 1.6.No; default is no, ignored if fork is false
        classpathrefthe classpath to use, given as reference to a PATH defined elsewhere.Noclasspathrefthe classpath to use, given as reference to a path defined elsewhere.No
        -

        Nested Elements

        +

        Parameters specified as nested elements

        -

        jdepend supports four nested elements: -<classpath>, <classespath> and -<sourcespath>, that represent PATH like structures, and -<exclude>.

        - -

        <sourcespath> is used to define the paths of the -source code to analyze, but it is deprecated. With version 2.5 of -JDepend, only class files are analyzed. The nested element -<classespath> replaces <sourcespath> and is used to define -the paths of compiled class code to analyze; the <sourcespath> -variable is still available in case you are using an earlier version -of JDepend. The <exclude> element can be used to set packages -to ignore (requires JDepend 2.5 or above).

        +

        jdepend supports four nested +elements: <classpath>, <classespath> +and <sourcespath>, that represent path-like +structures, and <exclude>.

        + +

        <sourcespath> is used to define the paths of the source code to analyze, but +it is deprecated. With version 2.5 of JDepend, only class files are analyzed. The nested +element <classespath> replaces <sourcespath> and is used to +define the paths of compiled class code to analyze; the <sourcespath> variable is +still available in case you are using an earlier version of JDepend. +The <exclude> element can be used to set packages to ignore (requires JDepend 2.5 +or above).

        Examples

        -
         <jdepend classpathref="base.path">
        -    <classespath>
        -        <pathelement location="build"/>
        -    </classespath>
        -</jdepend>
        -
        -
        -
        - -

        This invokes JDepend on the build directory, writing -the output on the standard output. The classpath is defined using a -classpath reference.

        + <classespath> + <pathelement location="build"/> + </classespath> +</jdepend> + +

        This invokes JDepend on the build directory, writing the output on the standard +output. The classpath is defined using a classpath reference.

        -
         <jdepend outputfile="docs/jdepend.xml" fork="yes" format="xml">
        -    <sourcespath>
        -        <pathelement location="src"/>
        -    </sourcespath>
        -    <classpath>
        -        <pathelement location="classes"/>
        -        <pathelement location="lib/jdepend.jar"/>
        -    </classpath>
        -</jdepend>
        -
        -
        - -

        This invokes JDepend in a separate VM on the src and -testsrc directories, writing the output to the -<docs/jdepend.xml> file in xml format. The -classpath is defined using nested elements.

        + <sourcespath> + <pathelement location="src"/> + </sourcespath> + <classpath> + <pathelement location="classes"/> + <pathelement location="lib/jdepend.jar"/> + </classpath> +</jdepend> + +

        This invokes JDepend in a separate JVM on the src and testsrc +directories, writing the output to the docs/jdepend.xml file in xml format. The +classpath is defined using nested elements.

        -
         <jdepend classpathref="base.path">
        -    <exclude name="java.*>
        -    <exclude name="javax.*>
        -    <classespath>
        -        <pathelement location="build"/>
        -    </classespath>
        -</jdepend>
        -
        -
        - -

        This invokes JDepend with the build directory as the base for class -files to analyze, and will ignore all classes in the java.* and -javax.* packages.

        + <exclude name="java.*> + <exclude name="javax.*> + <classespath> + <pathelement location="build"/> + </classespath> +</jdepend> +

        This invokes JDepend with the build directory as the base for class files to analyze, and will +ignore all classes in the java.* and javax.* packages.

        - - diff -Nru ant-1.9.10/manual/Tasks/jjdoc.html ant-1.10.3/manual/Tasks/jjdoc.html --- ant-1.9.10/manual/Tasks/jjdoc.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jjdoc.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,110 +14,86 @@ See the License for the specific language governing permissions and limitations under the License. --> - - JJDoc Task -

        -JJDoc

        +

        JJDoc

        Since Apache Ant 1.6

        Description

        -

        Invokes the JJDoc preprocessor -for the JavaCC compiler compiler. It takes a JavaCC parser specification -and produces documentation for the BNF grammar. -It can operate in three modes, determined by command line options. -

        To use the jjdoc task, set the target attribute to the name -of the JavaCC grammar file to process. You also need to specify the directory -containing the JavaCC installation using the javacchome attribute, -so that ant can find the JavaCC classes. Optionally, you can also set the -outputfile to write the generated BNF documentation file to a specific (directory and) file. -Otherwise jjdoc writes the generated BNF documentation file as the JavaCC -grammar file with a suffix .txt or .html.

        -

        This task only invokes JJDoc if the grammar file is newer than the -generated BNF documentation file.

        +

        Invokes the JJDoc preprocessor for the JavaCC +compiler compiler. It takes a JavaCC parser specification and produces documentation for the BNF +grammar. It can operate in three modes, determined by command line options. +

        To use the jjdoc task, set the target attribute to the name of the JavaCC +grammar file to process. You also need to specify the directory containing the JavaCC installation +using the javacchome attribute, so that Ant can find the JavaCC classes. Optionally, you +can also set the outputfile to write the generated BNF documentation file to a specific +(directory and) file. Otherwise jjdoc writes the generated BNF documentation file as +the JavaCC grammar file with a suffix .txt or .html.

        +

        This task only invokes JJDoc if the grammar file is newer than the generated BNF +documentation file.

        Parameters

        - +
        - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        targetThe javacc grammar file to process.YestargetThe JavaCC grammar file to process.Yes
        javacchomeThe directory containing the JavaCC distribution.YesjavacchomeThe directory containing the JavaCC distribution.Yes
        outputfileThe file to write the generated BNF documentation file to. If not set, -the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt. NooutputfileThe file to write the generated BNF documentation file to. If not set, the file is written + with the same name as the JavaCC grammar file but with a the suffix .html + or .txtNo
        textSets the TEXT BNF documentation option. This is a boolean -option.NotextSets the TEXT BNF documentation option. This is a boolean option.No
        onetableSets the ONE_TABLE BNF documentation option. This is a boolean option.NoonetableSets the ONE_TABLE BNF documentation option. This is a boolean option.No
        maxmemoryMax amount of memory to allocate to the forked - VM. since Ant 1.8.3No
        maxmemoryMax amount of memory to allocate to the forked JVM. since Ant 1.8.3No
        -

        -Example

        +

        Example

        -
        -
        <jjdoc 
        -    target="src/Parser.jj" 
        -    outputfile="doc/ParserBNF.html"
        -    javacchome="c:/program files/JavaCC" 
        -/>
        -
        -This invokes JJDoc on grammar file src/Parser.jj, writing the generated -BNF documentation file, ParserBNF.html, file to doc. -
        +
        +<jjdoc target="src/Parser.jj"
        +       outputfile="doc/ParserBNF.html"
        +       javacchome="c:/program files/JavaCC"/>
        + +

        This invokes JJDoc on grammar file src/Parser.jj, writing the generated BNF +documentation file, ParserBNF.html, to doc.

        - diff -Nru ant-1.9.10/manual/Tasks/jjtree.html ant-1.10.3/manual/Tasks/jjtree.html --- ant-1.9.10/manual/Tasks/jjtree.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jjtree.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,213 +14,164 @@ See the License for the specific language governing permissions and limitations under the License. --> - - JJTree Task -

        -JJTree

        +

        JJTree

        -

        -Description

        -

        Invokes the JJTree preprocessor -for the JavaCC compiler compiler. It inserts parse tree building actions -at various places in the JavaCC source that it generates. The output of -JJTree is run through JavaCC to create the parser. -

        To use the jjtree task, set the target attribute to the name -of the JJTree grammar file to process. You also need to specify the directory -containing the JavaCC installation using the javacchome attribute, -so that Ant can find the JavaCC classes. Optionally, you can also set the -outputdirectory -to write the generated JavaCC grammar and node files to a specific directory. -Otherwise jjtree writes the generated JavaCC grammar and node files to the directory -containing the JJTree grammar file. As an extra option, you can also set the -outputfile to write the generated JavaCC grammar file to a specific (directory and) file. -Otherwise jjtree writes the generated JavaCC grammar file as the JJTree -grammar file with a suffix .jj.

        -

        This task only invokes JJTree if the grammar file is newer than the -generated JavaCC file.

        +

        Description

        +

        Invokes the JJTree preprocessor for the JavaCC +compiler compiler. It inserts parse tree building actions at various places in the JavaCC source +that it generates. The output of JJTree is run through JavaCC to create the parser.

        +

        To use the jjtree task, set the target attribute to the name of the +JJTree grammar file to process. You also need to specify the directory containing the JavaCC +installation using the javacchome attribute, so that Ant can find the JavaCC +classes. Optionally, you can also set the outputdirectory to write the generated JavaCC +grammar and node files to a specific directory. Otherwise jjtree writes the generated +JavaCC grammar and node files to the directory containing the JJTree grammar file. As an extra +option, you can also set the outputfile to write the generated JavaCC grammar file to a +specific (directory and) file. Otherwise jjtree writes the generated JavaCC grammar +file as the JJTree grammar file with a suffix .jj.

        +

        This task only invokes JJTree if the grammar file is newer than the generated JavaCC file.

        Parameters

        - +
        - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        targetThe jjtree grammar file to process.YestargetThe JJTree grammar file to process.Yes
        javacchomeThe directory containing the JavaCC distribution.YesjavacchomeThe directory containing the JavaCC distribution.Yes
        outputdirectoryThe directory to write the generated JavaCC grammar and node files to. -If not set, the files are written to the directory containing the grammar file. NooutputdirectoryThe directory to write the generated JavaCC grammar and node files to. If not set, the files + are written to the directory containing the grammar file.No
        outputfileThe file to write the generated JavaCC grammar file -to. If not set, the file is written with the same name as the JJTree -grammar file but with a the suffix .jj. This is a -filename relative to outputdirectory if specified, the -project's basedir.NooutputfileThe file to write the generated JavaCC grammar file to. If not set, the file is written with + the same name as the JJTree grammar file but with a the suffix .jj. This is a + filename relative to outputdirectory if specified, the project's basedir.No
        buildnodefilesSets the BUILD_NODE_FILES grammar option. This is a boolean -option.NobuildnodefilesSets the BUILD_NODE_FILES grammar option. This is a boolean option.No
        multiSets the MULTI grammar option. This is a boolean option.NomultiSets the MULTI grammar option. This is a boolean option.No
        nodedefaultvoidSets the NODE_DEFAULT_VOID grammar option. This is a boolean -option.NonodedefaultvoidSets the NODE_DEFAULT_VOID grammar option. This is a boolean option.No
        nodefactorySets the NODE_FACTORY grammar option. This is boolean option.NonodefactorySets the NODE_FACTORY grammar option. This is boolean option.No
        nodescopehookSets the NODE_SCOPE_HOOK grammar option. This is a boolean -option.NonodescopehookSets the NODE_SCOPE_HOOK grammar option. This is a boolean option.No
        nodeusesparserSets the NODE_USES_PARSER grammar option. This is a boolean -option.NonodeusesparserSets the NODE_USES_PARSER grammar option. This is a boolean option.No
        staticSets the STATIC grammar option. This is a boolean option.NostaticSets the STATIC grammar option. This is a boolean option.No
        visitorSets the VISITOR grammar option. This is a boolean option.NovisitorSets the VISITOR grammar option. This is a boolean option.No
        nodepackageSets the NODE_PACKAGE grammar option. This is a string option.NonodepackageSets the NODE_PACKAGE grammar option. This is a string option.No
        visitorexceptionSets the VISITOR_EXCEPTION grammar option. This is a string -option.NovisitorexceptionSets the VISITOR_EXCEPTION grammar option. This is a string option.No
        nodeprefixSets the NODE_PREFIX grammar option. This is a string option.NonodeprefixSets the NODE_PREFIX grammar option. This is a string option.No
        maxmemoryMax amount of memory to allocate to the forked - VM. since Ant 1.8.3NomaxmemoryMax amount of memory to allocate to the forked JVM. since Ant 1.8.3No
        -

        -Example

        +

        Example

        -
        -
        <jjtree 
        -    target="src/Parser.jjt" 
        -    outputdirectory="build/src"
        -    javacchome="c:/program files/JavaCC" 
        -    nodeusesparser="true"
        -/>
        -
        -This invokes JJTree on grammar file src/Parser.jjt, writing the generated -grammar file, Parser.jj, file to build/src. The grammar option NODE_USES_PARSER -is set to true when invoking JJTree. -
        - -

        Comparison output locations between command line JJTree and different Ant taskdef versions

        - - - - - - +
        +<jjtree target="src/Parser.jjt"
        +        outputdirectory="build/src"
        +        javacchome="c:/program files/JavaCC"
        +        nodeusesparser="true"/>
        + +

        This invokes JJTree on grammar file src/Parser.jjt, writing the generated grammar +file, Parser.jj, file to build/src. The grammar option NODE_USES_PARSER is +set to true when invoking JJTree.

        + +

        Comparison of output locations between command line JJTree and different Ant taskdef +versions

        + +
        Command Line JJTree options -
             and Generated Files (working directory: /tmp)
        Ant 1.5.3 versus command lineAnt 1.6 versus command line
        + + + + + + + - @@ -252,7 +203,7 @@ - @@ -260,7 +211,7 @@ - @@ -268,7 +219,7 @@ - @@ -276,7 +227,7 @@ - @@ -284,7 +235,7 @@ - @@ -292,7 +243,7 @@ - @@ -300,7 +251,7 @@ - @@ -308,7 +259,7 @@ - @@ -316,7 +267,7 @@ - @@ -324,7 +275,7 @@ - @@ -332,7 +283,7 @@ - @@ -340,7 +291,7 @@ - @@ -348,7 +299,7 @@ - @@ -356,7 +307,7 @@ - @@ -364,7 +315,7 @@ - @@ -372,7 +323,7 @@ - @@ -380,7 +331,7 @@ - @@ -388,7 +339,7 @@ - @@ -396,7 +347,7 @@ - @@ -404,7 +355,7 @@ - @@ -412,7 +363,7 @@ - @@ -420,7 +371,7 @@ - @@ -428,7 +379,7 @@ - @@ -436,7 +387,7 @@ - @@ -444,7 +395,7 @@ - @@ -452,7 +403,7 @@ - @@ -460,39 +411,39 @@ - - - + - + - - + - - + - @@ -500,7 +451,7 @@ - @@ -508,7 +459,7 @@ - @@ -516,7 +467,7 @@ - @@ -524,7 +475,7 @@ - @@ -532,32 +483,30 @@ - +
        Command line JJTree options and generated files (working directory: /tmp)Ant 1.5.3 versus command lineAnt 1.6 versus command line
        jjtree  grammar.jjt
             /tmp/grammar.jj
        @@ -241,7 +192,7 @@
           
        Same
        jjtree  /tmp/absolute/grammar.jjt
        +  
        jjtree /tmp/absolute/grammar.jjt
             /tmp/grammar.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_DIRECTORY:relative  grammar.jjt
        +  
        jjtree -OUTPUT_DIRECTORY:relative grammar.jjt
             /tmp/relative/grammar.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_DIRECTORY:relative  relative/grammar.jjt
        +  
        jjtree -OUTPUT_DIRECTORY:relative relative/grammar.jjt
             /tmp/relative/grammar.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_DIRECTORY:relative  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_DIRECTORY:relative /tmp/absolute/grammar.jjt
             /tmp/relative/grammar.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_DIRECTORY:/tmp/absolute/  grammar.jjt
        +  
        jjtree -OUTPUT_DIRECTORY:/tmp/absolute/ grammar.jjt
             /tmp/absolute/grammar.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_DIRECTORY:/tmp/absolute/  relative/grammar.jjt
        +  
        jjtree -OUTPUT_DIRECTORY:/tmp/absolute/ relative/grammar.jjt
             /tmp/absolute/grammar.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_DIRECTORY:/tmp/absolute/  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_DIRECTORY:/tmp/absolute/ /tmp/absolute/grammar.jjt
             /tmp/absolute/grammar.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj grammar.jjt
             /tmp/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj relative/grammar.jjt
             /tmp/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj /tmp/absolute/grammar.jjt
             /tmp/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  -OUTPUT_DIRECTORY:relative  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj -OUTPUT_DIRECTORY:relative grammar.jjt
             /tmp/relative/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  -OUTPUT_DIRECTORY:relative  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj -OUTPUT_DIRECTORY:relative relative/grammar.jjt
             /tmp/relative/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  -OUTPUT_DIRECTORY:relative  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj -OUTPUT_DIRECTORY:relative /tmp/absolute/grammar.jjt
             /tmp/relative/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ grammar.jjt
             /tmp/absolute/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ relative/grammar.jjt
             /tmp/absolute/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ /tmp/absolute/grammar.jjt
             /tmp/absolute/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj relative/grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj /tmp/absolute/grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  -OUTPUT_DIRECTORY:relative  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj -OUTPUT_DIRECTORY:relative grammar.jjt
             /tmp/relative/subdir/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  -OUTPUT_DIRECTORY:relative  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj -OUTPUT_DIRECTORY:relative relative/grammar.jjt
             /tmp/relative/subdir/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  -OUTPUT_DIRECTORY:relative  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj -OUTPUT_DIRECTORY:relative /tmp/absolute/grammar.jjt
             /tmp/relative/subdir/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ grammar.jjt
             /tmp/absolute/subdir/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ relative/grammar.jjt
             /tmp/absolute/subdir/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:subdir/output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:subdir/output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ /tmp/absolute/grammar.jjt
             /tmp/absolute/subdir/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj relative/grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj /tmp/absolute/grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Not Supported Same
        jjtree  -OUTPUT_FILE:D:/tmp/subdir/output.jj  grammar.jjt
        +
        jjtree -OUTPUT_FILE:D:/tmp/subdir/output.jj grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Not SupportedNot Supported *)Not Supported*
        jjtree  -OUTPUT_FILE:D:/tmp/subdir/output.jj  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:D:/tmp/subdir/output.jj relative/grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Not SupportedNot Supported *)Not Supported*
        jjtree  -OUTPUT_FILE:D:/tmp/subdir/output.jj  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:D:/tmp/subdir/output.jj /tmp/absolute/grammar.jjt
             /tmp/subdir/output.jj
             /tmp/<generated>.java
        Not SupportedNot Supported *)Not Supported*
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  -OUTPUT_DIRECTORY:relative  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj -OUTPUT_DIRECTORY:relative grammar.jjt
             /tmp/relative/tmp/subdir/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  -OUTPUT_DIRECTORY:relative  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj -OUTPUT_DIRECTORY:relative relative/grammar.jjt
             /tmp/relative/tmp/subdir/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  -OUTPUT_DIRECTORY:relative  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj -OUTPUT_DIRECTORY:relative /tmp/absolute/grammar.jjt
             /tmp/relative/tmp/subdir/output.jj
             /tmp/relative/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ grammar.jjt
             /tmp/absolute/tmp/subdir/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  relative/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ relative/grammar.jjt
             /tmp/absolute/tmp/subdir/output.jj
             /tmp/absolute/<generated>.java
        Same
        jjtree  -OUTPUT_FILE:/tmp/subdir/output.jj  -OUTPUT_DIRECTORY:/tmp/absolute/  /tmp/absolute/grammar.jjt
        +  
        jjtree -OUTPUT_FILE:/tmp/subdir/output.jj -OUTPUT_DIRECTORY:/tmp/absolute/ /tmp/absolute/grammar.jjt
             /tmp/absolute/tmp/subdir/output.jj
             /tmp/absolute/<generated>.java
        Not Supported Same
        -

        *) Footnote: When running JJTree with the Ant taskdef jjtree the option -OUTPUT_DIRECTORY must always -be set, because the project's basedir and the Ant working directory might differ. So even if you don't specify the jjtree taskdef -outputdirectory JJTree will be called with the -OUTPUT_DIRECTORY set to the project's basedirectory. -But when the -OUTPUT_DIRECTORY is set, the -OUTPUT_FILE setting is handled as if relative to this --OUTPUT_DIRECTORY. Thus when the -OUTPUT_FILE is absolute or contains a drive letter we have a -problem. -Therefore absolute outputfiles (when the outputdirectory isn't specified) are made relative to the default directory. -And for this reason outputfiles that contain a drive letter can't be supported.

        - -

        By the way: specifying a drive letter in the -OUTPUT_FILE when the -OUTPUT_DIRECTORY is set, also -results in strange behavior when running JJTree from the command line.

        - -
        - - - +

        Note: When running JJTree with +the Ant taskdef jjtree the option -OUTPUT_DIRECTORY must always be set, +because the project's basedir and the Ant working directory might differ. So even if you +don't specify the outputdirectory for taskdef jjtree, JJTree will be called +with the -OUTPUT_DIRECTORY set to the project's basedir. But when +the -OUTPUT_DIRECTORY is set, the -OUTPUT_FILE setting is handled as if +relative to this -OUTPUT_DIRECTORY. Thus when the -OUTPUT_FILE is absolute +or contains a drive letter we have a problem. Therefore absolute outputfiles (when +the outputdirectory isn't specified) are made relative to the default directory. And for +this reason outputfiles that contain a drive letter can't be supported.

        + +

        By the way: specifying a drive letter in the -OUTPUT_FILE when +the -OUTPUT_DIRECTORY is set, also results in strange behavior when running JJTree from +the command line.

        - diff -Nru ant-1.9.10/manual/Tasks/jlink.html ant-1.10.3/manual/Tasks/jlink.html --- ant-1.9.10/manual/Tasks/jlink.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jlink.html 2018-03-24 12:37:12.000000000 +0000 @@ -21,106 +21,81 @@ -

        Jlink

        -

        Deprecated

        -

        This task has been deprecated. Use a zipfileset - or zipgroupfileset with the - Jar task or Zip task - instead.

        + +

        Deprecated

        +

        This task has been deprecated. Use a zipfileset +or zipgroupfileset with +the Jar task or Zip task +instead.

        -

        Description:

        +

        Description

        Links entries from sub-builds and libraries.

        -

        The jlink task can be used to build jar and zip files, similar to -the jar task. -However, jlink provides options for controlling the way entries from -input files -are added to the output file. Specifically, capabilities for merging -entries from -multiple zip or jar files is available.

        - -

        If a mergefile is specified directly (eg. at the top level of a -mergefiles -pathelement) and the mergefile ends in ".zip" or -".jar", -entries in the mergefile will be merged into the outfile. A file with -any other extension -will be added to the output file, even if it is specified in the -mergefiles element. -Directories specified in either the mergefiles or addfiles element -are added to the -output file as you would expect: all files in subdirectories are -recursively added to -the output file with appropriate prefixes in the output file -(without merging). -

        - -

        -In the case where duplicate entries and/or files are found among the -files to be merged or -added, jlink merges or adds the first entry and ignores all subsequent entries. -

        - -

        -jlink ignores META-INF directories in mergefiles. Users should supply their -own manifest information for the output file. -

        - -

        It is possible to refine the set of files that are being jlinked. -This can be -done with the includes, includesfile, excludes, -excludesfile, -and defaultexcludes attributes on the addfiles and -mergefiles -nested elements. With the includes or includesfile -attribute you specify the files you want to have included by using patterns. -The exclude or excludesfile attribute is used to specify -the files you want to have excluded. This is also done with patterns. And -finally with the defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the -inclusion/exclusion of files works, and how to write patterns. The patterns are -relative to the base directory.

        +

        The jlink task can be used to build jar and zip files, similar to +the jar task. However, jlink provides options for controlling the way +entries from input files are added to the output file. Specifically, capabilities for merging +entries from multiple zip or jar files is available.

        + +

        If a mergefile is specified directly (eg. at the top level of a mergefiles +pathelement) and the mergefile ends in .zip or .jar, entries in +the mergefile will be merged into the outfile. A file with any other extension will be +added to the output file, even if it is specified in the mergefiles element. +Directories specified in either the mergefiles or addfiles element are +added to the output file as you would expect: all files in subdirectories are recursively added to +the output file with appropriate prefixes in the output file (without merging).

        + +

        In the case where duplicate entries and/or files are found among the files to be merged or +added, jlink merges or adds the first entry and ignores all subsequent entries.

        + +

        jlink ignores META-INF directories in mergefiles. Users +should supply their own manifest information for the output file.

        + +

        It is possible to refine the set of files that are being jlinked. This can be done with +the includes, includesfile, excludes, excludesfile, +and defaultexcludes attributes on the addfiles and mergefiles +nested elements. With the includes or includesfile attribute you specify the +files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This is +also done with patterns. And finally with the defaultexcludes attribute, you can specify +whether you want to use default exclusions or not. See the section +on directory based tasks, on how the +inclusion/exclusion of files works, and how to write patterns. The patterns are relative to +the base directory.

        - - -

        Parameters:

        - +

        Parameters

        +
        - - - + + + - - - + + + - - - + + + - - - + + + - - + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        outfilethe path of the output file.Yesoutfilethe path of the output file.Yes
        compresswhether or not the output should be compressed. -true, - yes, or on result in compressed output. - If omitted, output will be uncompressed (inflated).Nocompresswhether or not the output should be compressed. true, yes, or on + result in compressed output.No; defaults to uncompressed (inflated) output
        mergefilesfiles to be merged into the output, if possible.At least one of -mergefiles or addfilesmergefilesfiles to be merged into the output, if possible.Exactly one of the two
        addfilesfiles to be added to the output.addfilesfiles to be added to the output.

        Examples

        -

        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.

        +

        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.

         <jlink compress="false" outfile="out.jar">
            <mergefiles>
        @@ -134,7 +109,7 @@
         </jlink>
         
        -

        Non-deprecated alternative to the above:

        +

        Non-deprecated alternative to the above:

         <jar compress="false" destfile="out.jar">
           <zipgroupfileset dir="${build.dir}">
        @@ -148,30 +123,25 @@
         </jar>
         
        -

        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.

        +

        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.

         <jlink compress="false" outfile="out.jar">
            <mergefiles>
              <pathelement path="build/tempbuild"/>
            </mergefiles>
        -</jlink>
        -
        +</jlink> -

        However, the next example would result in two top-level entries in out.jar, -namely bar.class and barnone/myClass.zip

        +

        However, the next example would result in two top-level entries in out.jar, +namely bar.class and barnone/myClass.zip

         <jlink compress="false" outfile="out.jar">
            <mergefiles>
              <pathelement path="build/tempbuild/foo.jar"/>
            </mergefiles>
        -</jlink>
        -
        - +</jlink> - diff -Nru ant-1.9.10/manual/Tasks/jspc.html ant-1.10.3/manual/Tasks/jspc.html --- ant-1.9.10/manual/Tasks/jspc.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/jspc.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,229 +24,193 @@ -

        jspc (deprecated)

        +

        jspc

        +

        Deprecated

        +

        If you use this task with Tomcat's Jasper JSP compiler, you should seriously consider using +the task shipping with Tomcat instead. This task is only tested against Tomcat 4.x. There are +known problems with Tomcat 5.x that won't get fixed in Ant, please use Tomcat's jspc +task instead.
        Instead of relying on container-specific JSP compilers we suggest deploying the +raw files (*.jsp) and use the container build-in functions: after deploying run a test +suite (e.g. with Cactus or HttpUnit) +against the deployed web application. So you'll get the test result and the compiled +JSPs.

        Description

        -

        Apache Ant task to run the JSP compiler and turn JSP pages into Java source. +

        Apache Ant task to run the JSP compiler and turn JSP pages into Java source files.

        -

        Deprecated if you use this task with Tomcat's Jasper JSP -compiler, you should seriously consider using the task shipping with -Tomcat instead. This task is only tested against Tomcat 4.x. There -are known problems with Tomcat 5.x that won't get fixed in Ant, please -use Tomcat's jspc task instead.
        -Instead of relying on container specific JSP-compilers we suggest deploying -the raw files (*.jsp) and use the container build-in functions: after deploying run -a test suite (e.g. with Cactus or -HttpUnit) against the deployed web -application. So you'll get the test result and the compiled JSPs. -

        - -

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

        -By default the task uses the Jasper JSP compiler. This -means the task needs jasper.jar and jasper-runtime.jar, which come with -builds of Tomcat 4/Catalina from the -Apache Tomcat project, -and any other Jar files which may be needed in future versions (it changes) - -We recommend (in March 2003) Tomcat version 4.1.x for the most robust version -of Jasper. - -

        -There are many limitations with this task which partially stem from the -many versions of Jasper, others from implementation 'issues' in the task -(i.e. nobody's willingness to radically change large bits of it to work -around jasper). Because of this and the fact that JSP pages do not have -to be portable across implementations -or versions of implementations- -this task is better used for validating JSP pages before deployment, -rather than precompiling them. For that, just deploy and run your httpunit -junit tests after deployment to compile and test your pages, all in one -go. - -

        +

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

        + +

        By default the task uses the Jasper JSP compiler. This means the task +needs jasper.jar and jasper-runtime.jar, which come with builds of Tomcat +4/Catalina from the Apache Tomcat project, +and any other jar files which may be needed in future versions (it changes).

        + +

        We recommend (in March 2003) Tomcat version 4.1.x for the most robust version of Jasper.

        + +

        There are many limitations with this task which partially stem from the many versions of Jasper, +others from implementation 'issues' in the task (i.e. nobody's willingness to radically change large +bits of it to work around Jasper). Because of this and the fact that JSP pages do not have to be +portable across implementations—or versions of implementations—this task is better used +for validating JSP pages before deployment, rather than precompiling them. For the latter, just +deploy and run your HttpUnit JUnit tests after deployment to compile and test your pages, all in one +go.

        Parameters

        -The Task has the following attributes:

        +

        The Task has the following attributes:

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - - -
        AttributeDescriptionRequiredAttributeDescriptionRequired
        destdirWhere to place the generated files. They are located - under here according to the given package name.YesdestdirWhere to place the generated files. They are located under here according to the given + package name.Yes
        srcdirWhere to look for source jsp files.YessrcdirWhere to look for source JSP files.Yes
        verboseThe verbosity integer to pass to the compiler. Default="0"NoverboseThe verbosity integer to pass to the compiler.No; default 0
        packageName of the destination package for generated java - classes.NopackageName of the destination package for generated Java classes.No
        compilerclass name of a JSP compiler adapter, - such as "jasper" or "jasper41"No -defaults to "jasper"compilerclass name of a JSP compiler adapter, such as jasper or jasper41No; defaults to jasper
        iepluginJava Plugin classid for Internet Explorer.NoiepluginJava Plugin classid for Internet Explorer.No
        mapped(boolean) Generate separate write() calls for each HTML - line in the JSP.Nomapped(boolean) Generate separate write() calls for each HTML line in the JSP.No
        classpathThe classpath to use to run the jsp compiler. - This can also be specified - by the nested element classpath - Path).No, but it seems to work better when usedclasspathThe classpath to use to run the JSP compiler.No, but it seems to work better when used; can also be specified by the nested + element classpath
        classpathrefA Reference. As - per classpathNoclasspathrefA Reference. As per classpath.No
        failonerrorflag to control action on compile failures: default=yesNofailonerrorflag to control action on compile failures.No; default yes
        uribase - The uri context of relative URI - references in the JSP pages. If it does not - exist then it is derived from the location of the file - relative to the declared or derived value of uriroot. - NouribaseThe context of relative URI references in JSP.No; derived from the location of the file relative to the declared or derived value + of uriroot
        uriroot - The root directory that uri files should be resolved - against. - NourirootThe root directory that URIs should be resolved against.No
        compiler - Class name of jsp compiler adapter to use. Defaults to - the standard adapter for Jasper. - NocompilerClass name of JSP compiler adapter to use.No; defaults to the standard adapter for Jasper
        compilerclasspathThe classpath used to find the compiler adapter specified - by the compiler attribute.NocompilerclasspathThe classpath used to find the compiler adapter specified by the compiler + attribute.No
        webincOutput file name for the fraction of web.xml that lists servlets.No
        webincOutput file name for the fraction of web.xml that lists servlets.No
        webxmlFile name for web.xml to be generatedNo
        - -

        The mapped option will, if set to true, split the JSP text content into a -one line per call format. There are comments above and below the mapped -write calls to localize where in the JSP file each line of text comes -from. This can lead to a minor performance degradation (but it is bound -by a linear complexity). Without this options all adjacent writes are -concatenated into a single write.

        - -

        The ieplugin option is used by the <jsp:plugin> tags. -If the Java Plug-in COM Class-ID you want to use changes then it can be -specified here. This should not need to be altered.

        - -

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

        + webxml + File name for web.xml to be generated + No + + -

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

        +

        The mapped option will, if set to true, split the JSP text content into a one +line per call format. There are comments above and below the mapped write calls to localize where +in the JSP file each line of text comes from. This can lead to a minor performance degradation (but +it is bound by a linear complexity). Without this option all adjacent writes are concatenated into +a single write.

        + +

        The ieplugin option is used by the <jsp:plugin> tags. If the Java +Plug-in COM Class-ID you want to use changes then it can be specified here. This should not need to +be altered.

        + +

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

        + +

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

        Parameters specified as nested elements

        -This task is a directory based task, like -javac, so the jsp files to be compiled are located as java -files are by javac. That is, elements such as includes and -excludes can be used directly inside the task declaration. - -

        +

        This task is a directory based task, like javac, so +the .jsp files to be compiled are located as .java files are +by javac. That is, elements such as includes and excludes can +be used directly inside the task declaration.

        -Elements specific to the jspc task are:- +

        Elements specific to the jspc task are:

        classpath

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

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

        classpathref

        -a reference to an existing classpath + +

        a reference to an existing classpath

        webapp

        -Instructions to jasper to build an entire web application. -The base directory must have a WEB-INF subdirectory beneath it. -When used, the task hands off all dependency checking to the compiler. - - - - - + +

        Instructions to Jasper to build an entire web application. The base directory must have +a WEB-INF subdirectory beneath it. When used, the task hands off all dependency +checking to the compiler.

        +
        AttributeDescriptionRequired
        + + + + - - - + + +
        AttributeDescriptionRequired
        basedirthe base directory of the web applicationYesbasedirthe base directory of the web applicationYes

        Example

        @@ -257,52 +221,39 @@ compiler="jasper41" verbose="9"> <include name="**/*.jsp"/> -</jspc> - -Build all jsp pages under src/war into the destination /gensrc, in a -package hierarchy beginning with com.i3sp.jsp. +</jspc> +

        Build all .jsp files under src/war into the +destination /gensrc, in a package hierarchy beginning +with com.i3sp.jsp.

        -<jspc
        -      destdir="interim"
        +<jspc destdir="interim"
               verbose="1"
               srcdir="src"
               compiler="jasper41"
               package="com.i3sp.jsp">
           <include name="**/*.jsp"/>
         </jspc>
        -<depend
        -         srcdir="interim"
        +<depend srcdir="interim"
                  destdir="build"
                  cache="build/dependencies"
                  classpath="lib/taglibs.jar"/>
        -<javac
        -         srcdir="interim"
        +<javac srcdir="interim"
                  destdir="build"
                  classpath="lib/taglibs.jar"
        -         debug="on"/>
        -
        -Generate jsp pages then javac them down to -bytecodes. Include lib/taglib jar in the java compilation. - Dependency checking is used to scrub the -java files if class dependencies indicate it is needed. - -

        Notes

        -Using the package attribute it is possible to identify the resulting -java files and thus do full dependency checking - this task should only rebuild -java files if their jsp file has been modified. However, this only works -with some versions of jasper. By default the checking supports tomcat 4.0.x -with the "jasper" compiler, set the compiler to "jasper41" for the tomcat4.1.x -dependency checking. -Even when it does work, changes in -.TLD imports or in compile time includes do not get picked up. - -

        -Jasper generates JSP pages against the JSP1.2 specification -a copy of -version 2.3 of the servlet specification is needed on the classpath to -compile the Java code. - - - + debug="on"/> +

        Generate .java files from .jsp files then javac them down +to bytecodes. Include lib/taglibs.jar in the Java compilation. Dependency checking is +used to scrub the .java files if class dependencies indicate it is needed.

        + +

        Notes

        +

        Using the package attribute it is possible to identify the +resulting .java files and thus do full dependency checking—this task should only +rebuild .java files if their .jsp file has been modified. However, this +only works with some versions of Jasper. By default the checking supports Tomcat 4.0.x with +the jasper compiler, set the compiler to jasper41 for the Tomcat 4.1.x dependency +checking. Even when it does work, changes in .tld imports or in compile time includes +do not get picked up.

        +

        Jasper generates JSP pages against the JSP 1.2 specification—a copy of version 2.3 of the +servlet specification is needed on the classpath to compile the Java code.

        - diff -Nru ant-1.9.10/manual/Tasks/junit.html ant-1.10.3/manual/Tasks/junit.html --- ant-1.9.10/manual/Tasks/junit.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/junit.html 2018-03-24 12:37:12.000000000 +0000 @@ -21,281 +21,221 @@ -

        JUnit

        +

        JUnit

        Description

        -

        This task runs tests from the JUnit testing framework. The latest -version of the framework can be found at -http://www.junit.org. -This task has been tested with JUnit 3.0 up to JUnit 3.8.2; it won't -work with versions prior to JUnit 3.0. It also works with JUnit 4.0, including -"pure" JUnit 4 tests using only annotations and no JUnit4TestAdapter.

        -

        Note: This task depends on external libraries not included +

        This task runs tests from the JUnit testing framework. The latest version of the framework can be +found at https://junit.org. This task has been tested +with JUnit 3.0 up to JUnit 3.8.2; it won't work with versions prior to JUnit 3.0. It also works with +JUnit 4.x, including "pure" JUnit 4 tests using only annotations and +no JUnit4TestAdapter.

        +

        Note: This task depends on external libraries not included in the Apache Ant distribution. See -Library Dependencies for more information. -

        -

        -Note: -You must have junit.jar available. -You can do one of: -

        +Library Dependencies for more information.

        +

        Note: You must have junit.jar available. You can do one of:

          -
        1. -Put both junit.jar and ant-junit.jar in -ANT_HOME/lib. -
        2. -
        3. -Do not put either in ANT_HOME/lib, and instead -include their locations in your CLASSPATH environment variable. -
        4. -
        5. -Add both JARs to your classpath using -lib. -
        6. -
        7. -Specify the locations of both JARs using -a <classpath> element in a <taskdef> in the build file. -
        8. -
        9. -Leave ant-junit.jar in its default location in ANT_HOME/lib -but include junit.jar in the <classpath> passed -to <junit>. (since Ant 1.7) -
        10. +
        11. Put both junit.jar and ant-junit.jar + in ANT_HOME/lib.
        12. +
        13. Do not put either in ANT_HOME/lib, and instead include their locations in + your CLASSPATH environment variable.
        14. +
        15. Add both JARs to your classpath using -lib.
        16. +
        17. Specify the locations of both JARs using a <classpath> element in + a <taskdef> in the build file.
        18. +
        19. Leave ant-junit.jar in its default location in ANT_HOME/lib but + include junit.jar in the <classpath> passed + to <junit>. Since Ant 1.7
        -

        -See the -FAQ for details. -

        - -

        Tests are defined by nested test or -batchtest tags (see nested -elements).

        +

        See the FAQ +for details.

        + +

        Tests are defined by nested test or batchtest tags +(see nested elements).

        Parameters

        - - - - - - +
        AttributeDescriptionRequired
        - - - - - - - - - - - - - - - - - - + + + - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        printsummaryPrint one-line statistics for each testcase. Can - take the values on, - off, and - withOutAndErr. - withOutAndErr is the same - as on but also includes the output of the test - as written to System.out and System.err.No; default is off.
        forkRun the tests in a separate VM.No; default is off.
        forkmodeControls how many Java Virtual Machines get - created if you want to fork some tests. Possible values are - "perTest" (the default), "perBatch" and - "once". "once" creates only a single Java VM - for all tests while "perTest" creates a new VM for each - TestCase class. "perBatch" creates a VM for each nested - <batchtest> and one collecting all nested - <test>s. Note that only tests with the same - settings of filtertrace, haltonerror, - haltonfailure, errorproperty and - failureproperty can share a VM, so even if you set - forkmode to "once", Ant may have to create - more than a single Java VM. This attribute is ignored for tests - that don't get forked into a new Java VM. since Ant 1.6.2No; default is perTest.
        haltonerrorStop the build process if an error occurs during the test - run.No; default is off.AttributeDescriptionRequired
        errorpropertyThe name of a property to set in the event of an error.No
        haltonfailureStop the build process if a test fails (errors are - considered failures as well).No; default is off.printsummaryPrint one-line statistics for each testcase. Can take the values on, off, + and withOutAndErr. withOutAndErr is the same as on but also includes the + output of the test as written to System.out and System.err.No; default is off
        failurepropertyThe name of a property to set in the event of a failure - (errors are considered failures as well).No.
        filtertraceFilter out Junit and Ant stack frames from error and failure stack traces.No; default is on.
        timeoutCancel the individual tests if they don't finish - in the given time (measured in milliseconds). Ignored if - fork is disabled. When running multiple tests - inside the same Java VM (see forkMode), timeout applies to the - time that all tests use together, not to an individual - test.No
        maxmemoryMaximum amount of memory to allocate to the forked VM. - Ignored if fork is disabled. Note: - If you get java.lang.OutOfMemoryError: Java heap space - in some of your tests then you need to raise the size like - maxmemory="128m"No
        jvmThe command used to invoke the Java Virtual Machine, - default is 'java'. The command is resolved by - java.lang.Runtime.exec(). - Ignored if fork is disabled.No; default is java.
        dirThe directory in which to invoke the VM. Ignored if - fork is disabled.No
        newenvironmentDo not propagate the old environment when new - environment variables are specified. Ignored if fork is - disabled.No; default is false.
        includeantruntimeImplicitly add the Ant classes required to run - the tests and JUnit to the classpath in forked mode. - No; default is true.forkRun the tests in a separate JVM.No; default is off
        showoutputSend any output generated by tests to Ant's - logging system as well as to the formatters. By default only the - formatters receive the output.NoforkmodeControls how many JVMs get created if you want to fork some tests. Possible values + are perTest (the default), perBatch and once. once creates only a + single JVM for all tests while perTest creates a new JVM for each TestCase + class. perBatch creates a JVM for each nested <batchtest> and one + collecting all nested <test>s. Note that only tests with the same settings + of filtertrace, haltonerror, haltonfailure, errorproperty + and failureproperty can share a JVM, so even if you set forkmode + to once, Ant may have to create more than a single JVM. This attribute is ignored for + tests that don't get forked into a new JVM. Since Ant 1.6.2No; default is perTest
        outputtoformatters - Since Ant 1.7.0.
        - Send any output generated by tests to the test formatters. - This is "true" by default. -
        NohaltonerrorStop the build process if an error occurs during the test run.No; default is off
        errorpropertyThe name of a property to set in the event of an error.No
        haltonfailureStop the build process if a test fails (errors are considered failures as well).No; default is off
        failurepropertyThe name of a property to set in the event of a failure (errors are considered failures as + well).No
        filtertraceFilter out JUnit and Ant stack frames from error and failure stack traces.No; default is on
        timeoutCancel the individual tests if they don't finish in the given time (measured in + milliseconds). Ignored if fork is off. When running multiple tests inside + the same JVM (see forkMode), timeout applies to the time that all tests + use together, not to an individual test.No
        maxmemoryMaximum amount of memory to allocate to the forked JVM. Ignored if fork + is off. Note: If you get java.lang.OutOfMemoryError: Java heap + space in some of your tests then you need to raise the size + like maxmemory=128mNo
        jvmThe command used to invoke JVM. The command is resolved + by java.lang.Runtime.exec().No; default is java, ignored if fork is false
        dirThe directory in which to invoke JVM.No, ignored if fork is false
        newenvironmentDo not propagate the old environment when new environment variables are specified.No; default is false, ignored if fork is false
        tempdirWhere Ant should place temporary files. - Since Ant 1.6.No; default is the project's base - directory.
        reloadingWhether or not a new classloader should be instantiated for each test case.
        - Ignore if fork is set to true. - Since Ant 1.6.
        No; default is true.
        clonevmIf set to true true, then all system properties - and the bootclasspath of the forked Java Virtual Machine will be - the same as those of the Java VM running Ant. Default is - "false" (ignored if fork is disabled). - since Ant 1.7No
        logfailedtestsWhen Ant executes multiple tests and doesn't stop - on errors or failures it will log a "FAILED" message for each - failing test to its logging system. If you set this option to - false, the message will not be logged and you have to rely on the - formatter output to find the failing tests. - since Ant 1.8.0No
        enableTestListenerEventsWhether Ant should send fine grained information - about the running tests to Ant's logging system at the verbose - level. Such events may be used by custom test listeners to show - the progress of tests.
        - Defaults to false.
        - Can be overridden by a magic - property.
        - since Ant 1.8.2 - Ant 1.7.0 to 1.8.1 behave as - if this attribute was true by default.
        No
        threadsa number of threads to run the tests in.
        - When this attribute is specified the tests will be split arbitrarily among the threads.
        - requires that the tests be forked with the perTest - option to be operative.
        - since Ant 1.9.4
        NoincludeantruntimeImplicitly add the Ant classes required to run the tests and JUnit to the classpath in + forked mode.No; default is true
        showoutputSend any output generated by tests to Ant's logging system as well as to the + formatters.No; by default only the formatters receive the output
        outputtoformattersSend any output generated by tests to the test formatters. Since Ant 1.7.0.No; default is true
        tempdirWhere Ant should place temporary files. Since Ant 1.6.No; default is the project's basedir
        reloadingWhether or not a new classloader should be instantiated for each test case.
        Ignore + if fork is set to true. Since Ant 1.6.
        No; default is true
        clonevmIf set to true, then all system properties and the bootclasspath of the + forked JVM will be the same as those of the JVM running Ant. since Ant 1.7No; default is false, ignored if fork is false
        logfailedtestsWhen Ant executes multiple tests and doesn't stop on errors or failures it will log a + "FAILED" message for each failing test to its logging system. If you set this option + to false, the message will not be logged and you have to rely on the formatter output + to find the failing tests. since Ant 1.8.0No
        enableTestListenerEventsWhether Ant should send fine grained information about the running tests to Ant's logging + system at the verbose level. Such events may be used by custom test listeners to show the + progress of tests.
        since Ant 1.8.2Ant 1.7.0 to 1.8.1 behave as if + this attribute was true by default.
        No; defaults to false, can be overridden by + a magic property
        threadsa number of threads to run the tests in.
        When this attribute is specified the tests will + be split arbitrarily among the threads.
        Requires that the tests be forked with + the perTest option to be operative.
        since Ant 1.9.4
        No
        -

        By using the errorproperty and failureproperty -attributes, it is possible to -perform setup work (such as starting an external server), execute the test, -clean up, and still fail the build in the event of a failure.

        - -

        The filtertrace attribute condenses error and failure -stack traces before reporting them. -It works with both the plain and XML formatters. It filters out any lines -that begin with the following string patterns:

        -   "junit.framework.TestCase"
        -   "junit.framework.TestResult"
        -   "junit.framework.TestSuite"
        -   "junit.framework.Assert."
        -   "junit.swingui.TestRunner"
        -   "junit.awtui.TestRunner"
        -   "junit.textui.TestRunner"
        -   "java.lang.reflect.Method.invoke("
        -   "sun.reflect."
        -   "org.apache.tools.ant."
        -   "org.junit."
        -   "junit.framework.JUnit4TestAdapter"
        -   " more"
        - -

        Nested Elements

        - -

        The <junit> task -supports a nested <classpath> -element that represents a PATH like -structure.

        +

        By using the errorproperty and failureproperty attributes, it is possible +to perform setup work (such as starting an external server), execute the test, clean up, and still +fail the build in the event of a failure.

        + +

        The filtertrace attribute condenses error and failure stack traces before reporting +them. It works with both the plain and XML formatters. It filters out any lines that begin with +the following string patterns:

        + +
        +   "junit.framework.TestCase"
        +   "junit.framework.TestResult"
        +   "junit.framework.TestSuite"
        +   "junit.framework.Assert."
        +   "junit.swingui.TestRunner"
        +   "junit.awtui.TestRunner"
        +   "junit.textui.TestRunner"
        +   "java.lang.reflect.Method.invoke("
        +   "sun.reflect."
        +   "org.apache.tools.ant."
        +   "org.junit."
        +   "junit.framework.JUnit4TestAdapter"
        +   " more"
        -

        As of Ant 1.7, this classpath may be used to refer to junit.jar -as well as your tests and the tested code. +

        Parameters specified as nested elements

        + +

        The <junit> task supports a nested <classpath> element that +represents a path-like structure.

        + +

        Since Ant 1.7, this classpath may be used to refer to junit.jar as well as +your tests and the tested code.

        jvmarg

        -

        If fork is enabled, additional parameters may be passed to -the new VM via nested <jvmarg> elements. For example:

        +

        If fork is true, additional parameters may be passed to the new JVM via +nested <jvmarg> elements. For example:

         <junit fork="yes">
        @@ -304,18 +244,17 @@
         </junit>
         
        -

        would run the test in a VM without JIT.

        +

        would run the test in a JVM without JIT.

        -

        <jvmarg> allows all attributes described in Command-line Arguments.

        +

        <jvmarg> allows all attributes described +in Command-line Arguments.

        sysproperty

        -

        Use nested <sysproperty> elements to specify system -properties required by the class. These properties will be made available -to the VM during the execution of the test (either ANT's VM or the forked VM, -if fork is enabled). -The attributes for this element are the same as for environment variables.

        +

        Use nested <sysproperty> elements to specify system properties required by the +class. These properties will be made available to JVM during the execution of the test (either Ant's +JVM or the forked JVM, if fork=true). The attributes for this element are the +same as for environment variables.

         <junit fork="no">
        @@ -324,369 +263,351 @@
         </junit>
         
        -

        would run the test in ANT's VM and make the basedir property -available to the test.

        +

        would run the test in Ant's JVM and make the basedir property available to the +test.

        syspropertyset

        +

        Since Ant 1.6

        +

        You can specify a set of properties to be used as system properties with syspropertysets.

        -

        since Ant 1.6.

        -

        env

        -

        It is possible to specify environment variables to pass to the -forked VM via nested <env> elements. For a description -of the <env> element's attributes, see the -description in the exec task.

        +

        It is possible to specify environment variables to pass to the forked JVM via +nested <env> elements. For a description of the <env> +element's attributes, see the description in the exec task.

        -

        Settings will be ignored if fork is disabled.

        +

        Settings will be ignored if fork=false.

        bootclasspath

        -

        The location of bootstrap class files can be specified using this -PATH like structure - will be ignored -if fork is not true or the target VM doesn't -support it (i.e. Java 1.1).

        +

        Since Ant 1.6.

        -

        since Ant 1.6.

        +

        The location of bootstrap class files can be specified using +this path-like structure—will be ignored if fork +is false or the target JVM doesn't support it (i.e. Java 1.1).

        permissions

        -

        Security permissions can be revoked and granted during the execution of the -class via a nested permissions element. For more information please + +

        Since Ant 1.6.

        + +

        Security permissions can be revoked and granted during the execution of the class via a +nested permissions element. For more information please see permissions

        -

        Settings will be ignored if fork is enabled.

        +

        Settings will be ignored if fork=true.

        -

        since Ant 1.6.

        -

        assertions

        -

        You can control enablement of Java 1.4 assertions with an -<assertions> -subelement.

        - -

        Assertion statements are currently ignored in non-forked mode.

        +

        Since Ant 1.6.

        + +

        You can control enablement of Java 1.4 assertions with +an <assertions> subelement.

        -

        since Ant 1.6.

        +

        Assertion statements are currently ignored in non-forked mode.

        modulepath

        -

        The location of modules can be specified using this PATH like structure.
        -The modulepath requires fork to be set to true. +

        Since Ant 1.9.8

        -

        since Ant 1.9.8

        +

        The location of modules can be specified using this path-like +structure.
        The modulepath requires fork to be set to true.

        upgrademodulepath

        -

        The location of modules that replace upgradeable modules in the runtime image -can be specified using this PATH like structure.
        -The upgrademodulepath requires fork to be set to true. +

        Since Ant 1.9.8

        -

        since Ant 1.9.8

        +

        The location of modules that replace upgradeable modules in the runtime image can be specified +using this path-like +structure.
        The upgrademodulepath requires fork to be set +to true.

        formatter

        -

        The results of the tests can be printed in different -formats. Output will always be sent to a file, unless you set the -usefile attribute to false. -The name of the file is determined by the -name of the test and can be set by the outfile attribute +

        The results of the tests can be printed in different formats. Output will always be sent to a +file, unless you set the usefile attribute to false. The name of the file is +determined by the name of the test and can be set by the outfile attribute of <test>.

        -

        There are four predefined formatters - one prints the test results -in XML format, the other emits plain text. The formatter named -brief will only print detailed information for testcases -that failed, while plain gives a little statistics line -for all test cases. Custom formatters that need to implement -org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter +

        There are four predefined formatters—one prints the test results in XML format, the other +emits plain text. The formatter named brief will only print detailed information for test +cases that failed, while plain gives a little statistics line for all test cases. Custom +formatters that need to +implement org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter can be specified.

        -

        If you use the XML formatter, it may not include the same output -that your tests have written as some characters are illegal in XML -documents and will be dropped.

        - -

        The fourth formatter named failure (since Ant 1.8.0) -collects all failing testXXX() -methods and creates a new TestCase which delegates only these -failing methods. The name and the location can be specified via Java System property or Ant property -ant.junit.failureCollector. The value has to point to the directory and -the name of the resulting class (without suffix). It defaults to java-tmp-dir/FailedTests.

        +

        If you use the XML formatter, it may not include the same output that your tests have written as +some characters are illegal in XML documents and will be dropped.

        - +

        The fourth formatter named failure (since Ant 1.8.0) collects all +failing testXXX() methods and creates a +new TestCase which delegates only these failing methods. The name and the +location can be specified via Java system property or Ant +property ant.junit.failureCollector. The value has to point to the directory and the +name of the resulting class (without suffix). It defaults +to java-tmp-dir/FailedTests.

        + +
        - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        typeUse a predefined formatter (either - xml, plain, brief or failure).Exactly one of these.typeUse a predefined formatter (either xml, plain, brief + or failure).Exactly one of these
        classnameName of a custom formatter class.classnameName of a custom formatter class.
        extensionExtension to append to the output filename.Yes, if classname has been used.extensionExtension to append to the output filename.Yes, if classname has been used
        usefileBoolean that determines whether output should be - sent to a file.No; default is true.usefileBoolean that determines whether output should be sent to a file.No; default is true
        ifOnly use formatter if the named property is set.No; default is true.ifOnly use formatter if the named property is + set.No; default is true
        unlessOnly use formatter if the named property is not set.No; default is true.
        unlessOnly use formatter if the named property + is not set.No; default is true

        test

        Defines a single test class.

        - - - - - - +
        AttributeDescriptionRequired
        - - - + + + - - + + + + + + - - + + - - - + + + - - - + + + - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        nameName of the test class.YesAttributeDescriptionRequired
        methodsComma-separated list of names of test case methods to execute. - Since 1.8.2 -

        The methods attribute can be useful in the following scenarios:

        +
        nameName of the test class.Yes
        methodsComma-separated list of names of test case methods to execute. Since 1.8.2 +

        The methods attribute can be useful in the followiang scenarios:

          -
        • A test method has failed and you want to re-run the test method - to test a fix or re-run the test under the Java debugger without - having to wait for the other (possibly long running) test methods - to complete.
        • -
        • One or more test methods are running slower than expected and you - want to re-run them under a Java profiler (without the overhead - of running the profiler whilst other test methods are being - executed).
        • +
        • A test method has failed and you want to re-run the test method to test a fix or re-run + the test under the Java debugger without having to wait for the other (possibly long + running) test methods to complete.
        • +
        • One or more test methods are running slower than expected and you want to re-run them + under a Java profiler (without the overhead of running the profiler whilst other test + methods are being executed).
        -

        If the methods attribute is used but no test method - is specified, then no test method from the suite will be executed.

        +

        If the methods attribute is used but no test method is specified, then no test + method from the suite will be executed.

        No; default is to run all test methods in the suite.
        No; default is to run all test methods in the suite
        forkRun the tests in a separate VM. - Overrides value set in <junit>.NoforkRun the tests in a separate JVM. Overrides value set in <junit>.No
        haltonerrorStop the build process if an error occurs during the test - run. Overrides value set in <junit>.NohaltonerrorStop the build process if an error occurs during the test run. Overrides value set + in <junit>.No
        errorpropertyThe name of a property to set in the event of an error. - Overrides value set in <junit>.No
        haltonfailureStop the build process if a test fails (errors are - considered failures as well). Overrides value set in - <junit>.NoerrorpropertyThe name of a property to set in the event of an error. Overrides value set + in <junit>.No
        failurepropertyThe name of a property to set in the event of a failure - (errors are considered failures as well). Overrides value set in - <junit>.No
        filtertraceFilter out Junit and Ant stack frames from error and failure stack - traces. Overrides value set in <junit>.No; default is on.
        todirDirectory to write the reports to.No; default is the current directory.
        outfileBase name of the test result. The full filename is - determined by this attribute and the extension of - formatter.No; default is - TEST-name, where name is the name of - the test specified in the name attribute.
        ifOnly run test if the named property is set.No
        unlessOnly run test if the named property is not set.No
        skipNonTestsDo not pass any classes that do not contain JUnit tests to the test runner. - This prevents non tests from appearing as test errors in test results.
        - Tests are identified by looking for the @Test annotation on any methods in concrete classes - that don't extend junit.framework.TestCase, or for public/protected methods with - names starting with 'test' in concrete classes that extend junit.framework.TestCase. - Classes marked with the JUnit4 org.junit.runner.RunWith or - org.junit.runner.Suite.SuiteClasses annotations are also passed to JUnit for execution, - as is any class with a public/protected no-argument suite method.
        No. Default is false.haltonfailureStop the build process if a test fails (errors are considered failures as well). Overrides + value set in <junit>.No
        failurepropertyThe name of a property to set in the event of a failure (errors are considered failures as + well). Overrides value set in <junit>.No
        filtertraceFilter out JUnit and Ant stack frames from error and failure stack traces. Overrides value + set in <junit>.No; default is on
        todirDirectory to write the reports to.No; default is the current directory
        outfileBase name of the test result. The full filename + is outfile.formatter.No; default is TEST-name
        ifOnly run test if the named property is set.No
        unlessOnly run test if the named property + is not set.No
        skipNonTestsDo not pass any classes that do not contain JUnit tests to the test runner. This prevents + non tests from appearing as test errors in test results.
        Tests are identified by looking + for the @Test annotation on any methods in concrete classes that don't + extend junit.framework.TestCase, or for public/protected methods with names + starting with test in concrete classes that + extend junit.framework.TestCase. Classes marked with the JUnit + 4 org.junit.runner.RunWith or org.junit.runner.Suite.SuiteClasses + annotations are also passed to JUnit for execution, as is any class with a public/protected + no-argument suite() method.
        No; default is false
        -

        Tests can define their own formatters via nested -<formatter> elements.

        +

        Tests can define their own formatters via nested <formatter> elements.

        batchtest

        Define a number of tests based on pattern matching.

        -

        batchtest collects the included resources from any number -of nested Resource Collections. It then -generates a test class name for each resource that ends in -.java or .class.

        - -

        Any type of Resource Collection is supported as a nested element, -prior to Ant 1.7 only <fileset> has been -supported.

        +

        batchtest collects the included resources from +any number of nested resource collections. It then +generates a test class name for each resource that ends in .java +or .class.

        - - - - - - +

        Any type of resource collection is supported as a nested element, prior to Ant 1.7 +only <fileset> has been supported.

        + +
        AttributeDescriptionRequired
        - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + +
        forkRun the tests in a separate VM. - Overrides value set in <junit>.NoAttributeDescriptionRequired
        haltonerrorStop the build process if an error occurs during the test - run. Overrides value set in <junit>.NoforkRun the tests in a separate JVM. Overrides value set in <junit>.No
        errorpropertyThe name of a property to set in the event of an error. - Overrides value set in <junit>.No
        haltonfailureStop the build process if a test fails (errors are - considered failures as well). Overrides value set in - <junit>.NohaltonerrorStop the build process if an error occurs during the test run. Overrides value set + in <junit>.No
        errorpropertyThe name of a property to set in the event of an error. Overrides value set + in <junit>.No
        failurepropertyThe name of a property to set in the event of a failure - (errors are considered failures as well). Overrides value set in - <junit>No
        filtertraceFilter out Junit and Ant stack frames from error and failure stack - traces. Overrides value set in <junit>.No; default is on.haltonfailureStop the build process if a test fails (errors are considered failures as well). Overrides + value set in <junit>.No
        todirDirectory to write the reports to.No; default is the current directory.failurepropertyThe name of a property to set in the event of a failure (errors are considered failures as + well). Overrides value set in <junit>No
        ifOnly run tests if the named property is set.NofiltertraceFilter out JUnit and Ant stack frames from error and failure stack traces. Overrides value + set in <junit>.No; default is on
        unlessOnly run tests if the named property is not set.NotodirDirectory to write the reports to.No; default is the current directory
        skipNonTestsDo not pass any classes that do not contain JUnit tests to the test runner. - This prevents non tests from appearing as test errors in test results.
        - Tests are identified by looking for the @Test annotation on any methods in concrete classes - that don't extend junit.framework.TestCase, or for public/protected methods with - names starting with 'test' in concrete classes that extend junit.framework.TestCase. - Classes marked with the JUnit4 org.junit.runner.RunWith or - org.junit.runner.Suite.SuiteClasses annotations are also passed to JUnit for execution, - as is any class with a public/protected no-argument suite method.
        No. Default is false.ifOnly run tests if the named property is set.No
        unlessOnly run tests if the named property + is not set.No
        skipNonTestsDo not pass any classes that do not contain JUnit tests to the test runner. This prevents + non tests from appearing as test errors in test results.
        Tests are identified by looking + for the @Test annotation on any methods in concrete classes that don't + extend junit.framework.TestCase, or for public/protected methods with names + starting with test in concrete classes that + extend junit.framework.TestCase. Classes marked with the JUnit + 4 org.junit.runner.RunWith or org.junit.runner.Suite.SuiteClasses + annotations are also passed to JUnit for execution, as is any class with a public/protected + no-argument suite() method.
        No; default is false
        -

        Batchtests can define their own formatters via nested -<formatter> elements.

        +

        Batch tests can define their own formatters via nested <formatter> +elements.

        -

        Forked tests and tearDown

        +

        Forked tests and tearDown()

        -

        If a forked test runs into a timeout, Ant will terminate the Java - VM process it has created, which probably means the - test's tearDown method will never be called. The same - is true if the forked VM crashes for some other reason.

        - -

        Starting with Ant 1.8.0, a special formatter is distributed with - Ant that tries to load the testcase that was in the forked VM and - invoke that class' tearDown method. This formatter has - the following limitations:

        +

        If a forked test runs into a timeout, Ant will terminate the JVM process it has created, which +probably means the test's tearDown() method will never be called. The +same is true if the forked JVM crashes for some other reason.

        + +

        Since Ant 1.8.0, a special formatter is distributed with Ant that tries to load the +testcase that was in the forked JVM and invoke that class' tearDown() +method. This formatter has the following limitations:

          -
        • It runs in the same Java VM as Ant itself, this is a different - Java VM than the one that was executing the test and it may see a - different classloader (and thus may be unable to load the test +
        • It runs in the same JVM as Ant itself, this is a different JVM than the one that was executing + the test and it may see a different classloader (and thus may be unable to load the test class).
        • -
        • It cannot determine which test was run when the timeout/crash - occurred if the forked VM was running multiple test. I.e. the - formatter cannot work with any forkMode other - than perTest and it won't do anything if the test - class contains a suite() method.
        • +
        • It cannot determine which test was run when the timeout/crash occurred if the forked JVM was + running multiple tests. I.e. the formatter cannot work with any forkMode other + than perTest and it won't do anything if the test class contains + a suite() method.
        -

        If the formatter recognizes an incompatible forkMode - or a suite method or fails to load the test class it - will silently do nothing.

        +

        If the formatter recognizes an incompatible forkMode or +a suite() method or fails to load the test class it will silently do +nothing.

        -

        The formatter doesn't have any effect on tests that were not - forked or didn't cause timeouts or VM crashes.

        +

        The formatter doesn't have any effect on tests that were not forked or didn't cause timeouts or +JVM crashes.

        To enable the formatter, add a formatter like

        @@ -697,76 +618,64 @@

        to your junit task.

        -

        ant.junit.enabletestlistenerevents - magic property

        +

        ant.junit.enabletestlistenerevents magic property

        -

        Since Ant 1.8.2 the enableTestListenerEvents - attribute of the task controls whether fine grained logging messages - will be sent to the task's verbose log. In addition to this - attribute Ant will consult the - property ant.junit.enabletestlistenerevents and the - value of the property overrides the setting of the attribute.

        - -

        This property exists so that containers running Ant that depend on - the additional logging events can ensure they will be generated even - if the build file disables them.

        +

        Since Ant 1.8.2 the enableTestListenerEvents attribute of the task controls +whether fine grained logging messages will be sent to the task's verbose log. In addition to this +attribute Ant will consult the property ant.junit.enabletestlistenerevents and the +value of the property overrides the setting of the attribute.

        + +

        This property exists so that containers running Ant that depend on the additional logging events +can ensure they will be generated even if the build file disables them.

        Examples

         <junit>
        -  <test name="my.test.TestCase"/>
        -</junit>
        -
        + <test name="my.test.TestCase"/> +</junit> -

        Runs the test defined in my.test.TestCase in the same -VM. No output will be generated unless the test fails.

        +

        Runs the test defined in my.test.TestCase in the same VM. No output will be +generated unless the test fails.

         <junit printsummary="yes" fork="yes" haltonfailure="yes">
        -  <formatter type="plain"/>
        -  <test name="my.test.TestCase"/>
        -</junit>
        -
        - -

        Runs the test defined in my.test.TestCase in a -separate VM. At the end of the test, a one-line summary will be -printed. A detailed report of the test can be found in -TEST-my.test.TestCase.txt. The build process will be -stopped if the test fails.

        + <formatter type="plain"/> + <test name="my.test.TestCase"/> +</junit> + +

        Runs the test defined in my.test.TestCase in a separate JVM. At the end of the +test, a one-line summary will be printed. A detailed report of the test can be found +in TEST-my.test.TestCase.txt. The build process will be stopped if the test fails.

         <junit printsummary="yes" haltonfailure="yes">
        -  <classpath>
        -    <pathelement location="${build.tests}"/>
        -    <pathelement path="${java.class.path}"/>
        -  </classpath>
        -
        -  <formatter type="plain"/>
        -
        -  <test name="my.test.TestCase" haltonfailure="no" outfile="result">
        -    <formatter type="xml"/>
        -  </test>
        -
        -  <batchtest fork="yes" todir="${reports.tests}">
        -    <fileset dir="${src.tests}">
        -      <include name="**/*Test*.java"/>
        -      <exclude name="**/AllTests.java"/>
        -    </fileset>
        -  </batchtest>
        -</junit>
        -
        - -

        Runs my.test.TestCase in the same VM, ignoring the -given CLASSPATH; only a warning is printed if this test fails. In -addition to the plain text test results, for this test a XML result -will be output to result.xml. -Then, for each matching file in the directory defined for -${src.tests} a -test is run in a separate VM. If a test fails, the build process is -aborted. Results are collected in files named -TEST-name.txt and written to -${reports.tests}.

        + <classpath> + <pathelement location="${build.tests}"/> + <pathelement path="${java.class.path}"/> + </classpath> + + <formatter type="plain"/> + + <test name="my.test.TestCase" haltonfailure="no" outfile="result"> + <formatter type="xml"/> + </test> + + <batchtest fork="yes" todir="${reports.tests}"> + <fileset dir="${src.tests}"> + <include name="**/*Test*.java"/> + <exclude name="**/AllTests.java"/> + </fileset> + </batchtest> +</junit> + +

        Runs my.test.TestCase in the same JVM, ignoring the given CLASSPATH; +only a warning is printed if this test fails. In addition to the plain text test results, for this +test a XML result will be output to result.xml. Then, for each matching file in the +directory defined for ${src.tests} a test is run in a separate JVM. If a test fails, +the build process is aborted. Results are collected in files +named TEST-name.txt and written +to ${reports.tests}.

         <target name="test">
        @@ -776,7 +685,7 @@
             <delete>
                 <fileset dir="${collector.dir}" includes="${collector.class}*.class"/>
             </delete>
        -    <!-- compile the FailedTests class if present --> 
        +    <!-- compile the FailedTests class if present -->
             <javac srcdir="${collector.dir}" destdir="${collector.dir}"/>
             <available file="${collector.dir}/${collector.class}.class" property="hasFailingTests"/>
             <junit haltonerror="false" haltonfailure="false">
        @@ -798,60 +707,60 @@
                     <formatter type="plain" usefile="false"/>
                 </test>
             </junit>
        -</target>
        -
        +</target>

        On the first run all tests are collected via the <batchtest/> -element. Its plain formatter shows the output on the console. The -failure formatter creates a java source file in -${build.dir}/failingTests/FailedTests.java which extends -junit.framework.TestCase and returns from a suite() -method a test suite for the failing tests.
        -On a second run the collector class exists and instead of the <batchtest/> -the single <test/> will run. So only the failing test cases are re-run. -The two nested formatters are for displaying (for the user) and for updating the collector -class. -

        +element. Its plain formatter shows the output on the console. The failure +formatter creates a Java source file in ${build.dir}/failingTests/FailedTests.java +which extends junit.framework.TestCase and returns from a suite() method a +test suite for the failing tests.
        On a second run the collector class exists and instead of +the <batchtest/> the single <test/> will run. So only the +failing test cases are re-run. The two nested formatters are for displaying (for the user) and for +updating the collector class.

        -    <junit fork="true"
        -        jvm="${platform.java}">
        -        <jvmarg line="--patch-module ${module.name}=${build.test.classes}"/>
        -        <jvmarg line="--add-modules ${module.name}"/>
        -        <jvmarg line="--add-reads ${module.name}=ALL-UNNAMED"/>
        -        <jvmarg line="--add-exports ${module.name}/my.test=ALL-UNNAMED"/>
        -        <classpath>
        -            <pathelement path="${libs.junit}"/>
        -        </classpath>
        -        <modulepath>
        -            <pathelement path="${modules}:${build.classes}"/>
        -        </modulepath>
        -        <formatter type="plain"/>
        -        <test name="my.test.TestCase"/>
        -    </junit>
        +<junit fork="true"
        +       jvm="${platform.java}">
        +    <jvmarg line="--patch-module ${module.name}=${build.test.classes}"/>
        +    <jvmarg line="--add-modules ${module.name}"/>
        +    <jvmarg line="--add-reads ${module.name}=ALL-UNNAMED"/>
        +    <jvmarg line="--add-exports ${module.name}/my.test=ALL-UNNAMED"/>
        +    <classpath>
        +        <pathelement path="${libs.junit}"/>
        +    </classpath>
        +    <modulepath>
        +        <pathelement path="${modules}:${build.classes}"/>
        +    </modulepath>
        +    <formatter type="plain"/>
        +    <test name="my.test.TestCase"/>
        +</junit>
         
        -

        Runs my.test.TestCase as a white-box test in the forked VM given by the platform.java property. -The junit library is a part of an unnamed module while the tested project and required modules are on the module path. The tests -do not have module-info file and are executed in the project module given by module.name property.
        -The --patch-module java option executes the tests built into ${build.test.classes} in a module given -by module.name property.
        -The --add-modules java option enables the tested module.
        -The --add-reads java option makes the unnamed module containing the junit readable by tested module.
        -The --add-exports java option makes the non-exported test package my.test accessible from the unnamed module containing the junit.
        +

        Runs my.test.TestCase as a white-box test in the forked JVM given by +the platform.java property. The JUnit library is a part of an unnamed module while the +tested project and required modules are on the module path. The tests do not have module-info file +and are executed in the project module given by module.name property.
        +The --patch-module Java option executes the tests built +into ${build.test.classes} in a module given by module.name property.
        +The --add-modules Java option enables the tested module.
        +The --add-reads Java option makes the unnamed module containing JUnit readable by +tested module.
        The --add-exports Java option makes the non-exported test +package my.test accessible from the unnamed module containing JUnit.

        -    <junit fork="true"
        -        jvm="${platform.java}">
        -        <jvmarg line="--add-modules ${test.module.name}"/>
        -        <jvmarg line="--add-exports ${test.module.name}/my.test=junit,ALL-UNNAMED"/>
        -        <modulepath>
        -            <pathelement path="${modules}:${build.classes}:${libs.junit}"/>
        -        </modulepath>
        -        <formatter type="plain"/>
        -        <test name="my.test.TestCase"/>
        -    </junit>
        +<junit fork="true"
        +       jvm="${platform.java}">
        +    <jvmarg line="--add-modules ${test.module.name}"/>
        +    <jvmarg line="--add-exports ${test.module.name}/my.test=junit,ALL-UNNAMED"/>
        +    <modulepath>
        +        <pathelement path="${modules}:${build.classes}:${libs.junit}"/>
        +    </modulepath>
        +    <formatter type="plain"/>
        +    <test name="my.test.TestCase"/>
        +</junit>
         
        -

        Runs my.test.TestCase as a black-box test in the forked VM given by the platform.java property. -The junit library is used as an automatic module. The tests module-info requires the tested module and junit.
        -The --add-modules java option enables the test module.
        -The --add-exports java option makes the non-exported test package my.test accessible from the junit module and Ant's test runner. -Another possibility is to export the test package in the tests module-info by exports my.test directive.
        +

        Runs my.test.TestCase as a black-box test in the forked JVM given by +the platform.java property. The JUnit library is used as an automatic module. The +tests' module-info requires the tested module and JUnit.
        The --add-modules Java +option enables the test module.
        The --add-exports Java option makes the +non-exported test package my.test accessible from the JUnit module and Ant's test +runner. Another possibility is to export the test package in the tests' module-info +by exports my.test directive.

        diff -Nru ant-1.9.10/manual/Tasks/junitlauncher.html ant-1.10.3/manual/Tasks/junitlauncher.html --- ant-1.9.10/manual/Tasks/junitlauncher.html 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/manual/Tasks/junitlauncher.html 2018-03-24 12:37:12.000000000 +0000 @@ -0,0 +1,476 @@ + + + + + JUnitLauncher Task + + + +

        JUnitLauncher

        +

        Description

        + +

        + This task allows tests to be launched and run using the JUnit 5 framework. +

        +

        + JUnit 5 introduced a newer set of APIs to write and launch tests. It also introduced the concept + of test engines. Test engines decide which classes are considered as testcases and how they are + executed. JUnit 5 supports running tests that have been written using JUnit 4 constructs as well + as tests that have been written using JUnit 5 constructs. For more details about JUnit 5 + itself, please refer to the JUnit 5 project's documentation + at https://junit.org/junit5/. +

        +

        + The goal of this junitlauncher task is to allow launching the JUnit 5 test launcher + and building the test requests so that the selected tests can then be parsed and executed by the + test engine(s) supported by JUnit 5. This task in itself does not understand what a test + case is nor does it execute the tests itself. +

        +

        + Note: This task depends on external libraries not included in the Apache Ant + distribution. See Library Dependencies for + more information. +

        +

        + Note: You must have the necessary JUnit 5 libraries in the classpath of the + tests. At the time of writing this documentation, the list of JUnit 5 platform libraries that + are necessary to run the tests are: +

        + +
          +
        • + junit-platform-commons.jar +
        • +
        • + junit-platform-engine.jar +
        • +
        • + junit-platform-launcher.jar +
        • +
        + +

        + Depending on the test engine(s) that you want to use in your tests, you will further need the + following libraries in the classpath +

        + +

        + For junit-vintage engine: +

        + +
          +
        • + junit-vintage-engine.jar +
        • +
        • + junit.jar (JUnit 4.x version) +
        • +
        + +

        + For junit-jupiter engine: +

        + +
          +
        • + junit-jupiter-api.jar +
        • +
        • + junit-jupiter-engine.jar +
        • +
        • + opentest4j.jar +
        • +
        + +

        + To have these in the test classpath, you can follow either of the following approaches: +

        + +
          +
        • Put all these relevant jars along with the ant-junitlauncher.jar + in ANT_HOME/lib directory
        • +
        • OR Leave ant-junitlauncher.jar in the ANT_HOME/lib directory and + include all other relevant jars in the classpath by passing them as a -lib + option, while invoking Ant
        • +
        + +

        + Tests are defined by nested elements like test, testclasses tags + (see nested elements). +

        + +

        Parameters

        + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        haltOnFailureA value of true implies that build has to stop if any failure occurs in any of + the tests. JUnit 4+ classifies failures as both assertion failures as well as exceptions + that get thrown during test execution. As such, this task too considers both these cases + as failures and doesn't distinguish one from another. + No; default is false
        failurePropertyThe name of a property to set in the event of a failure + (exceptions in tests are considered failures as well). + No
        + +

        Nested Elements

        + +

        classpath

        +

        + The nested <classpath> element that represents + a PATH like structure can be used to configure the task to use + this classpath for finding and running the tests. This classpath will be used for: +

        +
          +
        • Finding the test classes to execute
        • +
        +

        + If the classpath element isn't configured for the task, then the classpath of Ant + itself will be used for finding the test classes. +

        + +

        listener

        + +

        + The junitlauncher task can be configured with listener(s) to listen to + test execution events (such as a test execution starting, completing etc...). The listener is + expected to be a class which implements + the org.junit.platform.launcher.TestExecutionListener. + This TestExecutionListener interface is an API exposed by the JUnit 5 + platform APIs and isn't specific to Ant. As such, you can use any existing implementation + of TestExecutionListener in this task. +

        + +
        Test result formatter
        +

        + junitlauncher provides a way where the test execution results can be formatted and + presented in a way that's customizable. The task allows for configuring test result formatters, + through the use of listener element. As noted previously, the listener + element expects the listener to implement + the org.junit.platform.launcher.TestExecutionListener + interface. Typically, result formatters need a bit more configuration details to be fed to them, + during the test execution—details like where to write out the formatted result. Any such + listener can optionally implement + the org.apache.tools.ant.taskdefs.optional.junitlauncher.TestResultFormatter + interface. This interface is specific to Ant junitlauncher task and it extends + the org.junit.platform.launcher.TestExecutionListener interface +

        +

        + The junitlauncher task comes with the following pre-defined test result formatter + types: +

        +
          +
        • + legacy-plain : This formatter prints a short statistics line for all test + cases. +
        • +
        • + legacy-brief : This formatter prints information for tests that failed or were + skipped. +
        • +
        • + legacy-xml : This formatter prints statistics for the tests in XML format. +
        • +
        +

        + Note: Each of these formatters named legacy try to format the results + similar to what the junit task's formatters used to do. Furthermore, + the legacy-xml formatter generates the XML to comply with the same schema that + the junit task's XML formatter used to follow. As a result, the XML generated by + this formatter, can be used as-is by the junitreport task. +

        +

        + The listener element supports the following attributes: +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        typeUse a predefined formatter (either legacy-xml, legacy-plain + or legacy-brief).Exactly one of these
        classnameName of a listener class which + implements org.junit.platform.launcher.TestExecutionListener or + the org.apache.tools.ant.taskdefs.optional.junitlauncher.TestResultFormatter + interface +
        resultFile + The file name to which the formatted result needs to be written to. This attribute is + only relevant when the listener class implements + the org.apache.tools.ant.taskdefs.optional.junitlauncher.TestResultFormatter + interface. +

        + If no value is specified for this attribute and the listener implements + the org.apache.tools.ant.taskdefs.optional.junitlauncher.TestResultFormatter + then the file name will be defaulted to and will be of the + form TEST-testname.formatter-specific-extension + (ex: TEST-org.myapp.SomeTest.xml for the legacy-xml type + formatter) +

        +
        No
        sendSysOutIf set to true then the listener will be passed the stdout content + generated by the test(s). This attribute is relevant only if the listener class + implements + the org.apache.tools.ant.taskdefs.optional.junitlauncher.TestResultFormatter + interface.No; defaults to false
        sendSysErrIf set to true then the listener will be passed the stderr content + generated by the test(s). This attribute is relevant only if the listener class + implements + the org.apache.tools.ant.taskdefs.optional.junitlauncher.TestResultFormatter + interface.No; defaults to false
        ifOnly use this listener if the named property is + set.No
        unlessOnly use this listener if the named property + is not set.No
        + +

        test

        + +

        Defines a single test class.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        nameFully qualified name of the test class.Yes
        methodsComma-separated list of names of test case methods to execute. If this is specified, + then only these test methods from the test class will be executed.No
        haltOnFailureStop the build process if a failure occurs during the test run (exceptions are + considered as failures too). Overrides value set on junitlauncher + element.No
        failurePropertyThe name of a property to set in the event of a failure (exceptions are considered + failures as well). Overrides value set on junitlauncher element.No
        outputDirDirectory to write the reports to.No; default is the base directory of the project.
        ifOnly run this test if the named property is + set.No
        unlessOnly run this test if the named property + is not set.No
        + +

        + Tests can define their own listeners via nested listener elements. +

        + +

        testclasses

        + +

        Define a number of tests based on pattern matching.

        + +

        + testclasses collects the included resources + from any number of nested Resource + Collections. It then selects each resource whose name ends in .class. These + classes are then passed on to the JUnit 5 platform for it to decide and run them as tests. +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        haltOnFailureStop the build process if a failure occurs during the test run (exceptions are + considered as failures too). Overrides value set on junitlauncher + element.No
        failurePropertyThe name of a property to set in the event of a failure (exceptions are considered + failures as well). Overrides value set on junitlauncher element.No
        outputDirDirectory to write the reports to.No; default is the base directory of the project.
        ifOnly run the tests if the named property is + set.No
        unlessOnly run the tests if the named property + is not set.No
        + +

        + testclasses can define their own listeners via nested listener + elements. +

        + +

        Examples

        + +
        +<path id="test.classpath">
        +    ...
        +</path>
        +
        +<junitlauncher>
        +    <classpath refid="test.classpath"/>
        +    <test name="org.myapp.SimpleTest"/>
        +</junitlauncher>
        + +

        + Launches the JUnit 5 platform to run the org.myapp.SimpleTest test +

        + +
        +<junitlauncher>
        +    <classpath refid="test.classpath"/>
        +    <test name="org.myapp.SimpleTest" haltOnFailure="true"/>
        +    <test name="org.myapp.AnotherTest"/>
        +</junitlauncher>
        +
        + +

        + Launches the JUnit 5 platform to run the org.myapp.SimpleTest and + the org.myapp.AnotherTest tests. The build process will be stopped if any test, in + the org.myapp.SimpleTest, fails. +

        + +
        +<junitlauncher>
        +    <classpath refid="test.classpath"/>
        +    <test name="org.myapp.SimpleTest" methods="testFoo, testBar"/>
        +</junitlauncher>
        + +

        + Launches the JUnit 5 platform to run only the testFoo and testBar + methods of the org.myapp.SimpleTest test class. +

        + +
        +<junitlauncher>
        +    <classpath refid="test.classpath"/>
        +
        +    <testclasses outputdir="${output.dir}">
        +        <fileset dir="${build.classes.dir}">
        +            <include name="org/example/**/tests/**/"/>
        +        </fileset>
        +    </testclasses>
        +</junitlauncher>
        + +

        + Selects any .class files that match + the org/example/**/tests/**/ fileset filter, under + the ${build.classes.dir} and passes those classes to the JUnit 5 platform for + execution as tests. +

        + +
        +<junitlauncher>
        +    <classpath refid="test.classpath"/>
        +
        +    <testclasses outputdir="${output.dir}">
        +        <fileset dir="${build.classes.dir}">
        +            <include name="org/example/**/tests/**/"/>
        +        </fileset>
        +        <listener type="legacy-xml" sendSysOut="true" sendSysErr="true"/>
        +        <listener type="legacy-plain" sendSysOut="true" />
        +    </testclasses>
        +</junitlauncher>
        +

        + Selects any .class files that match + the org/example/**/tests/**/ fileset filter, under + the ${build.classes.dir} and passes those classes to the JUnit 5 platform for + execution as tests. Test results will be written out to the ${output.dir} by + the legacy-xml and legacy-plain formatters, in separate files. Furthermore, both + the legacy-xml and the legacy-plain listeners, above, are configured to receive + the standard output content generated by the tests. The legacy-xml listener is + configured to receive standard error content as well. +

        + + + diff -Nru ant-1.9.10/manual/Tasks/junitreport.html ant-1.10.3/manual/Tasks/junitreport.html --- ant-1.9.10/manual/Tasks/junitreport.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/junitreport.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,195 +22,189 @@ -

        JUnitReport

        +

        JUnitReport

        Description

        -Merge the individual XML files generated by the JUnit task and eventually apply -a stylesheet on the resulting merged document to provide a browsable report of -the testcases results. - -

        Note: This task depends on external libraries not -included in the Apache Ant distribution. See Library Dependencies -for more information.

        +

        Merge the individual XML files generated by the JUnit task and eventually apply a +stylesheet on the resulting merged document to provide a browsable report of the testcases +results.

        + +

        Note: This task depends on external libraries not included in the Apache Ant +distribution. See Library Dependencies for more +information.

        Requirements

        -

        The task needs Apache Xalan 2.4.1+ or Xalan XSLTC -(JDK 1.4 contains a version of Xalan-J 2.x while JDK 1.5 ships with a -version of XSLTC). Starting from JDK 1.4.2-01 it ships with a bundled -Xalan-J 2.4.1+, meaning that JDK version prior to 1.4.2-01 won't work -out of the box. The table below summarize the compatibility status. -

        - - +

        The task needs Apache Xalan 2.4.1+ or +Xalan XSLTC (JDK 1.4 contains a version of Xalan 2.x, while JDK 1.5 ships with a version of +XSLTC). JDK 1.4.2-01 and later ships with a bundled Xalan 2.4.1+, meaning that JDKs prior to version +1.4.2-01 won't work out of the box. The table below summarize the compatibility status.

        +
        XalanSun JDK BundleStatus
        + - +
        XalanSun JDK BundleStatus
        2.4.1+JDK 1.4.2-01+OK
        XSLTCJDK 1.5.xOK
        2.xJDK 1.4.xDEPRECATED
        Use ${ant.home}/etc/junit-frames-xalan1.xsl -
        Upgrade Xalan using the JDK endorsement mechanism
        2.xJDK 1.4.xDeprecated, +use ${ant.home}/etc/junit-frames-xalan1.xsl
        Upgrade Xalan using the JDK endorsement +mechanism
        -

        With Ant 1.6.2 we had to decide between supporting Xalan-J 1/Xalan J 2.4.1- -and Xalan 2.4.1+/XSLTC, since there was no way to support both couples at the same -time.

        -

        With Ant 1.7 we had to drop support Xalan-J 1, since Xalan-J 1 has not -available anymore for quite some time.

        +

        In Ant 1.6.2, we had to decide between supporting Xalan 1/Xalan 2.4.1- and Xalan 2.4.1+/XSLTC, +because there was no way to support both couples at the same time.

        +

        Since Ant 1.7, we dropped support for Xalan 1, because Xalan 1 was not available anymore +for quite some time.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        tofileThe name of the XML file that will aggregate all individual - XML testsuite previously generated by the JUnit task.No. Default to TESTS-TestSuites.xmltofileThe name of the XML file that will aggregate all individual XML testsuites previously + generated by the JUnit task.No; defaults to TESTS-TestSuites.xml
        todirThe directory where should be written the file resulting - from the individual XML testsuite aggregation.No. Default to current directorytodirThe directory where the file resulting from the individual XML testsuite aggregation should + be written.No; defaults to current directory
        -

        Nested Elements

        +

        Parameters specified as nested elements

        fileset

        -

        junitreport collects individual xml files generated by the JUnit -task using the nested <FileSet> -element.

        +

        junitreport collects individual xml files generated by the JUnit task +using the nested <FileSet> element.

        report

        Generate a browsable report based on the document created by the merge.

        Parameters

        - +
        - - - + + + - - - + + + - - + - + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        formatThe format of the generated report. Must be "noframes" - or "frames".No, default to "frames"formatThe format of the generated report. Must be either noframes or frames.No; defaults to frames
        styledirThe directory where the stylesheets are defined. They must - be conforming to the following conventions: + styledirThe directory where the stylesheets are defined. They must be conforming to the following + conventions:
          -
        • frames format: the stylesheet must be named junit-frames.xsl.
        • -
        • noframes format: the stylesheet must be named junit-noframes.xsl.
        • +
        • frames format: the stylesheet must be named junit-frames.xsl, + or junit-frames-saxon.xsl if you are using Saxon 9+.
        • +
        • noframes format: the stylesheet must be named junit-noframes.xsl, + or junit-noframes-saxon.xsl if you are using Saxon 9+.
        No. Default to embedded stylesheets.No; defaults to embedded stylesheets
        todirThe directory where the files resulting from the - transformation should be written to.No. Default to current directorytodirThe directory where the files resulting from the transformation should be written to.No; defaults to current directory
        -

        Ant assumes the following concerning the frames and noframes formats :

        -

        The frames format uses -a stylesheet which is generating output only by redirecting.

        -

        The -noframes format does not use redirecting and generates one -file called junit-noframes.html.

        -

        Custom versions of junit-frames.xsl or junit-noframes.xsl must adhere to the above conventions.

        +

        Ant assumes the following concerning the frames and noframes formats:

        +
          +
        • The frames format uses a stylesheet which is generating output only by + redirecting.
        • +
        • The noframes format does not use redirecting and generates one file + called junit-noframes.html.
        • +
        +

        Custom versions of junit-frames.xsl or junit-noframes.xsl must adhere +to the above conventions.

        -

        Nested Element of the report tag

        +

        Nested element of the report tag

        param

        -Since Ant 1.7the report tag supports nested param tags. -These tags can pass XSL parameters to the stylesheet. +

        Since Ant 1.7, the report tag supports nested param tags. These +tags can pass XSL parameters to the stylesheet.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameName of the XSL parameterYesnameName of the XSL parameterYes
        expressionText value to be placed into the param.
        - Was originally intended to be an XSL expression.
        YesexpressionText value to be placed into the param.
        Was originally intended to be an + XSL expression.
        Yes
        ifThe param will only be passed if this property is set.NoifThe param will only be passed if this + property is set.No
        unlessThe param will not be passed if this property is set.NounlessThe param will not be passed if this + property is set.No

        The built-in stylesheets support the following parameters:

        - +
        - - - + + + - - - + + +
        XSL-ParameterDescriptionRequiredXSL ParameterDescriptionRequired
        TITLETitle used in <title> and <h1> tagsNo. Defaults to Unit Test Results.TITLETitle used in <title> and <h1> tagsNo; defaults to Unit Test Results

        classpath

        -

        Since Ant 1.9.5. -Like for the XSLT task, -a nested <classpath> will be used to load the processor.

        +

        Since Ant 1.9.5. Like for the XSLT task, a +nested <classpath> will be used to load the processor.

        factory

        -

        Since Ant 1.9.5. -Like for the XSLT task, -a nested <factory> can be used to specify factory settings.

        - +

        Since Ant 1.9.5. Like for the XSLT task, a +nested <factory> can be used to specify factory settings.

        Example of report

        -
        -
        <junitreport todir="./reports">
        -  <fileset dir="./reports">
        -    <include name="TEST-*.xml"/>
        -  </fileset>
        -  <report format="frames" todir="./report/html"/>
        -</junitreport>
        -
        -
        -

        would generate a TESTS-TestSuites.xml file in the directory reports and -generate the default framed report in the directory report/html.

        -

        Example of report with xsl params

        -
        -
        +
        +<junitreport todir="./reports">
        +    <fileset dir="./reports">
        +        <include name="TEST-*.xml"/>
        +    </fileset>
        +    <report format="frames" todir="./report/html"/>
        +</junitreport>
        + +

        would generate a TESTS-TestSuites.xml file in the directory reports and +generate the default framed report in the directory report/html.

        + +

        Example of report with XSL params

        +
         <junitreport todir="${outputdir}">
             <fileset dir="${jrdir}">
                 <include name="TEST-*.xml"/>
             </fileset>
             <report todir="${outputdir}/html"
        -        styledir="junitreport"
        -        format="frames">
        +            styledir="junitreport"
        +            format="frames">
                 <param name="key1" expression="value1"/>
                 <param name="key2" expression="value2"/>
             </report>
        -</junitreport>
        -  
        -
        -

        This example requires a file called junitreport/junit-frames.xsl. - The XSL parameters key1 and key2 will be passed to the XSL transformation.

        +</junitreport> - +

        This example requires a file called junitreport/junit-frames.xsl. The XSL +parameters key1 and key2 will be passed to the XSL transformation.

        + diff -Nru ant-1.9.10/manual/Tasks/length.html ant-1.10.3/manual/Tasks/length.html --- ant-1.9.10/manual/Tasks/length.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/length.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,103 +25,102 @@

        Length

        +

        Since Apache Ant 1.6.3

        Description

        -

        Display or set a property containing length information for - a string, a file, or one or more nested - Resource Collections. - Can also be used as a condition. Since Apache Ant 1.6.3

        +

        Display or set a property containing length information for a string, a file, or one or more +nested resource collections. Can also be used as +a condition.

        Parameters

        - +
        - - - + + + - - - + + - - - + + + + - - + + + + + + + + + - - + + - - - + + - - - + + + - - - + + + + - - - + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        propertyThe property to set. If omitted - the results are written to the log. Ignored when - processing as a condition.NoTaskCondition
        fileSingle file whose length to report.One of these, - or one or more nested filesetspropertyThe property to set.No; by default, output value to the logIgnored
        resourceSingle resource whose length to report (using extended - properties handling). - Since Ant 1.8.1 - modeFile length mode; when all the resulting value is the sum of all included resources' + lengths; when each the task outputs the absolute path and length of each included + resource, one per line.No; default is allIgnored
        fileSingle file whose length to report.One of these, or one or more nested filesets
        stringThe string whose length to report.resourceSingle resource whose length to report (using + extended properties handling). Since Ant + 1.8.1 +
        modeFile length mode; when "all" the resulting - value is the sum of all included resources' lengths; when "each" - the task outputs the absolute path and length of each included resource, - one per line. Ignored when processing as a condition.No; default is "all"stringThe string whose length to report.
        trimWhether to trim when operating on a string. Default false.No; only valid when string is settrimWhether to trim when operating on a string.No; default is false, ignored unless string is set
        lengthComparison length for processing as a condition.Yes, in condition modelengthComparison length.IgnoredYes
        whenComparison type: "equal", "eq", "greater", "gt", "less", - "lt", "ge" (greater or equal), "ne" (not equal), "le" (less or equal) - for use when operating as a condition.No; default is "equal"whenComparison + type: equal, eq, greater, gt, less, lt, ge + (greater or equal), ne (not equal), le (less or equal).IgnoredNo; default is equal

        Parameters specified as nested elements

        -

        Resource Collections

        -

        You can include resources via nested - Resource Collections.

        +

        resource collections

        +

        You can include resources via nested resource +collections.

        Examples

        -
        <length string="foo" property="length.foo" />
        -
        -

        Stores the length of the string "foo" in the property named -length.foo.

        +
        <length string="foo" property="length.foo"/>
        +

        Stores the length of the string foo in the property named length.foo.

        -
        <length file="bar" property="length.bar" />
        -
        -

        Stores the length of file "bar" in the property named -length.bar.

        +
        <length file="bar" property="length.bar"/>
        +

        Stores the length of file bar in the property named length.bar.

         <length property="length" mode="each">
             <fileset dir="." includes="foo,bar"/>
         </length>
         
        -

        Writes the file paths of foo and bar and their length into -the property length.

        +

        Writes the file paths of foo and bar and their length into the +property length.

         <length property="length" mode="all">
             <fileset dir="." includes="foo,bar"/>
         </length>
         
        -

        Adds the length of foo and bar and stores the result in property length.

        - +

        Adds the length of foo and bar and stores the result in +property length.

        - diff -Nru ant-1.9.10/manual/Tasks/loadfile.html ant-1.10.3/manual/Tasks/loadfile.html --- ant-1.9.10/manual/Tasks/loadfile.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/loadfile.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,112 +22,96 @@ - -

        LoadFile

        +

        LoadFile

        Description

        -

        -Specialization of loadresource that -works on files exclusively and provides a srcFile attribute for -convenience. Unless an encoding is specified, the encoding of the -current locale is used. -

        -

        If the resource content is empty (maybe after processing a filterchain) -the property is not set.

        - +

        Specialization of loadresource that works on files exclusively +and provides a srcFile attribute for convenience. Unless an encoding is +specified, the encoding of the current locale is used.

        +

        If the resource content is empty (maybe after processing a filterchain) the property +is not set.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        srcFilesource fileYessrcFilesource fileYes
        propertyproperty to save toYespropertyproperty to save toYes
        encodingencoding to use when loading the fileNoencodingencoding to use when loading the fileNo
        failonerrorWhether to halt the build on failureNo, default "true"failonerrorWhether to halt the build on failureNo; default true
        quietDo not display a diagnostic message (unless Apache Ant has been - invoked with the -verbose or -debug - switches) or modify the exit status to reflect an error. Setting this to - "true" implies setting failonerror to "false". - Since Ant 1.7.0. + quietDo not display a diagnostic message (unless Apache Ant has been invoked with + the -verbose or -debug switches) or modify the exit status to + reflect an error. Setting this to true implies setting failonerror + to false. Since Ant 1.7.0. No, default "false"No; default false
        -

        -The LoadFile task supports nested -FilterChains. +

        The LoadFile task supports nested FilterChains.

        Examples

        -
            <loadfile property="message"
        -      srcFile="message.txt"/>
        -
        -Load file message.txt into property "message"; an <echo> -can print this. This is identical to -
            <loadresource property="message">
        -       <file file="message.txt"/>
        -    </loadresource>
        -
        -

        - -
            <loadfile property="encoded-file"
        -      srcFile="loadfile.xml"
        -      encoding="ISO-8859-1"/>
        -
        -Load a file using the latin-1 encoding - -
            <loadfile
        -      property="optional.value"
        -      srcFile="optional.txt"
        -      failonerror="false"/>
        -
        -Load a file, don't fail if it is missing (a message is printed, though) - -
            <loadfile
        -      property="mail.recipients"
        -      srcFile="recipientlist.txt">
        -      <filterchain>
        +
        +<loadfile property="message"
        +          srcFile="message.txt"/>
        +

        Load file message.txt into property message; an <echo> can print +this. This is identical to

        +
        +<loadresource property="message">
        +    <file file="message.txt"/>
        +</loadresource>
        + +
        +<loadfile property="encoded-file"
        +          srcFile="loadfile.xml"
        +          encoding="ISO-8859-1"/>
        +

        Load a file using the Latin-1 encoding

        + +
        +<loadfile property="optional.value"
        +          srcFile="optional.txt"
        +          failonerror="false"/>
        +

        Load a file, don't fail if it is missing (a message is printed, though)

        + +
        +<loadfile property="mail.recipients"
        +          srcFile="recipientlist.txt">
        +    <filterchain>
                 <striplinebreaks/>
        -      </filterchain>
        -    </loadfile>
        -
        -Load a property which can be used as a parameter for another task (in this case mail), -merging lines to ensure this happens. - -
            <loadfile
        -      property="system.configuration.xml"
        -      srcFile="configuration.xml">
        -        <filterchain>
        -          <expandproperties/>
        -        </filterchain>
        -    </loadfile>
        -
        -Load an XML file into a property, expanding all properties declared -in the file in the process. - - - + </filterchain> +</loadfile>
        +

        Load a property which can be used as a parameter for another task (in this +case mail), merging lines to ensure this happens.

        + +
        +<loadfile property="system.configuration.xml"
        +          srcFile="configuration.xml">
        +    <filterchain>
        +        <expandproperties/>
        +    </filterchain>
        +</loadfile>
        +

        Load an XML file into a property, expanding all properties declared in the file in the +process.

        - diff -Nru ant-1.9.10/manual/Tasks/loadproperties.html ant-1.10.3/manual/Tasks/loadproperties.html --- ant-1.9.10/manual/Tasks/loadproperties.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/loadproperties.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,68 +23,60 @@ -

        LoadProperties

        +

        LoadProperties

        Description

        -

        -Load a file's contents as Apache Ant properties. This is equivalent -to <property file|resource="..."/> except that it -supports nested <filterchain> elements. -Also if the file is missing, the build is halted with an error, rather -than a warning being printed. -

        - -

        Note: the default value of this -task's prefixValues attribute is different from the -default value of the same attribute in -the <property> -task.

        +

        Load a file's contents as Apache Ant properties. This is equivalent to <property +file|resource=.../> except that it supports nested <filterchain> +elements. Also if the file is missing, the build is halted with an error, rather than a warning +being printed.

        + +

        Note: the default value of this task's prefixValues attribute is +different from the default value of the same attribute in +the <property> task.

        Parameters

        - +
        - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        srcFilesource fileOne of these or a - nested resourcesrcFilesource fileOne of these or a nested resource
        resourcethe resource name of the property fileresourcethe resource name of the property file
        encodingencoding to use when loading the fileNoencodingencoding to use when loading the fileNo
        classpaththe classpath to use when looking up a resource.Noclasspaththe classpath to use when looking up a resource.No
        classpathrefthe classpath to use when looking up a resource, - given as reference - to a <path> defined elsewhere..Noclasspathrefthe classpath to use when looking up a resource, given + as reference to a <path> defined + elsewhere.No
        prefixPrefix to apply to loaded properties; - a "." is appended to the prefix if not specified. Since Ant 1.8.1NoprefixPrefix to apply to loaded properties. Since Ant 1.8.1No; default is .
        prefixValuesWhether to apply the prefix when expanding the - right hand side of the properties. - Since Ant 1.8.2No (default=true)prefixValuesWhether to apply the prefix when expanding the right hand side of the properties. Since + Ant 1.8.2No; default is true
        @@ -93,48 +85,44 @@

        any resource or single element resource collection

        -

        The specified resource will be used as src. Since Ant 1.7

        +

        Since Ant 1.7

        + +

        The specified resource will be used as srcFile or resource.

        FilterChain

        classpath

        -

        for use with the resource attribute.

        +

        for use with the resource attribute.

        Examples

        -
            <loadproperties srcFile="file.properties"/>
        -
        -or +
        <loadproperties srcFile="file.properties"/>
        +

        or

        -    <loadproperties>
        -      <file file="file.properties"/>
        -    </loadproperties>
        -
        -Load contents of file.properties as Ant properties. +<loadproperties> + <file file="file.properties"/> +</loadproperties> +

        Load contents of file.properties as Ant properties.

        -
            <loadproperties srcFile="file.properties">
        -      <filterchain>
        +
        +<loadproperties srcFile="file.properties">
        +    <filterchain>
                 <linecontains>
        -          <contains value="import."/>
        +            <contains value="import."/>
                 </linecontains>
        -      </filterchain>
        -    </loadproperties>
        -
        -Read the lines that contain the string "import." -from the file "file.properties" and load them as -Ant properties. + </filterchain> +</loadproperties>
        +

        Read the lines that contain the string import. from the file file.properties +and load them as Ant properties.

        -    <loadproperties>
        -      <gzipresource>
        +<loadproperties>
        +    <gzipresource>
                 <url url="http://example.org/url.properties.gz"/>
        -      </gzipresource>
        -    </loadproperties>
        -
        -Load contents of http://example.org/url.properties.gz, uncompress it -on the fly and load the contents as Ant properties. - - + </gzipresource> +</loadproperties> +

        Load contents of http://example.org/url.properties.gz, uncompress it on the fly and +load the contents as Ant properties.

        diff -Nru ant-1.9.10/manual/Tasks/loadresource.html ant-1.10.3/manual/Tasks/loadresource.html --- ant-1.9.10/manual/Tasks/loadresource.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/loadresource.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,71 +23,61 @@ -

        LoadResource

        +

        LoadResource

        Since Apache Ant 1.7

        Description

        -

        -Load a text resource into a single property. Unless an encoding is -specified, the encoding of the current locale is used. Resources to -load are specified as nested resource elements or single -element resource collections. If the resource content is empty (maybe after -processing a filterchain) the property is not set. -

        +

        Load a text resource into a single property. Unless an encoding is specified, the encoding of the +current locale is used. Resources to load are specified as +nested resource elements or single element resource +collections. If the resource content is empty (maybe after processing a filterchain) +the property is not set.

        -

        Since properties are immutable, the task will not change the value - of an existing property.

        +

        Since properties are immutable, the task will not change the value of an existing property.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        propertyproperty to save toYespropertyproperty to save toYes
        encodingencoding to use when loading the resourceNoencodingencoding to use when loading the resourceNo
        failonerrorWhether to halt the build on failureNo, default "true"failonerrorWhether to halt the build on failureNo; default is true
        quietDo not display a diagnostic message (unless Ant has been - invoked with the -verbose or -debug - switches) or modify the exit status to reflect an error. Setting this to - "true" implies setting failonerror to "false". - No, default "false"quietDo not display a diagnostic message (unless Ant has been invoked with + the -verbose or -debug switches) or modify the exit status to + reflect an error. Setting this to true implies setting failonerror + to false.No; default is false
        -

        -The LoadResource task supports nested -FilterChains. +

        The LoadResource task supports nested FilterChains.

        Examples

         <loadresource property="homepage">
        -  <url url="http://ant.apache.org/index.html"/>
        -</loadresource>
        -
        -Load the entry point of Ant's homepage into property "homepage"; an -<echo> can print this. + <url url="http://ant.apache.org/index.html"/> +</loadresource> +

        Load the entry point of Ant's homepage into property homepage; +an <echo> can print this.

        For more examples see the loadfile task.

        - - diff -Nru ant-1.9.10/manual/Tasks/local.html ant-1.10.3/manual/Tasks/local.html --- ant-1.9.10/manual/Tasks/local.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/local.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,31 +25,31 @@

        Local

        +

        Since Ant 1.8

        Description

        -

        Adds a local property to the current scope. Property scopes exist at Apache Ant's -various "block" levels. These include targets as well as the -Parallel and Sequential -task containers (including Macrodef bodies). A local -property at a given scope "shadows" properties of the same name at higher scopes, -including the global scope. Note that using the Local task at the global -level effectively makes the property local to the "anonymous target" in which -top-level operations are carried out; it will not be defined for other targets -in the buildfile. Since Ant 1.8

        +

        Adds a local property to the current scope. Property scopes exist at Apache Ant's various "block" +levels. These include targets as well as the Parallel +and Sequential task containers +(including Macrodef bodies). A local property at a given scope "shadows" +properties of the same name at higher scopes, including the global scope. Note that using +the Local task at the global level effectively makes the property local to the +"anonymous target" in which top-level operations are carried out; it will not be defined for other +targets in the buildfile.

        -

        A property is made local if the <local> task - precedes its definition. See the examples section.

        +

        A property is made local if the <local> task precedes its definition. See the +examples section.

        Parameters

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe property to declare in the current scopeYesnameThe property to declare in the current scopeYes
        @@ -58,129 +58,118 @@

        Temporarily shadow a global property's value

        -    <property name="foo" value="foo"/>
        +<property name="foo" value="foo"/>
         
        -    <target name="step1">
        -        <echo>Before local: foo is ${foo}</echo>
        -        <local name="foo"/>
        -        <property name="foo" value="bar"/>
        -        <echo>After local: foo is ${foo}</echo>
        -    </target>
        -
        -    <target name="step2" depends="step1">
        -        <echo>In step2: foo is ${foo}</echo>
        -    </target>
        -
        +<target name="step1"> + <echo>Before local: foo is ${foo}</echo> + <local name="foo"/> + <property name="foo" value="bar"/> + <echo>After local: foo is ${foo}</echo> +</target> + +<target name="step2" depends="step1"> + <echo>In step2: foo is ${foo}</echo> +</target>

        outputs

        -
        +
         step1:
              [echo] Before local: foo is foo
              [echo] After local: foo is bar
         
         step2:
        -     [echo] In step2: foo is foo
        -
        + [echo] In step2: foo is foo
        -

        here the local-task shadowed the global definition - of foo for the remainder of the target step1.

        +

        here the local task shadowed the global definition of foo for the +remainder of the target step1.

        Creating thread local properties

        -    <property name="foo" value="foo"/>
        +<property name="foo" value="foo"/>
         
        -    <parallel>
        -        <echo>global 1: foo is ${foo}</echo>
        -        <sequential>
        -            <local name="foo"/>
        -            <property name="foo" value="bar.1"/>
        -            <echo>First sequential: foo is ${foo}</echo>
        -        </sequential>
        -        <sequential>
        -            <sleep seconds="1"/>
        -            <echo>global 2: foo is ${foo}</echo>
        -        </sequential>
        -        <sequential>
        -            <local name="foo"/>
        -            <property name="foo" value="bar.2"/>
        -            <echo>Second sequential: foo is ${foo}</echo>
        -        </sequential>
        -        <echo>global 3: foo is ${foo}</echo>
        -    </parallel>
        -
        +<parallel> + <echo>global 1: foo is ${foo}</echo> + <sequential> + <local name="foo"/> + <property name="foo" value="bar.1"/> + <echo>First sequential: foo is ${foo}</echo> + </sequential> + <sequential> + <sleep seconds="1"/> + <echo>global 2: foo is ${foo}</echo> + </sequential> + <sequential> + <local name="foo"/> + <property name="foo" value="bar.2"/> + <echo>Second sequential: foo is ${foo}</echo> + </sequential> + <echo>global 3: foo is ${foo}</echo> +</parallel>

        outputs something similar to

        -
        -     [echo] global 3: foo is foo
        -     [echo] global 1: foo is foo
        -     [echo] First sequential: foo is bar.1
        -     [echo] Second sequential: foo is bar.2
        -     [echo] global 2: foo is foo
        -
        - -

        Use inside macrodef

        - -

        This probably is where local can be applied in the most useful - way. If you needed a "temporary property" inside a macrodef in Ant - prior to Ant 1.8.0 you had to try to come up with a property name - that would be unique across macro invocations.

        - -

        Say you wanted to write a macro that created the parent directory - of a given file. A naive approach would be:

        - -
        -    <macrodef name="makeparentdir">
        -        <attribute name="file"/>
        -        <sequential>
        -            <dirname property="parent" file="@{file}"/>
        -            <mkdir dir="${parent}"/>
        -        </sequential>
        -    </macrodef>
        -    <makeparentdir file="some-dir/some-file"/>
        -
        - -

        but this would create a global property "parent" on the first - invocation - and since properties are not mutable, any subsequent - invocation will see the same value and try to create the same - directory as the first invocation.

        - -

        The recommendation prior to Ant 1.8.0 was to use a property name - based on one of the macro's attributes, like

        - -
        -    <macrodef name="makeparentdir">
        -        <attribute name="file"/>
        -        <sequential>
        -            <dirname property="parent.@{file}" file="@{file}"/>
        -            <mkdir dir="${parent.@{file}}"/>
        -        </sequential>
        -    </macrodef>
        -
        - -

        Now invocations for different files will set different properties - and the directories will get created. Unfortunately this "pollutes" - the global properties space. In addition it may be hard to come up - with unique names in some cases.

        +
        +    [echo] global 3: foo is foo
        +    [echo] global 1: foo is foo
        +    [echo] First sequential: foo is bar.1
        +    [echo] Second sequential: foo is bar.2
        +    [echo] global 2: foo is foo
        + +

        Use inside macrodef

        + +

        This probably is where local can be applied in the most useful way. If you needed a +"temporary property" inside a macrodef in Ant prior to Ant 1.8.0 you had to try to come +up with a property name that would be unique across macro invocations.

        + +

        Say you wanted to write a macro that created the parent directory of a given file. A naive +approach would be:

        + +
        +<macrodef name="makeparentdir">
        +    <attribute name="file"/>
        +    <sequential>
        +        <dirname property="parent" file="@{file}"/>
        +        <mkdir dir="${parent}"/>
        +    </sequential>
        +</macrodef>
        +<makeparentdir file="some-dir/some-file"/>
        + +

        but this would create a global property parent on the first invocation—and +since properties are not mutable, any subsequent invocation will see the same value and try to +create the same directory as the first invocation.

        + +

        The recommendation prior to Ant 1.8.0 was to use a property name based on one of the macro's +attributes, like

        + +
        +<macrodef name="makeparentdir">
        +    <attribute name="file"/>
        +    <sequential>
        +        <dirname property="parent.@{file}" file="@{file}"/>
        +        <mkdir dir="${parent.@{file}}"/>
        +    </sequential>
        +</macrodef>
        + +

        Now invocations for different files will set different properties and the directories will get +created. Unfortunately this "pollutes" the global properties space. In addition, it may be hard to +come up with unique names in some cases.

        Enter <local>:

        -    <macrodef name="makeparentdir">
        -        <attribute name="file"/>
        -        <sequential>
        -            <local name="parent"/>
        -            <dirname property="parent" file="@{file}"/>
        -            <mkdir dir="${parent}"/>
        -        </sequential>
        -    </macrodef>
        -
        +<macrodef name="makeparentdir"> + <attribute name="file"/> + <sequential> + <local name="parent"/> + <dirname property="parent" file="@{file}"/> + <mkdir dir="${parent}"/> + </sequential> +</macrodef> -

        Each invocation gets its own property name "parent" and there will - be no global property of that name at all.

        +

        Each invocation gets its own property named parent and there will be no global +property of that name at all.

        - diff -Nru ant-1.9.10/manual/Tasks/macrodef.html ant-1.10.3/manual/Tasks/macrodef.html --- ant-1.9.10/manual/Tasks/macrodef.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/macrodef.html 2018-03-24 12:37:12.000000000 +0000 @@ -17,281 +17,213 @@ - + MacroDef Task -

        MacroDef

        +

        MacroDef

        +

        Since Apache Ant 1.6

        Description

        -

        - This defines a new task using a <sequential> - nested task as a template. Nested elements <attribute> and - <element> are used to specify attributes and elements of - the new task. These get substituted into the <sequential> - task when the new task is run. -

        +

        This defines a new task using a <sequential> nested task as a + template. Nested elements <attribute> and <element> are + used to specify attributes and elements of the new task. These get substituted into + the <sequential> task when the new task is run.

        Note

        -

        - You can also use prior defined attributes for default-values in - other attributes. See the examples. -

        -

        - since Apache Ant 1.6 -

        +

        You can also use prior defined attributes for default values in other + attributes. See the examples.

        Parameters

        - +
        - - - + + + - - - + + + - - + - + - - + - + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe name of the new definition.YesnameThe name of the new definition.Yes
        uri + uri The uri that this definition should live in. NoNo
        descriptionA description of the macrodef + descriptionA description of the macrodef (for documentation purposes only). NoNo
        backtrace - This controls the error traceback if there is an - error detected when running the macro. If this is - set to true, there will be an error trackback, if false - there will not be one. Since Ant 1.7. - No; default truebacktraceThis controls the error traceback if there is an error detected when running the + macro. If this is set to true, there will be an error trackback, if false + there will be none. Since Ant 1.7.No; default true
        -

        Parameters specified as nested elements

        +

        Parameters specified as nested elements

        attribute

        -

        - This is used to specify attributes of the new task. The values - of the attributes get substituted into the templated task. - The attributes will be required attributes unless a default - value has been set. -

        -

        - This attribute is placed in the body of the templated - task using a notation similar to the ant property notation - - @{attribute name}. (May be remembered as "put the substitution - AT this location"). -

        -

        - The escape sequence @@ is used to escape @. This allows @{x} to be - placed in the text without substitution of x by using @@{x}. - This corresponds to the $$ escape sequence for properties. -

        -

        - The case of the attribute is ignored, so @{myAttribute} is treated the - same as @{MyAttribute}. -

        -

        Parameters

        - - - - - - - - - - - - - - - - - - - - - - - - - +

        This is used to specify attributes of the new task. The values of the attributes get + substituted into the templated task. The attributes will be required attributes unless a + default value has been set.

        +

        This attribute is placed in the body of the templated task using a notation similar to the + Ant property notation—@{attribute name}. (May be remembered as "put the + substitution AT this location").

        +

        The escape sequence @@ is used to escape @. This + allows @{x} to be placed in the text without substitution of x by + using @@{x}. This corresponds to the $$ escape sequence for + properties.

        +

        The case of the attribute is ignored, so @{myAttribute} is treated the same + as @{MyAttribute}.

        +
        Parameters
        +
        AttributeDescriptionRequired
        nameThe name of the new attributeYes
        default - The default value of the attribute. - No
        description - This contains a description of the attribute. - since ant 1.6.1 - No
        doubleexpanding - Controls whether or not property references in the attribute are expanded twice or just once. - See the FAQ for details. - since Ant 1.8.3 - No; default true
        + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        nameThe name of the new attributeYes
        defaultThe default value of the attribute.No
        descriptionThis contains a description of the attribute. Since Ant 1.6.1No
        doubleexpandingControls whether or not property references in the attribute are expanded twice or just + once. See the FAQ for details. Since Ant 1.8.3No; default is true

        element

        -

        - This is used to specify nested elements of the new task. - The contents of the nested elements of the task instance - are placed in the templated task at the tag name. -

        -

        - The case of the element name is ignored. -

        -

        Parameters

        - +

        This is used to specify nested elements of the new task. The contents of the nested elements + of the task instance are placed in the templated task at the tag name.

        +

        The case of the element name is ignored.

        +
        Parameters
        +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe name of the elementYesnameThe name of the element.Yes
        optional - If true this nested element is optional. Default is - false - i.e the nested element is required in - the new task. - NooptionalIf true this nested element is optional.No; default is false—the nested element is required in the new task
        implicit - If true this nested element is implicit. This means that - any nested elements of the macrodef instance will be placed - in the element indicated by the name of this element. - There can only be one element if an element is implicit. - The default value is false. since ant 1.6.2 - NoimplicitIf true this nested element is implicit. This means that any nested elements of + the macrodef instance will be placed in the element indicated by the name of + this element. There can only be one element if an element is implicit. Since Ant + 1.6.2No; default is false
        description - This contains a description - informing the user what the contents of the element are expected to be. - since ant 1.6.1 - NodescriptionThis contains a description informing the user what the contents of the element are + expected to be. Since Ant 1.6.1No

        text

        -

        - This is used to specify the treatment of text contents of the macro invocation. - If this element is not present, then any nested text in the macro invocation - will be an error. If the text element is present, then the name - becomes an attribute that gets set to the nested text of the macro invocation. - Since ant 1.6.1. -

        -

        - The case of the text name is ignored. -

        -

        Parameters

        - +

        This is used to specify the treatment of text contents of the macro invocation. If this + element is not present, then any nested text in the macro invocation will be an error. If + the text element is present, then the name becomes an attribute that gets set to + the nested text of the macro invocation. Since Ant 1.6.1.

        +

        The case of the text name is ignored.

        +
        Parameters
        +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe name of the text attributeYesnameThe name of the text attribute.Yes
        optional - If true nested text in the macro is optional, default is "false". - NooptionalIf true nested text in the macro is optional.No; default is false
        trim - If true, the nested text is trimmed of white space, - default is "false". - NotrimIf true, the nested text is trimmed of white space.No; default is false
        description - This contains a description - informing the user what the nested text of the macro is expected - to be. - NodescriptionThis contains a description informing the user what the nested text of the macro is + expected to be.No

        Examples

        -

        - The following example defined a task called testing and - runs it. -

        -
        -
        +    

        The following example defined a task called testing and runs it.

        +
         <macrodef name="testing">
        -   <attribute name="v" default="NOT SET"/>
        -   <element name="some-tasks" optional="yes"/>
        -   <sequential>
        -      <echo>v is @{v}</echo>
        -      <some-tasks/>
        -   </sequential>
        +    <attribute name="v" default="NOT SET"/>
        +    <element name="some-tasks" optional="yes"/>
        +    <sequential>
        +        <echo>v is @{v}</echo>
        +        <some-tasks/>
        +    </sequential>
         </macrodef>
         
         <testing v="This is v">
        -   <some-tasks>
        -      <echo>this is a test</echo>
        -   </some-tasks>
        -</testing>
        -
        -
        -

        - The following fragment defines a task called <call-cc> which - take the attributes "target", "link" and "target.dir" and the - nested element "cc-elements". The body of the task - uses the <cc> task from the - ant-contrib project. -

        -
        -
        +    <some-tasks>
        +        <echo>this is a test</echo>
        +    </some-tasks>
        +</testing>
        +

        The following fragment defines a task called <call-cc> which take the + attributes target, link and target.dir and the nested + element cc-elements. The body of the task uses the <cc> task + from the ant-contrib + project.

        +
         <macrodef name="call-cc">
        -   <attribute name="target"/>
        -   <attribute name="link"/>
        -   <attribute name="target.dir"/>
        -   <element name="cc-elements"/>
        -   <sequential>
        -      <mkdir dir="${obj.dir}/@{target}"/>
        -      <mkdir dir="@{target.dir}"/>
        -         <cc link="@{link}" objdir="${obj.dir}/@{target}"
        -             outfile="@{target.dir}/@{target}">
        +    <attribute name="target"/>
        +    <attribute name="link"/>
        +    <attribute name="target.dir"/>
        +    <element name="cc-elements"/>
        +    <sequential>
        +        <mkdir dir="${obj.dir}/@{target}"/>
        +        <mkdir dir="@{target.dir}"/>
        +        <cc link="@{link}" objdir="${obj.dir}/@{target}"
        +            outfile="@{target.dir}/@{target}">
                     <compiler refid="compiler.options"/>
                     <cc-elements/>
        -         </cc>
        -      </sequential>
        -</macrodef>
        -
        -
        -

        - This then can be used as follows: -

        -
        -
        +        </cc>
        +    </sequential>
        +</macrodef>
        +

        This then can be used as follows:

        +
         <call-cc target="unittests" link="executable"
                  target.dir="${build.bin.dir}">
            <cc-elements>
        @@ -301,16 +233,11 @@
               <fileset dir="${gen.dir}" includes = "*.cpp"/>
               <linker refid="linker-libs"/>
            </cc-elements>
        -</call-cc>
        -
        -
        -

        - The following fragment shows <call-cc>, but this time - using an implicit element and with the link and target.dir arguments - having default values. -

        -
        -
        +</call-cc>
        +

        The following fragment shows <call-cc>, but this time using an implicit + element and with the link and target.dir arguments having default + values.

        +
         <macrodef name="call-cc">
            <attribute name="target"/>
            <attribute name="link" default="executable"/>
        @@ -321,19 +248,14 @@
               <mkdir dir="@{target.dir}"/>
                  <cc link="@{link}" objdir="${obj.dir}/@{target}"
                      outfile="@{target.dir}/@{target}">
        -            <compiler refid="compiler.options"/>
        -            <cc-elements/>
        +             <compiler refid="compiler.options"/>
        +             <cc-elements/>
                  </cc>
               </sequential>
        -</macrodef>
        -
        -
        -

        - This then can be used as follows, note that <cc-elements> - is not specified. -

        -
        -
        +</macrodef>
        +

        This then can be used as follows, note that <cc-elements> is not + specified.

        +
         <call-cc target="unittests">
            <includepath location="${gen.dir}"/>
            <includepath location="test"/>
        @@ -341,13 +263,9 @@
            <fileset dir="${gen.dir}" includes = "*.cpp"/>
            <linker refid="linker-libs"/>
         </call-cc>
        -
        -
        -

        - The following shows the use of the text element. -

        -
        -
        +    
        +

        The following shows the use of the text element.

        +
         <macrodef name="echotest">
            <text name="text"/>
            <sequential>
        @@ -357,29 +275,20 @@
         <echotest>
            Hello world
         </echotest>
        -
        -
        -

        - The following uses a prior defined attribute for setting the - default value of another. The output would be - one=test two=test. If you change the order of lines - *1 and *2 the output would be one=test two=@{one}, - because while processing the two-line the value for - one is not set. -

        -
        -
        +    
        +

        The following uses a prior defined attribute for setting the default value of another. The + output would be one=test two=test. If you change the order of + lines *1 and *2 the output would be one=test two=@{one}, because + while processing the two-line the value for one is not set.

        +
         <macrodef name="test">
        -   <attribute name="one"/>                     *1
        -   <attribute name="two" default="@{one}"/>    *2
        +   <attribute name="one"/>                     *1
        +   <attribute name="two" default="@{one}"/>    *2
            <sequential>
               <echo>one=@{one}   two=@{two}</echo>
            </sequential>
         </macrodef>
        -<test one="test"/>
        -
        -
        - +<test one="test"/> diff -Nru ant-1.9.10/manual/Tasks/mail.html ant-1.10.3/manual/Tasks/mail.html --- ant-1.9.10/manual/Tasks/mail.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/mail.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,304 +24,266 @@ -

        Mail

        +

        Mail

        Description

        -

        - A task to send SMTP email. -

        -

        - This task can send mail using either plain - text, UU encoding, or MIME format mail, depending on what is available. -

        -

        - SMTP auth and SSL/TLS require JavaMail and are only available in MIME format. -

        -

        - Attachments may be sent using nested - <attachments> elements, which are path-like structures. This means - any filesystem based resource or resource - collection can be used to point to attachments. Prior to Apache Ant 1.7 - only <fileset> has been supported as a nested - element, you can still use this directly without an - <attachments> container. -

        -

        - Note: This task may depend on external libraries - that are not included in the Ant distribution. - See Library Dependencies - for more information. -

        +

        A task to send SMTP email.

        +

        This task can send mail using either plain text, UU encoding, or MIME format mail, depending on +what is available.

        +

        SMTP auth and SSL/TLS require JavaMail and are only available in MIME format.

        +

        Attachments may be sent using nested <attachments> elements, which +are path-like structures. This means any filesystem +based resource or resource collection can be used to point to +attachments. Prior to Apache Ant 1.7 only <fileset> has been supported as a +nested element, you can still use this directly without an <attachments> +container.

        +

        Note: This task may depend on external libraries that are not included in the +Ant distribution. See Library Dependencies for +more information.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + - - - - - - - - - - - + + + + + + + + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        fromEmail address of sender.Either a from attribute, or a <from> - element.fromEmail address of sender.Either a from attribute, or a <from> element.
        replytoReplyto email address.NoreplytoReply-to email address.No
        tolistComma-separated list of recipients.At least one of these, or the - equivalent elements.tolistComma-separated list of recipients.At least one of these, or the equivalent nested elements
        cclistComma-separated list of recipients to carbon copycclistComma-separated list of recipients to carbon copy
        bcclistComma-separated list of recipients to blind carbon copy + bcclistComma-separated list of recipients to blind carbon copy
        messageMessage to send in the body of the email.One of these or a - <message> element.
        messagefileFile to send as the body of the email. Property - values in the file will be expanded.
        messagefileinputencoding - Specifies the encoding of the input file. Please see - - Supported Encodings for a list of possible - values. Defaults to the platform's default character - encoding. Since Ant 1.9.4 + messageMessage to send in the body of the email.One of these or a <message> element.
        messagefileFile to send as the body of the email. Property values in the file will be + expanded.
        messagefileinputencodingSpecifies the encoding of the input file. Please + see Supported Encodings for a list of possible values. Since Ant 1.9.4 NoNo; defaults to default JVM character encoding
        messagemimetypeThe content type of the message. The default is - text/plain.NomessagemimetypeThe content type of the message.No; default is text/plain
        filesFiles to send as attachments to the email. Separate multiple - file names using a comma or space. You can also use <fileset> - elements to specify files.NofilesFiles to send as attachments to the email. Separate multiple file names using a comma or + space. You can also use <fileset> elements to specify files.No
        failonerrorflag to indicate whether to halt the build on - any error. The default value is true.No.failonerrorflag to indicate whether to halt the build on any error.No; default is true
        includefilenamesInclude filename(s) before file contents. - Valid only when the plain encoding is used. The default - value is false.NoincludefilenamesInclude filename(s) before file contents.No; default is false, ignored unless plain encoding is used
        mailhostHost name of the SMTP server. The default value is - localhost.NomailhostHost name of the SMTP server.No; default is localhost
        mailportTCP port of the SMTP server. The default value is 25.NomailportTCP port of the SMTP server.No; default is 25
        useruser name for SMTP authYes, if SMTP auth is required on your SMTP server

        - the email message will be then sent using Mime and requires JavaMail
        useruser name for SMTP authYes, if SMTP auth is required on your SMTP server;
        the email message will be then sent + using MIME and requires JavaMail
        passwordpassword for SMTP authYes, if SMTP auth is required on your SMTP server

        - the email message will be then sent using Mime and requires JavaMail
        passwordpassword for SMTP authYes, if SMTP auth is required on your SMTP server;
        the email message will be then sent + using MIME and requires JavaMail
        ssl"true", "on" or "yes" accepted here

        - indicates whether you need TLS/SSL
        Nossltrue, on, or yes accepted here
        indicates whether you need + TLS/SSL
        No
        encodingSpecifies the encoding to use for the content of the email. - Values are mime, uu, plain, or - auto. The default value is auto. - uu or plain are not compatible with SMTP authNoencodingSpecifies the encoding to use for the content of the email. Values + are mime, uu, plain, or auto. uu or plain are not + compatible with SMTP authNo; default is auto
        charsetCharacter set of the email.
        - You can also set the charset in the message nested element.
        - These options are mutually exclusive.
        NocharsetCharacter set of the email.
        You can also set the charset in + the message nested element.
        These options are mutually exclusive.
        No
        subjectEmail subject line.NosubjectEmail subject line.No
        ignoreInvalidRecipientsBoolean. Whether the task should try to send - the message to as many recipients as possible and should only - fail if neither is reachable. Since Ant 1.8.0.No, default is falseignoreInvalidRecipients(boolean) Whether the task should try to send the message to as many recipients as possible + and should only fail if neither is reachable. Since Ant 1.8.0.No; default is false
        enableStartTLS"true", "on" or "yes" accepted here

        - whether the STARTTLS command used to switch to an encrypted - connection for authentication should be supported. Requires - JavaMail. Since Ant 1.8.0
        NoenableStartTLS(boolean) Whether the STARTTLS command used to switch to an encrypted + connection for authentication should be supported. Requires JavaMail. Since Ant + 1.8.0No

        Note regarding the attributes containing email addresses

        -Since Ant 1.6, the attributes from, replyto, tolist, cclist, bcclist -can contain email addresses of the form : +

        Since Ant 1.6, the +attributes from, replyto, tolist, cclist, bcclist +can contain email addresses of the form:

          -
        • address@xyz.com
        • -
        • name <address@xyz.com>
        • -
        • <address@xyz.com> name
        • -
        • (name) address@xyz.com
        • -
        • address@xyz.com (name)
        • +
        • address@xyz.com
        • +
        • name <address@xyz.com>
        • +
        • <address@xyz.com> name
        • +
        • (name) address@xyz.com
        • +
        • address@xyz.com (name)
        -

        You need to enter the angle brackets as XML entities -&gt; and &lt;.

        +

        You need to enter the angle brackets as XML entities &gt; and &lt;.

        Parameters specified as nested elements

        -

        to / cc / bcc / from/ replyto

        +

        to / cc / bcc / from/ replyto

        Adds an email address element. It takes the following attributes:

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe display name for the address.NonameThe display name for the address.No
        addressThe email address.YesaddressThe email address.Yes

        message

        -

        Specifies the message to include in the email body. It takes the following -attributes:

        +

        Specifies the message to include in the email body. It takes the following attributes:

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        srcThe file to use as the message.NosrcThe file to use as the message.No
        mimetypeThe content type to use for the message.NomimetypeThe content type to use for the message.No
        charsetCharacter set of the message
        - You can also set the charset as attribute of the enclosing mail task.
        - These options are mutually exclusive.
        NocharsetCharacter set of the message
        You can also set the charset as attribute of the + enclosing mail task.
        These options are mutually exclusive.
        No
        inputencoding - Specifies the encoding of the input file. Please see - - Supported Encodings for a list of possible - values. Defaults to the platform's default character - encoding. Since Ant 1.9.4 + inputencoding + Specifies the encoding of the input file. Please + see Supported Encodings for a list of possible values. Since Ant 1.9.4 NoNo; defaults to default JVM character encoding
        -

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

        +

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

        header

        -

        Since Ant 1.7, arbitrary mail headers can be added by - specifying these attributes on one or more nested header elements:

        +

        Since Ant 1.7, arbitrary mail headers can be added by specifying these attributes on one +or more nested header elements:

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        nameThe name associated with this mail header.YesnameThe name associated with this mail header.Yes
        valueThe value to assign to this mail header.YesvalueThe value to assign to this mail header.Yes
        -

        It is permissible to duplicate the name attribute amongst multiple headers. -

        +

        It is permissible to duplicate the name attribute amongst multiple headers.

        Examples

        -
        +
         <mail from="me"
               tolist="you"
               subject="Results of nightly build"
        -      files="build.log"/>
        -
        + files="build.log"/> -

        Sends an email from me to you with a subject of -Results of nightly build and includes the contents of the file -build.log in the body of the message.

        +

        Sends an email from me to you with a subject of Results of nightly build and +includes the contents of the file build.log in the body of the message.

        -
        +
         <mail mailhost="smtp.myisp.com" mailport="1025" subject="Test build">
           <from address="config@myisp.com"/>
           <replyto address="me@myisp.com"/>
        @@ -332,17 +294,16 @@
               <include name="**/*.zip"/>
             </fileset>
           </attachments>
        -</mail>
        -
        +</mail> -

        Sends an eMail from config@myisp.com to all@xyz.com with a subject of -Test Build. Replies to this email will go to me@myisp.com. -Any zip files from the dist directory are attached.  The -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. ${buildname} -will be replaced with the buildname property's value.

        +

        Sends an eMail from config@myisp.com to all@xyz.com with a subject of Test +Build. Replies to this email will go to me@myisp.com. Any zip files from +the dist directory are attached. The 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. ${buildname} will be replaced with the buildname property's +value.

        -
        +
         <property name="line2" value="some_international_message"/>
         <echo message="${line2}"/>
         
        @@ -350,13 +311,10 @@
           <from address="me@myist.com"/>
           <to address="all@xyz.com"/>
           <message>some international text:${line2}</message>
        -</mail>
        -
        - -

        Sends an eMail from me@myisp.com to all@xyz.com with a subject of -Test Build, the message body being coded in UTF-8 - +</mail> +

        Sends an eMail from me@myisp.com to all@xyz.com with a subject of Test +Build, the message body being coded in UTF-8. diff -Nru ant-1.9.10/manual/Tasks/makeurl.html ant-1.10.3/manual/Tasks/makeurl.html --- ant-1.9.10/manual/Tasks/makeurl.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/makeurl.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,221 +14,71 @@ See the License for the specific language governing permissions and limitations under the License. --> - + + Makeurl Task - - - + - +

        Makeurl Task

        +

        Description

        +

        This task takes one or more filenames and turns them into URLs, which it then assigns to a +property. Useful when setting up RMI or JNLP codebases, for example. Nested filesets are +supported; if present, these are turned into the URLs with the supplied separator between +them.

        +

        Parameters

        +
        - + + + + - - - + + + + + + + + + + + + + + + + + + + + + + - -
        - - - -
        - Makeurl Task - - - - Apache Ant - -
        -
        AttributeDescriptionTypeRequired
        - - - - - - - - - - -
         
        - - - Description -
        -This task takes one or more filenames and turns them into URLs, which it then assigns to a property. -Useful when setting up RMI or JNLP codebases, for example. -Nested filesets are supported; if present, these are turned into the URLs with the supplied separator between them (default: space). -

        -

        Examples:

        -
        -<makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/>
        -
        -Sets the property m2.repository.url to the file: URL of the local Maven2 repository. -
        -<makeurl property="codebase"><fileset dir="lib includes="*.jar"/></makeurl>
        -
        -Set the property codebase to the three URLs of the files provided as nested elements. -
        - - - - - - - - - - - - -
         
        - - - Parameters -
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - Attribute - - Description - - Type - - Requirement -
        - file - - name of a file to be converted into a URL - - File - - optional, if a nested fileset or path is supplied -
        - property - - name of a property to set to the URL - - String - - required -
        - separator - - separator for the multi-URL option - - String - - optional -
        - validate - - validate that every named file exists - - boolean - - optional; default: true -
        -
        - - - - - - - - - - -
         
        - - - Parameters as nested elements -
        - - - - - -
         
        - - fileset (org.apache.tools.ant.types.FileSet) -
        - A fileset of JAR files to include in the URL list, each separated by the separator. - - - -
        - - - - - - -
         
        - - path (org.apache.tools.ant.types.Path) -
        - Add a path to the URL. All elements in the path will be converted to individual URL entries. - - - -
        - - -
        - - - -
        filename of a file to be converted into a URLFileNo, if a nested fileset or path is supplied
        propertyname of a property to set to the URLStringYes
        separatorseparator for the multi-URL optionStringNo; default is space
        validatevalidate that every named file existsbooleanNo; default is true
        +

        Parameters as nested elements

        +

        fileset (org.apache.tools.ant.types.FileSet)

        + +

        A fileset of JAR files to include in the URL list, each separated by the separator.

        + +

        path (org.apache.tools.ant.types.Path)

        +

        Add a path to the URL. All elements in the path will be converted to individual URL entries.

        +

        Examples

        +
        <makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/>
        +

        Sets the property m2.repository.url to the file: URL of the local Maven2 +repository.

        +
        <makeurl property="codebase">
        +  <fileset dir="lib includes="*.jar"/>
        +</makeurl>
        +

        Set the property codebase to the three URLs of the files provided as nested +elements.

        diff -Nru ant-1.9.10/manual/Tasks/manifestclasspath.html ant-1.10.3/manual/Tasks/manifestclasspath.html --- ant-1.9.10/manual/Tasks/manifestclasspath.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/manifestclasspath.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,94 +24,75 @@ -

        Manifestclasspath

        +

        Manifestclasspath

        +

        Since Apache Ant 1.7

        Description

        -

        Converts a Path into a property -whose value is appropriate for a Manifest's -Class-Path attribute.

        - -

        This task is often used to work around command line limitations on Windows -when using very long class paths when launching an application. The long class -path normally specified on the command line is replaced by a single (possibly -empty) jar file which an in-manifest Class-Path attribute whose value lists -all the jar and zip files the class path should contain. The files referenced -from this attribute must be found relatively to the jar file itself, usually -in the same directory. The Java VM automically uses all file entries listed -in the Class-Path attributes of a jar to locate/load classes. Note though that -it silently ignores entries for which it cannot find any corresponding file.

        - -

        Note that the property value created may be longer than a manifest's maximum -72 characters per line, but will be properly wrapped as per the Jar -specification by the <manifest> element, where the -defined property is re-referenced.

        - -

        For this task to work properly the relative path from the file - given in the jarfile attribute to the elements of the - nested classpath must be the same as you expect them to - be when deploying the jar.

        +

        Converts a Path into a property whose value is appropriate for +a Manifest's Class-Path attribute.

        -

        since Apache Ant 1.7

        +

        This task is often used to work around command line limitations on Windows when using very long +class paths when launching an application. The long class path normally specified on the command +line is replaced by a single (possibly empty) jar file which an in-manifest Class-Path +attribute whose value lists all the jar and zip files the classpath should contain. The files +referenced from this attribute must be found relatively to the jar file itself, usually in the same +directory. JVM automatically uses all file entries listed in the Class-Path attributes +of a jar to locate/load classes. Note though that it silently ignores entries for which it cannot +find any corresponding file.

        + +

        Note that the property value created may be longer than a manifest's maximum 72 characters per +line, but will be properly wrapped as per the Jar specification by the <manifest> +element, where the defined property is re-referenced.

        + +

        For this task to work properly the relative path from the file given in the jarfile +attribute to the elements of the nested classpath must be the same as you expect them +to be when deploying the jar.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        propertythe name of the property to set. This property must - not already be set.Yespropertythe name of the property to set. This property must not already be set.Yes
        jarfile - the filename for the Jar which will contain the manifest that will - use the property this task will set. This file need not exist yet, - but its parent directory must exist. - Yesjarfilethe filename for the Jar which will contain the manifest that will use the property this + task will set. This file need not exist yet, but its parent directory must exist.Yes
        maxParentLevels - The maximum number of parent directories one is allowed to traverse - to navigate from the jar file to the path entry. Put differently, the - maximum number of .. which is allowed in the relative path from the - jar file to a given class path entry. Specify 0 to enforce a path - entry to be in the same directory (or one of its sub-directories) - as the jar file itself. Defaults to 2 levels.NomaxParentLevelsThe maximum number of parent directories one is allowed to traverse to navigate from the jar + file to the path entry. Put differently, the maximum number of .. which is allowed in + the relative path from the jar file to a given class path entry. Specify 0 to enforce a + path entry to be in the same directory (or one of its sub-directories) as the jar file + itself.No; defaults to 2

        Parameters specified as nested elements

        classpath

        -

        A Path-like element, which can be -defined in-place, or refer to a path defined elsewhere using the -<classpath refid="pathid" /> syntax. +

        A path-like element, which can be defined in-place, or refer to +a path defined elsewhere using the <classpath refid="pathid"/> syntax. This classpath must not be empty, and is required.

        Examples

        -
        -
        -    <manifestclasspath property="jar.classpath"
        -                       jarfile="build/acme.jar">
        -      <classpath refid="classpath" />
        -    </manifestclasspath>
        -  
        -

        Assuming a path of id "classpath" was already defined, convert this - path relatively to the build/ directory that will contain acme.jar, which - can later be created with <jar> with a nested - <manifest> element that lists an - <attribute name="Class-Path" value="${jar.classpath}" />. -

        -
        - - +
        +<manifestclasspath property="jar.classpath"
        +                   jarfile="build/acme.jar">
        +    <classpath refid="classpath"/>
        +</manifestclasspath>
        +

        Assuming a path with id classpath was already defined, convert this path +relatively to the build/ directory that will contain acme.jar, which can +later be created with <jar> with a nested <manifest> element +that lists an <attribute name="Class-Path" value="${jar.classpath}"/>.

        diff -Nru ant-1.9.10/manual/Tasks/manifest.html ant-1.10.3/manual/Tasks/manifest.html --- ant-1.9.10/manual/Tasks/manifest.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/manifest.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,157 +24,140 @@ -

        Manifest

        +

        Manifest

        Description

        Creates a manifest file.

        -

        This task can be used to write a Manifest file, optionally -replacing or updating an existing file.

        - - - -

        Manifests are processed according to the -Jar -file specification.. Specifically, a manifest element consists of -a set of attributes and sections. These sections in turn may contain -attributes. Note in particular that this may result in manifest lines -greater than 72 bytes being wrapped and continued on the next -line.

        - -

        - The Apache Ant team regularly gets complaints that this task in generating invalid - manifests. By and large, this is not the case: we believe that we are following - the specification to the letter. The usual problem is that some third party - manifest reader is not following the same specification as well as they think - they should; we cannot generate invalid manifest files just because one - single application is broken. J2ME runtimes appear to be particularly troublesome. -

        - -

        - If you find that Ant generates manifests incompatible with your runtime, take - a manifest it has built, fix it up however you need and switch to using the <zip> - task to create the JAR, feeding in the hand-crafted manifest. -

        - +

        This task can be used to write a Manifest file, optionally replacing or updating an existing +file.

        +

        Manifests are processed according to +the Jar +file specification. Specifically, a manifest element consists of a set of attributes and +sections. These sections in turn may contain attributes. Note in particular that this may result in +manifest lines greater than 72 bytes being wrapped and continued on the next line.

        + +

        The Apache Ant team regularly gets complaints that this task in generating invalid manifests. By +and large, this is not the case: we believe that we are following the specification to the +letter. The usual problem is that some third party manifest reader is not following the same +specification as well as they think they should; we cannot generate invalid manifest files just +because one single application is broken. Java ME runtimes appear to be particularly +troublesome.

        + +

        If you find that Ant generates manifests incompatible with your runtime, take a manifest it has +built, fix it up however you need and switch to using the zip task to create +the JAR, feeding in the hand-crafted manifest.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        filethe manifest-file to create/update.Yesfilethe manifest-file to create/update.Yes
        modeOne of "update" or "replace", default is "replace".NomodeOne of update or replace.No; default is replace
        encodingThe encoding used to read the existing manifest - when updating. The task will always use UTF-8 when writing the - manifest.No, defaults to UTF-8 encoding.encodingThe encoding used to read the existing manifest when updating. The task will always use + UTF-8 when writing the manifest.No; defaults to UTF-8 encoding
        mergeClassPathAttributesWhether to merge the Class-Path attributes found - in different manifests (if updating). If false, only the - attribute of the most recent manifest will be preserved. - Since Ant 1.8.0. -
        unless you also set flattenAttributes to true this may - result in manifests containing multiple Class-Path attributes - which violates the manifest specification.
        No, default is falsemergeClassPathAttributesWhether to merge the Class-Path attributes found in different manifests (if + updating). If false, only the attribute of the most recent manifest will be + preserved. Since Ant 1.8.0.
        Unless you also set flattenAttributes + to true this may result in manifests containing multiple Class-Path + attributes which violates the manifest specification.
        No; default is false
        flattenAttributesWhether to merge attributes occurring more than - once in a section (this can only happen for the Class-Path - attribute) into a single attribute. - Since Ant 1.8.0.No, default is falseflattenAttributesWhether to merge attributes occurring more than once in a section (this can only happen for + the Class-Path attribute) into a single attribute. Since Ant + 1.8.0.No; default is false
        -

        Nested elements

        -

        attribute

        -

        One attribute for the manifest file. Those attributes that are -not nested into a section will be added to the "Main" section.

        - - - - - +

        Parameters specified as nested elements

        +

        attribute

        +

        One attribute for the manifest file. Those attributes that are not nested into a section will be +added to the main section.

        +
        AttributeDescriptionRequired
        + + + + - - + - + - - - + + +
        AttributeDescriptionRequired
        namethe name of the attribute,
        - must match the regexp [A-Za-z0-9][A-Za-z0-9-_]*. +
        namethe name of the attribute, must match the regexp [A-Za-z0-9][A-Za-z0-9-_]*. YesYes
        valuethe value of the attribute.Yesvaluethe value of the attribute.Yes
        -

        section

        -

        A manifest section - you can nest attribute elements into sections.

        +

        A manifest section—you can nest attribute elements into +sections.

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        namethe name of the section.No, if omitted it will be assumed - to be the main section.namethe name of the section.No, defaults to the main section

        Examples

        -  <manifest file="MANIFEST.MF">
        -    <attribute name="Built-By" value="${user.name}"/>
        -    <section name="common">
        -      <attribute name="Specification-Title" value="Example"/>
        -      <attribute name="Specification-Version" value="${version}"/>
        -      <attribute name="Specification-Vendor" value="Example Organization"/>
        -      <attribute name="Implementation-Title" value="common"/>
        -      <attribute name="Implementation-Version" value="${version} ${TODAY}"/> 
        -      <attribute name="Implementation-Vendor" value="Example Corp."/>
        -    </section>
        -    <section name="common/class1.class">
        -      <attribute name="Sealed" value="false"/>
        -    </section>
        -  </manifest>
        -
        - -

        Creates or replaces the file MANIFEST.MF. Note that the Built-By -attribute will take the value of the Ant property ${user.name}. The -same is true for the ${version} and ${TODAY} properties. This example -produces a MANIFEST.MF that contains -package -version identification for the package common.

        +<manifest file="MANIFEST.MF"> + <attribute name="Built-By" value="${user.name}"/> + <section name="common"> + <attribute name="Specification-Title" value="Example"/> + <attribute name="Specification-Version" value="${version}"/> + <attribute name="Specification-Vendor" value="Example Organization"/> + <attribute name="Implementation-Title" value="common"/> + <attribute name="Implementation-Version" value="${version} ${TODAY}"/> + <attribute name="Implementation-Vendor" value="Example Corp."/> + </section> + <section name="common/class1.class"> + <attribute name="Sealed" value="false"/> + </section> +</manifest> + +

        Creates or replaces the file MANIFEST.MF. Note that the Built-By +attribute will take the value of the Ant property ${user.name}. The same is true for +the ${version} and ${TODAY} properties. This example produces +a MANIFEST.MF that +contains package version identification for the package common.

        The manifest produced by the above would look like this:

        -
        Manifest-Version: 1.0
        +
        +Manifest-Version: 1.0
         Built-By: bodewig
         Created-By: Apache Ant 1.9
         
        @@ -187,11 +170,7 @@
         Implementation-Title: common
         
         Name: common/class1.class
        -Sealed: false
        -
        -
        - +Sealed: false
        - diff -Nru ant-1.9.10/manual/Tasks/mimemail.html ant-1.10.3/manual/Tasks/mimemail.html --- ant-1.9.10/manual/Tasks/mimemail.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/mimemail.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,92 +24,85 @@ -

        MimeMail

        +

        MimeMail

        -

        Deprecated

        -

        This task has been deprecated. Use the mail task instead.

        +

        Deprecated

        +

        This task has been deprecated. Use the mail task instead.

        Description

        -

        Sends SMTP mail with MIME attachments. -JavaMail -and Java +

        Sends SMTP mail with MIME +attachments. JavaMail +and Java Activation Framework are required for this task.

        Multiple files can be attached using FileSets.

        Parameters

        - +
        - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + - - - + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        messageThe message bodyNo, but only one of of 'message' or - 'messageFile' may be specified.  If not specified, a fileset must be - provided.messageThe message bodyExactly one of these, or a nested fileset
        messageFileA filename to read and used as the message bodymessageFileA filename to read and used as the message body
        messageMimeTypeMIME type to use for 'message' or 'messageFile' when - attached.No, defaults to "text/plain"messageMimeTypeMIME type to use for message or messageFile when attached.No; defaults to text/plain
        tolistComma-separated list of To: recipientsYes, at least one of 'tolist', 'cclist', - or 'bcclist' must be specified.tolistComma-separated list of To: recipientsYes, at least one of these
        cclistComma-separated list of CC: recipients cclistComma-separated list of CC: recipients
        bcclistComma-separated list of BCC: recipients bcclistComma-separated list of BCC: recipients
        mailhostHost name of the mail server.No, default to "localhost"mailhostHost name of the mail server.No; default to localhost
        subjectEmail subject line.NosubjectEmail subject line.No
        fromEmail address of sender.YesfromEmail address of sender.Yes
        failonerrorStop the build process if an error occurs sending the - e-mail.No, default to "true"failonerrorStop the build process if an error occurs sending the e-mail.No; default to true

        Examples

        -

        Send a single HTML file as the body of a message

        -
            <mimemail messageMimeType="text/html" messageFile="overview-summary.html"
        -        tolist="you" subject="JUnit Test Results: ${TODAY}" from="me"/>
        -

        Sends all files in a directory as attachments

        -
            <mimemail message="See attached files" tolist="you" subject="Attachments" from="me">
        -        <fileset dir=".">
        -            <include name="dist/*.*"/>
        -        </fileset>
        -    </mimemail>
        -
        - +

        Send a single HTML file as the body of a message

        +
        +<mimemail messageMimeType="text/html" messageFile="overview-summary.html"
        +          tolist="you" subject="JUnit Test Results: ${TODAY}" from="me"/>
        +

        Sends all files in a directory as attachments

        +
        +<mimemail message="See attached files" tolist="you" subject="Attachments" from="me">
        +    <fileset dir=".">
        +       <include name="dist/*.*"/>
        +    </fileset>
        +</mimemail>
        - diff -Nru ant-1.9.10/manual/Tasks/mkdir.html ant-1.10.3/manual/Tasks/mkdir.html --- ant-1.9.10/manual/Tasks/mkdir.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/mkdir.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,21 +24,21 @@ -

        Mkdir

        +

        Mkdir

        Description

        -

        Creates a directory. Also non-existent parent directories are created, when -necessary. Does nothing if the directory already exist.

        +

        Creates a directory. Also non-existent parent directories are created, when necessary. Does +nothing if the directory already exist.

        Parameters

        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        dirthe directory to create.Yesdirthe directory to create.Yes

        Examples

        @@ -47,6 +47,5 @@
        <mkdir dir="${dist}/lib"/>

        creates a directory ${dist}/lib.

        - diff -Nru ant-1.9.10/manual/Tasks/move.html ant-1.10.3/manual/Tasks/move.html --- ant-1.9.10/manual/Tasks/move.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/move.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,235 +24,187 @@ -

        Move

        +

        Move

        Description

        -

        Moves a file to a new file or directory, or collections of files to -a new directory. By default, the -destination file is overwritten if it already exists. When overwrite is -turned off, then files are only moved if the source file is newer than -the destination file, or when the destination file does not exist.

        - -

        Resource -Collections are used to select a group of files to move. Only -file system based resource collections are supported, this includes filesets, filelist and path. Prior to Apache Ant 1.7 only -<fileset> has been supported as a nested element. -To use a resource collection, the todir attribute must be -set.

        - -

        Since Ant 1.6.3, the file attribute may be used to move -(rename) an entire directory. If tofile denotes an existing file, or -there is a directory by the same name in todir, the action will fail. -

        +

        Moves a file to a new file or directory, or collections of files to a new directory. By default, +the destination file is overwritten if it already exists. When overwrite is turned off, +then files are only moved if the source file is newer than the destination file, or when the +destination file does not exist.

        + +

        Resource collections are used to select a group +of files to move. Only file system based resource collections are supported, this +includes filesets, filelist +and path. Prior to Apache Ant 1.7 +only <fileset> has been supported as a nested element. To use a resource +collection, the todir attribute must be set.

        + +

        Since Ant 1.6.3, the file attribute may be used to move (rename) an entire +directory. If tofile denotes an existing file, or there is a directory by the same name +in todir, the action will fail.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        filethe file or directory to moveOne of file or - at least one nested resource collection elementfilethe file or directory to moveOne of file or at least one nested resource collection element
        preservelastmodifiedGive the moved files the same last modified - time as the original source files. - (Note: Ignored on Java 1.1)No; defaults to false.preservelastmodifiedGive the moved files the same last modified time as the original source files. + (Note: Ignored on Java 1.1)No; defaults to false
        tofilethe file to move toWith the file attribute, - either tofile or todir 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 file attribute is already specified, only - todir is allowedtofilethe file to move toWith the file attribute, either tofile or todir + 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 file attribute is already specified, + only todir is allowed
        todirthe directory to move totodirthe directory to move to
        overwriteoverwrite existing files even if the destination - files are newer (default is "true")Nooverwriteoverwrite existing files even if the destination files are newerNo; defaults to true
        forceOverwrite read-only destination - files. since Ant 1.8.2No; defaults to false.forceOverwrite read-only destination files. since Ant 1.8.2No; defaults to false
        filteringindicates whether token filtering should take place during - the move. See the filter task for a description of - how filters work.Nofilteringindicates whether token filtering should take place during the move. See + the filter task for a description of how filters work.No
        flattenignore directory structure of source directory, - copy all files into a single directory, specified by the todir - attribute (default is "false").Note that you can achieve the - same effect by using a flatten mapperNoflattenignore directory structure of source directory, copy all files into a single directory, + specified by the todir attribute. Note that you can achieve the same effect by + using a flatten mapperNo; defaults to false
        includeEmptyDirsCopy empty directories included with the nested FileSet(s). - Defaults to "yes".NoincludeEmptyDirsCopy empty directories included with the nested FileSet(s).No; defaults to yes
        failonerrorIf false, log a warning message, but do not stop the - build, when the file to copy does not exist or one of the nested - filesets points to a directory that doesn't exist or an error occurs - while moving. - No; defaults to true.failonerrorIf false, log a warning message, but do not stop the build, when the file to copy does not + exist or one of the nested filesets points to a directory that doesn't exist or an error + occurs while moving.No; defaults to true
        quietIf true and failonerror is false, then do not log a - warning message when the file to copy does not exist or one of the nested - filesets points to a directory that doesn't exist or an error occurs - while copying. since Ant 1.8.3. - No; defaults to false.quietIf true and failonerror is false, then do not log a warning message + when the file to copy does not exist or one of the nested filesets points to a directory that + doesn't exist or an error occurs while copying. since Ant 1.8.3.No; defaults to false
        verboseLog the files that are being moved.No; defaults to false.verboseLog the files that are being moved.No; defaults to false
        encodingThe encoding to assume when filter-copying the - files. since Ant 1.5.No - defaults to default JVM encodingencodingThe encoding to assume when filter-copying the files. since Ant 1.5.No; defaults to default JVM character encoding
        outputencodingThe encoding to use when writing the files. - since Ant 1.6.No - defaults to the value of the encoding - attribute if given or the default JVM encoding otherwise.outputencodingThe encoding to use when writing the files. since Ant 1.6.No; defaults to encoding if set or default JVM character encoding otherwise
        enablemultiplemappings - If true the task will process to all the mappings for a - given source path. If false the task will only process - the first file or directory. This attribute is only relevant - if there is a mapper subelement. - since Ant 1.6.No - defaults to false.enablemultiplemappingsIf true the task will process to all the mappings for a given source + path. If false the task will only process the first file or directory. This attribute + is only relevant if there is a mapper subelement. since Ant 1.6.No; defaults to false
        granularityThe 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, or 2 seconds on DOS - systems. This can also be useful if source and target files live - on separate machines with clocks being out of sync. since Ant - 1.6.granularityThe 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. This can also be useful if source and target files live on separate + machines with clocks being out of sync. since Ant 1.6.No; default is 0 milliseconds, or 2 seconds on DOS systems
        performGCOnFailedDelete - If Ant fails to delete a file or directory it will retry the - operation once. If this flag is set to true it will perform a - garbage collection before retrying the delete.
        - Setting this flag to true is known to resolve some problems on - Windows (where it defaults to true) but also for directory trees - residing on an NFS share. - Since Ant 1.8.3
        No, default "true" on - Windows and "true" on any other OS.performGCOnFailedDeleteIf Ant fails to delete a file or directory it will retry the operation once. If this flag + is set to true it will perform a garbage collection before retrying the delete.
        + Setting this flag to true is known to resolve some problems on Windows (where it + defaults to true) but also for directory trees residing on an NFS share. Since Ant + 1.8.3
        No; defaults to true on Windows and false on any other OS

        Parameters specified as nested elements

        mapper

        -

        You can define file name transformations by using a nested mapper element. The default mapper used by -<move> is the identity.

        -

        Note that the source name handed to the mapper depends on the -resource collection you use. If you use <fileset> -or any other collection that provides a base directory, the name -passed to the mapper will be a relative filename, relative to the base -directory. In any other case the absolute filename of the source will -be used.

        +

        You can define file name transformations by using a +nested mapper element. The default mapper used +by <move> is the identity.

        +

        Note that the source name handed to the mapper depends on the resource collection you use. If +you use <fileset> or any other collection that provides a base directory, the +name passed to the mapper will be a relative filename, relative to the base directory. In any other +case the absolute filename of the source will be used.

        filterchain

        -

        The Move task supports nested -FilterChains.

        - -

        -If <filterset> and <filterchain> elements are used inside the -same <move> task, all <filterchain> elements are processed first -followed by <filterset> elements. -

        +

        The Move task supports nested FilterChains.

        +

        If <filterset> and <filterchain> elements are used inside +the same <move> task, all <filterchain> elements are processed +first followed by <filterset> elements.

        Examples

        -

        Move a single file (rename a file)

        -
        -  <move file="file.orig" tofile="file.moved"/>
        -
        -

        Move a single file to a directory

        -
        -  <move file="file.orig" todir="dir/to/move/to"/>
        -
        -

        Move a directory to a new directory

        -
        -  <move todir="new/dir/to/move/to">
        -    <fileset dir="src/dir"/>
        -  </move>
        -
        - or, since Ant 1.6.3: -
        -  <move file="src/dir" tofile="new/dir/to/move/to"/>
        -
        -

        Move a set of files to a new directory

        -
        -  <move todir="some/new/dir">
        -    <fileset dir="my/src/dir">
        -      <include name="**/*.jar"/>
        -      <exclude name="**/ant.jar"/>
        -    </fileset>
        -  </move>
        -
        -

        Move a list of files to a new directory

        -
        -  <move todir="some/new/dir">
        -    <filelist dir="my/src/dir">
        -      <file name="file1.txt"/>
        -      <file name="file2.txt"/>
        -    </filelist>
        -  </move>
        -
        -

        Append ".bak" to the names of all files -in a directory.

        -
        -  <move todir="my/src/dir" includeemptydirs="false">
        -    <fileset dir="my/src/dir">
        -      <exclude name="**/*.bak"/>
        -    </fileset>
        -    <mapper type="glob" from="*" to="*.bak"/>
        -  </move>
        -
        - +

        Move a single file (rename a file)

        +
        <move file="file.orig" tofile="file.moved"/>
        +

        Move a single file to a directory

        +
        <move file="file.orig" todir="dir/to/move/to"/>
        +

        Move a directory to a new directory

        +
        +<move todir="new/dir/to/move/to">
        +  <fileset dir="src/dir"/>
        +</move>
        +

        or, since Ant 1.6.3:

        +
        <move file="src/dir" tofile="new/dir/to/move/to"/>
        +

        Move a set of files to a new directory

        +
        +<move todir="some/new/dir">
        +  <fileset dir="my/src/dir">
        +    <include name="**/*.jar"/>
        +    <exclude name="**/ant.jar"/>
        +  </fileset>
        +</move>
        +

        Move a list of files to a new directory

        +
        +<move todir="some/new/dir">
        +  <filelist dir="my/src/dir">
        +    <file name="file1.txt"/>
        +    <file name="file2.txt"/>
        +  </filelist>
        +</move>
        +

        Append ".bak" to the names of all files in a +directory.

        +
        +<move todir="my/src/dir" includeemptydirs="false">
        +  <fileset dir="my/src/dir">
        +    <exclude name="**/*.bak"/>
        +  </fileset>
        +  <mapper type="glob" from="*" to="*.bak"/>
        +</move>
        - diff -Nru ant-1.9.10/manual/Tasks/native2ascii.html ant-1.10.3/manual/Tasks/native2ascii.html --- ant-1.9.10/manual/Tasks/native2ascii.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/native2ascii.html 2018-03-24 12:37:12.000000000 +0000 @@ -15,135 +15,111 @@ limitations under the License. --> - -Native2Ascii Task + + + Native2Ascii Task +

        Native2Ascii

        -

        Description:

        +

        Description

        -

        - Converts files from native encodings to ASCII with escaped Unicode. - A common usage is to convert source files maintained in a native - operating system encoding, to ASCII prior to compilation. -

        - -

        - Files in the directory src - are converted from a native encoding to ASCII. - By default, all files in the directory are converted. - However, conversion may be limited to selected files using - includes and excludes attributes. - For more information on file matching patterns, - see the section on - directory based tasks. - If no encoding is specified, - the default encoding for the JVM is used. - If ext is specified, then output files are renamed - to use it as a new extension. - More sophisticated file name translations can be achieved using a nested - <mapper> element. By default an - identity mapper will be used. - If dest and src point to the same directory, - the ext attribute or a nested <mapper> - is required. -

        - -

        - This task forms an implicit File Set, - and supports most attributes of <fileset> - (dir becomes src) as well as +

        Converts files from native encodings to ASCII with escaped Unicode. A common usage is to + convert source files maintained in a native operating system encoding, to ASCII prior to + compilation.

        + +

        Files in the directory src are converted from a native encoding to ASCII. By + default, all files in the directory are converted. However, conversion may be limited to + selected files using includes and excludes attributes. For more + information on file matching patterns, see the section + on directory based tasks. If + no encoding is specified, the default encoding for the JVM is used. + If ext is specified, then output files are renamed to use it as a new extension. + More sophisticated file name translations can be achieved using a + nested <mapper> element. By default + an identity mapper will be used. + If dest and src point to the same directory, the ext + attribute or a nested <mapper> is required.

        + +

        This task forms an implicit FileSet, and supports most + attributes of <fileset> (dir becomes src) as well as nested <include>, <exclude>, - and <patternset> elements. -

        + and <patternset> elements.

        -

        It is possible to use different converters. This can be selected - with the implementation attribute or a nested element. - Here are the choices of the attribute:

        +

        It is possible to use different converters. This can be selected + with the implementation attribute or a nested element. Here are the choices of the + attribute:

          -
        • default - the default converter for the platform - kaffee - when run on Kaffee, builtin if JDK9 or newer is detected, sun - otherwise.
        • -
        • sun (the standard converter of the JDK < 9)
        • -
        • kaffe (the standard converter - of Kaffe)
        • -
        • builtin - Ant's internal implementation used for - JDK9+. since ant 1.9.8
        • +
        • default—the default converter for the platform: kaffe when run on Kaffe, + builtin otherwise.
        • +
        • sun—used to be the standard converter of the JDK 8 or earlier
        • +
        • kaffe—the standard converter of Kaffe
        • +
        • builtin—Ant's internal implementation. Since Ant 1.9.8
        - +
        - - - + + + - - + + - - + + - - + + - + - - - - - - + - - + + - - + + - - + + - - + + - - - + + + + + + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        reverseReverse the sense of the conversion, - i.e. convert from ASCII to native only supported by the - sun and builtin convertersNoReverse the sense of the conversion, i.e. convert from ASCII to native
        Only + supported by the sun and builtin converters
        No
        encodingThe native encoding the files are in - (default is the default encoding for the JVM)NoThe native encoding the files are inNo; defaults to default JVM character encoding
        srcThe directory to find files in (default is basedir)NoThe directory to find files in; default is basedirNo
        dest The directory to output file toYesYes
        ext File extension to use in renaming output filesNo
        defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). - Default excludes are used when omitted. - NoNo
        includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.NoComma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
        includesfilethe name of a file. Each line of this file is - taken to be an include patternNoName of a file. Each line of this file is taken to be an include patternNo
        excludescomma- or space-separated list of patterns of files that must be excluded. - No files (except default excludes) are excluded when omitted.NoComma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
        excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoName of a file. Each line of this file is taken to be an exclude patternNo
        implementationThe converter implementation to use. - If this attribute is not set, the default converter for the - current VM will be used. (See the above list of valid converters.)NodefaultexcludesIndicates whether default excludes should be used or not (yes|no).No; defaults to yes
        implementationThe converter implementation to use. (See the + above list of valid converters.)No; defaults to default converter for the current JVM
        @@ -151,101 +127,85 @@

        arg

        -

        You can specify additional command line arguments for the converter -with nested <arg> elements. These elements are -specified like Command-line Arguments -but have an additional attribute that can be used to enable arguments -only if a given converter implementation will be used.

        +

        You can specify additional command line arguments for the converter with +nested <arg> elements. These elements are specified +like Command-line Arguments but have an additional attribute that +can be used to enable arguments only if a given converter implementation will be used.

        - +
        - - - + + + - - - + + + - + - + - + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        valueSee - Command-line Arguments.Exactly one of these.valueSee Command-line Arguments.Exactly one of these
        lineline
        filefile
        pathpath
        implementationOnly pass the specified argument if the chosen converter - implementation matches the value of this attribute. Legal values - are the same as those in the above list of valid compilers.)NoimplementationOnly pass the specified argument if the chosen converter implementation matches the value of + this attribute. Legal values are the same as those in the + above list of valid compilers.)No
        -

        implementationclasspath since Apache Ant 1.8.0

        - -

        A PATH like structure holding the - classpath to use when loading the converter implementation if a - custom class has been specified. Doesn't have any effect when - using one of the built-in converters.

        - -

        Any nested element of a type that implements Native2AsciiAdapter - since Ant 1.8.0

        +

        implementationclasspath

        +

        Since Apache Ant 1.8.0

        +

        A path-like structure holding the classpath to use when loading +the converter implementation if a custom class has been specified. Doesn't have any effect when +using one of the built-in converters.

        + +

        Any nested element of a type that implements Native2AsciiAdapter

        +

        Since Ant 1.8.0

        +

        If a defined type implements the Native2AsciiAdapter interface a nested +element of that type can be used as an alternative to the implementation attribute.

        -

        If a defined type implements the Native2AsciiAdapter - interface a nested element of that type can be used as an - alternative to the implementation attribute.

        +

        Examples

        -

        Examples

        - -
        +
         <native2ascii encoding="EUCJIS" src="srcdir" dest="srcdir"
        -   includes="**/*.eucjis" ext=".java"/>
        -    
        + includes="**/*.eucjis" ext=".java"/>
        -

        - Converts all files in the directory srcdir - ending in .eucjis from the EUCJIS encoding to ASCII - and renames them to end in .java. -

        +

        Converts all files in the directory srcdir ending in .eucjis from the +EUCJIS encoding to ASCII and renames them to end in .java.

         <native2ascii encoding="EUCJIS" src="native/japanese" dest="src"
        -   includes="**/*.java"/>
        -
        + includes="**/*.java"/> -

        - Converts all the files ending in .java - in the directory native/japanese to ASCII, - placing the results in the directory src. - The names of the files remain the same. -

        - -

        If you want to use a custom - Native2AsciiAdapter org.example.MyAdapter you can either - use the implementation attribute:

        +

        Converts all the files ending in .java in the directory native/japanese +to ASCII, placing the results in the directory src. The names of the files remain the +same.

        + +

        If you want to use a +custom Native2AsciiAdapter org.example.MyAdapter you can +either use the implementation attribute:

         <native2ascii encoding="EUCJIS" src="srcdir" dest="srcdir"
        -       includes="**/*.eucjis" ext=".java"
        -       implementation="org.example.MyAdapter"/>
        -
        + includes="**/*.eucjis" ext=".java" + implementation="org.example.MyAdapter"/>

        or a define a type and nest this into the task like in:

         <componentdef classname="org.example.MyAdapter"
                       name="myadapter"/>
         <native2ascii encoding="EUCJIS" src="srcdir" dest="srcdir"
        -       includes="**/*.eucjis" ext=".java">
        -  <myadapter/>
        -</native2ascii>
        -
        -

        in which case your native2ascii adapter can support attributes and - nested elements of its own.

        - + includes="**/*.eucjis" ext=".java"> + <myadapter/> +</native2ascii> +

        in which case your native2ascii adapter can support attributes and nested elements +of its own.

        + diff -Nru ant-1.9.10/manual/Tasks/netrexxc.html ant-1.10.3/manual/Tasks/netrexxc.html --- ant-1.9.10/manual/Tasks/netrexxc.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/netrexxc.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,318 +24,279 @@ -

        NetRexxC

        +

        NetRexxC

        Description

        -

        Compiles a NetRexx -source tree within the running (Apache Ant) VM.

        -

        The source and destination directory will be recursively scanned for -NetRexx source files to compile. Only NetRexx files that have no corresponding -class file or where the class file is older than the java file will be compiled.

        -

        Files in the source tree are copied to the destination directory, -allowing support files to be located properly in the classpath. The source -files are copied because the NetRexx compiler cannot produce class files in a -specific directory via parameters

        -

        The directory structure of the source tree should follow the package -hierarchy.

        -

        It is possible to refine the set of files that are being compiled/copied. -This can be done with the includes, includesfile, excludes, excludesfile and -defaultexcludes attributes. With the includes or includesfile attribute you -specify the files you want to have included by using patterns. The -exclude or excludesfile attribute is used to specify the files you want to have -excluded. This is also done with patterns. And finally with the -defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the +

        Compiles a NetRexx source tree within the running (Apache Ant) JVM.

        +

        The source and destination directory will be recursively scanned for NetRexx source files to +compile. Only NetRexx files that have no corresponding class file or where the class file is older +than the java file will be compiled.

        +

        Files in the source tree are copied to the destination directory, allowing support files to be +located properly in the classpath. The source files are copied because the NetRexx compiler cannot +produce class files in a specific directory via parameters

        +

        The directory structure of the source tree should follow the package hierarchy.

        +

        It is possible to refine the set of files that are being compiled/copied. This can be done with +the includes, includesfile, excludes, excludesfile +and defaultexcludes attributes. With the includes or includesfile +attribute you specify the files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This +is also done with patterns. And finally with the defaultexcludes attribute, you can +specify whether you want to use default exclusions or not. See the section +on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.

        -

        This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes srcdir) as well as the nested -<include>, <exclude> and -<patternset> elements.

        -

        All properties except classpath, srcdir and destDir are also available as properties in the form -ant.netrexxc.attributename, eg.
        -<property name="ant.netrexxc.verbose" value="noverbose"/>
        -or from the command line as
        -ant -Dant.netrexxc.verbose=noverbose ... -

        -

        Note: This task depends on external libraries not -included in the Apache Ant distribution. See Library Dependencies -for more information.

        +

        This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes srcdir) as well as the +nested <include>, <exclude> +and <patternset> elements.

        +

        All attributes except classpath, srcdir and destDir are also +available as properties in the form ant.netrexxc.attributename, +eg.
        <property name="ant.netrexxc.verbose" +value="noverbose"/>
        or from the command line as
        ant +-Dant.netrexxc.verbose=noverbose ...

        +

        Note: This task depends on external libraries not included in the Apache Ant +distribution. See Library Dependencies for more +information.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        binaryWhether literals are treated as the java binary - type rather than the NetRexx typesNobinaryWhether literals are treated as the Java binary type rather than the NetRexx typesNo
        classpathThe classpath to use during compilationNoclasspathThe classpath to use during compilationNo
        commentsWhether comments are passed through to the - generated java sourceNocommentsWhether comments are passed through to the generated Java source fileNo
        compactWhether error messages come out in compact or - verbose format. Default is the compact format.NocompactWhether error messages come out in compact or verbose format.No; default is true
        compileWhether the NetRexx compiler should compile the - generated java codeNocompileWhether the NetRexx compiler should compile the generated Java codeNo
        consoleWhether or not messages should be displayed on the - 'console'. Note that this task will rely on the default value for filtering compile messages.NoconsoleWhether or not messages should be displayed on the 'console'. Note that this task will rely + on the default value for filtering compile messages.No
        crossrefWhether variable cross references are generatedNocrossrefWhether variable cross references are generatedNo
        decimalWhether decimal arithmetic should be used for the - NetRexx code. Setting this to off will report decimal arithmetic - as an error, for performance critical applications.NodecimalWhether decimal arithmetic should be used for the NetRexx code. Setting this to off + will report decimal arithmetic as an error, for performance critical applications.No
        defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when - omitted.NodefaultexcludesWhether default excludes should be used or not (yes|no).No; defaults to yes
        destDirthe destination directory into which the NetRexx - source files should be copied and then compiledYesdestDirthe destination directory into which the NetRexx source files should be copied and then + compiledYes
        diagWhether diagnostic information about the compile is - generatedNodiagWhether diagnostic information about the compile is generatedNo
        excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when - omitted.NoexcludesComma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
        excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfileName of a file. Each line of this file is taken to be an exclude patternNo
        explicitWhether variables must be declared explicitly - before useNoexplicitWhether variables must be declared explicitly before useNo
        formatWhether the generated java code is formatted nicely - or left to match NetRexx line numbers for call stack debuggingNoformatWhether the generated Java code is formatted nicely or left to match NetRexx line numbers + for call stack debuggingNo
        includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.NoincludesComma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
        includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfileName of a file. Each line of this file is taken to be an include patternNo
        javaWhether the generated java code is producedNojavaWhether the generated Java code is producedNo
        keepSets whether the generated java source file should be kept - after compilation. The generated files will have an extension of - .java.keep, not .java. Use removeKeepExtension to change that.NokeepSets whether the generated java source file should be kept after compilation. The generated + files will have an extension + of .java.keep, not .java. Use removeKeepExtension + to change that.No
        logoWhether the compiler text logo is displayed when - compilingNologoWhether the compiler text logo is displayed when compilingNo
        removeKeepExtensionTells whether the trailing .keep in nocompile-mode should - be removed so that the resulting java source really ends on .java. This - facilitates the use of the javadoc tool lateron.NoremoveKeepExtensionTells whether the trailing .keep in compile=false mode should + be removed so that the resulting Java source file really ends on .java. This + facilitates the use of the javadoc tool later on.No
        replaceWhether the generated .java file should be replaced - when compilingNoreplaceWhether the generated .java files should be replaced when compilingNo
        savelogWhether the compiler messages will be written to - NetRexxC.log as well as to the consoleNosavelogWhether the compiler messages will be written to NetRexxC.log as well as to the + consoleNo
        sourcedirTells the NetRexx compiler to store the class files in the - same directory as the source files. The alternative is the working - directoryNosourcedirTells the NetRexx compiler to store the class files in the same directory as the source + files. The alternative is the working directoryNo
        srcDirSet the source dir to find the source NetRexx - filesYessrcDirSets the directory to find the source NetRexx files inYes
        strictargsTells the NetRexx compiler that method calls always - need parentheses, even if no arguments are needed, e.g. - aStringVar.getBytes vs. - aStringVar.getBytes()NostrictargsTells the NetRexx compiler that method calls always need parentheses, even if no arguments + are needed, e.g. aStringVar.getBytes vs. aStringVar.getBytes()No
        strictassignTells the NetRexx compile that assignments must - match exactly on typeNostrictassignTells the NetRexx compile that assignments must match exactly on typeNo
        strictcaseSpecifies whether the NetRexx compiler should be - case sensitive or notNostrictcaseSpecifies whether the NetRexx compiler should be case sensitive or notNo
        strictimportWhether classes need to be imported explicitly using an - import statement. By default the NetRexx compiler will - import certain packages automaticallyNostrictimportWhether classes need to be imported explicitly using an import statementNo; by default the NetRexx compiler will import certain packages automatically
        strictpropsWhether local properties need to be qualified - explicitly using thisNostrictpropsWhether local properties need to be qualified explicitly using thisNo
        strictsignalWhether the compiler should force catching of - exceptions by explicitly named typesNostrictsignalWhether the compiler should force catching of exceptions by explicitly named typesNo
        symbolsWhether debug symbols should be generated into the - class fileNosymbolsWhether debug symbols should be generated into the class fileNo
        timeAsks the NetRexx compiler to print compilation - times to the consoleNotimeAsks the NetRexx compiler to print compilation times to the consoleNo
        traceTurns on or off tracing and directs the resultant - trace outputNotraceTurns on or off tracing and directs the resultant trace outputNo
        utf8Tells the NetRexx compiler that the source is in UTF8Noutf8Tells the NetRexx compiler that the source is in UTF8No
        verboseWhether lots of warnings and error messages should - be generatedNoverboseTells whether lots of warnings and error messages should be generatedNo
        suppressMethodArgumentNotUsedTells whether we should filter out the - &Method argument not used& messages in strictargs mode.NosuppressMethodArgumentNotUsedTells whether we should filter out the Method argument not used messages + in strictargs mode.No
        suppressPrivatePropertyNotUsedTells whether we should filter out the - &Private Property defined, but not used& messages in strictargs mode.NosuppressPrivatePropertyNotUsedTells whether we should filter out the Private Property defined, but not used + messages in strictargs mode.No
        suppressVariableNotUsedTells whether we should filter out the - &Variable set but not used& messages in strictargs mode. - Please be careful with this one, as you can hide errors behind it!NosuppressVariableNotUsedTells whether we should filter out the Variable set but not used messages + in strictargs mode. Please be careful with this one, as you can hide errors behind + it!No
        suppressExceptionNotSignalledTells whether we should filter out the - &Exception is declared, but not signalled within the method& - messages in strictsignal mode.NosuppressExceptionNotSignalledTells whether we should filter out the Exception is declared, but not signalled within + the method messages in strictsignal mode.No
        suppressDeprecationTells whether we should filter out any deprecation-messages - of the compiler out.NosuppressDeprecationTells whether we should filter out any deprecation messages of the compiler outputNo

        Examples

        -
        -

        <netrexxc srcDir="/source/project" - includes="vnr/util/*" - destDir="/source/project/build" - classpath="/source/project2/proj.jar" - comments="true" - crossref="false" replace="true" - keep="true"/> -

        -
        +
        +<netrexxc srcDir="/source/project"
        +          includes="vnr/util/*"
        +          destDir="/source/project/build"
        +          classpath="/source/project2/proj.jar"
        +          comments="true"
        +          crossref="false" replace="true"
        +          keep="true"/>
        - diff -Nru ant-1.9.10/manual/Tasks/nice.html ant-1.10.3/manual/Tasks/nice.html --- ant-1.9.10/manual/Tasks/nice.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/nice.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,47 +24,38 @@ -

        Nice

        +

        Nice

        Description

        -

        Provide "nice-ness" to the current thread - and/or query the current value.

        +

        Provide "nice-ness" to the current thread and/or query the current value.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        currentprioritythe name of the property whose value should be - set to the current "nice-ness" level. - Nocurrentpriorityname of the property whose value should be set to the current "nice-ness" + level.No
        newprioritythe value to which the - "nice-ness" level should be set. - Must be a valid Java Thread priority. - Nonewpriorityvalue to which the "nice-ness" level should be set. Must be a valid Java Thread + priority.No

        Examples

        -
           <nice newpriority="10"/>
        -Set the Thread priority to 10 (highest). -
           <nice currentpriority="priority"/>
        -Store the current Thread priority in the user property "priority". -
        -   <nice currentpriority="currentpriority" newpriority="1"/>
        -
        -

        Set the current Thread priority to 1 (lowest), storing the original -priority in the user property "currentpriority". This -can be used to set the priority back to its original value later. -

        - +
        <nice newpriority="10"/>
        +

        Set the Thread priority to 10 (highest).

        +
        <nice currentpriority="priority"/>
        +

        Store the current Thread priority in the user property priority.

        +
        <nice currentpriority="currentpriority" newpriority="1"/>
        +

        Set the current Thread priority to 1 (lowest), storing the original priority in the user +property currentpriority. This can be used to set the priority back to its original +value later.

        - diff -Nru ant-1.9.10/manual/Tasks/pack.html ant-1.10.3/manual/Tasks/pack.html --- ant-1.9.10/manual/Tasks/pack.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/pack.html 2018-03-24 12:37:12.000000000 +0000 @@ -19,58 +19,57 @@ -GZip/BZip2 Tasks +GZip/BZip2/XZ Tasks -

        GZip/BZip2

        +

        GZip/BZip2/XZ

        Description

        -

        Packs a resource using the GZip or BZip2 algorithm. -The output file is only generated if it doesn't exist or the source -resource is newer.

        +

        Packs a resource using the GZip, BZip2 or XZ algorithm. The output file is only generated if it +doesn't exist or the source resource is newer.

        + +

        XZ compression support has been added since Apache Ant 1.10.1 and depends on external +libraries not included in the Ant distribution. +See Library Dependencies for more information.

        +

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        srcthe file to gzip/bzip.Yes, or a nested resource collection.srcthe file to gzip/bzip/xz.Yes, or a nested resource collection
        destfilethe destination file to create.Exactly one of the two.destfilethe destination file to create.Exactly one of the two
        zipfilethe deprecated old name of destfile.zipfiledeprecated old name of destfile.
        -

        any resource or single element -resource collection

        - -

        The specified resource will be used as src. Since Apache Ant 1.7

        +

        Parameters specified as nested elements

        +

        any resource or single element resource collection

        +

        Since Apache Ant 1.7

        +

        The specified resource will be used as src.

        Examples

        -
        -<gzip src="test.tar" destfile="test.tar.gz"/>
        -
        -
        -<bzip2 src="test.tar" destfile="test.tar.bz2"/>
        -
        -
        +
        <gzip src="test.tar" destfile="test.tar.gz"/>
        +
        <bzip2 src="test.tar" destfile="test.tar.bz2"/>
        +
        <xz src="test.tar" destfile="test.tar.xz"/>
        +
         <gzip destfile="archive.tar.gz">
           <url url="http://example.org/archive.tar"/>
        -</gzip>
        -
        -

        downloads http://example.org/archive.tar and compresses it -to archive.tar.gz in the project's basedir on the fly.

        - +</gzip> +

        downloads http://example.org/archive.tar and compresses it +to archive.tar.gz in the project's basedir on the fly.

        diff -Nru ant-1.9.10/manual/Tasks/parallel.html ant-1.10.3/manual/Tasks/parallel.html --- ant-1.9.10/manual/Tasks/parallel.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/parallel.html 2018-03-24 12:37:12.000000000 +0000 @@ -26,136 +26,114 @@

        Parallel

        Description

        -

        - Executes nested tasks in parallel with no guarantees of thread safety. - Every task will run in its own thread, with the likelihood of - concurrency problems scaling with the number of CPUs on the host system. -

        -

        Warning: While the Apache Ant core is believed to be thread safe, no such - guarantees are made about tasks, which are not tested for thread safety during - Ant's test process. - Third party tasks may or may not be thread safe, and some of Ant's core tasks, such as - <javac> are definitely not re-entrant. This is because they use libraries that - were never designed to be used in a multithreaded environment. -

        -

        - The primary use case for <parallel> is to run external programs - such as an application server, and the JUnit or TestNG test suites at the - same time. Anyone trying to run large Ant task sequences in parallel, such - as javadoc and javac at the same time, is implicitly taking on the task - of identifying and fixing all concurrency bugs the tasks that they run. - -

        -

        - Accordingly, while this task has uses, it should be considered an advanced - task which should be used in certain batch-processing or testing situations, - rather than an easy trick to speed up build times on a multiway CPU. -

        +

        Executes nested tasks in parallel with no guarantees of thread safety. Every task will run in +its own thread, with the likelihood of concurrency problems scaling with the number of CPUs on the +host system.

        +

        Warning: While the Apache Ant core is believed to be thread safe, no such +guarantees are made about tasks, which are not tested for thread safety during Ant's test process. +Third party tasks may or may not be thread safe, and some of Ant's core tasks, such +as <javac> are definitely not re-entrant. This is because they use libraries that +were never designed to be used in a multithreaded environment.

        +

        The primary use case for <parallel> is to run external programs such as an +application server, and the JUnit or TestNG test suites at the same time. Anyone trying to run large +Ant task sequences in parallel, such as javadoc and javac at the same +time, is implicitly taking on the task of identifying and fixing all concurrency bugs the tasks that +they run.

        +

        Accordingly, while this task has uses, it should be considered an advanced task which should be +used in certain batch processing or testing situations, rather than an easy trick to speed up build +times on a multicore CPU.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        threadCountMaximum numbers of thread to use.NothreadCountMaximum numbers of thread to use.No
        threadsPerProcessorMaximum number of threads to use per available processor -(Java 1.4+)No, defers to threadCountthreadsPerProcessorMaximum number of threads to use per available processor (Java 1.4+)No; defers to threadCount
        timeoutNumber of milliseconds before execution is terminatedNotimeoutNumber of milliseconds before execution is terminatedNo
        failonanyIf any of the nested tasks fails, execution of the task completes - at that point without waiting for any other tasks to complete.No, default is false.failonanyIf any of the nested tasks fails, execution of the task completes at that point without + waiting for any other tasks to complete.No; default is false.
        pollIntervalCurrently has no effectNo, default is 1000pollIntervalCurrently has no effectNo; default is 1000

        Parallel tasks have a number of uses in an Ant build file including:

          -
        • Taking advantage of available processing resources to execute external - programs simultaneously.
        • -
        • Testing servers, where the server can be run in one thread and the test -harness is run in another thread.
        • +
        • Taking advantage of available processing resources to execute external programs + simultaneously.
        • +
        • Testing servers, where the server can be run in one thread and the test harness is run in + another thread.
        -

        Any valid Ant task may be embedded within a -parallel task, including other parallel tasks, though there is no guarantee that -the tasks will be thread safe in such an environment.

        - -

        While the tasks within the parallel task are being run, the main -thread will be blocked waiting for all the child threads to complete. If -execution is terminated by a timeout or a nested task failure when the -failonany -flag is set, the parallel task will complete without waiting for other nested -tasks to complete in other threads. -

        - -

        If any of the tasks within the <parallel> task fails and failonany is -not set, the remaining tasks in other threads will continue to run until -all threads have completed. In this situation, the parallel task will also fail.

        - -

        The parallel task may be combined with the -sequential task to define sequences of tasks to be executed on each thread -within the parallel block

        - -

        The threadCount attribute can be used to place a maximum number of available -threads for the execution. When not present all child tasks will be executed at -once. When present then the maximum number of concurrently executing tasks will -not exceed the number of threads specified. Furthermore, each task will be -started in the order they are given. But no guarantee is made as to the speed -of execution or the order of completion of the tasks, only that each will be -started before the next.

        - -

        If you are using Java 1.4 or later you can also use the threadsPerProcessor -and the number of available threads will be the stated multiple of the number of -processors (there is no affinity to a particular processor however). This will -override the value in threadCount. If threadsPerProcessor -is specified on any older JVM, then the value in threadCount will be used as is.

        - -

        When using threadCount and threadsPerProcessor - care should be taken to ensure that the build does not deadlock. - This can be caused by tasks such as waitfor - taking up all available threads before the tasks that would unlock the - waitfor -would occur. This is not a replacement for Java Language level thread -semantics and is best used for "embarassingly parallel" tasks.

        - +

        Any valid Ant task may be embedded within a parallel task, including +other parallel tasks, though there is no guarantee that the tasks will be thread safe +in such an environment.

        + +

        While the tasks within the parallel task are being run, the main thread will be +blocked waiting for all the child threads to complete. If execution is terminated by a timeout or a +nested task failure when the failonany flag is set, the parallel task will +complete without waiting for other nested tasks to complete in other threads.

        + +

        If any of the tasks within the <parallel> task fails and failonany +is not set, the remaining tasks in other threads will continue to run until all threads have +completed. In this situation, the parallel task will also fail.

        + +

        The parallel task may be combined with the sequential +task to define sequences of tasks to be executed on each thread within the parallel block.

        + +

        The threadCount attribute can be used to place a maximum number of available threads +for the execution. When not present all child tasks will be executed at once. When present then +the maximum number of concurrently executing tasks will not exceed the number of threads specified. +Furthermore, each task will be started in the order they are given. But no guarantee is made as to +the speed of execution or the order of completion of the tasks, only that each will be started +before the next.

        + +

        If you are using Java 1.4 or later you can also use the threadsPerProcessor and the +number of available threads will be the started multiple of the number of processors (there is no +affinity to a particular processor, however). This will override the value +in threadCount. If threadsPerProcessor is specified on any older JVM, then +the value in threadCount will be used as is.

        + +

        When using threadCount and threadsPerProcessor care should be taken to +ensure that the build does not deadlock. This can be caused by tasks such as waitfor +taking up all available threads before the tasks that would unlock the waitfor would +occur. This is not a replacement for Java Language level thread semantics and is best used for +"embarrassingly parallel" tasks.

        Parameters specified as nested elements

        daemons

        -

        -The parallel task supports a <daemons> nested element. This is a list of tasks -which are to be run in parallel daemon threads. The parallel task will not wait for -these tasks to complete. Being daemon threads, however, they will not prevent Ant from -completing, whereupon the threads are terminated. Failures in daemon threads which -occur before the parallel task itself finishes will be reported and can cause -parallel to throw an exception. Failures which occur after parallel has completed are not -reported. -

        - -

        Daemon tasks can be used, for example, to start test servers which might not be easily -terminated from Ant. By using <daemons> such servers do not halt the build. -

        +

        The parallel task supports a <daemons> nested element. This is a +list of tasks which are to be run in parallel daemon threads. The parallel task will +not wait for these tasks to complete. Being daemon threads, however, they will not prevent Ant from +completing, whereupon the threads are terminated. Failures in daemon threads which occur before +the parallel task itself finishes will be reported and can cause parallel +to throw an exception. Failures which occur after parallel has completed are not +reported.

        +

        Daemon tasks can be used, for example, to start test servers which might not be easily terminated +from Ant. By using <daemons> such servers do not halt the build.

        Examples

        @@ -166,15 +144,13 @@
             <junit fork="true" forkmode="once" ... >
             <wlstop/>
           </sequential>
        -</parallel>
        -
        -

        This example represents a typical pattern for testing a server application. -In one thread the server is started (the <wlrun> task). -The other thread consists -of a three tasks which are performed in sequence. The <sleep> task is used to -give the server time to come up. Another task which is capable of validating -that the server is available could be used in place of the <sleep> task. The -<junit> test harness then runs, again in its own JVM. Once the tests are complete, the server is stopped +</parallel> +

        This example represents a typical pattern for testing a server application. In one thread the +server is started (the <wlrun> task). The other thread consists of a three tasks +which are performed in sequence. The <sleep> task is used to give the server time +to come up. Another task which is capable of validating that the server is available could be used +in place of the <sleep> task. The <junit> test harness then +runs, again in its own JVM. Once the tests are complete, the server is stopped (using <wlstop> in this example), allowing both threads to complete. The <parallel> task will also complete at this time and the build will then continue.

        @@ -183,53 +159,44 @@ <parallel> <javac fork="true"...> <!-- compiler servlet code --> <wljspc ...> <!-- precompile JSPs --> -</parallel> - +</parallel> -

        This example shows two independent tasks being run to achieve better -resource utilization during the build. In this instance, some servlets are being -compiled in one thead and a set of JSPs is being precompiled in another. Developers -need to be careful that the two tasks are independent, both in -terms of their dependencies and in terms of their potential interactions in -Ant's external environment. Here we set fork="true" for the -<javac> task, so that it runs in a new process; -if the <wljspc> task used the javac compiler in-VM -(it may), concurrency problems may arise. -

        +

        This example shows two independent tasks being run to achieve better resource utilization during +the build. In this instance, some servlets are being compiled in one thread and a set of JSPs is +being precompiled in another. Developers need to be careful that the two tasks are independent, both +in terms of their dependencies and in terms of their potential interactions in Ant's external +environment. Here we set fork=true for the <javac> task, so +that it runs in a new process; if the <wljspc> task used the javac +compiler in-VM (it may), concurrency problems may arise.

          <macrodef name="dbpurge">
             <attribute file="file"/>
            <sequential>
               <java jar="utils/dbpurge.jar" fork="true" >
        -        <arg file="@{file} />
        +        <arg file="@{file}/>
               </java>
            </sequential>
         </macrodef>
        -    
        +
         <parallel threadCount="4">
        -  <dbpurge file="db/one" />
        -  <dbpurge file="db/two" />
        -  <dbpurge file="db/three" />
        -  <dbpurge file="db/four" />
        -  <dbpurge file="db/five" />
        -  <dbpurge file="db/six" />
        -  <dbpurge file="db/seven" />
        -  <dbpurge file="db/eight" />
        +  <dbpurge file="db/one"/>
        +  <dbpurge file="db/two"/>
        +  <dbpurge file="db/three"/>
        +  <dbpurge file="db/four"/>
        +  <dbpurge file="db/five"/>
        +  <dbpurge file="db/six"/>
        +  <dbpurge file="db/seven"/>
        +  <dbpurge file="db/eight"/>
           <!-- repeated about 40 times -->
        -</parallel>
        -
        - -

        This example represents a typical need for use of the threadCount and -threadsPerProcessor attributes. Spinning up all 40 of those tasks could cripple -the system for memory and CPU time. By limiting the number of -concurrent executions you can reduce contention for CPU, memory and disk IO, -and so actually finish faster. This is also a good -candidate for use of threadCount (and possibly threadsPerProcessor) because -each task is independent (every new JVM is forked) and has no dependencies on -the other tasks.

        +</parallel> +

        This example represents a typical need for use of the threadCount +and threadsPerProcessor attributes. Spinning up all 40 of those tasks could cripple the +system for memory and CPU time. By limiting the number of concurrent executions you can reduce +contention for CPU, memory and disk IO, and so actually finish faster. This is also a good +candidate for use of threadCount (and possibly threadsPerProcessor) because +each task is independent (every new JVM is forked) and has no dependencies on the other tasks.

        - diff -Nru ant-1.9.10/manual/Tasks/patch.html ant-1.10.3/manual/Tasks/patch.html --- ant-1.9.10/manual/Tasks/patch.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/patch.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,88 +24,80 @@ -

        Patch

        +

        Patch

        Description

        -

        Applies a diff file to originals. ; requires "patch" to be - on the execution path.

        +

        Applies a diff file to originals. Requires patch to be on the execution path.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        patchfilethe file that includes the diff outputYespatchfilethe file that includes the diff outputYes
        originalfilethe file to patchNo, tries to guess it from the diff - fileoriginalfilethe file to patchNo; tries to guess it from the diff file
        destfilethe file to send the output to instead of - patching the file(s) in place. since Apache Ant 1.6No.destfilethe file to send the output to instead of patching the file(s) in place. since Apache + Ant 1.6No
        backupsKeep backups of the unpatched filesNobackupsKeep backups of the unpatched filesNo
        quietWork silently unless an error occursNoquietWork silently unless an error occursNo
        reverseAssume patch was created with old and new files - swapped.NoreverseAssume patch was created with old and new files swapped.No
        ignorewhitespaceIgnore whitespace differences.NoignorewhitespaceIgnore whitespace differences.No
        stripStrip the smallest prefix containing num leading - slashes from filenames.NostripStrip the smallest prefix containing num leading slashes from filenames.No
        dirThe directory in which to run the patch command.No, default is the project's basedir.dirThe directory in which to run the patch command.No; default is the project's basedir
        failonerrorStop the buildprocess if the command exits with a - return code signaling failure. Defaults to false. - since Ant 1.8.0NofailonerrorStop the build process if the command exits with a return code signaling failure. since + Ant 1.8.0No; defaults to false

        Examples

        -
          <patch patchfile="module.1.0-1.1.patch"/>
        -

        applies the diff included in module.1.0-1.1.patch to the -files in base directory guessing the filename(s) from the diff output.

        -
          <patch patchfile="module.1.0-1.1.patch" strip="1"/>
        -

        like above but one leading directory part will be removed. i.e. if -the diff output looked like

        +
        <patch patchfile="module.1.0-1.1.patch"/>
        +

        applies the diff included in module.1.0-1.1.patch to the files in base directory +guessing the filename(s) from the diff output.

        +
        <patch patchfile="module.1.0-1.1.patch" strip="1"/>
        +

        like above but one leading directory part will be removed. i.e. if the diff output looked +like

        ---- a/mod1.0/A	Mon Jun  5 17:28:41 2000
        -+++ a/mod1.1/A	Mon Jun  5 17:28:49 2000
        -
        -the leading a/ will be stripped. - +--- a/mod1.0/A Mon Jun 5 17:28:41 2000 ++++ a/mod1.1/A Mon Jun 5 17:28:49 2000 +the leading a/ will be stripped. - diff -Nru ant-1.9.10/manual/Tasks/pathconvert.html ant-1.10.3/manual/Tasks/pathconvert.html --- ant-1.9.10/manual/Tasks/pathconvert.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/pathconvert.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,201 +24,156 @@ -

        Pathconvert

        +

        Pathconvert

        Description

        -

        Converts nested -ResourceCollections, or a reference to just one, into a path -form for a particular platform, optionally storing the result into -a given property. It can also be used when you need -to convert a Resource Collection into a list, separated by a given -character, such as a comma or space, or, conversely, e.g. to convert a list -of files in a FileList into a path. -

        -

        Nested <map> elements can be specified to map Windows -drive letters to Unix paths, and vice-versa.

        -

        More complex transformations can be achieved using a nested -<mapper> -(since Apache Ant 1.6.2). -

        +

        Converts nested resource collections, or a +reference to just one, into a path form for a particular platform, optionally storing the result +into a given property. It can also be used when you need to convert a resource collection into a +list, separated by a given character, such as a comma or space, or, conversely, e.g. to convert a +list of files in a FileList into a path.

        +

        Nested <map> elements can be specified to map Windows drive letters to Unix +paths, and vice-versa.

        +

        More complex transformations can be achieved using a +nested <mapper> (since Apache Ant +1.6.2).

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        targetos - The target architecture. Must be one of 'unix', 'windows', - 'netware', 'tandem' or 'os/2'. - This is a shorthand mechanism for specifying both - pathsep and dirsep - according to the specified target architecture. - NotargetosThe target architecture. Must be one + of unix, windows, netware, tandem or os/2. This is a + shorthand mechanism for specifying both pathsep and dirsep according + to the specified target architecture.No
        dirsep - The character(s) to use as the directory separator in the - generated paths. - No, defaults to current JVM File.separatordirsepThe character(s) to use as the directory separator in the generated paths.No; defaults to current JVM File.separator
        pathsep - The character(s) to use as the path-element separator in the - generated paths. - No, defaults to current JVM File.pathSeparatorpathsepThe character(s) to use as the path-element separator in the generated paths.No; defaults to current JVM File.pathSeparator
        propertyThe name of the property in which to place the converted path.No, result will be logged if unsetpropertyThe name of the property in which to place the converted path.No, result will be logged if unset
        refidWhat to convert, given as a - reference to a - <path>, <fileset>, - <dirset>, or <filelist> - defined elsewhereNo; if omitted, a nested - <path> element must be supplied.refidWhat to convert, given as a reference to + a <path>, <fileset>, <dirset>, + or <filelist> defined elsewhereYes, unless a nested <path> element is supplied
        setonemptyShould the property be set, even if the result - is the empty string? - No; default is "true". + setonemptyShould the property be set, even if the result is the empty string?No; default is true
        preserveduplicatesWhether to preserve duplicate resources. Since Ant 1.8No; default "false". + preserveduplicatesWhether to preserve duplicate resources. Since Ant 1.8No; default is false

        Parameters specified as nested elements

        map

        Specifies the mapping of path prefixes between Unix and Windows.

        - +
        - - - - - - - - - - - - - + + + + + + + + + + + + +
        AttributeDescriptionRequired
        from - The prefix to match. Note that this value is case-insensitive when - the build is running on a Windows platform and case-sensitive - when running on a Unix platform. - Since Ant 1.7.0, on Windows this value is also insensitive - to the slash style used for directories, one can use '/' or '\'. - Yes
        toThe replacement text to use when from is matched.YesAttributeDescriptionRequired
        fromThe prefix to match. Note that this value is case-insensitive when the build is running on + a Windows platform and case-sensitive when running on a Unix platform. Since Ant + 1.7.0, on Windows this value is also insensitive to the slash style used for directories, + one can use / or \.Yes
        toThe replacement text to use when from is matched.Yes
        -

        Each map element specifies a single replacement map to be applied to the elements of - the path being processed. If no map entries are specified, then no path prefix mapping - is performed. -

        -

        Note: The map elements are applied in the order specified, -and only the first matching map element is applied. So, the ordering of -your map elements can be important, if any from values are -prefixes of other from values. -

        -

        Resource Collections

        -

        If the refid attribute is not specified, then one or more - nested Resource -Collections must be supplied.

        +

        Each map element specifies a single replacement map to be applied to the elements of the path +being processed. If no map entries are specified, then no path prefix mapping is performed.

        +

        Note: The map elements are applied in the order specified, and only the first +matching map element is applied. So, the ordering of your map elements can be important, if +any from values are prefixes of other from values.

        +

        resource collections

        +

        If the refid attribute is not specified, then one or more +nested resource collections must be supplied.

        mapper

        -

        A single nested -<mapper> element can be specified -to perform any of various filename transformations (since Ant 1.6.2). -

        +

        A single nested <mapper> element can be +specified to perform any of various filename transformations (since Ant 1.6.2).

        Examples

        -

        In the examples below, assume that the ${wl.home} property -has the value -d:\weblogic, and ${wl.home.unix} has the value -/weblogic.

        +

        In the examples below, assume that the ${wl.home} property has the +value d:\weblogic, and ${wl.home.unix} has the +value /weblogic.

        Example 1

        -    <path id="wl.path">
        -      <pathelement location="${wl.home}/lib/weblogicaux.jar"/>
        -      <pathelement location="${wl.home}/classes"/>
        -      <pathelement location="${wl.home}/mssqlserver4/classes"/>
        -      <pathelement location="c:\winnt\System32"/>
        -    </path>
        -    
        -    <pathconvert targetos="unix" property="wl.path.unix" refid="wl.path">
        -      <map from="${wl.home}" to="${wl.home.unix}"/>
        -      <map from="c:" to=""/>
        -    </pathconvert>
        -
        -

        will generate the path shown below -and store it in the property named wl.path.unix. -

        -
        -/weblogic/lib/weblogicaux.jar:/weblogic/classes:/weblogic/mssqlserver4/classes:/WINNT/SYSTEM32
        -
        +<path id="wl.path"> + <pathelement location="${wl.home}/lib/weblogicaux.jar"/> + <pathelement location="${wl.home}/classes"/> + <pathelement location="${wl.home}/mssqlserver4/classes"/> + <pathelement location="c:\winnt\System32"/> +</path> + +<pathconvert targetos="unix" property="wl.path.unix" refid="wl.path"> + <map from="${wl.home}" to="${wl.home.unix}"/> + <map from="c:" to=""/> +</pathconvert> +

        will generate the path shown below and store it in the property +named wl.path.unix.

        +
        /weblogic/lib/weblogicaux.jar:/weblogic/classes:/weblogic/mssqlserver4/classes:/WINNT/SYSTEM32

        Example 2

        -Given a FileList defined as: +

        Given a FileList defined as:

        -  <filelist id="custom_tasks.jars"
        -        dir="${env.HOME}/ant/lib"
        -        files="njavac.jar,xproperty.jar"/>
        -
        -then: -
        -    <pathconvert targetos="unix" property="custom_tasks.jars" refid="custom_tasks.jars">
        -      <map from="${env.HOME}" to="/usr/local"/>
        -    </pathconvert>
        -
        -will convert the list of files to the following Unix path: -
        -/usr/local/ant/lib/njavac.jar:/usr/local/ant/lib/xproperty.jar
        -
        +<filelist id="custom_tasks.jars" + dir="${env.HOME}/ant/lib" + files="njavac.jar,xproperty.jar"/> +

        then:

        +
        +<pathconvert targetos="unix" property="custom_tasks.jars" refid="custom_tasks.jars">
        +  <map from="${env.HOME}" to="/usr/local"/>
        +</pathconvert>
        +

        will convert the list of files to the following Unix path:

        +
        /usr/local/ant/lib/njavac.jar:/usr/local/ant/lib/xproperty.jar

        Example 3

        -    <fileset dir="${src.dir}" id="src.files">
        -      <include name="**/*.java"/>
        -    </fileset>
        -  
        -    <pathconvert pathsep="," property="javafiles" refid="src.files"/>
        -
        +<fileset dir="${src.dir}" id="src.files"> + <include name="**/*.java"/> +</fileset> + +<pathconvert pathsep="," property="javafiles" refid="src.files"/>

        This example takes the set of files determined by the fileset (all files ending -in .java), joins them together separated by commas, and places the resulting -list into the property javafiles. The directory separator is not specified, so -it defaults to the appropriate character for the current platform. Such a list could -then be used in another task, like javadoc, that requires a comma separated -list of files. -

        +in .java), joins them together separated by commas, and places the resulting list into +the property javafiles. The directory separator is not specified, so it defaults to +the appropriate character for the current platform. Such a list could then be used in another task, +like javadoc, that requires a comma separated list of files.

        Example 4

        -    <pathconvert property="prop" dirsep="|">
        -      <map from="${basedir}/abc/" to=''/>
        -      <path location="abc/def/ghi"/>
        -    </pathconvert>
        -
        -

        - This example sets the property "prop" to "def|ghi" on - Windows and on Unix. -

        +<pathconvert property="prop" dirsep="|"> + <map from="${basedir}/abc/" to=""/> + <path location="abc/def/ghi"/> +</pathconvert> +

        This example sets the property prop to def|ghi on Windows and on Unix.

        - - diff -Nru ant-1.9.10/manual/Tasks/presetdef.html ant-1.10.3/manual/Tasks/presetdef.html --- ant-1.9.10/manual/Tasks/presetdef.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/presetdef.html 2018-03-24 12:37:12.000000000 +0000 @@ -15,95 +15,66 @@ limitations under the License. --> - + - + -PreSetDef Task - + PreSetDef Task - + - -

        PreSetDef

        + +

        PreSetDef

        +

        Since Apache Ant 1.6

        Description

        -

        - The preset definition generates a new definition - based on a current definition with some attributes - or elements preset. -

        -

        - since Apache Ant 1.6 -

        -

        - The resolution of properties in any of the attributes or - nested text takes place with the definition is used and not - when the preset definition is defined. -

        +

        The preset definition generates a new definition based on a current definition with some + attributes or elements preset.

        +

        The resolution of properties in any of the attributes or nested text takes place with the + definition is used and not when the preset definition is defined.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        namethe name of the new definitionYesnamethe name of the new definitionYes
        uri - The uri that this definition should live in. - NouriThe URI that this definition should live in.No

        Parameters specified as nested elements

        another type with attributes or elements set

        -

        The <presetdef> task takes one nested element as a parameter. - This nested element can be any other type or task. The attributes - and elements that need to be preset are placed here. -

        - +

        The <presetdef> task takes one nested element as a parameter. This nested + element can be any other type or task. The attributes and elements that need to be preset are + placed here.

        +

        Examples

        - The following fragment defines a javac task with the debug, deprecation - srcdir and destdir - attributes set. It also has a src element to source files from a generated - directory. -
        -
        +    

        The following fragment defines a javac task with + the debug, deprecation, srcdir and destdir + attributes set. It also has a src element to source files from a generated + directory.

        +
         <presetdef name="my.javac">
            <javac debug="${debug}" deprecation="${deprecation}"
                   srcdir="${src.dir}" destdir="${classes.dir}">
               <src path="${gen.dir}"/>
            </javac>
        -</presetdef>
        -
        -
        - This can be used as a normal javac task - example: -
        -
        -<my.javac/>
        -
        -
        - The attributes specified in the preset task may be overridden - i.e. - they may be seen as optional attributes - example: -
        -
        -<my.javac srcdir="${test.src}" deprecation="no"/>
        -
        -
        - One may put a presetdef definition in an antlib. - For example suppose the jar file antgoodies.jar has - the antlib.xml as follows: -
        -
        +</presetdef>
        +

        This can be used as a normal javac task—for example:

        +
        <my.javac/>
        +

        The attributes specified in the preset task may be overridden—i.e. they may be seen as + optional attributes—for example:

        +
        <my.javac srcdir="${test.src}" deprecation="no"/>
        +

        One may put a presetdef definition in an antlib. For example suppose the jar + file antgoodies.jar has the antlib.xml as follows:

        +
         <antlib>
            <taskdef resource="com/acme/antgoodies/tasks.properties"/>
            <!-- Implement the common use of the javac command -->
        @@ -111,12 +82,9 @@
               <javac deprecation="${deprecation}" debug="${debug}"
                      srcdir="src" destdir="classes"/>
            </presetdef>
        -</antlib>
        -
        -
        - One may then use this in a build file as follows: -
        -
        +</antlib>
        +

        One may then use this in a build file as follows:

        +
         <project default="example" xmlns:antgoodies="antlib:com.acme.antgoodies">
            <target name="example">
               <!-- Compile source -->
        @@ -124,15 +92,9 @@
               <!-- Compile test code -->
               <antgoodies:javac srcdir="src/test"/>
            </target>
        -</project>
        -
        -
        -

        - The following is an example of evaluation of properties when the - definition is used: -

        -
        -
        +</project>
        +

        The following is an example of evaluation of properties when the definition is used:

        +
         <target name="defineandcall">
            <presetdef name="showmessage">
               <echo>message is '${message}'</echo>
        @@ -146,39 +108,26 @@
         </target>
         <target name="called">
            <showmessage/>
        -</target>
        -
        -
        -

        - The command ant defineandcall results in the output: -

        -
        -
        +</target>
        +

        The command ant defineandcall results in the output:

        +
         defineandcall:
         [showmessage] message is '${message}'
         [showmessage] message is 'Message 1'
         
         called:
        -[showmessage] message is 'Message 2'
        -
        -
        -

        -It is possible to use a trick to evaluate properties when the definition is -made rather than used. This can be useful if you do not expect some -properties to be available in child builds run with -<ant ... inheritall="false">: -

        -
        +[showmessage] message is 'Message 2'
        +

        It is possible to use a trick to evaluate properties when the definition is made + rather than used. This can be useful if you do not expect some properties to be available in + child builds run with <ant ... inheritall="false">:

        +
         <macrodef name="showmessage-presetdef">
           <attribute name="messageval"/>
           <presetdef name="showmessage">
             <echo>message is '@{messageval}'</echo>
           </presetdef>
         </macrodef>
        -<showmessage-presetdef messageval="${message}"/>
        -
        -
        - +<showmessage-presetdef messageval="${message}"/> + - diff -Nru ant-1.9.10/manual/Tasks/projecthelper.html ant-1.10.3/manual/Tasks/projecthelper.html --- ant-1.9.10/manual/Tasks/projecthelper.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/projecthelper.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,30 +25,28 @@

        ProjectHelper

        +

        Since Ant 1.8.2

        Description

        -

        This task is provided for the purpose of allowing the user to install a different -ProjectHelper at runtime. -

        -

        The helpers will be added after all the already registered helpers, but before -the default one (ProjectHelper2) -

        -

        See the description of Apache Ant's -Project Helper for more information. -

        -

        Since Ant 1.8.2

        +

        This task is provided for the purpose of allowing the user to install a different ProjectHelper +at run time.

        +

        The helpers will be added after all the already registered helpers, but before the default one +(ProjectHelper2)

        +

        See the description of Apache Ant's Project Helper for more +information.

        Parameters specified as nested elements

        -You may specify many configured org.apache.tools.ant.ProjectHelper instances. +

        You may specify many configured org.apache.tools.ant.ProjectHelper +instances.

        Example

        -

        Install a custom ProjectHelper implementation - (assuming MyProjectHelper extends ProjectHelper):

        +

        Install a custom ProjectHelper implementation (assuming MyProjectHelper +extends ProjectHelper):

         <typedef classname="org.example.MyProjectHelper"
        -              name="myprojecthelper"/>
        +         name="myprojecthelper"/>
         <projecthelper>
           <myprojecthelper/>
         </projecthelper>
        @@ -56,4 +54,3 @@
         
         
         
        -
        diff -Nru ant-1.9.10/manual/Tasks/propertyfile.html ant-1.10.3/manual/Tasks/propertyfile.html
        --- ant-1.9.10/manual/Tasks/propertyfile.html	2018-02-03 16:12:26.000000000 +0000
        +++ ant-1.10.3/manual/Tasks/propertyfile.html	2018-03-24 12:37:12.000000000 +0000
        @@ -24,143 +24,140 @@
         
         
         

        PropertyFile

        +
        +

        Introduction

        +

        Apache Ant provides an optional task for editing property files. This is very useful when wanting +to make unattended modifications to configuration files for application servers and +applications. Currently, the task maintains a working property file with the ability to add +properties or make changes to existing ones. Since Ant 1.8.0 comments and layout of the +original properties file are preserved.

        + +

        Since Ant 1.8.2 the linefeed-style of the original file will be preserved as well, as +long as style used to be consistent. In general, linefeeds of the updated file will be the same as +the first linefeed found when reading it.

        -
        -

        Introduction

        -

        Apache Ant provides an optional task for editing property files. This is -very useful when wanting to make unattended modifications to -configuration files for application servers and -applications. Currently, the task maintains a working property file -with the ability to add properties or make changes to existing -ones. Since Ant 1.8.0 comments and layout of the original properties -file are preserved.

        - -

        Since Ant 1.8.2 the linefeed-style of the original file - will be preserved as well, as long as style used to be consistent. - In general, linefeeds of the updated file will be the same as the - first linefeed found when reading it.

        +
        -
        -

        PropertyFile Task

        +

        PropertyFile Task

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - + - +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        fileLocation of the property file to be editedYesfileLocation of the property file to be editedYes
        commentHeader for the file itselfnocommentHeader for the file itselfNo
        jdkpropertiesUse java.lang.Properties, which will - loose comments and layout of file (default is 'false'). since + jdkpropertiesUse java.lang.Properties, which will lose comments and layout of file. since Ant 1.8.0noNo; default is false
        -

        The boolean attribute 'jdkproperties' is provided to recover the -previous behaviour of the task, in which the layout and any comments -in the properties file were lost by the task.

        +

        The boolean attribute jdkproperties is provided to recover the previous behaviour of +the task, in which the layout and any comments in the properties file were lost by the task.

        Parameters specified as nested elements

        -

        Entry

        -

        Use nested <entry> -elements to specify actual modifications to the property file itself.

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

        pvcsproject element

        +

        The task supports a nested <pvcsproject> element, that represents a +project within the PVCS repository to extract files from. By nesting +multiple <pvcsproject> elements under the <pvcs> task, +multiple projects can be specified.

        + +
        Parameters
        + +
        AttributeDescriptionRequired
        keyName of the property name/value pairYes
        valueValue to set (=), to add (+) or subtract (-)At least one must be specified, if operation is not delete
        defaultInitial value to set for a property if it is not - already defined in the property file.
        - For type date, an additional keyword is allowed: "now"
        typeRegard the value as : int, date or string (default)No
        operationOne of the following operations:

        - for all datatypes:
          -
        • "del" : deletes an entry
        • -
        • "+" : adds a value to the existing value
        • -
        • "=" : sets a value instead of the existing value (default)
        • -

        for date and int only:
          -
        • "-" : subtracts a value from the existing value
        • -
        +

        Entry

        +

        Use nested <entry> elements to specify actual modifications to the property +file itself.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + - +
        AttributeDescriptionRequired
        keyName of the property name/value pairYes
        valueValue to set (=), to add (+) or subtract (-)At least one must be specified, if operation is not del
        defaultInitial value to set for a property if it is not already defined in the + property file.
        For type date, an additional keyword is + allowed: now
        typeRegard the value as: int, date or string (default)No; defaults to string
        operationOne of the following operations:
        + for all datatypes: +
          +
        • del : deletes an entry
        • +
        • + : adds a value to the existing value
        • +
        • = : sets a value instead of the existing value (default)
        • +
        + for date and int only: +
          +
        • - : subtracts a value from the existing value
        • +
        NoNo; defaults to =
        patternFor int and date type only. If present, Values will - be parsed and formatted accordingly.No
        unitThe unit of the value to be applied to date +/- operations. - Valid Values are: -
          -
        • millisecond
        • -
        • second
        • -
        • minute
        • -
        • hour
        • -
        • day (default)
        • -
        • week
        • -
        • month
        • -
        • year
        • -
        - This only applies to date types using a +/- operation. +
        patternFor int and date type only. If present, values will be parsed and + formatted accordingly.No
        unitThe unit of the value to be applied to date +/- operations. Valid + Values are: +
          +
        • millisecond
        • +
        • second
        • +
        • minute
        • +
        • hour
        • +
        • day (default)
        • +
        • week
        • +
        • month
        • +
        • year
        • +
        + This only applies to date types using a +/- operation.
        NoNo; defaults to day
        -

        The rules used when setting a property value are shown below.  The -operation occurs after these rules are considered.

        +

        The rules used when setting a property value are shown below. The operation +occurs after these rules are considered.

          -
        • If only value is specified, the property is set to it regardless of its - previous value.
        • -
        • If only default is specified and the property previously existed in the - property file, it is unchanged.
        • -
        • If only default is specified and the property did not exist in the - property file, the property is set to default.
        • -
        • If value and default are both specified and the property previously - existed in the property file, the property is set to value.
        • -
        • If value and default are both specified and the property did not exist in - the property file, the property is set to default.
        • +
        • If only value is specified, the property is set to it regardless of its previous + value.
        • +
        • If only default is specified and the property previously existed in the property + file, it is unchanged.
        • +
        • If only default is specified and the property did not exist in the property file, + the property is set to default.
        • +
        • If value and default are both specified and the property previously + existed in the property file, the property is set to value.
        • +
        • If value and default are both specified and the property did not exist + in the property file, the property is set to default.
        -

         

        Examples

        -

        The following changes the my.properties file. Assume my.properties look like:

        +

        The following changes the my.properties file. Assume my.properties +looks like:

        # A string value
         akey=original value
        @@ -169,8 +166,7 @@
         # each time the build is run.
         anint=1
        -

        After running, the file would now look like -

        +

        After running, the file would now look like

        #My properties
         #Wed Aug 31 13:47:19 BST 2005
         # A string value
        @@ -185,65 +181,55 @@
         formated.int=0014
         
         formated.date=243 13\:47
        -

        -The slashes conform to the expectations of the Properties class. The file will be stored in a manner so that each character is examined and escaped if necessary. -

        - -

        -The layout and comment of the original file is preserved. New properties are added at the end of the file. Existing properties are overwritten in place. -

        - -
        <propertyfile
        -    file="my.properties"
        -    comment="My properties">
        -  <entry  key="akey" value="avalue"/>
        -  <entry  key="adate" type="date" value="now"/>
        -  <entry  key="anint" type="int" default="0" operation="+"/>
        -  <entry  key="formated.int" type="int" default="0013" operation="+" pattern="0000"/>
        -  <entry  key="formated.date" type="date" value="now" pattern="DDD HH:mm"/>
        -</propertyfile>
        -
        -

        -To produce dates relative from today :

        -
        <propertyfile
        -    file="my.properties"
        -    comment="My properties">
        -  <entry  key="formated.date-1"
        -      type="date" default="now" pattern="DDD"
        -      operation="-" value="1"/>
        -  <entry  key="formated.tomorrow"
        -      type="date" default="now" pattern="DDD"
        -      operation="+" value="1"/>
        -</propertyfile>
        -
        - -

        -Concatenation of strings :

        -
        <propertyfile
        -    file="my.properties"
        -    comment="My properties">
        -  <entry  key="progress" default="" operation="+" value="."/>
        -</propertyfile>
        -
        -

        Each time called, a "." will be appended to "progress" -

        - -

        Pumps the project version to the next minor version (increase minor and set path=0): -

        <target name="nextMinorVersion">
        -   <property
        -     name="header"
        -     value="##Generated file - do not modify!"/>
        -   <propertyfile file="version.properties" comment="${header}">
        -     <entry key="product.build.major"   type="int"  value="3" />
        -     <entry key="product.build.minor"   type="int"  operation="+" />
        -     <entry key="product.build.patch"   type="int"  value="0" />
        -     <entry key="product.build.date"    type="date" value="now" />
        -  </propertyfile>
        -</target>
        -
        -After running this target the version changed e.g. from 3.2.2 to 3.3.0. -

        +

        The slashes conform to the expectations of the Properties class. The file will be stored in a +manner so that each character is examined and escaped if necessary.

        +

        The layout and comment of the original file is preserved. New properties are added at the end of +the file. Existing properties are overwritten in place.

        + +
        +<propertyfile file="my.properties"
        +              comment="My properties">
        +    <entry key="akey" value="avalue"/>
        +    <entry key="adate" type="date" value="now"/>
        +    <entry key="anint" type="int" default="0" operation="+"/>
        +    <entry key="formated.int" type="int" default="0013" operation="+" pattern="0000"/>
        +    <entry key="formated.date" type="date" value="now" pattern="DDD HH:mm"/>
        +</propertyfile>
        +

        To produce dates relative from today:

        +
        +<propertyfile file="my.properties"
        +              comment="My properties">
        +    <entry key="formated.date-1"
        +           type="date" default="now" pattern="DDD"
        +           operation="-" value="1"/>
        +    <entry key="formated.tomorrow"
        +           type="date" default="now" pattern="DDD"
        +           operation="+" value="1"/>
        +</propertyfile>
        + +

        Concatenation of strings:

        +
        +<propertyfile file="my.properties"
        +              comment="My properties">
        +    <entrykey="progress" default="" operation="+" value="."/>
        +</propertyfile>
        +

        Each time called, a . will be appended to progress

        + +

        Pumps the project version to the next minor version (increase minor and +set patch=0):

        +
        +<target name="nextMinorVersion">
        +    <property name="header"
        +              value="##Generated file - do not modify!"/>
        +    <propertyfile file="version.properties" comment="${header}">
        +        <entry key="product.build.major" type="int"  value="3"/>
        +        <entry key="product.build.minor" type="int"  operation="+"/>
        +        <entry key="product.build.patch" type="int"  value="0"/>
        +        <entry key="product.build.date"  type="date" value="now"/>
        +    </propertyfile>
        +</target>
        +

        After running this target the version changed e.g. from 3.2.2 to 3.3.0.

        diff -Nru ant-1.9.10/manual/Tasks/propertyhelper.html ant-1.10.3/manual/Tasks/propertyhelper.html --- ant-1.9.10/manual/Tasks/propertyhelper.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/propertyhelper.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,49 +25,52 @@

        PropertyHelper

        +

        Since Ant 1.8.0

        Description

        -

        This task is provided for the purpose of allowing the user to -(a) install a different PropertyHelper at runtime, or -(b) (hopefully more often) install one or more PropertyHelper Delegates into the -PropertyHelper active on the current Project. This is somewhat advanced Apache Ant usage and -assumes a working familiarity with the modern Ant APIs. See the description of Ant's -Property Helper for more information. -Since Ant 1.8.0

        +

        This task is provided for the purpose of allowing the user to (a) install a +different PropertyHelper at run time, or (b) (hopefully more often) +install one or more PropertyHelper Delegates into +the PropertyHelper active on the +current Project. This is somewhat advanced Apache Ant usage and assumes a +working familiarity with the modern Ant APIs. See the description of +Ant's Property Helper for more information.

        Parameters specified as nested elements

        PropertyHelper

        -You may specify exactly one configured org.apache.tools.ant.PropertyHelper instance. +

        You may specify exactly one configured org.apache.tools.ant.PropertyHelper +instance.

        PropertyHelper.Delegate

        -You may specify, either in conjunction with a new PropertyHelper or not, one or -more configured implementations of the org.apache.tools.ant.PropertyHelper.Delegate -interface. A deeper understanding of the API is required here, however, as Delegate -is a marker interface only: the nested arguments must implement a Delegate -subinterface in order to do anything meaningful. +

        You may specify, either in conjunction with a new PropertyHelper or +not, one or more configured implementations of +the org.apache.tools.ant.PropertyHelper.Delegate interface. A deeper +understanding of the API is required here, however, as Delegate is a +marker interface only: the nested arguments must implement a Delegate +subinterface in order to do anything meaningful.

        delegate

        -

        A generic <delegate> element which can use project references -is also provided:

        +

        A generic <delegate> element which can use project references is also +provided:

        Parameters
        - +
        - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        refidThe id of a PropertyHelper.Delegate to install.YesrefidThe id of a PropertyHelper.Delegate to install.Yes

        Examples

        -

        Install a completely different PropertyHelper implementation - (assuming MyPropertyHelper extends PropertyHelper):

        +

        Install a completely different PropertyHelper implementation +(assuming MyPropertyHelper extends PropertyHelper):

         <componentdef classname="org.example.MyPropertyHelper"
        @@ -77,12 +80,11 @@
         </propertyhelper>
         
        -

        Add a new PropertyEvaluator delegate - (assuming MyPropertyEvaluator implements - PropertyHelper.PropertyEvaluator). Note that PropertyHelper - uses the configured delegates in LIFO order. I.e. the delegate - added by this task will be consulted before any previously defined - delegate and in particular before the built-in ones.

        +

        Add a new PropertyEvaluator delegate +(assuming MyPropertyEvaluator implements +PropertyHelper.PropertyEvaluator). Note that PropertyHelper uses +the configured delegates in LIFO order. I.e. the delegate added by this task will be consulted +before any previously defined delegate and in particular before the built-in ones.

         <componentdef classname="org.example.MyPropertyEvaluator"
        @@ -92,7 +94,8 @@
         </propertyhelper>
         
        -

        Add a new PropertyEvaluator delegate using the refid syntax:

        +

        Add a new PropertyEvaluator delegate using the refid +syntax:

         <typedef classname="org.example.MyPropertyEvaluator"
        @@ -105,4 +108,3 @@
         
         
         
        -
        diff -Nru ant-1.9.10/manual/Tasks/property.html ant-1.10.3/manual/Tasks/property.html
        --- ant-1.9.10/manual/Tasks/property.html	2018-02-03 16:12:26.000000000 +0000
        +++ ant-1.10.3/manual/Tasks/property.html	2018-03-24 12:37:12.000000000 +0000
        @@ -24,322 +24,292 @@
         
         
         
        -

        Property

        +

        Property

        Description

        -

        Sets a property -(by name and value), or set of properties (from file or -resource) in the project. Properties are case sensitive.

        - Properties are immutable: whoever sets a property first freezes it for the - rest of the build; they are most definitely not variables. +

        Sets a property (by name and value), or set of properties +(from file or resource) in the project. Properties are case sensitive.

        +

        Properties are immutable: whoever sets a property first freezes it for the rest of the build; +they are most definitely not variables.

        There are seven ways to set properties:

          -
        • By supplying both the name and one of value or location attribute.
        • -
        • By supplying the name and nested text.
        • -
        • By supplying both the name and refid attribute.
        • -
        • By setting the file attribute with the filename of the property - file to load. This property file has the format as defined by the file used - in the class java.util.Properties, with the same rules about how - non-ISO8859-1 characters must be escaped.
        • -
        • By setting the url attribute with the url from which to load the - properties. This url must be directed to a file that has the format as defined - by the file used in the class java.util.Properties.
        • -
        • By setting the resource attribute with the resource name of the - property file to load. A resource is a property file on the current - classpath, or on the specified classpath.
        • -
        • By setting the environment attribute with a prefix to use. - Properties will be defined for every environment variable by - prefixing the supplied name and a period to the name of the variable.
        • +
        • By supplying both the name and one of value or location + attributes.
        • +
        • By supplying the name and nested text.
        • +
        • By supplying both the name and refid attributes.
        • +
        • By setting the file attribute with the filename of the property file to load. This + property file has the format as defined by the file used in the + class java.util.Properties, with the same rules about how + non-ISO-8859-1 characters must be escaped.
        • +
        • By setting the url attribute with the URL from which to load the properties. This + URL must be directed to a file that has the format as defined by the file used in the + class java.util.Properties.
        • +
        • By setting the resource attribute with the resource name of the property file to + load. A resource is a property file on the current classpath, or on the specified + classpath.
        • +
        • By setting the environment attribute with a prefix to use. Properties will be + defined for every environment variable by prefixing the supplied name and a period to the name + of the variable.
        -

        Although combinations of these ways are possible, only one should be used -at a time. Problems might occur with the order in which properties are set, for -instance.

        -

        The value part of the properties being set, might contain references to other -properties. These references are resolved at the time these properties are set. -This also holds for properties loaded from a property file.

        -

        A list of predefined properties can be found here.

        -

        Since Apache Ant 1.8.0 it is possible to load properties defined in xml -according to Suns DTD, -if Java5+ is present. For this the name of the file, resource or url has -to end with .xml.

        +

        Although combinations of these ways are possible, only one should be used at a time. Problems +might occur with the order in which properties are set, for instance.

        +

        The value part of the properties being set might contain references to other properties. These +references are resolved at the time these properties are set. This also holds for properties loaded +from a property file.

        +

        A list of predefined properties can be +found here.

        +

        Since Apache Ant 1.8.0, it is possible to load properties defined in XML according +to Sun DTD, when running on Java +5+. For this the name of the file, resource or url has to end with .xml.

        Parameters

        - +
        - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + +
        AttributeDescriptionRequiredAttributeDescriptionRequired
        namethe name of the property to set.Nonamethe name of the property to set.No
        valuethe value of the property.One of these or - nested text, when using the name attributevaluethe value of the property.One of these or nested text, when the name attribute is set
        locationSets the property to the absolute filename of the - given file. If the value of this attribute is an absolute path, it - is left unchanged (with / and \ characters converted to the - current platforms conventions). Otherwise it is taken as a path - relative to the project's basedir and expanded.locationSets the property to the absolute filename of the given file. If the value of + this attribute is an absolute path, it is left unchanged (with / and \ + characters converted to the current platforms conventions). Otherwise it is taken as a path + relative to the project's basedir and expanded.
        refidReference to an object - defined elsewhere. Only yields reasonable results for references - to PATH like structures or properties.refidReference to an object defined + elsewhere. Only yields reasonable results for references + to path-like structures or properties.
        resource the name of the classpath resource containing - properties settings in properties file format.One of these, when - not using the name attributeresourcethe name of the classpath resource containing properties settings in properties file + format.One of these, unless the name attribute is set
        filethe location of the properties file to load.filethe location of the properties file to load.
        urla url containing properties-format settings.urla URL containing properties-format settings.
        environmentthe prefix to use when retrieving environment variables. Thus - if you specify environment="myenv" you will be able to access OS-specific - environment variables via property names "myenv.PATH" or - "myenv.TERM". Note that if you supply a property name with a final - "." it will not be doubled; i.e. environment="myenv." will still - allow access of environment variables through "myenv.PATH" and - "myenv.TERM". This functionality is currently only implemented - on select platforms. Feel free to send patches to increase the - number of platforms on which this functionality is supported ;).
        - Note also that properties are case-sensitive, even if the - environment variables on your operating system are not; e.g. Windows 2000's - system path variable is set to an Ant property named "env.Path" - rather than "env.PATH".
        environmentthe prefix to use when retrieving environment variables. Thus if you + specify environment=myenv you will be able to access OS-specific environment + variables via property names myenv.PATH or myenv.TERM. Note that if + you supply a property name with a final . it will not be doubled; + i.e. environment=myenv. will still allow access of environment variables + through myenv.PATH and myenv.TERM. This functionality is currently + only implemented on select platforms. Feel free to send patches to + increase the number of platforms on which this functionality is supported ;-).
        Note also + that properties are case-sensitive, even if the environment variables on your operating system + are not; e.g. Windows 2000 or later system path variable is set to an Ant property + named env.Path rather than env.PATH.
        classpaththe classpath to use when looking up a resource.Noclasspaththe classpath to use when looking up a resource.No
        classpathrefthe classpath to use when looking up a resource, - given as reference to a <path> defined + classpathrefthe classpath to use when looking up a resource, given + as reference to a <path> defined elsewhere..NoNo
        prefixPrefix to apply to properties loaded using file, - resource, or url. - A "." is appended to the prefix if not specified.NoprefixPrefix to apply to properties loaded using file, resource, + or url. A . is appended to the prefix if not specified.No
        prefixValuesWhether to apply the prefix when expanding the - right hand side of properties loaded using file, - resource, or url. - Since Ant 1.8.2No (default=false)prefixValuesWhether to apply the prefix when expanding the right hand side of properties loaded + using file, resource, or url. Since Ant 1.8.2No; default is false
        relativeIf set to true the relative path - to basedir is set. Since Ant 1.8.0No (default=false)relativeIf set to true the relative path to basedir is set. Since Ant + 1.8.0No; default is false
        basedirThe basedir to calculate the relative path - from. Since Ant 1.8.0No (default=${basedir})basedirThe basedir to calculate the relative path from. Since Ant 1.8.0No; default is project's basedir

        OpenVMS Users

        -

        With the environment attribute this task will load all defined -logicals on an OpenVMS system. Logicals with multiple equivalence names get -mapped to a property whose value is a comma separated list of all equivalence -names. If a logical is defined in multiple tables, only the most local -definition is available (the table priority order being PROCESS, JOB, GROUP, -SYSTEM). -

        +

        With the environment attribute this task will load all defined logicals on an OpenVMS +system. Logicals with multiple equivalence names get mapped to a property whose value is a comma +separated list of all equivalence names. If a logical is defined in multiple tables, only the most +local definition is available (the table priority order being PROCESS, JOB, GROUP, SYSTEM).

        Any OS except OpenVMS

        -

        Starting with Ant 1.8.2 if Ant detects it is running of a Java 1.5 - VM (or better) Ant will use System.getenv rather than - its own OS dependent native implementation. For some OSes this - causes minor differences when compared to older versions of Ant. - For a full list - see Bugzilla - Issue 49366. In particular:

        +

        Since Ant 1.8.2, if Ant detects it is running on a Java 5 or newer, Ant will +use System.getenv() rather than its own OS dependent native +implementation. For some OSes this causes minor differences when compared to older versions of Ant. +For a full list see Bugzilla Issue 49366. In particular:

          -
        • On Windows Ant will now return additional "environment - variables" that correspond to the drive specific current working - directories when Ant is run from the command line. The keys of +
        • On Windows, Ant will now return additional "environment variables" that correspond to the + drive specific current working directories when Ant is run from the command line. The keys of these variables starts with an equals sign.
        • -
        • Some users reported that some Cygwin specific variables (in - particular PROMPT) was no longer present.
        • -
        • On OS/2 Ant no longer returns the BEGINLIBPATH variable.
        • +
        • Some users reported that some Cygwin specific variables (in particular PROMPT) + were no longer present.
        • +
        • On OS/2, Ant no longer returns the BEGINLIBPATH variable.

        Parameters specified as nested elements

        classpath

        -

        Property's classpath attribute is a PATH like structure and can also be set via a nested -classpath element.

        +

        Property's classpath attribute is +a path-like structure and can also be set via a +nested classpath element.

        Examples

        -
          <property name="foo.dist" value="dist"/>
        -

        sets the property foo.dist to the value "dist".

        +
        <property name="foo.dist" value="dist"/>
        +

        sets the property foo.dist to the value dist.

        -
          <property name="foo.dist">dist</property>
        -

        sets the property foo.dist to the value "dist".

        +
        <property name="foo.dist">dist</property>
        +

        sets the property foo.dist to the value dist.

        -
          <property file="foo.properties"/>
        -

        reads a set of properties from a file called "foo.properties".

        +
        <property file="foo.properties"/>
        +

        reads a set of properties from a file called foo.properties.

        -
          <property url="http://www.mysite.com/bla/props/foo.properties"/>
        -

        reads a set of properties from the address "http://www.mysite.com/bla/props/foo.properties".

        - -
          <property resource="foo.properties"/>
        -

        reads a set of properties from a resource called "foo.properties".

        -

        Note that you can reference a global properties file for all of your Ant -builds using the following:

        - -
          <property file="${user.home}/.ant-global.properties"/>
        -

        since the "user.home" property is defined by the Java virtual machine -to be your home directory. Where the "user.home" property resolves to in -the file system depends on the operating system version and the JVM implementation. -On Unix based systems, this will map to the user's home directory. On modern Windows -variants, this will most likely resolve to the user's directory in the "Documents -and Settings" or "Users" folder. Older windows variants such as Windows 98/ME are less -predictable, as are other operating system/JVM combinations.

        +
        <property url="http://www.mysite.com/bla/props/foo.properties"/>
        +

        reads a set of properties from the +address http://www.mysite.com/bla/props/foo.properties.

        + +
        <property resource="foo.properties"/>
        +

        reads a set of properties from a resource called foo.properties.

        +

        Note that you can reference a global properties file for all of your Ant builds using the +following:

        + +
        <property file="${user.home}/.ant-global.properties"/>
        +

        since the user.home property is defined by JVM to be your home directory. Where +the user.home property resolves to in the file system depends on the operating system +version and the JVM implementation. On Unix based systems, this will map to the user's home +directory. On modern Windows variants, this will most likely resolve to the user's directory in +the Documents and Settings or Users folder. Older Windows variants such as +Windows 98/ME are less predictable, as are other operating system/JVM combinations.

        -  <property environment="env"/>
        -  <echo message="Number of Processors = ${env.NUMBER_OF_PROCESSORS}"/>
        -  <echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>
        -
        -

        reads the system environment variables and stores them in properties, prefixed with "env". -Note that this only works on select operating systems. -Two of the values are shown being echoed. +<property environment="env"/> +<echo message="Number of Processors = ${env.NUMBER_OF_PROCESSORS}"/> +<echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>

        +

        reads the system environment variables and stores them in properties, prefixed with env. +Note that this only works on select operating systems. Two of the values are shown being +echoed.

        -  <property environment="env"/>
        -  <property file="${user.name}.properties"/>
        -  <property file="${env.STAGE}.properties"/>
        -  <property file="build.properties"/>
        -
        -

        This buildfile uses the properties defined in build.properties. Regarding to the -environment variable STAGE some or all values could be overwritten, e.g. having -STAGE=test and a test.properties you have special values for that (like another -name for the test server). Finally all these values could be overwritten by personal settings with -a file per user.

        - -
        -  <property name="foo" location="my/file.txt" relative="true" basedir=".."/>
        -
        -

        Stores the relative path in foo: projectbasedir/my/file.txt

        - -
        -  <property name="foo" location="my/file.txt" relative="true" basedir="cvs"/>
        -
        -

        Stores the relative path in foo: ../my/file.txt

        +<property environment="env"/> +<property file="${user.name}.properties"/> +<property file="${env.STAGE}.properties"/> +<property file="build.properties"/> +

        This buildfile uses the properties defined in build.properties. Regarding to the +environment variable STAGE some or all values could be overwritten, +e.g. having STAGE=test and a test.properties you have special values for +that (like another name for the test server). Finally all these values could be overwritten by +personal settings with a file per user.

        + +
        <property name="foo" location="my/file.txt" relative="true" basedir=".."/>
        +

        Stores the relative path in foo: ../my/file.txt

        +
        <property name="foo" location="my/file.txt" relative="true" basedir="cvs"/>
        +

        Stores the relative path in foo: cvs/my/file.txt

        -

        Property Files

        +

        Property files

        -As stated, this task will load in a properties file stored in the file -system, or as a resource on a classpath. Here are some interesting facts -about this feature +

        As stated, this task will load in a properties file stored in the file system, or as a resource +on a classpath. Here are some interesting facts about this feature

          -
        1. If the file is not there, nothing is printed except at -verbose log -level. This lets you have optional configuration files for every -project, that team members can customize. -
        2. The rules for this format match java.util.Properties.
        3. -
        4. Trailing spaces are not stripped. It may have been what you wanted.
        5. -
        6. Want unusual characters? Escape them \u0456 or \" style.
        7. -
        8. Ant Properties are expanded in the file
        9. -
        10. If you want to expand properties defined inside the same file and - you use the prefix attribute of the task, you must use the same - prefix when expanding the properties or - set prefixValues to true.
        11. +
        12. If the file is not there, nothing is printed except at -verbose log level. This + lets you have optional configuration files for every project, that team members can customize. +
        13. The rules for this format + match java.util.Properties.
        14. +
        15. Trailing spaces are not stripped. It may have been what you wanted.
        16. +
        17. Want unusual characters? Escape them \u0456 or \" style.
        18. +
        19. Ant Properties are expanded in the file
        20. +
        21. If you want to expand properties defined inside the same file and you use + the prefix attribute of the task, you must use the same prefix when expanding the + properties or set prefixValues to true.
        -In-file property expansion is very cool. Learn to use it. -

        -Example: +

        In-file property expansion is very cool. Learn to use it.

        +

        Example:

         build.compiler=jikes
         deploy.server=lucky
         deploy.port=8080
        -deploy.url=http://${deploy.server}:${deploy.port}/
        -
        - +deploy.url=http://${deploy.server}:${deploy.port}/ - -

        Notes about environment variables

        -

        - Ant runs on Java 1.2 therefore it cannot use Java5 features for accessing environment - variables. So it starts a command in a new process which prints the environment variables, - analyzes the output and creates the properties.
        - There are commands for the following operating systems implemented in - - Execute.java (method getProcEnvCommand()): +

        Notes about environment variables

        +

        Ant runs on Java 1.2 therefore it cannot use Java 5 features for accessing environment +variables. So it starts a command in a new process which prints the environment variables, analyzes +the output and creates the properties.
        There are commands for the following operating systems +implemented +in Execute.java (method getProcEnvCommand()): +

        - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
        OS command
        os/2 cmd /c set os/2cmd /c set
        windows windows
        * win9x command.com /c set * win9xcommand.com /c set
        * other cmd /c set * othercmd /c set
        z/os /bin/env OR /usr/bin/env OR env (depending on read rights) z/os/bin/env OR /usr/bin/env OR env (depending on read rights)
        unix /bin/env OR /usr/bin/env OR env (depending on read rights) unix/bin/env OR /usr/bin/env OR env (depending on read rights)
        netware env netwareenv
        os/400 env os/400env
        openvms show logical openvmsshow logical
        -

        diff -Nru ant-1.9.10/manual/Tasks/pvcstask.html ant-1.10.3/manual/Tasks/pvcstask.html --- ant-1.9.10/manual/Tasks/pvcstask.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/pvcstask.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,234 +14,186 @@ See the License for the specific language governing permissions and limitations under the License. --> - - PVCS task -

        -Apache Ant Pvcs Task User Manual

        +

        Apache Ant Pvcs Task User Manual

        -

        Note: -Before using this task, the user running Ant must have access to the -commands of PVCS (get and pcli) and must have access to the -repository. Note that the way to specify the repository is platform -dependent so use property to specify location of repository. -

        - -by -
        +

        Note: Before using this task, the user running Ant must have access to the +commands of PVCS (get and pcli) and must have access to the +repository. Note that the way to specify the repository is platform dependent so use property to +specify location of repository.

        +

        by

        + -Version 1.1 - 2001/06/27
        -

        Problems with UNC pathnames and the use of () in paths are fixed and an updateonly - argument introduced.

        -Version 1.0 - 2001/01/31
        +

        Version 1.1—2001/06/27

        +

        Problems with UNC pathnames and the use of () in paths are fixed and +an updateonly argument introduced.

        +

        Version 1.0—2001/01/31

        Initial release.

        -
        -

        -Table of Contents

        + +
        + +

        Table of Contents

        -
        -

        Introduction

        -The pvcs task allows the user of Ant to extract the latest edition -of the source code from a PVCS repository. PVCS is a version control system -developed by Merant. -
        -This version has been tested against PVCS version 6.5 and 6.6 under Windows and Solaris. +
        -
        -

        Pvcs Task

        -

        Description

        -The pvcs task is set to point at a PVCS repository and optionally a project -within that repository, and can from that specification get the latest -version of the files contained by the repository. -

        -Parameters

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        AttributeDescriptionRequired
        repositoryThe location of the repository (see your PVCS -manuals)Yes
        pvcsprojectThe project within the PVCS repository to extract -files from ("/" is root project and that is default if this attribute isn't -specified)No
        labelOnly files marked with this label are extracted.No
        promotiongroupOnly files within this promotion group are extracted. Using -both the label and the promotiongroup tag will cause the files in the -promotion group and with that label to be extracted. -No
        configpath of a non default .cfg file. -Can be given absolute or relative to Ant's base directory. -No
        forceIf set to yes all files that exists and are writable are overwritten. Default no causes the files that are writable to be ignored. This stops the PVCS command get to stop asking questions!No
        workspaceBy specifying a workspace, the files are extracted to that location. A PVCS workspace is a -name for a location of the workfiles and isn't as such the location itself. You define the location for a workspace -using the PVCS GUI clients. If this isn't specified the default workspace for the current user is used.No
        pvcsbinOn some systems the PVCS executables pcli -and get are not found in the PATH. In such cases this attribute -should be set to the bin directory of the PVCS installation containing -the executables mentioned before. If this attribute isn't specified the -tag expects the executables to be found using the PATH environment variable.No
        ignorereturncodeIf set to true the return value from executing - the pvcs commands are ignored.No
        updateonlyIf set to true files are gotten only if - newer than existing local files.No
        filenameformatThe format of your folder names in a - format suitable for java.text.MessageFormat. - Defaults to {0}-arc({1}). Repositories where - the archive extension is not -arc should set - this.No
        linestartUsed to parse the output of the pcli - command. It defaults to "P:. The parser already - knows about / and \\, this property is useful in cases where the - repository is accessed on a Windows platform via a drive letter - mapping.No
        revisionRetrieve the specified revision.No
        useridUse the specified userid.No
        -

        Nested Elements

        +

        Introduction

        +

        The pvcs task allows the user of Ant to extract the latest edition of the source +code from a PVCS (Polytron Version +Control System) repository. It is currently owned +by MicroFocus.

        +

        This version has been tested against PVCS version 6.5 and 6.6 under Windows and Solaris.

        -

        pvcsproject element

        -

        pvcs supports a nested -<pvcsproject> element, that represents a project -within the PVCS repository to extract files from. By nesting multiple -<pvcsproject> elements under the -<pvcs> task, multiple projects can be -specified.

        +
        +

        Pvcs Task

        +

        Description

        +

        The pvcs task is set to point at a PVCS repository and optionally a project within +that repository, and can from that specification get the latest version of the files contained by +the repository.

        Parameters

        - - - - - - - - - - - - - +
        AttributeDescriptionRequired
        nameThe name of the pvcs project
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDescriptionRequired
        repositoryThe location of the repository (see your PVCS manuals).Yes
        pvcsprojectThe project within the PVCS repository to extract files from.No; defaults to root project, /
        labelOnly files marked with this label are extracted.No
        promotiongroupOnly files within this promotion group are extracted. Using both the label and + the promotiongroup tag will cause the files in the promotion group and with that + label to be extracted.No
        configpath of a non default .cfg file. Can be given absolute or relative to + project's base directory.No
        forceIf set to yes all files that exists and are writable are + overwritten. Default no causes the files that are writable to be ignored. This stops + the PVCS command get to stop asking questions!No; default is no
        workspaceBy specifying a workspace, the files are extracted to that location. A PVCS + workspace is a name for a location of the workfiles and isn't as such the location itself. You + define the location for a workspace using the PVCS GUI clients.No; defaults to default workspace for the current user
        pvcsbinOn some systems the PVCS executables pcli and get are not found in + the PATH. In such cases this attribute should be set to the bin + directory of the PVCS installation containing the executables mentioned before. If this + attribute isn't specified the tag expects the executables to be found using + the PATH environment variable.No
        ignorereturncodeIf set to true the return value from executing the PVCS commands are ignored.No
        updateonlyIf set to true files are gotten only if newer than existing local files.No
        filenameformatThe format of your folder names in a format suitable + for java.text.MessageFormat. Repositories where the archive extension is + not -arc should set this.No; defaults to {0}-arc({1})
        linestartUsed to parse the output of the pcli command. The parser already knows + about / and \\, this property is useful in cases where the repository is + accessed on a Windows platform via a drive letter mapping.No; defaults to "P:
        revisionRetrieve the specified revision.No
        useridUse the specified userid.No
        +

        Parameters specified as nested elements

        -
        Yes
        + + + + + + + + + +
        AttributeDescriptionRequired
        nameThe name of the PVCS projectYes

        Examples

        -The following set-up extracts the latest version of the files in the pvcs repository. +

        The following set-up extracts the latest version of the files in the pvcs repository.

        -  <!-- =================================================================== -->
        -  <!-- Get the latest version                                              -->
        -  <!-- =================================================================== -->
        -  <target name="getlatest">
        -    <pvcs repository="/mnt/pvcs" pvcsproject="/myprj"/>
        -  </target>
      - -

      Now run:

      -ant getlatest +<!-- =================================================================== --> +<!-- Get the latest version --> +<!-- =================================================================== --> +<target name="getlatest"> + <pvcs repository="/mnt/pvcs" pvcsproject="/myprj"/> +</target> +

      Now run: ant getlatest

      This will cause the following output to appear:

      -
      +
         getlatest:
         [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86
         [pvcs] Copyright 1985-2000 MERANT. All rights reserved.
      @@ -256,23 +208,21 @@
       
         Total time: 19 seconds
      -This next example extracts the latest version of the files in the pvcs -repository from two projects using nested <pvcsproject> elements. +

      This next example extracts the latest version of the files in the pvcs repository from two +projects using nested <pvcsproject> elements.

      -  <!-- ===================================================================-->
      -  <!-- Get latest from myprj and myprj2                                   -->
      -  <!-- ===================================================================-->
      -  <target name="getlatest2">
      -    <pvcs repository="/mnt/pvcs">
      -      <pvcsproject name="/myprj"/>
      -      <pvcsproject name="/myprj2"/>
      -    </pvcs>
      -  </target>
    - -

    Now run:

    -ant getlatest2 +<!-- ===================================================================--> +<!-- Get latest from myprj and myprj2 --> +<!-- ===================================================================--> +<target name="getlatest2"> + <pvcs repository="/mnt/pvcs"> + <pvcsproject name="/myprj"/> + <pvcsproject name="/myprj2"/> + </pvcs> +</target> +

    Now run: ant getlatest2

    This will cause the following output to appear:

    -
    +
       getlatest2:
       [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86
       [pvcs] Copyright 1985-2000 MERANT.  All rights reserved.
    @@ -289,7 +239,5 @@
     
       Total time: 22 seconds
    -
    -

    PVCS is a registered trademark of MERANT.

    diff -Nru ant-1.9.10/manual/Tasks/recorder.html ant-1.10.3/manual/Tasks/recorder.html --- ant-1.9.10/manual/Tasks/recorder.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/recorder.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,73 +24,66 @@ -

    Record

    +

    Record

    Description

    -

    A recorder is a listener to the current build process that records the -output to a file.

    +

    A recorder is a listener to the current build process that records the output to a file.

    -

    Several recorders can exist at the same time. Each recorder is -associated with a file. The filename is used as a unique identifier for -the recorders. The first call to the recorder task with an unused filename -will create a recorder (using the parameters provided) and add it to the -listeners of the build. All subsequent calls to the recorder task using -this filename will modify that recorders state (recording or not) or other -properties (like logging level).

    - -

    Some technical issues: the file's print stream is flushed for "finished" -events (buildFinished, targetFinished and taskFinished), and is closed on -a buildFinished event.

    +

    Several recorders can exist at the same time. Each recorder is associated with a file. The +filename is used as a unique identifier for the recorders. The first call to +the record task with an unused filename will create a recorder (using the parameters +provided) and add it to the listeners of the build. All subsequent calls to the record +task using this filename will modify that recorder's state (recording or not) or other properties +(like logging level).

    + +

    Some technical issues: the file's print stream is flushed for finished events +(buildFinished, targetFinished and taskFinished), and is closed on +a buildFinished event.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    nameThe name of the file this logger is associated with.yesnameThe name of the file this logger is associated with.Yes
    actionThis tells the logger what to do: should it start - recording or stop? The first time that the recorder task is called for - this logfile, and if this attribute is not provided, then the default - for this attribute is "start". If this attribute is not provided on - subsequent calls, then the state remains as previous. - [Values = {start|stop}, Default = no state change]noactionThis tells the logger what to do: should it start recording or stop? The first time that + the recorder task is called for this logfile, and if this attribute is not provided, then the + default for this attribute is start. If this attribute is not provided on subsequent + calls, then the state remains as previous.No [values = start|stop, default = no state change]
    appendShould the recorder append to a file, or create a new - one? This is only applicable the first time this task is called for - this file. [Values = {yes|no}, Default=no]noappendShould the recorder append to a file, or create a new one? This is only applicable the first + time this task is called for this file.No [values = start|stop, default = no state change]
    emacsmodeRemoves [task] banners like Apache Ant's - -emacs command line switch if set to - true.no, default is falseemacsmodeRemoves [task] banners like Apache Ant's -emacs command line + switch if set to true.No; default is false
    loglevelAt what logging level should this recorder instance - record to? This is not a once only parameter (like append - is) -- you can increase or decrease the logging level as the build process - continues. [Values= {error|warn|info|verbose|debug}, Default = no change] + loglevelAt what logging level should this recorder instance record to? This is not a once only + parameter (like append is)—you can increase or decrease the logging level as + the build process continues. noNo [values = error|warn|info|verbose|debug, default = no change]

    Examples

    -

    The following build.xml snippet is an example of how to use the recorder -to record just the <javac> task:

    +

    The following build.xml snippet is an example of how to use the recorder to record +just the <javac> task:

         ...
         <compile >
    @@ -101,10 +94,9 @@
         ...
     
    -

    The following two calls to <record> set up two -recorders: one to file "records-simple.log" at logging level info -(the default) and one to file "ISO.log" using logging level of -verbose.

    +

    The following two calls to <record> set up two recorders: one to +file records-simple.log at logging level info (the default) and one to +file ISO.log using logging level of verbose.

         ...
         <record name="records-simple.log"/>
    @@ -113,60 +105,49 @@
     

    Notes

    -

    There is some functionality that I would like to be able to add in the -future. They include things like the following:

    - +

    There is some functionality that I would like to be able to add in the future. They include +things like the following:

    +
    - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - - - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    listenerA classname of a build listener to use from this point - on instead of the default listener.nolistenerA classname of a build listener to use from this point on instead of the default + listener.No
    includetargetA comma-separated list of targets to automatically - record. If this value is "all", then all targets are recorded. - [Default = all]noincludetargetA comma-separated list of targets to automatically record. If this value + is all, then all targets are recorded.No; default is all
    excludetargetnoexcludetargetNo
    includetaskA comma-separated list of task to automatically - record or not. This could be difficult as it could conflict with the - includetarget/excludetarget. (e.g.: - includetarget="compile" excludetask="javac", what should - happen?)noincludetaskA comma-separated list of tasks to automatically record or not. This could be + difficult as it may conflict with the includetarget/excludetarget. + (e.g.: includetarget="compile" excludetask="javac", what + should happen?)No
    excludetasknoexcludetaskNo
    actionadd greater flexibility to the action attribute. Things - like close to close the print stream.no
    actionadd greater flexibility to the action attribute. Things like close to + close the print stream.No
    - - - - diff -Nru ant-1.9.10/manual/Tasks/renameextensions.html ant-1.10.3/manual/Tasks/renameextensions.html --- ant-1.9.10/manual/Tasks/renameextensions.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/renameextensions.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,100 +24,82 @@ -

    RenameExtensions

    -

    Deprecated

    -

    This task has been deprecated. Use the move -task with a glob mapper instead.

    +

    RenameExtensions

    +

    Deprecated

    +

    This task has been deprecated. Use the move task +with a glob mapper instead.

    Description

    -

    Renames files in the srcDir directory ending with the -fromExtension string so that they end with the -toExtension string. Files are only replaced if -replace is true -

    -

    See the section on -directory based tasks, on how the -inclusion/exclusion of files works, and how to write patterns. -This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes srcDir) as well as the nested -<include>, <exclude> and -<patternset> elements.

    +

    Renames files in the srcDir directory ending with the fromExtension string +so that they end with the toExtension string. Files are only replaced +if replace is true.

    +

    See the section on directory based tasks, on +how the inclusion/exclusion of files works, and how to write patterns. This task forms an +implicit FileSet and supports most attributes +of <fileset> (dir becomes srcDir) as well as the +nested <include>, <exclude> +and <patternset> elements.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when - omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when - omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
    fromExtensionThe string that files must end in to be renamedYesfromExtensionThe string that files must end in to be renamedYes
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
    replaceWhether the file being renamed to should be - replaced if it already existsNoreplaceWhether the file being renamed to should be replaced if it already existsNo
    srcDirThe starting directory for files to search inYessrcDirThe starting directory for files to search inYes
    toExtensionThe string that renamed files will end with on - completionYestoExtensionThe string that renamed files will end with on completionYes

    Examples

    -
    -

    <renameext srcDir="/source/project1" - includes="**" - excludes="**/samples/*" - fromExtension=".java.keep" - toExtension=".java" - replace="true"/> - -

    -
    - +
    +<renameext srcDir="/source/project1"
    +           includes="**"
    +           excludes="**/samples/*"
    +           fromExtension=".java.keep"
    +           toExtension=".java"
    +           replace="true"/>
    - diff -Nru ant-1.9.10/manual/Tasks/rename.html ant-1.10.3/manual/Tasks/rename.html --- ant-1.9.10/manual/Tasks/rename.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/rename.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,41 +24,40 @@ -

    Rename

    -

    Deprecated

    -

    This task has been deprecated. Use the Move task instead.

    +

    Rename

    +

    Deprecated

    +

    This task has been deprecated. Use the Move task instead.

    Description

    Renames a given file.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    srcfile to rename.Yessrcfile to rename.Yes
    destnew name of the file.Yesdestnew name of the file.Yes
    replaceEnable replacing of existing file (default: on).NoreplaceEnable replacing of existing file.No; default is on

    Examples

    -
      <rename src="foo.jar" dest="${name}-${version}.jar"/>
    -

    Renames the file foo.jar to ${name}-${version}.jar (assuming name - and version being predefined properties). If a file named ${name}-${version}.jar - already exists, it will be removed prior to renaming foo.jar.

    - +
    <rename src="foo.jar" dest="${name}-${version}.jar"/>
    +

    Renames the file foo.jar to ${name}-${version}.jar +(assuming name and version being predefined properties). If a file +named ${name}-${version}.jar already exists, it will be removed prior to +renaming foo.jar.

    - diff -Nru ant-1.9.10/manual/Tasks/replace.html ant-1.10.3/manual/Tasks/replace.html --- ant-1.9.10/manual/Tasks/replace.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/replace.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,219 +24,205 @@ -

    Replace

    +

    Replace

    Description

    -

    Replace is a directory based task for replacing the occurrence of a given string with another string -in selected file.

    -

    If you want to replace a text that crosses line boundaries, you -must use a nested <replacetoken> element.

    +

    Replace is a directory based task for replacing the occurrence of a given string +with another string in selected file.

    +

    If you want to replace a text that crosses line boundaries, you must use a +nested <replacetoken> element.

    -

    The output file is only written if it differs from the existing -file. This prevents spurious rebuilds based on unchanged files which -have been regenerated by this task.

    +

    The output file is only written if it differs from the existing file. This prevents spurious +rebuilds based on unchanged files which have been regenerated by this task.

    Parameters

    - +
    - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    filefile for which the token should be replaced.Exactly one of the two.filefile for which the token should be replaced.Exactly one of the two
    dirThe base directory to use when replacing a token in - multiple files.dirThe base directory to use when replacing a token in multiple files.
    encodingThe encoding of the files upon which replace operates.No - defaults to default JVM encodingencodingThe encoding of the files upon which replace operates.No; defaults to default JVM character encoding
    tokenthe token which must be replaced.Yes, unless a nested - replacetoken element or the replacefilterfile - attribute is used.tokenthe token which must be replaced.Yes, unless a nested replacetoken element or the replacefilterfile + attribute is used.
    valuethe new value for the token. When omitted, an empty string - ("") is used.Novaluethe new value for the token.No; defaults to empty string ()
    summaryIndicates whether a summary of the replace operation - should be produced, detailing how many token occurrences - and files were processed - No, by default no summary is producedsummaryIndicates whether a summary of the replace operation should be produced, detailing how many + token occurrences and files were processedNo; defaults to no summary
    propertyFilevalid property file from which properties specified using nested <replacefilter> elements are drawn.Yes only if property attribute of <replacefilter> is used.propertyFilevalid property file from which properties specified using + nested <replacefilter> elements are drawn.Yes, only if property attribute of <replacefilter> is + used.
    replacefilterfilevalid property file. Each property will be - treated as a replacefilter where token is the name of - the property and value is the properties value. - No.replacefilterfilevalid property file. Each property will be treated as a replacefilter + where token is the name of the property and value is the property's + value.No
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    preserveLastModifiedKeep the file timestamp(s) even if the file(s) - is(are) modified. since Apache Ant 1.8.0.No, defaults to falsepreserveLastModifiedKeep the file timestamp(s) even if the file(s) is(are) modified. since Apache Ant + 1.8.0.No; defaults to false
    failOnNoReplacementsWhether to fail the build if the task didn't do - anything. since Ant 1.8.0.No, defaults to falsefailOnNoReplacementsWhether to fail the build if the task didn't do anything. since Ant 1.8.0.No; defaults to false

    Examples

    -
      <replace file="${src}/index.html" token="@@@" value="wombat"/>
    -

    replaces occurrences of the string "@@@" with the string -"wombat", in the file ${src}/index.html.

    +
    <replace file="${src}/index.html" token="@@@" value="wombat"/>
    +

    replaces occurrences of the string @@@ with the string wombat, in the +file ${src}/index.html.

    Parameters specified as nested elements

    -

    This task forms an implicit FileSet and -supports most attributes of <fileset> as well as the -nested <include>, <exclude> and -<patternset> elements.

    -

    Since Ant 1.8.0 this task supports any filesystem - based resource - collections as nested elements.

    +

    This task forms an implicit FileSet and supports most +attributes of <fileset> as well as the +nested <include>, <exclude> +and <patternset> elements.

    +

    Since Ant 1.8.0, this task supports any filesystem +based resource collections as nested elements.

    replacetoken and replacevalue

    -

    If either the text you want to replace or the replacement text -cross line boundaries, you can use nested elements to specify -them.

    +

    If either the text you want to replace or the replacement text cross line boundaries, you can use +nested elements to specify them.

    The elements support attributes:

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    expandPropertiesWhether to expand properties in the nested text. - since Ant 1.8.0.No, defaults to true.expandPropertiesWhether to expand properties in the nested text. Since Ant 1.8.0.No; defaults to true

    Examples

    -
    +
     <replace dir="${src}" value="wombat">
       <include name="**/*.html"/>
       <replacetoken><![CDATA[multi line
     token]]></replacetoken>
    -</replace>
    -
    -

    replaces occurrences of the string "multi -line\ntoken" with the string "wombat", in all -HTML files in the directory ${src}.Where \n is -the platform specific line separator.

    -
    +</replace>
    +

    replaces occurrences of the string multi line\ntoken with the string wombat, +in all HTML files in the directory ${src}. Here, \n is the platform +specific line separator.

    +
     <replace file="${src}/index.html">
       <replacetoken><![CDATA[two line
     token]]></replacetoken>
       <replacevalue><![CDATA[two line
     token]]></replacevalue>
    -</replace>
    -
    +</replace>

    replacefilter

    -

    In addition to allowing for multiple replacements, optional nested <replacefilter> elements allow replacement values to be extracted from a property file. The name of this file is specified using the <replace> attribute propertyFile. -

    - - - - - +

    In addition to allowing for multiple replacements, optional +nested <replacefilter> elements allow replacement values to be extracted from a +property file. The name of this file is specified using the <replace> +attribute propertyFile.

    +
    AttributeDescriptionRequired
    + + + + - - - + + - - - + + + - - + +
    AttributeDescriptionRequired
    tokenThe string to search for.Yes unless a nested replacetoken + tokenThe string to search for.Yes, unless a nested replacetoken is specified
    valueThe replacement string.Either may be specified, but not both. Both can be omitted, if desired.valueThe replacement string.Either may be specified, but not both. Both can be omitted, if desired.
    propertyName of the property whose value is to serve as the replacement value.propertyName of the property whose value is to serve as the replacement value.
    -

    Since Ant 1.8.0 token and value can be specified as nested elements - just like in the task itself.

    -

    If neither value nor property is used, the value provided using the <replace> attribute value and/or the <replacevalue> element is used. If no value was specified using either of these options, the token is replaced with an empty string. -

    +

    Since Ant 1.8.0, token and value can be specified as nested +elements just like in the task itself.

    +

    If neither value nor property is used, the value provided using +the <replace> attribute value and/or +the <replacevalue> element is used. If no value was specified using either of +these options, the token is replaced with an empty string.

    Examples

    -
    -<replace 
    -    file="configure.sh"
    -    value="defaultvalue"
    -    propertyFile="src/name.properties">
    -  <replacefilter 
    -    token="@token1@"/>
    -  <replacefilter 
    -    token="@token2@" 
    -    value="value2"/>
    -  <replacefilter 
    -    token="@token3@" 
    -    property="property.key"/>
    +
    +<replace file="configure.sh"
    +         value="defaultvalue"
    +         propertyFile="src/name.properties">
    +  <replacefilter token="@token1@"/>
    +  <replacefilter token="@token2@"
    +                 value="value2"/>
    +  <replacefilter token="@token3@"
    +                 property="property.key"/>
       <replacefilter>
    -    <replacetoken>@token4@</replacetoken> 
    +    <replacetoken>@token4@</replacetoken>
         <replacevalue>value4</replacevalue>
       </replacefilter>
    -</replace>
    -
    -

    In file configure.sh, replace all instances of "@token1@" with "defaultvalue", all instances of "@token2@" with "value2", and all instances of "@token3@" with the value of the property "property.key", as it appears in property file src/name.properties.

    -

    Note: It is possible to use either the token/<replacetoken> and value/<replacevalue> attributes/elements, the nested replacefilter elements, or both in the same operation. -

    - +</replace> +

    In file configure.sh, replace all instances of @token1@ +with defaultvalue, all instances of @token2@ with value2, and all instances +of @token3@ with the value of the property property.key, as it appears in +property file src/name.properties.

    +

    Note: It is possible to use either +the token/<replacetoken> +and value/<replacevalue> attributes/elements, the +nested replacefilter elements, or both in the same operation.

    - diff -Nru ant-1.9.10/manual/Tasks/replaceregexp.html ant-1.10.3/manual/Tasks/replaceregexp.html --- ant-1.9.10/manual/Tasks/replaceregexp.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/replaceregexp.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,75 +23,73 @@ -

    ReplaceRegExp

    +

    ReplaceRegExp

    Description

    -

    ReplaceRegExp is a directory based task for replacing the -occurrence of a given regular expression with a substitution pattern -in a selected file or set of files.

    - -

    The output file is only written if it differs from the existing -file. This prevents spurious rebuilds based on unchanged files which -have been regenerated by this task.

    - -

    Similar to regexp -type mappers this task needs a supporting regular expression -library and an implementation of -org.apache.tools.ant.util.regexp.Regexp. -See details in the documentation of the Regexp Type.

    +

    ReplaceRegExp is a directory based task for replacing the occurrence of a given +regular expression with a substitution pattern in a selected file or set of files.

    + +

    The output file is only written if it differs from the existing file. This prevents spurious +rebuilds based on unchanged files which have been regenerated by this task.

    + +

    Similar to regexp type mappers this task needs a +supporting regular expression library and an implementation +of org.apache.tools.ant.util.regexp.Regexp. See details in the +documentation of the Regexp Type.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    filefile for which the regular expression should be replaced.Yes if no nested <fileset> is usedfilefile for which the regular expression should be replaced.Yes, unless nested <fileset> is used
    matchThe regular expression pattern to match in the file(s)Yes, if no nested <regexp> is usedmatchThe regular expression pattern to match in the file(s)Yes, unless nested <regexp> is used
    replaceThe substitution pattern to place in the file(s) in place - of the regular expression.Yes, if no nested <substitution> is usedreplaceThe substitution pattern to place in the file(s) in place of the regular expression.Yes, unless nested <substitution> is used
    flagsThe flags to use when matching the regular expression. For more - information, consult the Perl5 syntax
    - g : Global replacement. Replace all occurrences found
    - i : Case Insensitive. Do not consider case in the match
    - m : Multiline. Treat the string as multiple lines of input, using "^" and "$" as the start or end of any line, respectively, rather than start or end of string.
    - s : Singleline. Treat the string as a single line of input, using "." to match any character, including a newline, which normally, it would not match.
    +
    flagsThe flags to use when matching the regular expression. For more information, consult the + Perl 5 syntax
    + g : Global replacement. Replace all occurrences found
    + i : Case Insensitive. Do not consider case in the match
    + m : Multiline. Treat the string as multiple lines of input, using ^ + and $ as the start or end of any line, respectively, rather than start or end of + string.
    + s : Singleline. Treat the string as a single line of input, using . to match + any character, including a newline, which normally, it would not match.
    NoNo
    bylineProcess the file(s) one line at a time, executing the replacement - on one line at a time (true/false). This is useful if you - want to only replace the first occurrence of a regular expression on - each line, which is not easy to do when processing the file as a whole. - Defaults to false.NobylineProcess the file(s) one line at a time, executing the replacement on one line at a time + (true|false). This is useful if you want to only replace the first occurrence of a + regular expression on each line, which is not easy to do when processing the file as a + whole.No; defaults to false
    encodingThe encoding of the file. since Apache Ant 1.6No - defaults to default JVM encodingencodingThe encoding of the file. since Apache Ant 1.6No; defaults to default JVM character encoding
    preserveLastModifiedKeep the file timestamp(s) even if the file(s) - is(are) modified. since Ant 1.8.0.No, defaults to falsepreserveLastModifiedKeep the file timestamp(s) even if the file(s) is(are) modified. since Ant + 1.8.0.No; defaults to false

    Examples

    @@ -99,107 +97,81 @@ <replaceregexp file="${src}/build.properties" match="OldProperty=(.*)" replace="NewProperty=\1" - byline="true" -/> - -

    replaces occurrences of the property name "OldProperty" - with "NewProperty" in a properties file, preserving the existing -value, in the file ${src}/build.properties

    + byline="true"/> +

    replaces occurrences of the property name OldProperty with NewProperty in a +properties file, preserving the existing value, in the file ${src}/build.properties

    Parameters specified as nested elements

    -

    This task supports a nested FileSet - element.

    -

    Since Ant 1.8.0 this task supports any filesystem - based resource - collections as nested elements.

    -

    This task supports a nested Regexp element to specify - the regular expression. You can use this element to refer to a previously - defined regular expression datatype instance.

    -
    - <regexp id="id" pattern="alpha(.+)beta"/>
    - <regexp refid="id"/> -
    -

    This task supports a nested Substitution element to specify - the substitution pattern. You can use this element to refer to a previously - defined substitution pattern datatype instance.

    -
    - <substitution id="id" expression="beta\1alpha"/>
    - <substitution refid="id"/> -
    +

    This task supports a nested FileSet element.

    +

    Since Ant 1.8.0, this task supports any filesystem +based resource collections as nested elements.

    +

    This task supports a nested Regexp element to specify the +regular expression. You can use this element to refer to a previously defined regular expression +datatype instance.

    +
    +<regexp id="id" pattern="alpha(.+)beta"/>
    +<regexp refid="id"/>
    + +

    This task supports a nested substitution element to specify the substitution +pattern. You can use this element to refer to a previously defined substitution pattern datatype +instance.

    + +
    +<substitution id="id" expression="beta\1alpha"/>
    +<substitution refid="id"/>

    Examples

    -
    -
    +
     <replaceregexp byline="true">
    -  <regexp pattern="OldProperty=(.*)"/>
    -  <substitution expression="NewProperty=\1"/>
    -  <fileset dir=".">
    -    <include name="*.properties"/>
    -  </fileset>
    -</replaceregexp>
    -
    -

    replaces occurrences of the property name "OldProperty" - with "NewProperty" in a properties file, preserving the existing -value, in all files ending in .properties in the current directory

    - -
    -
    -
    <replaceregexp match="\s+" replace=" " flags="g" byline="true">
    +    <regexp pattern="OldProperty=(.*)"/>
    +    <substitution expression="NewProperty=\1"/>
    +    <fileset dir=".">
    +        <include name="*.properties"/>
    +    </fileset>
    +</replaceregexp>
    +

    replaces occurrences of the property name OldProperty with NewProperty in a +properties file, preserving the existing value, in all files ending in .properties in +the current directory

    + +
    +<replaceregexp match="\s+" replace=" " flags="g" byline="true">
         <fileset dir="${html.dir}" includes="**/*.html"/>
    -</replaceregexp>
    -
    -

    replaces all whitespaces (blanks, tabs, etc) by one blank remaining the -line separator. So with input -

    +</replaceregexp> +

    replaces all whitespaces (blanks, tabs, etc) by one blank remaining the line separator. So with +input

    +
     <html>    <body>
    -<<TAB>><h1>    T E S T   </h1>  <<TAB>>    
    -<<TAB>> </body></html>
    -
    -would converted to -
    +<<TAB>><h1> T E S T </h1> <<TAB>> +<<TAB>> </body></html> +

    would converted to

     <html> <body>
    - <h1> T E S T </h1> </body></html>
    -
    -
    -

    - -
    -
    -
    <replaceregexp match="\\n" replace="${line.separator}" flags="g" byline="true">
    + <h1> T E S T </h1> </body></html>
    + +
    + +
    +<replaceregexp match="\\n" replace="${line.separator}" flags="g" byline="true">
         <fileset dir="${dir}"/>
    -</replaceregexp>
    -
    -

    replaces all \n markers (beware the quoting of the backslash) by a line break. -So with input -

    -
    -one\ntwo\nthree
    -
    -would converted to -
    +</replaceregexp> +

    replaces all \n markers (beware the quoting of the backslash) by a line break. So with +input

    +
    one\ntwo\nthree
    +

    would converted to

     one
     two
    -three
    -
    -
    -Beware that inserting line breaks could break file syntax. For example in xml: -
    +three + +

    Beware that inserting line breaks could break file syntax. For example in xml:

     <root>
    -  <text>line breaks \n should work in text</text>
    -  <attribute value="but breaks \n attributes" />
    -</root>
    -
    -
    -

    - - + <text>line breaks \n should work in text</text> + <attribute value="but breaks \n attributes"/> +</root> - diff -Nru ant-1.9.10/manual/Tasks/resourcecount.html ant-1.10.3/manual/Tasks/resourcecount.html --- ant-1.9.10/manual/Tasks/resourcecount.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/resourcecount.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,60 +25,61 @@

    ResourceCount

    - +

    Since Apache Ant 1.7

    Description

    -

    Display or set a property containing the size of a nested - Resource Collection. - Can also be used as a condition. Since Apache Ant 1.7

    +

    Display or set a property containing the size of a +nested resource collection. Can also be used as +a condition.

    Parameters

    - +
    + + + + + - - - + + - - - + + + + - - - + + + - - - + + + + - - - + + + +
    AttributeDescriptionRequired
    AttributeDescriptionRequiredTaskCondition
    propertyThe property to set. If omitted the results are written - to the log. Ignored when processing as a condition.NopropertyThe property to set.No; by default, output value to the logIgnored
    refidA reference - to a Resource Collection. - Yes, unless a nested Resource Collection is supplied - refidA reference to a resource collection.Yes, unless a nested resource collection is supplied
    countComparison count for processing as a condition.Yes, in condition modecountComparison count.IgnoredYes
    whenComparison type: "equal", "eq", "greater", "gt", "less", - "lt", "ge" (greater or equal), "ne" (not equal), "le" (less or equal) - for use when operating as a condition.No; default is "equal"whenComparison + type: equal, eq, greater, gt, less, lt, ge + (greater or equal), ne (not equal), le (less or equal).IgnoredNo; default is equal

    Parameters specified as nested elements

    -

    Resource Collection

    -

    A single - Resource Collection -should be specified via a nested element or the refid attribute. -

    +

    resource collection

    +

    A single resource collection should be specified +via a nested element or the refid attribute.

    Examples

    -
    <resourcecount property="count.foo">
    -  <filelist dir="." files="foo,bar" />
    -</resourcecount>
    -
    -

    Stores the number of resources in the specified filelist (two) -in the property named count.foo.

    +
    +<resourcecount property="count.foo">
    +  <filelist dir="." files="foo,bar"/>
    +</resourcecount>
    +

    Stores the number of resources in the specified filelist (two) in the property +named count.foo.

     <project>
    @@ -96,12 +97,9 @@
         </tokens>
       </resourcecount>
       <echo>The file '${file}' has ${file.lines} lines.</echo>
    -</project>
    -
    -

    Stores the number of lines of the current buildfile in the property file.lines. -Requires Ant 1.7.1+ as <concat> has to be resource.

    - +</project> +

    Stores the number of lines of the current buildfile in the property file.lines. +Requires Ant 1.7.1+ as <concat> has to be a resource.

    - diff -Nru ant-1.9.10/manual/Tasks/retry.html ant-1.10.3/manual/Tasks/retry.html --- ant-1.9.10/manual/Tasks/retry.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/retry.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,28 +23,29 @@

    Retry

    +

    Since Apache Ant 1.7.1

    Description

    -

    Retry is a container which executes a single nested task until either: there is no failure; or: -its retrycount has been exceeded. If this happens a BuildException is thrown. -Since Apache Ant 1.7.1

    +

    Retry is a container which executes a single nested task until either: there is no +failure; or: its retrycount has been exceeded. If this happens +a BuildException is thrown.

    Parameters

    - - - - - +
    AttributeDescriptionRequired
    + + + + - - - - + + + + - - - - + + + +
    AttributeDescriptionRequired
    retrycountnumber of times to attempt to execute the nested taskYes
    retrycountnumber of times to attempt to execute the nested taskYes
    retrydelaynumber of milliseconds to wait between retry attempts - task. Since Apache Ant 1.8.3No, defaults to no delay
    retrydelaynumber of milliseconds to wait between retry attempts task. Since Apache Ant + 1.8.3No; defaults to no delay

    Any valid Ant task may be embedded within the retry task.

    @@ -52,10 +53,10 @@

    Example

     <retry retrycount="3">
    -  <get src="http://www.unreliable-server.com/unreliable.tar.gz" 
    -       dest="/home/retry/unreliable.tar.gz" />
    -</retry>
    -
    -

    This example shows how to use <retry> to wrap a task which must interact with an unreliable network resource.

    + <get src="http://www.unreliable-server.com/unreliable.tar.gz" + dest="/home/retry/unreliable.tar.gz"/> +</retry> +

    This example shows how to use <retry> to wrap a task which must interact with +an unreliable network resource.

    diff -Nru ant-1.9.10/manual/Tasks/rexec.html ant-1.10.3/manual/Tasks/rexec.html --- ant-1.9.10/manual/Tasks/rexec.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/rexec.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,22 +24,23 @@ -

    RExec

    +

    RExec

    Description

    -Task to automate a remote rexec session. Just like the Telnet task, -it uses nested <read> to indicate strings to wait for, and -<write> tags to specify text to send to the remote process. - -

    Note: This task depends on external libraries not included in the Apache Ant distribution. -See Library Dependencies for more information.

    - -

    You can specify the commands you want to execute as nested elements -or via the command attribute, we recommend you use the command -attribute. If you use the command attribute, you must use the -username and password attributes as well.

    +

    Task to automate a remote rexec session. Just like the Telnet task, it uses +nested <read> to indicate strings to wait for, and +<write> tags to specify text to send to the remote +process.

    + +

    Note: This task depends on external libraries not included in the Apache Ant +distribution. See Library Dependencies for more +information.

    + +

    You can specify the commands you want to execute as nested elements or via the command +attribute, we recommend you use the command attribute. If you use the command +attribute, you must use the username and password attributes as well.

    Parameters

    - +
    @@ -67,50 +68,40 @@ - - + + - - + +
    Attribute Values
    portthe port number of the remote rexec server. Defaults to port 512 in BSD Unix systems.Nothe port number of the remote rexec server.No; defaults to 512 in Unix
    timeoutset a default timeout to wait for a response. Specified in seconds. Default is no timeout.Noset a default timeout to wait for a response, specified in seconds.No; default is no timeout
    -

    Nested Elements

    -The input to send to the server, and responses to wait for, are -described as nested elements. +

    Parameters specified as nested elements

    +

    The input to send to the server, and responses to wait for, are described as nested elements.

    read

    -

    declare (as a text child of this element) a string to wait for. -The element supports the timeout attribute, which overrides any -timeout specified for the task as a whole. It also has a string -attribute, which is an alternative to specifying the string as -a text element. -

    -It is not necessary to declare a closing <read> element like for the Telnet task. The connection is not broken until the command has completed and -the input stream (output of the command) is terminated. - +

    declare (as a text child of this element) a string to wait for. The element supports +the timeout attribute, which overrides any timeout specified for the task as a whole. It +also has a string attribute, which is an alternative to specifying the string as a text +element.

    +

    It is not necessary to declare a closing <read> element like for +the Telnet task. The connection is not broken until the command has completed and the +input stream (output of the command) is terminated.

    +

    write

    -

    describes the text to send to the server. The echo boolean -attribute controls whether the string is echoed to the local log; -this is "true" by default -

    +

    describes the text to send to the server. The echo boolean attribute controls whether +the string is echoed to the local log; this is true by default.

    Example

    -A simple example of connecting to a server and running a command. +

    A simple example of connecting to a server and running a command.

    -
    -<rexec userid="bob" password="badpass" server="localhost" command="ls"/>
    -
    - -The task can be used with other ports as well: -
    -<rexec port="80" userid="bob" password="badpass" server="localhost" command="ls"/>
    -
    +
    <rexec userid="bob" password="badpass" server="localhost" command="ls"/>
    +

    The task can be used with other ports as well:

    +
    <rexec port="80" userid="bob" password="badpass" server="localhost" command="ls"/>
    - diff -Nru ant-1.9.10/manual/Tasks/rmic.html ant-1.10.3/manual/Tasks/rmic.html --- ant-1.9.10/manual/Tasks/rmic.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/rmic.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,322 +24,293 @@ -

    Rmic

    +

    Rmic

    Description

    -

    Runs the rmic compiler for a certain class.

    -

    Rmic can be run on a single class (as specified with the classname -attribute) or a number of classes at once (all classes below base that -are neither _Stub nor _Skel classes). If you want to rmic a single -class and this class is a class nested into another class, you have to -specify the classname in the form Outer$$Inner instead of -Outer.Inner.

    -

    It is possible to refine the set of files that are being rmiced. This can be -done with the includes, includesfile, excludes, excludesfile and defaultexcludes -attributes. With the includes or includesfile attribute you specify the files you want to -have included by using patterns. The exclude or excludesfile attribute is used to specify -the files you want to have excluded. This is also done with patterns. And -finally with the defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the +

    Runs the rmic compiler for a certain class.

    +

    Rmic can be run on a single class (as specified with the classname attribute) or a +number of classes at once (all classes below base that are neither _Stub +nor _Skel classes). If you want to rmic a single class and this class is +a class nested into another class, you have to specify the classname in the +form Outer$$Inner instead of Outer.Inner.

    +

    It is possible to refine the set of files that are being rmiced. This can be done +with the includes, includesfile, excludes, excludesfile +and defaultexcludes attributes. With the includes or includesfile +attribute you specify the files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This is +also done with patterns. And finally with the defaultexcludes attribute, you can specify +whether you want to use default exclusions or not. See the section +on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.

    -

    This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes base) as well as the nested -<include>, <exclude> and -<patternset> elements.

    -

    It is possible to use different compilers. This can be selected -with the "build.rmic" property, the compiler -attribute. or a nested element. -Here are the choices:

    +

    This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes base) as well as the +nested <include>, <exclude> +and <patternset> elements.

    +

    It is possible to use different compilers. This can be selected with +the build.rmic property, the compiler attribute, or a nested element. Here +are the choices:

      -
    • default -the default compiler (kaffe, sun or forking) for the platform. -
    • sun (the standard compiler of the JDK < JDK 9)
    • -
    • kaffe (the standard compiler of Kaffe)
    • -
    • weblogic
    • -
    • forking - the sun compiler forked into a separate process (since - Apache Ant 1.7). Starting with Ant 1.9.8 this is the default when - running on JDK 9+.
    • -
    • xnew - the sun compiler forked into a separate process, - with the -Xnew option (since Ant 1.7). - This is the most reliable way to use -Xnew. -

      JDK9 has removed support for -Xnew and starting with Ant - 1.9.8 this option will be rejected by ant when running on JDK9.
    • -
    • "" (empty string). This has the same behaviour as not setting the compiler attribute. - First the value of build.rmic is used if defined, and if not, the default - for the platform is chosen. If build.rmic is set to this, you get the default. - +
    • default—the default compiler (kaffe, sun or forking) for the + platform. +
    • sun—the standard compiler prior to JDK 9
    • +
    • kaffe—the standard compiler of Kaffe
    • +
    • weblogic
    • +
    • forking—(since Apache Ant 1.7) the sun compiler forked into a + separate process. Since Ant 1.9.8, this is the default when running on JDK 9+.
    • +
    • xnew—(since Ant 1.7) the sun compiler forked into a separate + process, with the -Xnew option. This is the most reliable way to + use -Xnew.
      JDK 9 has removed support for -Xnew and since Ant + 1.9.8 this option will be rejected when running on JDK 9+.
    • +
    • (empty string). This has the same behaviour as not setting the compiler attribute. + First the value of build.rmic is used if defined, and if not, the default for the + platform is chosen. If build.rmic is set to this, you get the default.
    -

    The miniRMI -project contains a compiler implementation for this task as well, -please consult miniRMI's documentation to learn how to use it.

    +

    The miniRMI project contains a compiler implementation for this task as well, please +consult miniRMI's documentation to learn how to use it.

    + +

    CORBA support

    + +

    Java 11 removes the Java EE and +CORBA packages and rmic no longer supports either -iiop +or -idl options. Starting with Ant 1.10.3, the rmic task will fail when using +either while running Java 11+ unless you fork the task and explicitly specify an executable.

    Parameters

    - +
    - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    basethe location to store the compiled files. - Also serves as the parent directory for any non-Fileset includes, etc. - (This functionality has remained unchanged.)*1
    basethe location to store the compiled files. Also serves as the parent directory for any + non-Fileset includes, etc. (This functionality has remained unchanged.)See note
    destdirthe location to store the compiled files.destdirthe location to store the compiled files.
    classnamethe class for which to run rmic.Noclassnamethe class for which to run rmic.No
    filteringindicates whether token filtering should take placeNofilteringindicates whether token filtering should take placeNo
    sourcebasePass the "-keepgenerated" flag to rmic and - move the generated source file to the given sourcebase directory.NosourcebasePass the -keepgenerated flag to rmic and move the generated source + file to the given sourcebase directory.No
    stubversionSpecify the JDK version for the generated stub code. - Specify "1.1" to pass the "-v1.1" option to rmic, - "1.2" for -v12, compat for -vcompat.
    - Since Ant1.7, if you do not specify a version, and do not ask - for iiop or idl files, "compat" is selected. - -
    No, default="compat"stubversionSpecify the JDK version for the generated stub code. Specify 1.1 to pass + the -v1.1 option to rmic, 1.2 + for -v1.2, compat for -vcompat.
    Since Ant 1.7, if + you do not specify a version, and do not ask for .iiop or .idl + files, compat is selected.
    No; default is compat
    classpathThe classpath to use during compilationNoclasspathThe classpath to use during compilationNo
    classpathrefThe classpath to use during compilation, given as reference to a PATH defined elsewhereNoclasspathrefThe classpath to use during compilation, given + as reference to a path defined elsewhereNo
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    verifycheck that classes implement Remote before handing them - to rmic (default is false)Noverifycheck that classes implement Remote before handing them to rmicNo; default is false
    iiopindicates that portable (RMI/IIOP) stubs should be generatedNoiiopindicates that portable (RMI/IIOP) stubs should be generated.
    See the note on CORBA + support above.
    No
    iiopoptsadditional arguments for IIOP class generationNoiiopoptsadditional arguments for IIOP class generationNo
    idlindicates that IDL output files should be generatedNoidlindicates that IDL output files should be generated.
    See the note on CORBA support + above.
    No
    idloptsadditional arguments for IDL file generationNoidloptsadditional arguments for IDL file generationNo
    debuggenerate debug info (passes -g to rmic). Defaults to false.Nodebuggenerate debug info (passes -g to rmic)No; defaults to false
    includeAntRuntimewhether to include the Ant run-time libraries; - defaults to yes.NoincludeAntRuntimewhether to include the Ant run-time librariesNo; defaults to yes
    includeJavaRuntimewhether to include the default run-time - libraries from the executing VM; defaults to no.NoincludeJavaRuntimewhether to include the default run-time libraries from the executing JVMNo; defaults to no
    extdirslocation of installed extensions.Noextdirslocation of installed extensionsNo
    compilerThe compiler implementation to use. - If this attribute is not set, the value of the - build.rmic property, if set, will be used. - Otherwise, the default compiler for the current VM will be used. - (See the above list of valid - compilers.)NocompilerThe compiler implementation to use. (See the above list of + valid compilers.)No; defaults to the value of the build.rmic property, if set, and the default + compiler for the current JDK otherwise
    executableComplete path to the rmic - executable to use in case of the forking - or xnew compiler. - Defaults to the rmic compiler of the Java version that is currently - running Ant.
    - Since Ant 1.8.0.
    NoexecutableComplete path to the rmic executable to use in case of the forking + or xnew compiler. Since Ant 1.8.0.No; defaults to the rmic compiler of JDK that is currently running Ant
    listfilesIndicates whether the source files to be compiled will - be listed; defaults to no.
    - Since Ant 1.8.0.
    NolistfilesIndicates whether the source files to be compiled will be listed. Since Ant + 1.8.0.No; defaults to no
    -

    *1: +

    Note:

      -
    • Maintaining compatibility, base, when specified by - itself, serves as both the parent directory for any source files - AND the output directory.
    • -
    • destdir can be used to specify the output - directory, allowing for base to be used as the parent - directory for any source files.
    • -
    • At least one of either base or destdir - must be specified and exist, or a runtime error will - occur.
    • +
    • Maintaining compatibility, base, when specified by itself, serves as both the + parent directory for any source files AND the output directory.
    • +
    • destdir can be used to specify the output directory, allowing for base + to be used as the parent directory for any source files.
    • +
    • At least one of either base or destdir must be specified and exist, or + an error will occur at run time.
    -

    Parameters specified as nested elements

    classpath and extdirs

    -

    Rmic's classpath and extdirs attributes are PATH like structure and can also be set via a nested -classpath and extdirs elements.

    +

    Rmic's classpath and extdirs attributes +are path-like structure and can also be set via a nested +classpath and extdirs elements.

    compilerarg

    -

    You can specify additional command line arguments for the compiler -with nested <compilerarg> elements. These elements -are specified like Command-line -Arguments but have an additional attribute that can be used to -enable arguments only if a given compiler implementation will be -used.

    - +

    You can specify additional command line arguments for the compiler with +nested <compilerarg> elements. These elements are specified +like Command-line Arguments but have an additional attribute that +can be used to enable arguments only if a given compiler implementation will be used.

    +
    - - - + + + - - - + + + - + - + - + - - + - + Since Ant 1.8. + - - + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    valueSee - Command-line Arguments.Exactly one of these.valueSee Command-line Arguments.Exactly one of these
    lineline
    filefile
    pathpath
    prefixSee + prefixSee Command-line Arguments. - Since Ant 1.8.NoNo
    suffixNosuffixNo
    compilerOnly pass the specified argument if the chosen - compiler implementation matches the value of this attribute. - Legal values are the - same as those in the above list of valid - compilers.)NocompilerOnly pass the specified argument if the chosen compiler implementation matches the value of + this attribute. Legal values are the same as those in the + above list of valid compilers.)No
    -

    compilerclasspath since Ant 1.8.0

    - -

    A PATH like structure holding the - classpath to use when loading the compiler implementation if a - custom class has been specified. Doesn't have any effect when - using one of the built-in compilers.

    - -

    Any nested element of a type that implements RmicAdapter - since Ant 1.8.0

    - -

    If a defined type implements the RmicAdapter - interface a nested element of that type can be used as an - alternative to the compiler attribute.

    +

    compilerclasspath

    +

    Since Ant 1.8.0

    +

    A path-like structure holding the classpath to use when loading +the compiler implementation if a custom class has been specified. Doesn't have any effect when +using one of the built-in compilers.

    + +

    Any nested element of a type that implements RmicAdapter

    +

    Since Ant 1.8.0

    +

    If a defined type implements the RmicAdapter interface a nested element of that type +can be used as an alternative to the compiler attribute.

    Examples

    -
      <rmic classname="com.xyz.FooBar" base="${build}/classes"/>
    -

    runs the rmic compiler for the class com.xyz.FooBar. The -compiled files will be stored in the directory ${build}/classes.

    -
      <rmic base="${build}/classes" includes="**/Remote*.class"/>
    -

    runs the rmic compiler for all classes with .class -files below ${build}/classes whose classname starts with -Remote. The compiled files will be stored in the directory -${build}/classes.

    - -

    If you want to use a custom - RmicAdapter org.example.MyAdapter you can either - use the compiler attribute:

    +
    <rmic classname="com.xyz.FooBar" base="${build}/classes"/>
    +

    runs the rmic compiler for the class com.xyz.FooBar. The compiled files +will be stored in the directory ${build}/classes.

    +
    <rmic base="${build}/classes" includes="**/Remote*.class"/>
    +

    runs the rmic compiler for all classes with .class files +below ${build}/classes whose classname starts with Remote. The compiled +files will be stored in the directory ${build}/classes.

    + +

    If you want to use a custom RmicAdapter org.example.MyAdapter you can either use +the compiler attribute:

     <rmic classname="com.xyz.FooBar"
           base="${build}/classes"
    -      compiler="org.example.MyAdapter"/>
    -
    + compiler="org.example.MyAdapter"/>

    or a define a type and nest this into the task like in:

     <componentdef classname="org.example.MyAdapter"
    @@ -347,11 +318,8 @@
     <rmic classname="com.xyz.FooBar"
           base="${build}/classes">
       <myadapter/>
    -</rmic>
    -
    -

    in which case your compiler adapter can support attributes and - nested elements of its own.

    +</rmic> +

    in which case your compiler adapter can support attributes and nested elements of its own.

    - diff -Nru ant-1.9.10/manual/Tasks/rpm.html ant-1.10.3/manual/Tasks/rpm.html --- ant-1.9.10/manual/Tasks/rpm.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/rpm.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,100 +24,86 @@ -

    Rpm

    +

    Rpm

    Description

    -

    - A basic task for invoking the rpm executable to build a RedHat Package Manager Linux installation - file. The task currently only works on Linux or other Unix platforms with rpm support. -

    +

    A basic task for invoking the rpm executable to build a RedHat Package Manager +Linux installation file. The task currently only works on Linux or other Unix platforms +with rpm support.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    specFileThe name of the spec file to be used. This must be relative to the SPECS directory - under the root of the RPM set in the topDir attribute.YesspecFileThe name of the spec file to be used. This must be relative to the SPECS + directory under the root of the RPM set in the topDir attribute.Yes
    topDir - This is the directory which will have the expected - subdirectories, SPECS, SOURCES, BUILD, SRPMS. If this isn't specified, - the default RPM directory of the system (or user, if ~/.rpmmacros defines it) is used (often - /usr/src/rpm.
    - Defining a topdir will set %_topdir to the specified directory -there is no need - to edit your .rpmmacros file. -
    No, but your build file is very brittle if it is not set.topDirThis is the directory which will have the expected + subdirectories, SPECS, SOURCES, BUILD, SRPMS. + If this isn't specified, the default RPM directory of the system (or user, + if ~/.rpmmacros defines it) is used (often /usr/src/rpm.
    + Defining a topdir will set %_topdir to the specified + directory—there is no need to edit your .rpmmacros file.
    No, but your build file is very brittle if it is not set.
    cleanBuildDirThis will remove the generated files in the BUILD - directory. - See the the --clean option of rpmbuild. - NocleanBuildDirThis will remove the generated files in the BUILD directory. See the + the --clean option of rpmbuild.No
    removeSpecThis will remove the spec file from SPECS. - See the the --rmspec option of rpmbuild. - NoremoveSpecThis will remove the spec file from SPECS. See the the --rmspec + option of rpmbuild.No
    removeSourceFlag (optional, default=false) - to remove the sources after the build. - See the the --rmsource option of rpmbuild.NoremoveSourceFlag to remove the sources after the build. See the --rmsource option + of rpmbuild.No; default is false
    rpmBuildCommandThe executable to use for building the RPM. - Defaults to rpmbuild if it can be found or - rpm otherwise. Set this if you don't have either on - your PATH or want to use a different executable. Since Apache Ant - 1.6.NorpmBuildCommandThe executable to use for building the RPM. Set this if default executables are not on + PATH or a different executable is needed. Since Apache Ant 1.6.No; defaults to rpmbuild if it can be found or rpm otherwise
    commandThe command to pass to the rpmbuild program. The default is "-bb"NocommandThe command to pass to the rpmbuild program.No; default is -bb
    quietSuppress output. Defaults to false.NoquietSuppress output.No; defaults to false
    output/errorWhere standard output and error goNooutput/errorWhere standard output and error go.No
    failOnErrorStop the buildprocess if the RPM build command exits with - a non-zero returncode. Defaults to falseNofailOnErrorStop the build process if the RPM build command exits with a non-zero return code.No; defaults to false

    Examples

    -    <rpm
    -        specFile="example.spec"
    -        topDir="build/rpm"
    -        cleanBuildDir="true"
    -        failOnError="true"/>
    -
    +<rpm specFile="example.spec" + topDir="build/rpm" + cleanBuildDir="true" + failOnError="true"/> - diff -Nru ant-1.9.10/manual/Tasks/schemavalidate.html ant-1.10.3/manual/Tasks/schemavalidate.html --- ant-1.9.10/manual/Tasks/schemavalidate.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/schemavalidate.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,261 +23,224 @@ -

    SchemaValidate

    +

    SchemaValidate

    Description

    -

    This schemavalidate task validates XML files described by an XML Schema. -The task extends the XmlValidate task with XSD-specific features.

    +

    This schemavalidate task validates XML files described by an XML Schema. The task +extends the XmlValidate task with XSD-specific features.

      -
    1. The parser is created validating and namespace aware -
    2. -
    3. Validation is turned on.
    4. -
    5. Schema validation is turned on.
    6. -
    7. Any no-namespace schema URL or file supplied is used as the no-namespace schema -
    8. All nested schema declarations are turned into the list of namespace-url -bindings for schema lookup. +
    9. The parser is created validating and namespace aware.
    10. +
    11. Validation is turned on.
    12. +
    13. Schema validation is turned on.
    14. +
    15. Any no-namespace schema URL or file supplied is used as the no-namespace schema.
    16. +
    17. All nested schema declarations are turned into the list of namespace-url bindings for schema + lookup.
    -Note that nested catalogs are still used for lookup of the URLs given as the -sources of schema documents, so you can still delegate lookup to a catalog, you -just need to list all schema URIs and their URL equivalents. - -

    This task supports the use of nested -

  • <xmlcatalog> elements
  • -
  • <schema> elements, that bind a namespace URI to a URL or a - local filename. -
  • <dtd> elements which are used to resolve DTDs and entities.
  • -
  • <attribute> elements which are used to set features on the parser. - These can be any number of - http://xml.org/sax/features/ - or other features that your parser may support.
  • -
  • <property> elements, containing string properties -

    - -

    -The task only supports SAX2 or later parsers: it is an error to specify a SAX1 -parser. +

    Note that nested catalogs are still used for lookup of the URLs given as the sources of schema +documents, so you can still delegate lookup to a catalog, you just need to list all schema URIs and +their URL equivalents.

    + +

    This task supports the use of nested

    +
      +
    • <xmlcatalog> elements
    • +
    • <schema> elements, that bind a namespace URI to a URL or a local + filename.
    • +
    • <dtd> elements which are used to resolve DTDs and entities.
    • +
    • <attribute> elements which are used to set features on the parser. These + can be any number + of http://xml.org/sax/features/ or other features that your parser + may support.
    • +
    • <property> elements, containing string properties
    • +
    +

    The task only supports SAX2 or later parsers: it is an error to specify a SAX1 parser.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    classnamethe parser to use.Noclassnamethe parser to use.No
    classpathrefwhere to find the parser class. - Optionally can use an embedded <classpath> element.Noclasspathrefwhere to find the parser class. Optionally can use an + embedded <classpath> element.No
    disableDTD - Flag to disable DTD support. DTD support is needed to - validate XSD files themselves, amongst others. - No - default falsedisableDTDFlag to disable DTD support. DTD support is needed to validate XSD files themselves, amongst + others.No; default false
    failonerrorfails on a error if set to true (defaults to true).Nofailonerrorfails on a error if set to true.No; defaults to true
    filethe file(s) you want to check. (optionally can use an embedded fileset)Nofilethe file(s) you want to check (optionally use an embedded fileset).No
    fullchecking - enable full schema checking. Slow but strict. - No - default truefullcheckingenable full schema checking. Slow but strict.No; default true
    lenient - if true, only check the XML document is well formed - Nolenientif true, only check the XML document is well formedNo
    noNamespaceFile - filename of a no-namespace XSD file to provide the - schema for no-namespace XML content. - NonoNamespaceFilefilename of a no-namespace XSD file to provide the schema for no-namespace XML contentNo
    noNamespaceURL - URL of a no-namespace XSD file to provide the - schema for no-namespace XML content. - NonoNamespaceURLURL of a no-namespace XSD file to provide the schema for no-namespace XML contentNo
    warnlog parser warn events.Nowarnlog parser warn eventsNo
    -

    Nested Elements

    - +

    Parameters specified as nested elements

    schema

    -

    -Identify the name and location of a schema that may be used in validating -the document(s). -

    - +

    Identify the name and location of a schema that may be used in validating the document(s).

    +
    - - - + + + - - - + + + - - - + + + - - - + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    namespaceURI of the schema namespaceYesnamespaceURI of the schema namespaceYes
    urlURL of the schemaOne of url or file is requiredurlURL of the schemaExactly one of the two
    filefile of the schemaOne of url or file is requiredfilefile of the schema

    dtd

    -

    -<dtd> is used to specify different locations for DTD resolution. -

    - +

    <dtd> is used to specify different locations for DTD resolution.

    +
    - - - + + + - - - + + + - - + - +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    publicIdPublic ID of the DTD to resolveYespublicIdPublic ID of the DTD to resolveYes
    locationLocation of the DTD to use, which can be a file, + locationLocation of the DTD to use, which can be a file, a resource, or a URLYesYes

    xmlcatalog

    -

    The <xmlcatalog> -element is used to perform entity resolution.

    +

    The <xmlcatalog> element is used to +perform entity resolution.

    attribute

    -

    The <attribute> element is used to set parser features.
    -Features usable with the xerces parser are defined here : - Setting features
    - -SAX features are defined here: - http://xml.org/sax/features/
    -

    - - - - - +

    The <attribute> element is used to set parser features.
    Features usable +with the Xerces parser are defined here: Setting features
    SAX features are defined +here: http://xml.org/sax/features/

    +
    AttributeDescriptionRequired
    + + + + - - - + + + - - - + + +
    AttributeDescriptionRequired
    nameThe name of the featureYesnameThe name of the featureYes
    valueThe boolean value of the featureYesvalueThe boolean value of the featureYes
    -

    property

    -

    The <property> element is used to set properties. -These properties are defined here for the xerces XML parser implementation : - XML Parser properties -Properties can be used to set the schema used to validate the XML file. +

    The <property> element is used to set properties. These properties are +defined here for the Xerces XML parser +implementation: XML Parser +properties. Properties can be used to set the schema used to validate the XML file.

    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    nameThe name of the featureYesnameThe name of the featureYes
    valueThe string value of the propertyYesvalueThe string value of the propertyYes
    -

    -

    Examples

    -    <schemavalidate
    -      noNamespaceFile="document.xsd"
    -      file="xml/endpiece.xml">
    -    </schemavalidate>
    -
    -Validate a document against an XML schema. The document does not declare -any schema itself, which is why the noNamespaceFile is needed. -
    -    <presetdef name="validate-soap">
    -      <schemavalidate>
    -        <schema namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing"
    -          file="${soap.dir}/ws-addressing.xsd" />
    -        <schema namespace="http://www.w3.org/2003/05/soap-envelope"
    -          file="${soap.dir}/soap12.xsd" />
    -        <schema namespace="http://schemas.xmlsoap.org/wsdl/"
    -          file="${soap.dir}/wsdl.xsd" />
    -        <schema namespace="http://www.w3.org/2001/XMLSchema"
    -          file="${soap.dir}/XMLSchema.xsd" />
    -        </schemavalidate>
    -    </presetdef>
    -
    -Declare a new preset task, <validate-soap>, that validates -XSD and WSDL documents against the relevant specifications. -To validate XSD documents, you also need XMLSchema.dtd and datatypes.dtd in -the same directory as XMLSchema.xsd, or pointed to via the catalog. All -these files can be fetched from -the W3C. +<schemavalidate noNamespaceFile="document.xsd" + file="xml/endpiece.xml"/> +

    Validate a document against an XML schema. The document does not declare any schema itself, which +is why the noNamespaceFile is needed.

    -    <validate-soap file="xml/test.xsd"/>
    -
    -Use the preset task defined above to validate an XML Schema document. -
    - +<presetdef name="validate-soap"> + <schemavalidate> + <schema namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" + file="${soap.dir}/ws-addressing.xsd"/> + <schema namespace="http://www.w3.org/2003/05/soap-envelope" + file="${soap.dir}/soap12.xsd"/> + <schema namespace="http://schemas.xmlsoap.org/wsdl/" + file="${soap.dir}/wsdl.xsd"/> + <schema namespace="http://www.w3.org/2001/XMLSchema" + file="${soap.dir}/XMLSchema.xsd"/> + </schemavalidate> +</presetdef> +

    Declare a new preset task, <validate-soap>, that validates XSD and WSDL +documents against the relevant specifications. To validate XSD documents, you also +need XMLSchema.dtd and datatypes.dtd in the same directory +as XMLSchema.xsd, or pointed to via the catalog. All these files can be fetched +from W3C.

    +
    <validate-soap file="xml/test.xsd"/>
    +

    Use the preset task defined above to validate an XML Schema document.

    - diff -Nru ant-1.9.10/manual/Tasks/scp.html ant-1.10.3/manual/Tasks/scp.html --- ant-1.9.10/manual/Tasks/scp.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/scp.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,303 +24,251 @@ -

    SCP

    +

    SCP

    +

    Since Apache Ant 1.6

    Description

    -

    since Apache Ant 1.6

    -

    Copies a file or FileSet to or from a (remote) machine running an SSH daemon. -FileSet only works for copying files from the local machine to a -remote machine.

    +FileSet only works for copying files from the local machine to a remote machine.

    -

    Note: This task depends on external libraries not included -in the Ant distribution. See Library Dependencies -for more information. This task has been tested with jsch-0.1.2 and later.

    +

    Note: This task depends on external libraries not included in the Ant +distribution. See Library Dependencies for more +information. This task has been tested with jsch-0.1.2 and later.

    See also the sshexec task

    Parameters

    - +
    - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequired
    fileThe file to copy. This can be a local path or a - remote path of the form user[:password]@host:/directory/path. - :password can be omitted if you use key based - authentication or specify the password attribute. The way remote - path is recognized is whether it contains @ character or not. This - will not work if your localPath contains @ character.Yes, unless a nested - <fileset> element is used.
    localFileThis is an alternative to the file attribute. But - this must always point to a local file. The reason this was added - was that when you give file attribute it is treated as remote if - it contains @ character. This character can exist also in local - paths. since Ant 1.6.2Alternative to file attribute.AttributeDescriptionRequired
    fileThe file to copy. This can be a local path or a remote path of the + form user[:password]@host:/directory/path. :password can be omitted + if you use key based authentication or specify the password attribute. The way + remote path is recognized is whether it contains @ character or not. This will not work + if your localPath contains @ character.Yes, unless a nested <fileset> element is used
    localFileThis is an alternative to the file attribute. But this must always point to a + local file. The reason this was added was that when you give file attribute it is treated as + remote if it contains @ character. This character can exist also in local + paths. since Ant 1.6.2Alternative to file attribute
    remoteFileThis is an alternative to the file attribute. But - this must always point to a remote file. since Ant 1.6.2Alternative to file attribute.remoteFileThis is an alternative to the file attribute. But this must always point to a + remote file. since Ant 1.6.2Alternative to file attribute
    todirThe directory to copy to. This can be a local path - or a remote path of the form user[:password]@host:/directory/path. - :password can be omitted if you use key based - authentication or specify the password attribute. The way remote - path is recognized is whether it contains @ character or not. This - will not work if your localPath contains @ character.YestodirThe directory to copy to. This can be a local path or a remote path of the + form user[:password]@host:/directory/path. :password can be omitted + if you use key based authentication or specify the password attribute. The way + remote path is recognized is whether it contains @ character or not. This will not work + if your localPath contains @ character.Yes
    localTodirThis is an alternative to the todir - attribute. But this must always point to a local directory. The - reason this was added was that when you give todir attribute it is - treated as remote if it contains @ character. This character can - exist also in local paths. since Ant 1.6.2Alternative to todir attribute.localTodirThis is an alternative to the todir attribute. But this must always point to a + local directory. The reason this was added was that when you give todir attribute it + is treated as remote if it contains @ character. This character can exist also in local + paths. since Ant 1.6.2Alternative to todir attribute
    localTofileChanges the file name to the given name while - receiving it, only useful if receiving a single file. since - Ant 1.6.2Alternative to todir attribute.localTofileChanges the file name to the given name while receiving it, only useful if receiving a + single file. since Ant 1.6.2Alternative to todir attribute
    remoteTodirThis is an alternative to the todir - attribute. But this must always point to a remote directory. - since Ant 1.6.2Alternative to todir attribute.remoteTodirThis is an alternative to the todir attribute. But this must always point to a + remote directory. since Ant 1.6.2Alternative to todir attribute
    remoteTofileChanges the file name to the given name while - sending it, only useful if sending a single file. since - Ant 1.6.2Alternative to todir attribute.remoteTofileChanges the file name to the given name while sending it, only useful if sending a single + file. since Ant 1.6.2Alternative to todir attribute
    portThe port to connect to on the remote host.No, defaults to 22.portThe port to connect to on the remote host.No; defaults to 22
    trustThis trusts all unknown hosts if set to yes/true.
    - Note If you set this to false (the default), the - host you connect to must be listed in your knownhosts file, this - also implies that the file exists.
    No, defaults to No.trustThis trusts all unknown hosts if set to yes + or true.
    Note: If you set this to false (the default), the + host you connect to must be listed in your knownhosts file, this also implies that + the file exists.
    No; defaults to no
    knownhostsThis sets the known hosts file to use to validate - the identity of the remote host. This must be a SSH2 format file. - SSH1 format is not supported.No, defaults to - ${user.home}/.ssh/known_hosts.knownhostsThis sets the known hosts file to use to validate the identity of the remote host. This + must be a SSH2 format file. SSH1 format is not supported.No; defaults to ${user.home}/.ssh/known_hosts
    failonerrorWhether to halt the build if the transfer fails. - No; defaults to true.failonerrorWhether to halt the build if the transfer fails.No; defaults to true
    passwordThe password.Not if you are using key based - authentication or the password has been given in the file or - todir attribute.passwordThe password.Yes, unless you are using key based authentication or the password has been given in the + file or todir attribute
    keyfileLocation of the file holding the private key.Yes, if you are using key based - authentication.keyfileLocation of the file holding the private key.Yes, if you are using key based authentication
    passphrasePassphrase for your private key.No, defaults to an empty string.passphrasePassphrase for your private key.No; defaults to an empty string
    verboseDetermines whether SCP outputs verbosely to the - user. Currently this means outputting dots/stars showing the - progress of a file transfer. since Ant 1.6.2No; defaults to false.verboseDetermines whether SCP outputs verbosely to the user. Currently this means outputting + dots/stars showing the progress of a file transfer. since Ant 1.6.2No; defaults to false
    sftpDetermines whether SCP uses the sftp protocol. - The sftp protocol is the file transfer protocol of SSH2. It is - recommended that this be set to true if you are copying to/from a - server that doesn't support scp1. since Ant 1.7No; defaults to false.sftpDetermines whether SCP uses the sftp protocol. The sftp protocol is the file transfer + protocol of SSH2. It is recommended that this be set to true if you are copying to/from + a server that doesn't support scp1. since Ant 1.7No; defaults to false
    preserveLastModifiedDetermines whether the last modification - timestamp of downloaded files is preserved. It only works when - transferring from a remote to a local system and probably doesn't - work with a server that doesn't support SSH2. since Ant - 1.8.0No; defaults to false.preserveLastModifiedDetermines whether the last modification timestamp of downloaded files is preserved. It + only works when transferring from a remote to a local system and probably doesn't work with a + server that doesn't support SSH2. since Ant 1.8.0No; defaults to false
    filemodeA 3 digit octal string, specify the user, group - and other modes in the standard Unix fashion. Only applies to - uploaded files. Note the actual permissions of the remote - file will be governed by this setting and the UMASK on the - remote server. Default is 644. since Ant 1.9.5.NofilemodeA 3 digit octal string, specify the user, group and other modes in the standard Unix + fashion. Only applies to uploaded files. Note the actual permissions of the remote file will + be governed by this setting and the UMASK on the remote server. since Ant + 1.9.5.No; default is 644
    dirmodeA 3 digit octal string, specify the user, group - and other modes in the standard Unix fashion. Only applies to - uploaded dirs. Note the actual permissions of the remote - dir will be governed by this setting and the UMASK on the - remote server. Default is 755. since Ant 1.9.5.NodirmodeA 3 digit octal string, specify the user, group and other modes in the standard Unix + fashion. Only applies to uploaded dirs. Note the actual permissions of the remote dir will + be governed by this setting and the UMASK on the remote server. since Ant + 1.9.5.No; default is 755
    serverAliveIntervalSecondsSets a timeout interval in seconds after which if no data has - been received from the server, the task will send a message through - the encrypted channel to request a response from the server. - since Ant 1.9.7No, the default is 0, indicating - that these messages will not be sent to the serverserverAliveIntervalSecondsSets a timeout interval in seconds after which if no data has been received from the server, + the task will send a message through the encrypted channel to request a response from the + server. since Ant 1.9.7No, the default is 0, indicating that these messages will not be sent to the + server
    serverAliveCountMaxThe number of server alive messages which may be - sent without receiving any messages back from the server. Only - used if serverAliveIntervalSeconds is not 0. - since Ant 1.9.7No, defaults to 3serverAliveCountMaxThe number of server alive messages which may be sent without receiving any messages back + from the server. Only used if serverAliveIntervalSeconds is + not 0. since Ant 1.9.7No; defaults to 3
    compressedWhether to enable compression during transfer. - since Ant 1.9.8No, defaults to falsecompressedWhether to enable compression during transfer. since Ant 1.9.8No; defaults to false

    Parameters specified as nested elements

    -

    fileset or resource collections

    -

    FileSets or Resource Collections are used to select - groups of files to copy. To use a fileset or a resource collection, the todir attribute must be set.

    +

    resource collections

    +

    FileSets +or other resource collections are used to select groups +of files to copy. To use a fileset or a resource collection, the todir attribute must be +set.

    -Prior to Ant 1.9.7 only <fileset> has been supported as a nested element. +

    Prior to Ant 1.9.7 only <fileset> has been supported as a nested element.

    Examples

    -

    Copy a single local file to a remote machine

    -
    -  <scp file="myfile.txt" todir="user:password@somehost:/home/chuck"/>
    -
    - -

    Copy a single local file to a remote machine with separate -password attribute

    -
    -  <scp file="myfile.txt" todir="user@somehost:/home/chuck" password="password"/>
    -
    - -

    Copy a single local file to a remote machine using key base -authentication.

    -
    -  <scp file="myfile.txt"
    -       todir="user@somehost:/home/chuck" 
    -       keyfile="${user.home}/.ssh/id_dsa"
    -       passphrase="my extremely secret passphrase"
    -  />
    -
    +

    Copy a single local file to a remote machine

    +
    <scp file="myfile.txt" todir="user:password@somehost:/home/chuck"/>
    -

    Copy a single remote file to a local directory

    -
    -  <scp file="user:password@somehost:/home/chuck/myfile.txt" todir="../some/other/dir"/>
    -
    - -

    Copy a remote directory to a local directory

    -
    -  <scp file="user:password@somehost:/home/chuck/*" todir="/home/sara"/>
    -
    - -

    Copy a local directory to a remote directory

    -
    -  <scp todir="user:password@somehost:/home/chuck/">
    -    <fileset dir="src_dir"/>
    -  </scp>
    -
    -

    Copy a set of files to a directory

    -
    -  <scp todir="user:password@somehost:/home/chuck">
    +

    Copy a single local file to a remote machine with separate password +attribute

    +
    <scp file="myfile.txt" todir="user@somehost:/home/chuck" password="password"/>
    + +

    Copy a single local file to a remote machine using key base authentication.

    +
    +<scp file="myfile.txt"
    +     todir="user@somehost:/home/chuck"
    +     keyfile="${user.home}/.ssh/id_dsa"
    +     passphrase="my extremely secret passphrase"/>
    + +

    Copy a single remote file to a local directory

    +
    <scp file="user:password@somehost:/home/chuck/myfile.txt" todir="../some/other/dir"/>
    + +

    Copy a remote directory to a local directory

    +
    <scp file="user:password@somehost:/home/chuck/*" todir="/home/sara"/>
    + +

    Copy a local directory to a remote directory

    +
    +<scp todir="user:password@somehost:/home/chuck/">
    +  <fileset dir="src_dir"/>
    +</scp>
    +

    Copy a set of files to a directory

    +
    +<scp todir="user:password@somehost:/home/chuck">
    +  <fileset dir="src_dir">
    +    <include name="**/*.java"/>
    +  </fileset>
    +</scp>
    +

    Copy a set of files to a remote directory in reverse last-modified order

    +
    +<scp todir="user:password@somehost:/home/chuck">
    +  <sort>
    +    <reverse>
    +      <date/>
    +    </reverse>
         <fileset dir="src_dir">
    -      <include name="**/*.java"/>
    +      <include name="**/*"/>
         </fileset>
    -  </scp>
    -
    -

    Copy a set of files to a remote directory in reverse last-modified order

    -
    -  <scp todir="user:password@somehost:/home/chuck">
    -    <sort>
    -      <reverse>
    -        <date />
    -      </reverse>
    -      <fileset dir="src_dir">
    -        <include name="**/*" />
    -      </fileset>
    -    </sort>
    -  </scp>
    -
    - -

    Security Note: Hard coding passwords and/or usernames -in scp task can be a serious security hole. Consider using variable -substitution and include the password on the command line. For example: -

    -

    -    <scp todir="${username}:${password}@host:/dir" ...>
    -
    -Invoking ant with the following command line: -
    -    ant -Dusername=me -Dpassword=mypassword target1 target2
    -
    - -Is slightly better, but the username/password is exposed to all users on an Unix -system (via the ps command). The best approach is to use the -<input> task and/or retrieve the password from a (secured) -.properties file. - -

    - -

    Unix Note: File permissions are not retained when files -are downloaded; they end up with the default UMASK 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 <exec executable="scp" ... > -instead. -

    - + </sort> +</scp>
    +

    Security Note: Hardcoding passwords and/or usernames in scp task +can be a serious security hole. Consider using variable substitution and include the password on +the command line. For example:

    +
    <scp todir="${username}:${password}@host:/dir" ...>
    +

    Invoking Ant with the following command line:

    +
    ant -Dusername=me -Dpassword=mypassword target1 target2
    +

    is slightly better, but the username/password is exposed to all users on an Unix system (via +the ps command). The best approach is to use the <input> task and/or +retrieve the password from a (secured) .properties file.

    + +

    Unix Note: File permissions are not retained when files are downloaded; they end +up with the default UMASK 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 <exec executable="scp" ... > instead.

    - diff -Nru ant-1.9.10/manual/Tasks/scriptdef.html ant-1.10.3/manual/Tasks/scriptdef.html --- ant-1.9.10/manual/Tasks/scriptdef.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/scriptdef.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,309 +24,267 @@ -

    Scriptdef

    +

    Scriptdef

    Description

    -

    Scriptdef can be used to define an Apache Ant task using a scripting language. Ant -scripting languages supported by -Apache BSF -or - JSR 223 -may be -used to define the script. Scriptdef provides a mechanism to encapsulate -control logic from a build within an Ant task minimizing the need for -providing control style tasks in Ant itself. Complex logic can be made -available while retaining the simple structure of an Ant build file. Scriptdef -is also useful for prototyping new custom tasks. Certainly as the complexity -of the script increases it would be better to migrate the task definition -into a Java based custom task. -

    - -

    Note: This task depends on external libraries not included in the -Ant distribution. See -Library Dependencies -for more information.

    - - +

    Scriptdef can be used to define an Apache Ant task using a scripting language. Ant +scripting languages supported by Apache +BSF or JSR 223 may be used to define the script. Scriptdef provides a +mechanism to encapsulate control logic from a build within an Ant task minimizing the need for +providing control style tasks in Ant itself. Complex logic can be made available while retaining the +simple structure of an Ant build file. Scriptdef is also useful for prototyping new +custom tasks. Certainly as the complexity of the script increases it would be better to migrate the +task definition into a Java based custom task.

    + +

    Note: This task depends on external libraries not included in the Ant +distribution. See Library Dependencies for more +information.

    The attributes and nested elements supported by the task may be defined using <attribute> and <element> nested elements. These are -available to the script that implements the task as two collection style -script variables attributes and elements. The -elements in the attributes collection may be accessed by the -attribute name. The elements collection is accessed by the nested -element name. This will return a list of all instances of the nested element. -The instances in this list may be accessed by an integer index. -

    - -

    Note: Ant will turn all attribute and element names into all -lowercase names, so even if you use name="SomeAttribute", you'll have -to use "someattribute" to retrieve the attribute's value from the -attributes collection.

    - -

    The name "self" (since Ant 1.6.3) is a pre-defined reference to the - script def task instance. - It can be used for logging, or for integration with the rest of - ant. the self.text attribute contains - any nested text passed to the script

    - -

    If an attribute or element is not passed in, -then attributes.get() or elements.get() will -return null. It is up to the script to perform any checks and validation. -self.fail(String message)can be used to raise a -BuildException. -

    - - -

    The name "project" is a pre-defined reference to the Ant Project. For -more information on writing scripts, please refer to the -<script> task -

    - +available to the script that implements the task as two collection style script +variables attributes and elements. The elements +in the attributes collection may be accessed by the attribute +name. The elements collection is accessed by the nested element name. This +will return a list of all instances of the nested element. The instances in this list may be +accessed by an integer index.

    + +

    Note: Ant will turn all attribute and element names into all lowercase names, so +even if you use name=SomeAttribute, you'll have to use someattribute to +retrieve the attribute's value from the attributes collection.

    + +

    The name self (since Ant 1.6.3) is a pre-defined reference to +the scriptdef task instance. It can be used for logging, or for integration with the +rest of Ant. The self.text attribute contains any nested text passed to +the script

    + +

    If an attribute or element is not passed in, then attributes.get() +or elements.get() will return null. It is up to the script to perform any +checks and validation. self.fail(String message)can be used to raise +a BuildException.

    + +

    The name project is a pre-defined reference to the Ant Project. For +more information on writing scripts, please refer to +the <script> task.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + - - - - - - - - -
    AttributeDescriptionRequiredAttributeDescriptionRequired
    namethe name of the task to be created using the scriptYesnamethe name of the task to be created using the scriptYes
    languageThe programming language the script is written in. - Must be a supported Apache BSF or JSR 223 languageYeslanguageThe programming language the script is written in. Must be a supported Apache BSF or JSR + 223 languageYes
    manager - The script engine manager to use. - See the script task - for using this attribute. - No - default is "auto"managerThe script engine manager to use. See the script task + for using this attribute.No; default is auto
    srcThe location of the script as a file, if not inlineNosrcThe location of the script as a file, if not inlineNo
    uri - The XML namespace uri that this definition should live in. - NoencodingThe encoding of the script as a file. since Ant 1.10.2.No; defaults to default JVM character encoding
    classpath - The classpath to pass into the script. - NocompiledIf true, the script is compiled before the first evaluation for faster multiple executions, + on the condition that the manager is javax and the target engine + implements javax.script.Compilable. Note that the bsf manager may + automatically compile the script. since Ant 1.10.2.No; defaults to false
    uriThe XML namespace uri that this definition should live in.No
    classpathThe classpath to pass into the script.No
    classpathrefThe classpath to use, given as a - reference to a path defined elsewhere. - No
    loaderRefthe name of the loader that is - used to load the script, constructed from the specified - classpath. This allows multiple script definitions - to reuse the same class loader. - No
    + classpathref + The classpath to use, given as a reference to a path + defined elsewhere. + No + + + loaderRef + the name of the loader that is used to load the script, constructed from the specified + classpath. This allows multiple script definitions to reuse the same class loader. + + No + + -

    Nested elements

    +

    Parameters specified as nested elements

    attribute

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    namethe name of the attributeYesnamethe name of the attributeYes

    element

    - - - - - - +
    AttributeDescriptionRequired
    - - - + + + - - - + + + - - - + + + - - - + + + -
    namethe name of the nested element to be supported by the - task defined by the scriptYesAttributeDescriptionRequired
    classnamethe classname of the class to be used for the nested element. - This specifies the class directly and is an alternative to specifying - the Ant type name.Nonamethe name of the nested element to be supported by the task defined by the scriptYes
    typeThis is the name of an Ant task or type which is to - be used when this element is to be created. This is an alternative - to specifying the class name directly. If the type is in a namespace, - the URI and a : must be prefixed to the type. For example - type="antlib:example.org:newtype"Noclassnamethe classname of the class to be used for the nested element. This specifies the class + directly and is an alternative to specifying the Ant type name.No
    any resource or resource collectionSince Ant1.7.1, this task can load scripts - from any resource supplied as a nested element. when NotypeThis is the name of an Ant task or type which is to be used when this element is to be + created. This is an alternative to specifying the class name directly. If the type is in a + namespace, the URI and a : must be prefixed to the type. For + example type=antlib:example.org:newtypeNo
    -

    classpath

    -

    - See the script task - for using this nested element. -

    +

    classpath

    +

    See the script task for using this nested element.

    +

    any resource collection

    +

    Since Ant 1.7.1

    +

    This task can load scripts from any resource supplied as a nested element.

    Examples

    -

    -The following definition creates a task which supports an attribute called -attr and two nested elements, one being a fileset and the other a path. When -executed, the resulting task logs the value of the attribute and the basedir -of the first fileset. -

    +

    The following definition creates a task which supports an attribute called attr and +two nested elements, one being a fileset and the other a path. When executed, the resulting task +logs the value of the attribute and the basedir of the first fileset.

    -  <scriptdef name="scripttest" language="javascript">
    -    <attribute name="attr1"/>
    -    <element name="fileset" type="fileset"/>
    -    <element name="path" type="path"/>
    -    <![CDATA[
    -
    -      self.log("Hello from script");
    -      self.log("Attribute attr1 = " + attributes.get("attr1"));
    -      self.log("First fileset basedir = "
    -        + elements.get("fileset").get(0).getDir(project));
    -
    -    ]]>
    -  </scriptdef>
    -
    -  <scripttest attr1="test">
    -    <path>
    -      <pathelement location="src"/>
    -    </path>
    -    <fileset dir="src"/>
    -    <fileset dir="main"/>
    -  </scripttest>
    -
    - -

    -The following variation on the above script lists the number of fileset elements -and iterates through them -

    +<scriptdef name="scripttest" language="javascript"> + <attribute name="attr1"/> + <element name="fileset" type="fileset"/> + <element name="path" type="path"/> + <![CDATA[ + + self.log("Hello from script"); + self.log("Attribute attr1 = " + attributes.get("attr1")); + self.log("First fileset basedir = " + + elements.get("fileset").get(0).getDir(project)); + + ]]> +</scriptdef> + +<scripttest attr1="test"> + <path> + <pathelement location="src"/> + </path> + <fileset dir="src"/> + <fileset dir="main"/> +</scripttest> + +

    The following variation on the above script lists the number of fileset elements and iterates +through them

    -  <scriptdef name="scripttest2" language="javascript">
    -    <element name="fileset" type="fileset"/>
    -    <![CDATA[
    -      filesets = elements.get("fileset");
    -      self.log("Number of filesets = " + filesets.size());
    -      for (i = 0; i < filesets.size(); ++i) {
    -        self.log("fileset " + i + " basedir = "
    -          + filesets.get(i).getDir(project));
    -      }
    -    ]]>
    -  </scriptdef>
    -
    -  <scripttest2>
    -    <fileset dir="src"/>
    -    <fileset dir="main"/>
    -  </scripttest2>
    -
    - -

    -When a script has a syntax error, the scriptdef name will be listed in the -error. For example in the above script, removing the closing curly bracket -would result in this error -

    - -

    build.xml:15: SyntaxError: missing } in compound -statement (scriptdef <scripttest2>; line 10)

    - -

    -Script errors are only detected when a script task is actually executed. -

    -

    - The next example does uses nested text in Jython. It also declares - the script in a new xml namespace, which must be used to refer to - the task. Declaring scripts in a new namespace guarantees that Ant will - not create a task of the same (namespace,localname) name pair. -

    +<scriptdef name="scripttest2" language="javascript"> + <element name="fileset" type="fileset"/> + <![CDATA[ + filesets = elements.get("fileset"); + self.log("Number of filesets = " + filesets.size()); + for (i = 0; i < filesets.size(); ++i) { + self.log("fileset " + i + " basedir = " + + filesets.get(i).getDir(project)); + } + ]]> +</scriptdef> + +<scripttest2> + <fileset dir="src"/> + <fileset dir="main"/> +</scripttest2> + +

    When a script has a syntax error, the scriptdef name will be listed in the +error. For example in the above script, removing the closing curly bracket would result in this +error

    + +
    build.xml:15: SyntaxError: missing } in compound
    +statement (scriptdef <scripttest2>; line 10)
    + +

    Script errors are only detected when a script task is actually executed.

    +

    The next example does uses nested text in Jython. It also declares the script in a new xml +namespace, which must be used to refer to the task. Declaring scripts in a new namespace guarantees +that Ant will not create a task of the same (namespace,localname) name pair.

     <target name="echo-task-jython">
       <scriptdef language="jython"
    -      name="echo"
    -      uri="http://example.org/script">
    +             name="echo"
    +             uri="http://example.org/script">
           <![CDATA[
     self.log("text: " +self.text)
    -    ]]>
    +      ]]>
         </scriptdef>
     </target>
     
     <target name="testEcho" depends="echo-task-jython"
    -    xmlns:s="http://example.org/script">
    +        xmlns:s="http://example.org/script">
       <s:echo>nested text</s:echo>
    -</target>
    -
    +</target> -The next example shows the use of <classpath> and -"loaderref" to get access to the beanshell jar. +

    The next example shows the use of <classpath> +and loaderref to get access to the beanshell jar.

    -    <scriptdef name="b1" language="beanshell"
    -               loaderref="beanshell-ref">
    -      <attribute name="a"/>
    -      <classpath
    -        path="${user.home}/scripting/beanshell/bsh-1.3b1.jar"/>
    -      self.log("attribute a is " + attributes.get("a"));
    -    </scriptdef>
    -
    -    <scriptdef name="b2" language="beanshell"
    -               loaderref="beanshell-ref">
    -      <attribute name="a2"/>
    -      self.log("attribute a2 is " + attributes.get("a2"));
    -    </scriptdef>
    -
    -    <b1 a="this is an 'a'"/>
    -    <b2 a2="this is an 'a2' for b2"/>
    -
    -

    Testing Scripts

    - -

    -The easiest way to test scripts is to use the -AntUnit ant library. -This will run all targets in a script that begin with "test" (and their dependencies).

    - - - +<scriptdef name="b1" language="beanshell" + loaderref="beanshell-ref"> + <attribute name="a"/> + <classpath path="${user.home}/scripting/beanshell/bsh-1.3b1.jar"/> + self.log("attribute a is " + attributes.get("a")); +</scriptdef> + +<scriptdef name="b2" language="beanshell" + loaderref="beanshell-ref"> + <attribute name="a2"/> + self.log("attribute a2 is " + attributes.get("a2")); +</scriptdef> + +<b1 a="this is an 'a'"/> +<b2 a2="this is an 'a2' for b2"/> + +

    Testing scripts

    + +

    The easiest way to test scripts is to use the AntUnit Ant library. This will run all targets in a script that begin +with test (and their dependencies).

    diff -Nru ant-1.9.10/manual/Tasks/script.html ant-1.10.3/manual/Tasks/script.html --- ant-1.9.10/manual/Tasks/script.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/script.html 2018-03-24 12:37:12.000000000 +0000 @@ -17,147 +17,126 @@ - + Script Task -

    Script

    +

    Script

    Description

    -

    Execute a script in a - Apache BSF - or - JSR 223 supported language. -

    -

    Note: - This task depends on external libraries not included in the Apache Ant distribution. - See Library Dependencies - for more information. -

    -

    - The task may use the BSF scripting manager or the JSR 223 manager that - is included in JDK6 and higher. This is controlled by the manager - attribute. The JSR 223 scripting manager is indicated by "javax". -

    -

    All items (tasks, targets, etc) of the running project are - accessible from the script, using either their name or - id attributes (as long as their names are considered - valid Java identifiers, that is). - This is controlled by the "setbeans" attribute of the task. - The name "project" is a pre-defined reference to the Project, which can be - used instead of the project name. The name "self" is a pre-defined reference to the actual - <script>-Task instance.
    From these objects you have access to the Ant Java API, see the -JavaDoc (especially for -Project and -Script) for more information.

    -

    If you are using JavaScript under BSF, a good resource is -http://www.mozilla.org/rhino/doc.html as we are using their JavaScript interpreter.

    +

    Execute a script in a Apache BSF +or JSR 223 supported language. +

    +

    Note: This task depends on external libraries not included in the Apache Ant +distribution. See Library Dependencies for more +information.

    +

    The task may use the BSF scripting manager or the JSR 223 manager that is included in JDK 6 and +higher. This is controlled by the manager attribute. The JSR 223 scripting manager is +indicated by javax.

    +

    All items (tasks, targets, etc) of the running project are accessible from the script, using +either their name or id attributes (as long as their names are considered +valid Java identifiers, that is). This is controlled by the setbeans attribute of the +task. The name project is a pre-defined reference to the Project, which +can be used instead of the project name. The name self is a pre-defined +reference to the actual <script>-Task instance.
    From these objects you have +access to the Ant Java API, see the JavaDoc (especially +for Project +and Script) for more +information.

    +

    If you are using JavaScript under BSF, a good resource +is https://www.mozilla.org/rhino/doc.html as we are using their JavaScript +interpreter.

    Scripts can do almost anything a task written in Java could do.

    -

    Rhino provides a special construct - the JavaAdapter. With that you can -create an object which implements several interfaces, extends classes and for which you -can overwrite methods. Because this is an undocumented feature (yet), here is the link -to an explanation: -Groups@Google: "Rhino, enum.js, JavaAdapter?" by Norris Boyd in the newsgroup -netscape.public.mozilla.jseng.

    - -

    If you are creating Targets programmatically, make sure you set the -Location to a useful value. In particular all targets should have -different location values.

    +

    Rhino provides a special construct—the JavaAdapter. With that you can create +an object which implements several interfaces, extends classes and for which you can overwrite +methods. Because this is an undocumented feature (yet), here is the link to an +explanation: Google Groups: "Rhino, enum.js, JavaAdapter?" by Norris Boyd in the +newsgroup netscape.public.mozilla.jseng.

    + +

    If you are creating Targets programmatically, make sure you set the Location to a useful value. +In particular all targets should have different location values.

    Parameters

    - +
    - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + + + + + + - - + - +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    languageThe programming language the script is written in. - Must be a supported Apache BSF or JSR 223 languageYeslanguageThe programming language the script is written in. Must be a supported Apache BSF or JSR + 223 languageYes
    manager - Since: Ant 1.7. - The script engine manager to use. This can have - one of three values ("auto", "bsf" or "javax"). - The default value is "auto". -
    -
  • "bsf" use the BSF scripting manager to run - the language.
  • -
  • "javax" use the javax.scripting manager - to run the language. (This will only work for JDK6 and higher).
  • -
  • "auto" use the BSF engine if it exists, - otherwise use the javax.scripting manager.
  • -
    +
    manager + Since Ant 1.7. The script engine manager to use. This can have one of three + values: auto, bsf or javax. +
      +
    • bsf use the BSF scripting manager to run the language.
    • +
    • javax use the javax.scripting manager to run the language. (This + will only work for JDK 6 and higher).
    • +
    • auto use the BSF engine if it exists, otherwise use + the javax.scripting manager.
    • +
    NoNo; default is auto
    srcThe location of the script as a file, if not inlineNosrcThe location of the script as a file, if not inlineNo
    setbeans - This attribute controls whether to set variables for - all properties, references and targets in the running script. - If this attribute is false, only the the "project" and "self" variables are set. - If this attribute is true all the variables are set. The default value of this - attribute is "true". Since Ant 1.7 - NoencodingThe encoding of the script as a file. Since Ant 1.10.2.No; defaults to default JVM character encoding
    classpath - The classpath to pass into the script. Since Ant 1.7 - NosetbeansThis attribute controls whether to set variables for all properties, references and targets + in the running script. If this attribute is false, only the the project + and self variables are set. If this attribute is true all the variables + are set. Since Ant 1.7No; defaults to true
    classpathThe classpath to pass into the script. Since Ant 1.7No
    classpathrefThe classpath to use, given as a - reference to a path defined elsewhere. + classpathrefThe classpath to use, given as a reference to a path + defined elsewhere. Since Ant 1.7NoNo

    Parameters specified as nested elements

    classpath

    -

    Since Ant 1.7

    -

    - Script's classpath attribute is a - path-like structure and can also be set via a nested - <classpath> element. -

    - If a classpath is set, it will be used as the current thread - context classloader, and - as the classloader given to the BSF manager. - This means that it can be used to specify - the classpath containing the language implementation for BSF - or for JSR 223 managers. - This can be useful if one wants - to keep ${user.home}/.ant/lib free of lots of scripting language - specific jar files. -

    -

    - NB: (Since Ant 1.7.1) - This classpath can be used to - specify the location of - the BSF jar file and/or languages - that have engines in the BSF jar file. This includes the - javascript, jython, netrexx and jacl languages. -

    +

    Since Ant 1.7

    +

    Script's classpath attribute is a path-like +structure and can also be set via a nested <classpath> element.

    +

    If a classpath is set, it will be used as the current thread context classloader, and as the +classloader given to the BSF manager. This means that it can be used to specify the classpath +containing the language implementation for BSF or for JSR 223 managers. This can be useful if one +wants to keep ${user.home}/.ant/lib free of lots of scripting language specific jar +files.

    +

    Note: (since Ant 1.7.1) This classpath can be used to specify +the location of the BSF jar file and/or languages that have engines in the BSF jar file. This +includes the javascript, jython, netrexx and jacl languages.

    Examples

    -The following snippet shows use of five different languages: -
    +

    The following snippet shows use of five different languages:

    +
         <property name="message" value="Hello world"/>
     
         <script language="groovy">
    @@ -178,74 +157,50 @@
     
         <script language="jython">
     print "message is %s" % message
    -    </script>
    -
    -
    -

    - Note that for the jython example, the script contents must - start on the first column. -

    -

    - Note also that for the ruby example, the names of the set variables are prefixed - by a '$'. -

    - The following script shows a little more complicated jruby example: -

    -
    +    </script>
    +

    Note that for the jython example, the script contents must start on the +first column.

    +

    Note also that for the ruby example, the names of the set variables are prefixed by +a $.

    +

    The following script shows a little more complicated JRuby example:

    +
     <script language="ruby">
       xmlfiles = Dir.new(".").entries.delete_if { |i| ! (i =~ /\.xml$/) }
       xmlfiles.sort.each { |i| $self.log(i) }
    -</script>
    -
    -
    -

    - The same example in groovy is: -

    -
    +</script>
    +

    The same example in Groovy is:

    +
     <script language="groovy">
       xmlfiles = new java.io.File(".").listFiles().findAll{ it =~ "\.xml$"}
    -  xmlfiles.sort().each { self.log(it.toString())}
    -</script>
    -
    -
    -

    - The following example shows the use of classpath to specify the location - of the beanshell jar file. -

    -
    +  xmlfiles.sort().each { self.log(it.toString()) }
    +</script>
    +

    The following example shows the use of classpath to specify the location of the beanshell jar +file.

    +
     <script language="beanshell" setbeans="true">
       <classpath>
    -    <fileset dir="${user.home}/lang/beanshell" includes="*.jar" />
    +    <fileset dir="${user.home}/lang/beanshell" includes="*.jar"/>
       </classpath>
       System.out.println("Hello world");
    -</script>
    -
    -
    +</script>

    - The following script uses javascript to create a number of - echo tasks and execute them. + The following script uses JavaScript to create a number of + echo tasks and execute them.

    -
    +
     <project name="squares" default="main" basedir=".">
    -
       <target name="main">
    -
         <script language="javascript"> <![CDATA[
    -
    -      for (i=1; i<=10; i++) {
    +      for (i = 1; i <= 10; i++) {
             echo = squares.createTask("echo");
             echo.setMessage(i*i);
             echo.perform();
           }
    -
         ]]> </script>
    -
       </target>
    -
    -</project>
    -
    +</project>

    generates

    -
    +
     main:
     1
     4
    @@ -258,15 +213,13 @@
     81
     100
     
    -BUILD SUCCESSFUL
    -
    +BUILD SUCCESSFUL -

    Now a more complex example using the Java API and the Ant API. The goal is to list the -filesizes of all files a <fileset/> caught.

    -
    -
    -<?xml version="1.0" encoding="ISO-8859-1"?>
    -<project name="MyProject" basedir="." default="main">
    +

    Now a more complex example using the Java API and the Ant API. The goal is to list the file sizes +of all files a <fileset/> caught.

    +
    +<?xml version="1.0" encoding="UTF-8"?>
    +<project name="MyProject" basedir="." default="main">
     
       <property name="fs.dir" value="src"/>
       <property name="fs.includes" value="**/*.txt"/>
    @@ -274,20 +227,19 @@
     
       <target name="main">
         <script language="javascript"> <![CDATA[
    -
           // import statements
    -      // importPackage(java.io);
    -      importClass(java.io.File);
    +      // importPackage(java.io);
    +      importClass(java.io.File);
     
           // Access to Ant-Properties by their names
    -      dir      = project.getProperty("fs.dir");
    -      includes = MyProject.getProperty("fs.includes");
    -      excludes = self.getProject()  .getProperty("fs.excludes");
    +      dir      = project.getProperty("fs.dir");
    +      includes = MyProject.getProperty("fs.includes");
    +      excludes = self.getProject().getProperty("fs.excludes");
     
           // Create a <fileset dir="" includes=""/>
    -      fs = project.createDataType("fileset");
    -      fs.setDir( new File(dir) );
    -      fs.setIncludes(includes);
    +      fs = project.createDataType("fileset");
    +      fs.setDir(new File(dir));
    +      fs.setIncludes(includes);
           fs.setExcludes(excludes);
     
           // Get the files (array) of that fileset
    @@ -295,50 +247,44 @@
           srcFiles = ds.getIncludedFiles();
     
           // iterate over that array
    -      for (i=0; i<srcFiles.length; i++) {
    +      for (i = 0; i < srcFiles.length; i++) {
     
             // get the values via Java API
             var basedir  = fs.getDir(project);
             var filename = srcFiles[i];
    -        var file = new File(basedir, filename);
    +        var file = new File(basedir, filename);
             var size = file.length();
     
             // create and use a Task via Ant API
    -        echo = MyProject.createTask("echo");
    +        echo = MyProject.createTask("echo");
             echo.setMessage(filename + ": " + size + " byte");
    -        echo.perform();
    +        echo.perform();
           }
         ]]></script>
       </target>
    -</project>
    -
    -

    We want to use the Java API. Because we don't want always typing the package signature -we do an import. Rhino knows two different methods for import statements: one for packages -and one for a single class. By default only the java packages are available, so -java.lang.System can be directly imported with importClass/importPackage. -For other packages you have to prefix the full classified name with Packages. -For example Ant's FileUtils class can be imported with -importClass(Packages.org.apache.tools.ant.util.FileUtils) -
    -The <script> task populates the Project instance under -the name project, so we can use that reference. Another way is to use its given name -or getting its reference from the task itself.
    -The Project provides methods for accessing and setting properties, creating DataTypes and -Tasks and much more.
    -After creating a FileSet object we initialize that by calling its set-methods. Then we can -use that object like a normal Ant task (<copy> for example).
    -For getting the size of a file we instantiate a java.io.File. So we are using -normal Java API here.
    -Finally we use the <echo> task for producing the output. The task is not executed by -its execute() method, because the perform() method (implemented in Task itself) does the -appropriate logging before and after invoking execute(). -

    -

    - Here is an example of using beanshell to create an ant - task. This task will add filesets and paths to a referenced - path. If the path does not exist, it will be created. -

    -
    +</project>
    +

    We want to use the Java API. Because we don't want always typing the package signature we do an +import. Rhino knows two different methods for import statements: one for packages and one for a +single class. By default only the java packages are available, +so java.lang.System can be directly imported +with importClass/importPackage. For other packages you have to prefix the full +classified name with Packages. For example Ant's FileUtils class can +be imported +with importClass(Packages.org.apache.tools.ant.util.FileUtils)
    +The <script> task populates the Project instance under the +name project, so we can use that reference. Another way is to use its given name or +getting its reference from the task itself.
    The Project provides methods for accessing and +setting properties, creating DataTypes and Tasks and much more.
    After creating a FileSet +object we initialize that by calling its set-methods. Then we can use that object like a normal Ant +task (<copy> for example).
    For getting the size of a file we instantiate +a java.io.File. So we are using normal Java API here.
    Finally we use +the <echo> task for producing the output. The task is not executed by +its execute() method, because the perform() +method (implemented in Task itself) does the appropriate logging before and after +invoking execute().

    +

    Here is an example of using beanshell to create an Ant task. This task will add filesets and +paths to a referenced path. If the path does not exist, it will be created.

    +
     <!--
            Define addtopath task
      -->
    @@ -366,15 +312,11 @@
             }
         }
         project.addTaskDefinition("addtopath", AddToPath.class);
    -</script>
    -
    -

    - An example of using this task to create a path - from a list of directories (using antcontrib's - - <for> task) follows: -

    -
    +</script>
    +

    An example of using this task to create a path from a list of directories (using +Ant-Contrib's <for> task) follows:

    +
     <path id="main.path">
       <fileset dir="build/classes"/>
     </path>
    @@ -386,8 +328,7 @@
                    includes="**/*.jar"/>
         </addtopath>
       </sequential>
    -</ac:for>
    -
    +</ac:for> diff -Nru ant-1.9.10/manual/Tasks/sequential.html ant-1.10.3/manual/Tasks/sequential.html --- ant-1.9.10/manual/Tasks/sequential.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sequential.html 2018-03-24 12:37:12.000000000 +0000 @@ -26,14 +26,12 @@

    Sequential

    Description

    -

    Sequential is a container task - it can contain other Apache Ant tasks. The nested -tasks are simply executed in sequence. Sequential's primary use is to support -the sequential execution of a subset of tasks within the -parallel task

    +

    Sequential is a container task—it can contain other Apache Ant tasks. The +nested tasks are simply executed in sequence. Sequential's primary use is to support the sequential +execution of a subset of tasks within the parallel task

    -

    The sequential task has no attributes and does not support any nested -elements apart from Ant tasks. Any valid Ant task may be embedded within the -sequential task.

    +

    The sequential task has no attributes and does not support any nested elements apart +from Ant tasks. Any valid Ant task may be embedded within the sequential task.

    Example

    @@ -44,12 +42,9 @@
         <junit ... >
         <wlstop/>
       </sequential>
    -</parallel>
    -
    -

    This example shows how the sequential task is used to execute three tasks in -sequence, while another task is being executed in a separate thread.

    - +</parallel> +

    This example shows how the sequential task is used to execute three tasks in +sequence, while another task is being executed in a separate thread.

    - diff -Nru ant-1.9.10/manual/Tasks/serverdeploy.html ant-1.10.3/manual/Tasks/serverdeploy.html --- ant-1.9.10/manual/Tasks/serverdeploy.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/serverdeploy.html 2018-03-24 12:37:12.000000000 +0000 @@ -25,311 +25,281 @@ -

    Apache Ant ServerDeploy User Manual

    +

    Apache Ant ServerDeploy User Manual

    by

    -

    -
    -

    At present the tasks support:
    +


    +

    At present the tasks support:

    -Over time we expect further optional tasks to support additional J2EE Servers. -

    +

    Over time we expect further optional tasks to support additional J2EE Servers.

    -
    - - - - - - - +
    +
    TaskApplication Servers
    serverdeployNested Elements
    genericGeneric task
    jonasJOnAS 2.4
    weblogicWeblogic
    + + + + +
    TaskApplication Servers
    serverdeployNested Elements
    genericGeneric task
    jonasJOnAS 2.4
    weblogicWebLogic
    - -

    ServerDeploy element

    +

    ServerDeploy element

    + +

    Description

    -

    Description:

    +

    The serverdeploy task is used to run a "hot" deployment tool for vendor-specific +J2EE server. The task requires nested elements which define the attributes of the vendor-specific +deployment tool being executed. Vendor-specific deployment tools elements may enforce rules for +which attributes are required, depending on the tool.

    -

    The serverdeploy task is used to run a "hot" deployment tool for -vendor-specific J2EE server. The task requires nested elements which define -the attributes of the vendor-specific deployment tool being executed. -Vendor-specific deployment tools elements may enforce rules for which -attributes are required, depending on the tool. -

    - -

    Parameters:

    - - - - - - - - - +

    Parameters

    +
    AttributeDescriptionRequired
    actionThis is the action to be performed. For most cases this - will be "deploy". Some tools support additional actions, such as "delete", "list", - "undeploy", "update"...
    + + + + + + + + - - + +
    AttributeDescriptionRequired
    actionThis is the action to be performed. For most cases this will be deploy. Some tools + support additional actions, such + as delete, list, undeploy, update, ... Yes
    sourceA fully qualified path/filename of the component to be deployed. - This may be an .ear, .jar, .war, or any other type that is supported by the server. - sourceA fully qualified path/filename of the component to be deployed. This may be + an .ear, .jar, .war, or any other type that is + supported by the server. Tool dependent
    -

    Nested Elements

    +

    Parameters specified as nested elements

    -

    The serverdeploy task supports a nested classpath element to set the classpath.

    +

    The serverdeploy task supports a nested classpath element to set the +classpath.

    Vendor-specific nested elements

    -

    Parameters used for all tools:

    - +

    Also supported are nested vendor-specific elements.

    + +

    Parameters used for all tools

    +
    - - - + + + - - + + - - + + - - + + - - + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    classpathThe classpath to be passed to the JVM running the tool. - The classpath may also be supplied as a nested element.classpathThe classpath to be passed to the JVM running the tool. The classpath may also be supplied + as a nested element. Tool dependent
    serverThe address or URL for the server where the component will be deployed.serverThe address or URL for the server where the component will be deployed. Tool dependent
    usernameThe user with privileges to deploy applications to the server.usernameThe user with privileges to deploy applications to the server. Tool dependent
    passwordThe password of the user with privileges to deploy applications to the server.passwordThe password of the user with privileges to deploy applications to the server. Tool dependent
    -

    Also supported are nested vendor-specific elements.

    - -
    -

    Generic element

    -This element is provided for generic Java-based deployment tools. -The generic task accepts (but does not require) nested arg -and jvmarg elements. -A JVM will be spawned with the provided attributes. It is recommended -that a vendor-specific element be used over the generic one if at all -possible. +

    Generic element

    +

    This element is provided for generic Java-based deployment tools. The generic task accepts (but +does not require) nested arg and jvmarg elements. A JVM will be spawned +with the provided attributes. It is recommended that a vendor-specific element be used over the +generic one if at all possible.

    The following attributes are supported by the generic element.

    -

    - +
    - - - + + + - - + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    classnameThis is the fully qualified classname of the Java based - deployment tool to execute.classnameThis is the fully qualified classname of the Java based deployment tool to execute. Yes
    -

    -

    Nested Elements

    -

    The generic element supports nested <arg> and <jvmarg> elements.

    +

    Nested elements

    +

    The generic element supports nested <arg> and <jvmarg> +elements.

    Example

    -

    This example shows the use of generic deploy element to deploy a component -using a Java based deploy tool:

    +

    This example shows the use of generic deploy element to deploy a component using a Java based +deploy tool:

    -    <serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.ear">
    -        <generic classname="com.yamato.j2ee.tools.deploy.DeployTool"
    -            classpath="${classpath}"
    -            username="${user.name}"
    -            password="${user.password}">
    -            <arg value="-component=WildStar"/>
    -            <arg value="-force"/>
    -            <jvmarg value="-ms64m"/>
    -            <jvmarg value="-mx128m"/>
    -        </generic>
    -    </serverdeploy>
    -
    - -
    -

    WebLogic element

    -

    -The WebLogic element contains additional attributes to run the -weblogic.deploy deployment tool. -

    Valid actions for the tool are deploy, undeploy, -list, update, and delete. -

    If the action is deploy or update, -the application and source attributes must be set. -If the action is undeploy or delete, -the application attribute must be set. If the username -attribute is omitted, it defaults to "system". The password attribute is -required for all actions. -

    - - - - - +<serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.ear"> + <generic classname="com.yamato.j2ee.tools.deploy.DeployTool" + classpath="${classpath}" + username="${user.name}" + password="${user.password}"> + <arg value="-component=WildStar"/> + <arg value="-force"/> + <jvmarg value="-ms64m"/> + <jvmarg value="-mx128m"/> + </generic> +</serverdeploy> + +

    WebLogic element

    +

    The WebLogic element contains additional attributes to run the weblogic.deploy +deployment tool.

    +

    Valid actions for the tool are deploy, undeploy, list, update, +and delete.

    +

    If the action is deploy or update, the application and source +attributes must be set. If the action is undeploy or delete, +the application attribute must be set. If the username attribute is omitted, +it defaults to system. The password attribute is required for all actions.

    + +
    AttributeDescriptionRequired
    + + + + - - + + - - + + - - + +
    AttributeDescriptionRequired
    applicationThis is the name of the application being deployedapplicationThis is the name of the application being deployed Yes
    componentThis is the component string for deployment targets. - It is in the form <component>:<target1>,<target2>... - Where component is the archive name (minus the .jar, .ear, .war - extension). Targets are the servers where the components will be deployedcomponentThis is the component string for deployment targets. It is in the + form <component>:<target1>,<target2>... Where component is the + archive name (minus the .jar, .ear, .war extension). + Targets are the servers where the components will be deployed no
    debugIf set to true, additional information will be - printed during the deployment process.debugIf set to true, additional information will be printed during the deployment + process. No
    -

    Examples

    -

    This example shows the use of serverdeploy to deploy a component to a WebLogic server:

    +

    This example shows the use of serverdeploy to deploy a component to a WebLogic +server:

    -    <serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.ear">
    -        <weblogic application="myapp"
    -            server="t3://myserver:7001"
    -            classpath="${weblogic.home}/lib/weblogic.jar"
    -            username="${user.name}"
    -            password="${user.password}"
    -            component="ejb_foobar:myserver,productionserver"
    -            debug="true"/>
    -    </serverdeploy>
    -
    +<serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.ear"> + <weblogic application="myapp" + server="t3://myserver:7001" + classpath="${weblogic.home}/lib/weblogic.jar" + username="${user.name}" + password="${user.password}" + component="ejb_foobar:myserver,productionserver" + debug="true"/> +</serverdeploy> -

    This example shows serverdeploy being used to delete a component from a -WebLogic server:

    +

    This example shows serverdeploy being used to delete a component from a WebLogic +server:

    -    <serverdeploy action="delete" source="${lib.dir}/ejb_myApp.jar"/>
    -        <weblogic application="myapp"
    -            server="t3://myserver:7001"
    -            classpath="${weblogic.home}/lib/weblogic.jar"
    -            username="${user.name}"
    -            password="${user.password}"/>
    -    </serverdeploy>
    -
    - -
    -

    JOnAS (Java Open Application Server) element

    -

    -The JOnAS element contains additional attributes to run the -JonasAdmin deployment tool. -

    Valid actions for the tool are deploy, undeploy, -list and update. -

    You can't use user and password property with this -task. -

    - - - - - +<serverdeploy action="delete" source="${lib.dir}/ejb_myApp.jar"/> + <weblogic application="myapp" + server="t3://myserver:7001" + classpath="${weblogic.home}/lib/weblogic.jar" + username="${user.name}" + password="${user.password}"/> +</serverdeploy> + +

    JOnAS (Java Open Application Server) element

    +

    The JOnAS element contains additional attributes to run the JonasAdmin deployment +tool.

    +

    Valid actions for the tool are deploy, undeploy, list and update.

    +

    You can't use user and password property with this task.

    +
    AttributeDescriptionRequired
    + + + + - - + + - - - + + + - - + + - - + + - - - + + + -
    AttributeDescriptionRequired
    jonasrootThe root directory for JOnAS.jonasrootThe root directory for JOnAS. Yes
    orbChoose your ORB : RMI, JEREMIE, DAVID, ... If omitted, it defaults - to the one present in classpath. The corresponding JOnAS JAR is - automatically added to the classpath. If your orb is DAVID (RMI/IIOP) you must - specify davidhost and davidport properties.NoorbChoose your ORB: RMI, JEREMIE, DAVID, ... The corresponding JOnAS JAR + is automatically added to the classpath. If your orb is DAVID (RMI/IIOP) you + must specify davidhost and davidport properties.No; defaults to the ORB present in classpath
    davidhostThe value for the system property : david.CosNaming.default_host .davidhostThe value for the system property: david.CosNaming.default_host. No
    davidportThe value for the system property : david.CosNaming.default_port .davidportThe value for the system property: david.CosNaming.default_port. No
    classnameThis is the fully qualified classname of the Java based - deployment tool to execute. Default to org.objectweb.jonas.adm.JonasAdminNoclassnameThis is the fully qualified classname of the Java based deployment tool to execute.No; default is org.objectweb.jonas.adm.JonasAdmin
    -

    Nested Elements

    -

    The jonas element supports nested <arg> and <jvmarg> elements.

    - +

    Nested elements

    +

    The jonas element supports nested <arg> +and <jvmarg> elements.

    Examples

    -

    This example shows the use of serverdeploy to deploy a component to a JOnAS server:

    +

    This example shows the use of serverdeploy to deploy a component to a JOnAS +server:

    -    <serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.jar">
    -        <jonas server="MyJOnAS" jonasroot="${jonas.root}">
    -
    -           <classpath>
    -               <pathelement path="${jonas.root}/lib/RMI_jonas.jar"/>
    -               <pathelement path="${jonas.root}/config/"/>
    -           </classpath>
    -        </jonas>
    -    </serverdeploy>
    -
    +<serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.jar"> + <jonas server="MyJOnAS" jonasroot="${jonas.root}"> + <classpath> + <pathelement path="${jonas.root}/lib/RMI_jonas.jar"/> + <pathelement path="${jonas.root}/config/"/> + </classpath> + </jonas> +</serverdeploy> -

    This example shows serverdeploy being used to list the components from a -JOnAS server and a WebLogic server:

    +

    This example shows serverdeploy being used to list the components from a JOnAS +server and a WebLogic server:

    -    <serverdeploy action="list"/>
    -        <jonas jonasroot="${jonas.root}" orb="JEREMIE"/>
    -        <weblogic application="myapp"
    -            server="t3://myserver:7001"
    -            classpath="${weblogic.home}/lib/weblogic.jar"
    -            username="${user.name}"
    -            password="${user.password}"/>
    -    </serverdeploy>
    -
    - - +<serverdeploy action="list"/> + <jonas jonasroot="${jonas.root}" orb="JEREMIE"/> + <weblogic application="myapp" + server="t3://myserver:7001" + classpath="${weblogic.home}/lib/weblogic.jar" + username="${user.name}" + password="${user.password}"/> +</serverdeploy> diff -Nru ant-1.9.10/manual/Tasks/setpermissions.html ant-1.10.3/manual/Tasks/setpermissions.html --- ant-1.9.10/manual/Tasks/setpermissions.html 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/manual/Tasks/setpermissions.html 2018-03-24 12:37:12.000000000 +0000 @@ -0,0 +1,96 @@ + + + + + + +SetPermissions Task + + + + +

    SetPermissions

    +

    Since Ant 1.10.0.

    +

    Description

    +

    Changes the file permissions using Java's NIO support for permissions.

    +

    This task provides a subset of the platform specific abilities of chmod +and attrib in a platform independent way.

    +

    If no permissions are specified either via the mode or the permissions attribute, then all +permissions will be removed from the nested resources.

    +

    The task accepts arbitrary resources as part of the nested resource collections, but not all +resources support setting permissions. This task won't do anything for resources that don't support +setting permissions—for example URLs.

    +

    The permissions are applied to all resources contained within the nested resources +collections. You may want to ensure the collection only returns files or directories if you want +different sets of permissions to apply to either type of resource.

    + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    permissionsThe permissions to set as comma separated list of names + of PosixFilePermission values.No
    modeThe permissions to set as traditional Unix three-digit octal number.No
    nonPosixModeWhat to do if changing the permissions of a file is not possible because the file-system + doesn't support POSIX file permissions. Possible options are fail (fail the + build), pass (just log an error), tryDosOrFail (at least try to set the + read-only flag on DOS file systems, fail if that isn't possible either) + and tryDosOrPass (at least try to set the read-only flag on DOS file systems, just log + an error if that isn't possible either).No; defaults to fail
    failonerrorWhether to stop the build if setting permissions fails.No; defaults to true
    +

    Parameters specified as nested elements

    + +

    any resource collection

    +

    resource collections are used to select groups +of resources.

    +

    Examples

    +
    +<setpermissions mode="755">
    +  <file file="${dist}/start.sh"/>
    +</setpermissions>
    +

    makes the start.sh file readable and executable for anyone and in addition writable +by the owner.

    +
    +<setpermissions permissions="OWNER_READ,OWNER_WRITE,OWNER_EXECUTE,OTHERS_READ,OTHERS_EXECUTE,GROUP_READ,GROUP_EXECUTE">
    +  <file file="${dist}/start.sh"/>
    +</setpermissions>
    +

    makes the start.sh file readable and executable for anyone and in addition writable +by the owner.

    + + diff -Nru ant-1.9.10/manual/Tasks/setproxy.html ant-1.10.3/manual/Tasks/setproxy.html --- ant-1.9.10/manual/Tasks/setproxy.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/setproxy.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,207 +14,86 @@ See the License for the specific language governing permissions and limitations under the License. --> - + + Setproxy Task - + +

    Setproxy Task

    - +

    Description

    +

    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.

    - +

    Parameters

    +
    - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -
    - - - -
    - Setproxy Task -
    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. -
    - - - Apache Ant - -
    -
    - - - - - - - - - - -
     
    - - - Description -
    - 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.

    Examples

    <setproxy/>
    do nothing
    <setproxy proxyhost="firewall"/>
    set the proxy to firewall:80
    <setproxy proxyhost="firewall" proxyport="81"/>
    set the proxy to firewall:81
    <setproxy proxyhost=""/>
    stop using the http proxy; don't change the socks settings
    <setproxy socksproxyhost="socksy"/>
    use socks via socksy:1080
    <setproxy socksproxyhost=""/>
    stop using the socks server.

    You can set a username and password for http with the proxyHost and proxyPassword attributes. On Java1.4 and above these can also be used against SOCKS5 servers.

    -
    - - - - - - - - - - - - -
     
    - - - Parameters -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Attribute - - Description - - Type - - Requirement -
    - nonproxyhosts - - 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 - - String - - Optional -
    - proxyhost - - the HTTP/ftp proxy host. Set this to "" for the http proxy option to be disabled - - String -
    - proxypassword - - Set the password for the proxy. Used only if the proxyUser is set. - - String -
    - proxyport - - the HTTP/ftp proxy port number; default is 80 - - int -
    - proxyuser - - set the proxy user. Probably requires a password to accompany this setting. Default="" - - String -
    - socksproxyhost - - The name of a Socks server. Set to "" to turn socks proxying off. - - String -
    - socksproxyport - - Set the ProxyPort for socks connections. The default value is 1080 - - int -
    -
    - - - - - - - - - - -
     
    - - - Parameters as nested elements -
    - -
    - - - -
    AttributeDescriptionTypeRequired
    nonproxyhostsA 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.comStringNo
    proxyhostthe HTTP/FTP proxy host. Set this to for the HTTP proxy option to be disabled.StringNo
    proxypasswordSet the password for the proxy. Used only if the proxyUser is set.StringNo
    proxyportthe HTTP/FTP proxy port numberintNo; default is 80
    proxyuserset the proxy user. Probably requires a password to accompany this setting.StringNo; default is
    socksproxyhostThe name of a SOCKS server. Set to to turn SOCKS proxying off.StringNo
    socksproxyportSet the ProxyPort for SOCKS connections.intNo; default is 1080
    +

    Examples

    +
    <setproxy/>
    do nothing +
    <setproxy proxyhost="firewall"/>
    set the proxy to firewall:80 +
    <setproxy proxyhost="firewall" proxyport="81"/>
    set the proxy to firewall:81 +
    <setproxy proxyhost=""/>
    stop using HTTP proxy; don't change SOCKS settings +
    <setproxy socksproxyhost="socksy"/>
    use SOCKS via socksy:1080 +
    <setproxy socksproxyhost=""/>
    stop using the SOCKS server. +

    You can set a username and password for http with the proxyHost +and proxyPassword attributes. On Java 1.4 and above these can also be used against SOCKS +5 servers.

    + diff -Nru ant-1.9.10/manual/Tasks/signjar.html ant-1.10.3/manual/Tasks/signjar.html --- ant-1.9.10/manual/Tasks/signjar.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/signjar.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,276 +24,253 @@ -

    SignJar

    +

    SignJar

    Description

    Signing a jar allows users to authenticate the publisher.

    -

    Signs JAR files with the jarsigner command line tool. -It will take a named file in the jar attribute, and an optional -destDir or signedJar attribute. Nested paths are also -supported; here only an (optional) destDir is allowed. If a destination -directory or explicit JAR file name is not provided, JARs are signed in place. -

    -

    -Dependency rules -

    +

    Signs JAR files with +the jarsigner command line tool. It will take a named file in +the jar attribute, and an optional destDir or signedJar +attribute. Nested paths are also supported; here only an (optional) destDir is +allowed. If a destination directory or explicit JAR file name is not provided, JARs are signed in +place.

    +

    Dependency rules

      -
    • Nonexistent destination JARs are created/signed
    • -
    • Out of date destination JARs are created/signed
    • -
    • If a destination file and a source file are the same, -and lazy is true, the JAR is only signed if it does not -contain a signature by this alias.
    • -
    • If a destination file and a source file are the same, -and lazy is false, the JAR is signed.
    • +
    • Nonexistent destination JARs are created/signed
    • +
    • Out of date destination JARs are created/signed
    • +
    • If a destination file and a source file are the same, and lazy is true, the + JAR is only signed if it does not contain a signature by this alias.
    • +
    • If a destination file and a source file are the same, and lazy is false, the + JAR is signed.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    jarthe jar file to signYes, unless nested paths have - been used.jarthe jar file to signYes, unless nested paths have been used
    aliasthe alias to sign underYes.aliasthe alias to sign underYes
    storepasspassword for keystore integrity.Yes.storepasspassword for keystore integrity. Ant will not use + the -storepass command line argument but send the + password to jarsigner when it prompts for it.Yes
    keystorekeystore locationNokeystorekeystore locationNo
    storetypekeystore typeNostoretypekeystore typeNo
    keypasspassword for private key (if different)Nokeypasspassword for private key (if different)No
    sigfilename of .SF/.DSA fileNosigfilename of .SF/.DSA fileNo
    signedjarname of signed JAR file. This can only be set when - the jar attribute is set.No.signedjarname of signed JAR file. This can only be set when the jar attribute is set.No
    verbose(true | false) verbose output when signingNo; default falseverbose(true|false) verbose output when signingNo; default false
    strict(true | false) strict checking when signing.
    since Ant 1.9.1.
    No; default falsestrict(true|false) strict checking when signing.
    since Ant 1.9.1.
    No; default false
    internalsf(true | false) include the .SF file inside the signature -blockNo; default falseinternalsf(true|false) include the .SF file inside the signature blockNo; default false
    sectionsonly(true | false) don't compute hash of entire manifestNo; default falsesectionsonly(true|false) don't compute hash of entire manifestNo; default false
    lazyflag to control whether the presence of a signature - file means a JAR is signed. This is only used when the target JAR matches - the source JARNo; default falselazyflag to control whether the presence of a signature file means a JAR is signed. This is only + used when the target JAR matches the source JARNo; default false
    maxmemorySpecifies the maximum memory the jarsigner VM will use. Specified in the - style of standard java memory specs (e.g. 128m = 128 MBytes)NomaxmemorySpecifies the maximum memory the jarsigner JVM will use. Specified in the style + of standard Java memory specs (e.g. 128m = 128 MBytes)No
    preservelastmodifiedGive the signed files the same last modified - time as the original jar files.No; default false.preservelastmodifiedGive the signed files the same last modified time as the original jar files.No; default false.
    tsaurlURL for a timestamp authority for timestamped - JAR files in Java1.5+NotsaurlURL for a timestamp authority for timestamped JAR files in Java 5+No
    tsacertalias in the keystore for a timestamp authority for - timestamped JAR files in Java1.5+Notsacertalias in the keystore for a timestamp authority for timestamped JAR files in Java 5+No
    tsaproxyhostproxy host to be used when connecting to TSA serverNotsaproxyhostproxy host to be used when connecting to TSA serverNo
    tsaproxyportproxy port to be used when connecting to TSA serverNotsaproxyportproxy port to be used when connecting to TSA serverNo
    executableSpecify a particular jarsigner executable - to use in place of the default binary (found in the same JDK as - Apache Ant is running in).
    - Must support the same command line options as the Sun JDK - jarsigner command. - since Ant 1.8.0.
    NoexecutableSpecify a particular jarsigner executable to use in place of the default binary + (found in the same JDK as Apache Ant is running in).
    Must support the same command line + options as the Sun JDK jarsigner command. since Ant 1.8.0.
    No
    forceWhether to force signing of the jar file even if - it doesn't seem to be out of date or already signed. - since Ant 1.8.0.No; default falseforceWhether to force signing of the jar file even if it doesn't seem to be out of date or + already signed. since Ant 1.8.0.No; default false
    sigalgname of signature algorithmNosigalgname of signature algorithmNo
    digestalgname of digest algorithmNodigestalgname of digest algorithmNo
    tsadigestalgname of TSA digest algorithm. since Ant 1.10.2No

    Parameters as nested elements

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    pathpath of JAR files to sign. since Ant 1.7Nopathpath of JAR files to sign. since Ant 1.7No
    filesetfileset of JAR files to sign. Nofilesetfileset of JAR files to sign.No
    mapperA mapper to rename jar files during signingNo, and only one can be suppliedmapperA mapper to rename jar files during signingNo, and only one can be supplied
    syspropertyJVM system properties, with the syntax of Ant - environment variables No, and only one can be suppliedsyspropertyJVM system properties, with the syntax of Ant environment + variablesNo, and only one can be supplied
    -

    Examples

    -

    For instructions on generating a code signing certificate, see the keytool documentation and/or instructions from your certificate authority.

    -
    +

    For instructions on generating a code signing certificate, see +the keytool documentation and/or instructions from your certificate authority.

    +
     <signjar jar="${dist}/lib/ant.jar"
    -alias="apache-group" storepass="secret"/>
    -
    -

    - signs the ant.jar with alias "apache-group" accessing the - keystore and private key via "secret" password. -

    -
    +         alias="apache-group" storepass="secret"/>
    +

    signs the ant.jar with alias apache-group accessing the keystore and private +key via secret password.

    +
     <signjar destDir="signed"
    -    alias="testonly" keystore="testkeystore"
    -    storepass="apacheant"
    -    preservelastmodified="true">
    +         alias="testonly" keystore="testkeystore"
    +         storepass="apacheant"
    +         preservelastmodified="true">
       <path>
    -    <fileset dir="dist" includes="**/*.jar" />
    +    <fileset dir="dist" includes="**/*.jar"/>
       </path>
    -  <flattenmapper />
    -</signjar>
    -
    -

    -Sign all JAR files matching the dist/**/*.jar pattern, copying them to the -directory "signed" afterwards. The flatten mapper means that they will -all be copied to this directory, not to subdirectories. - -

    -
    -<signjar
    -    alias="testonly" keystore="testkeystore"
    -    storepass="apacheant"
    -    lazy="true"
    -    >
    +  <flattenmapper/>
    +</signjar>
    +

    Sign all JAR files matching the dist/**/*.jar pattern, copying them to the +directory signed afterwards. The flatten mapper means that they will all be copied to +this directory, not to subdirectories.

    +
    +<signjar alias="testonly" keystore="testkeystore"
    +         storepass="apacheant"
    +         lazy="true">
       <path>
    -    <fileset dir="dist" includes="**/*.jar" />
    +    <fileset dir="dist" includes="**/*.jar"/>
       </path>
    -</signjar>
    -
    -

    -Sign all the JAR files in dist/**/*.jar in-situ. Lazy signing is used, -so the files will only be signed if they are not already signed. -

    -
    -<signjar
    -    alias="testonly" keystore="testkeystore"
    -    storepass="apacheant"
    -    sigalg="MD5withRSA"
    -    digestalg="SHA1">
    +</signjar>
    +

    Sign all the JAR files in dist/**/*.jar in-situ. Lazy signing is used, so +the files will only be signed if they are not already signed.

    +
    +<signjar alias="testonly" keystore="testkeystore"
    +         storepass="apacheant"
    +         sigalg="MD5withRSA"
    +         digestalg="SHA1">
       <path>
    -    <fileset dir="dist" includes="**/*.jar" />
    +    <fileset dir="dist" includes="**/*.jar"/>
       </path>
    -</signjar>
    -
    -

    -Sign all the JAR files in dist/**/*.jar using the digest algorithm SHA1 and the -signature algorithm MD5withRSA. This is especially useful when you want to use -the JDK 7 jarsigner (which uses SHA256 and SHA256withRSA as default) to create -signed jars that will be deployed on platforms not supporting SHA256 and -SHA256withRSA. -

    +</signjar> +

    Sign all the JAR files in dist/**/*.jar using the digest algorithm SHA1 and the +signature algorithm MD5withRSA. This is especially useful when you want to use the JDK +7 jarsigner (which uses SHA256 and SHA256withRSA as default) to create signed jars that +will be deployed on platforms not supporting SHA256 and SHA256withRSA.

    About timestamp signing

    -

    Timestamps record the date and time that a signature took place, allowing the signature to be verified as of that point in time. -With trusted timestamping, users can verify that signing occurred before a certificate's expiration or revocation. Without this timestamp, users can only verify the signature as of their current date.

    +

    Timestamps record the date and time that a signature took place, allowing the signature to be +verified as of that point in time. With trusted timestamping, users can verify that signing +occurred before a certificate's expiration or revocation. Without this timestamp, users can only +verify the signature as of their current date.

    -

    -Timestamped JAR files were introduced in Java1.5 and supported in Ant since -Ant 1.7. Since Ant 1.9.5, Ant can use unauthenticated proxies for this signing process. -

    +

    Timestamped JAR files were introduced in Java 5; they are supported since Ant +1.7. Unauthenticated proxies can be used to access TSAs since Ant 1.9.5.

    -

    Common public timestamp authorities include -

      -
    • http://timestamp.verisign.com
    • -
    • http://tsa.starfieldtech.com
    • -
    • https://timestamp.geotrust.com/tsa
    • -
    • Others (see your certificate authority)
    • -

    +

    Common public timestamp authorities include

    +
      +
    • http://timestamp.verisign.com
    • +
    • http://tsa.starfieldtech.com
    • +
    • https://timestamp.geotrust.com/tsa
    • +
    • Others (see your certificate authority)
    • +
    - diff -Nru ant-1.9.10/manual/Tasks/sleep.html ant-1.10.3/manual/Tasks/sleep.html --- ant-1.9.10/manual/Tasks/sleep.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sleep.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,63 +23,58 @@ -

    Sleep

    +

    Sleep

    Description

    -

    A task for sleeping a short period of time, useful when a build or deployment - process requires an interval between tasks.

    +

    A task for sleeping a short period of time, useful when a build or deployment process requires an +interval between tasks.

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    AttributeDescriptionRequired
    hourshours to to add to the sleep timeNo
    minutes minutes to add to the sleep timeNo
    secondsseconds to add to the sleep timeNo
    millisecondsmilliseconds to add to the sleep timeNo
    failonerrorflag controlling whether to break the build on an error. - No
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    hourshours to to add to the sleep timeNo
    minutesminutes to add to the sleep timeNo
    secondsseconds to add to the sleep timeNo
    millisecondsmilliseconds to add to the sleep timeNo
    failonerrorflag controlling whether to break the build on an errorNo
    -

    The sleep time is the sum of specified values, hours, minutes seconds and milliseconds. - A negative value can be supplied to any of them provided the total sleep time - is positive

    -

    Note that sleep times are always hints to be interpred by the OS how it feels - - small times may either be ignored or rounded up to a minimum timeslice. Note - also that the system clocks often have a fairly low granularity too, which complicates - measuring how long a sleep actually took.

    +

    The sleep time is the sum of specified values, hours, minutes seconds and milliseconds. A +negative value can be supplied to any of them provided the total sleep time is positive

    +

    Note that sleep times are always hints to be interpreted by the OS how it feels—small times +may either be ignored or rounded up to a minimum timeslice. Note also that the system clocks often +have a fairly low granularity too, which complicates measuring how long a sleep actually took.

    Examples

    -
       <sleep milliseconds="10"/>
    -Sleep for about 10 mS. -
       <sleep seconds="2"/>
    -Sleep for about 2 seconds. -
       <sleep hours="1" minutes="-59" seconds="-58"/>
    -

    Sleep for one hour less 59:58, or two seconds again

    -
       <sleep/>
    -Sleep for no time at all. This may yield the CPU time to another thread or process. - +
    <sleep milliseconds="10"/>
    +

    Sleep for about 10 ms.

    +
    <sleep seconds="2"/>
    +

    Sleep for about 2 seconds.

    +
    <sleep hours="1" minutes="-59" seconds="-58"/>
    +

    Sleep for one hour less 59:58, or two seconds again.

    +
    <sleep/>
    +

    Sleep for no time at all. This may yield the CPU time to another thread or process.

    - diff -Nru ant-1.9.10/manual/Tasks/sos.html ant-1.10.3/manual/Tasks/sos.html --- ant-1.9.10/manual/Tasks/sos.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sos.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,177 +14,161 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - -SOS Tasks - + SOS Tasks -

    SourceOffSite Tasks User Manual

    - -
    by +

    by

    -Version 1.1 2002/01/23 -
    -
    +

    Version 1.1 2002/01/23

    -
    +

    Contents

    -
    -

    Introduction

    +

    Introduction

    -

    These tasks provide an interface to the -Microsoft Visual SourceSafe SCM via -SourceGear's SourceOffSite -product. SourceOffSite is an add-on to Microsoft's VSS, that allows remote -development teams and tele-commuters that need fast and secure read/write -access to a centralized SourceSafe database via any TCP/IP connection. SOS -provides Linux ,Solaris & Windows clients. The - org.apache.tools.ant.taskdefs.optional.sos -package consists of a simple framework to support SOS functionality as well -as some Apache Ant tasks encapsulating frequently used SOS commands. Although it -is possible to use these commands on the desktop, they were primarily intended -to be used by automated build systems. These tasks have been tested with -SourceOffSite version 3.5.1 connecting to VisualSourceSafe 6.0. The tasks -have been tested with Linux, Solaris & Windows2000.

    - -

    The Tasks

    - - - - - - - - - - - - - - - - - - - +

    These tasks provide an interface to +the Microsoft Visual SourceSafe SCM via SourceGear's SourceOffSite +product. SourceOffSite is an add-on to Microsoft's VSS, that allows remote development teams and +tele-commuters that need fast and secure read/write access to a centralized SourceSafe database via +any TCP/IP connection. SOS provides Linux, Solaris & Windows +clients. The org.apache.tools.ant.taskdefs.optional.sos package consists +of a simple framework to support SOS functionality as well as some Apache Ant tasks encapsulating +frequently used SOS commands. Although it is possible to use these commands on the desktop, they +were primarily intended to be used by automated build systems. These tasks have been tested with +SourceOffSite version 3.5.1 connecting to VisualSourceSafe 6.0. The tasks have been tested with +Linux, Solaris & Windows 2000.

    +

    The Tasks

    + +
    sosgetRetrieves a read-only copy of the specified project or file.
    soslabelAssigns a label to the specified project.
    soscheckinUpdates VSS with changes made to a checked out file or project, - and unlocks the VSS master copy.
    soscheckoutRetrieves a read-write copy of the specified project - or file, locking the VSS master copy
    + + + + + + + + + + + + + + + + +
    sosgetRetrieves a read-only copy of the specified project or file.
    soslabelAssigns a label to the specified project.
    soscheckinUpdates VSS with changes made to a checked out file or project, + and unlocks the VSS master copy.
    soscheckoutRetrieves a read-write copy of the specified project or file, locking the VSS master + copy
    -
    - -
    +

    Task Descriptions

    -

    SOSGet
    -

    +

    SOSGet

    Description

    - Task to perform GET commands with SOS
    +

    Task to perform Get commands with SOS

    Parameters

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    AttributeValuesRequired
    soscmdDirectory which contains soscmd(.exe)
    - soscmd(.exe) must be in the path if this is not specified
    No
    vssserverpathpath to the srcsafe.ini - eg. \\server\vss\srcsafe.iniYes
    sosserverpathaddress & port of the SOS server - eg. 192.168.0.1:8888Yes
    projectpathSourceSafe project path - eg. $/SourceRoot/Project1Yes
    fileFilename to act upon
    - If no file is specified then act upon the project
    No
    usernameSourceSafe usernameYes
    passwordSourceSafe passwordNo
    localpathOverride the working directory and get to the specified pathNo
    soshomeThe path to the SourceOffSite home directoryNo
    nocompresstrue or false - disable compressionNo
    recursivetrue or false - Only works with the GetProject commandNo
    versiona version number to get - Only works with the GetFile commandNo
    labela label version to get - Only works with the GetProject commandNo
    nocachetrue or false - Only needed if SOSHOME is set as an environment variableNo
    verbosetrue or false - Status messages are displayedNo
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeValuesRequired
    soscmdDirectory which contains soscmd(.exe)No; by default, the executable must be in the path
    vssserverpathpath to the srcsafe.ini—eg. \\server\vss\srcsafe.iniYes
    sosserverpathaddress & port of the SOS server—eg. 192.168.0.1:8888Yes
    projectpathSourceSafe project path—eg. $/SourceRoot/Project1Yes
    fileFilename to act uponNo; by default, act upon the project
    usernameSourceSafe usernameYes
    passwordSourceSafe passwordNo
    localpathOverride the working directory and get to the specified pathNo
    soshomeThe path to the SourceOffSite home directoryNo
    nocompresstrue|false—disable compressionNo
    recursivetrue|false—Only works with the GetProject commandNo
    versiona version number to get—Only works with the GetFile commandNo
    labela label version to get—Only works with the GetProject commandNo
    nocachetrue|false—Only needed if SOSHOME is set as an environment + variableNo
    verbosetrue|false—Status messages are displayedNo
    @@ -198,73 +182,72 @@ localpath="tmp" projectpath="$/SourceRoot/project1" sosserverpath="192.168.10.6:8888" - vssserverpath="d:\vss\srcsafe.ini"/> - -Connects to a SourceOffsite server on 192.168.10.6:8888 with -build,build as the username & password. The SourceSafe database resides -on the same box as the SOS server & the VSS database is at -"d:\vss\srcsafe.ini" Does a recursive GetProject on -$/SourceRoot/project1, using tmp as the working -directory.
    -
    + vssserverpath="d:\vss\srcsafe.ini"/> +

    Connects to a SourceOffsite server on 192.168.10.6:8888 +with build, build as the username & password. The SourceSafe database resides on +the same box as the SOS server & the VSS database is at d:\vss\srcsafe.ini. Does a +recursive GetProject on $/SourceRoot/project1, using tmp as the +working directory.

    -
    -

    SOSLabel

    +
    +

    SOSLabel

    Description

    - Task to perform Label commands with SOS
    +

    Task to perform Label commands with SOS

    Parameters

    - - +
    + + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + @@ -277,101 +260,99 @@ label="test label" projectpath="$/SourceRoot/project1" sosserverpath="192.168.10.6:8888" - vssserverpath="d:\vss\srcsafe.ini"/> - - -Connects to a SourceOffsite server on 192.168.10.6:8888 with -build,build as the username & password. The SourceSafe database resides -on the same box as the SOS server & the VSS database is at -"d:\vss\srcsafe.ini". Labels the $/SourceRoot/project1 -project with "test label".
    -
    - -

    + vssserverpath="d:\vss\srcsafe.ini"/> +

    Connects to a SourceOffsite server on 192.168.10.6:8888 +with build, build as the username & password. The SourceSafe database resides on +the same box as the SOS server & the VSS database is at d:\vss\srcsafe.ini. Labels +the $/SourceRoot/project1 project with test label.

    -

    SOSCheckIn

    +
    +

    SOSCheckIn

    Description

    - Task to perform CheckIn commands with SOS
    +

    Task to perform CheckIn commands with SOS

    Parameters

    -
    Attribute Values Required
    soscmdDirectory which contains soscmd(.exe)
    - soscmd(.exe) must be in the path if this is not specified
    NoDirectory which contains soscmd(.exe)No; by default, the executable must be in the path
    vssserverpathpath to the srcsafe.ini - eg. \\server\vss\srcsafe.iniYesvssserverpathpath to the srcsafe.ini—eg. \\server\vss\srcsafe.iniYes
    sosserverpathaddress and port of the SOS server - eg. 192.168.0.1:8888Yessosserverpathaddress and port of the SOS server—eg. 192.168.0.1:8888Yes
    projectpathSourceSafe project path - eg. $/SourceRoot/Project1YesprojectpathSourceSafe project path—eg. $/SourceRoot/Project1Yes
    usernameSourceSafe usernameYesusernameSourceSafe usernameYes
    passwordSourceSafe passwordNopasswordSourceSafe passwordNo
    labelThe label to apply to a projectYeslabelThe label to apply to a projectYes
    commentA comment to be applied to all files being labeledNocommentA comment to be applied to all files being labeledNo
    verbosetrue or false - Status messages are displayedtrue|false—Status messages are displayed No
    - +
    + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + - +
    Attribute Values Required
    soscmdDirectory which contains soscmd(.exe)
    - soscmd(.exe) must be in the path if this is not specified
    NoDirectory which contains soscmd(.exe)No; by default, the executable must be in the path
    vssserverpathpath to the srcsafe.ini - eg. \\server\vss\srcsafe.iniYesvssserverpathpath to the srcsafe.ini—eg. \\server\vss\srcsafe.iniYes
    sosserverpathaddress and port of the SOS server - eg. 192.168.0.1:8888Yessosserverpathaddress and port of the SOS server—eg. 192.168.0.1:8888Yes
    projectpathSourceSafe project path - eg. $/SourceRoot/Project1YesprojectpathSourceSafe project path—eg. $/SourceRoot/Project1Yes
    fileFilename to act upon
    If no file is specified then act upon the project
    NofileFilename to act uponNo; by default, act upon the project
    usernameSourceSafe usernameYesusernameSourceSafe usernameYes
    passwordSourceSafe passwordNopasswordSourceSafe passwordNo
    localpathOverride the working directory and get to the specified pathNolocalpathOverride the working directory and get to the specified pathNo
    soshomeThe path to the SourceOffSite home directoryNososhomeThe path to the SourceOffSite home directoryNo
    nocompresstrue or false - disable compressionNonocompresstrue|false—disable compressionNo
    recursivetrue or false - Only works with the CheckOutProject commandNorecursivetrue|false—Only works with the CheckOutProject commandNo
    nocachetrue or false - Only needed if SOSHOME is set as an environment variableNonocachetrue|false—Only needed if SOSHOME is set as an environment + variableNo
    verbosetrue or false - Status messages are displayedNoverbosetrue|false—Status messages are displayedNo
    commentA comment to be applied to all files being checked inNo
    commentA comment to be applied to all files being checked inNo

    Example

    @@ -383,101 +364,98 @@ comment="comment abc" projectpath="$/SourceRoot/project1" sosserverpath="server1:8888" - vssserverpath="\\server2\vss\srcsafe.ini"/> - + vssserverpath="\\server2\vss\srcsafe.ini"/> -Connects to a SourceOffsite server on server1:8888 with build,build as -the username & password. The SourceSafe database resides on a different -box (server2) & the VSS database is on a share called -"vss". Checks-in only the "foobar.txt" file adding -a comment of "comment abc". Extra status messages will be -displayed on screen.
    -
    +

    Connects to a SourceOffsite server on server1:8888 with build, build +as the username & password. The SourceSafe database resides on a different box +(server2) & the VSS database is on a share called vss. Checks-in only +the foobar.txt file adding a comment of comment abc. Extra status messages will +be displayed on screen.

    -
    -

    SOSCheckOut

    +
    +

    SOSCheckOut

    Description

    - Task to perform CheckOut commands with SOS
    +

    Task to perform CheckOut commands with SOS

    Parameters

    - - +
    + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    Attribute Values Required
    soscmdDirectory which contains soscmd(.exe)
    - soscmd(.exe) must be in the path if this is not specified
    NoDirectory which contains soscmd(.exe)No; by default, the executable must be in the path
    vssserverpathpath to the srcsafe.ini - eg. \\server\vss\srcsafe.iniYesvssserverpathpath to the srcsafe.ini—eg. \\server\vss\srcsafe.iniYes
    sosserverpathaddress and port of the SOS server - eg. 192.168.0.1:8888Yessosserverpathaddress and port of the SOS server—eg. 192.168.0.1:8888Yes
    projectpathSourceSafe project path - eg. $/SourceRoot/Project1YesprojectpathSourceSafe project path—eg. $/SourceRoot/Project1Yes
    fileFilename to act upon
    If no file is specified then act upon the project
    NofileFilename to act uponNo; by default, act upon the project
    usernameSourceSafe usernameYesusernameSourceSafe usernameYes
    passwordSourceSafe passwordNopasswordSourceSafe passwordNo
    localpathOverride the working directory and get to the specified pathNolocalpathOverride the working directory and get to the specified pathNo
    soshomeThe path to the SourceOffSite home directoryNososhomeThe path to the SourceOffSite home directoryNo
    nocompresstrue or false - disable compressionNonocompresstrue|false—disable compressionNo
    recursivetrue or false - Only works with the CheckOutProject commandNorecursivetrue|false—Only works with the CheckOutProject commandNo
    nocachetrue or false - Only needed if SOSHOME is set as an environment variableNonocachetrue|false—Only needed if SOSHOME is set as an environment variableNo
    verbosetrue or false - Status messages are displayedNoverbosetrue|false—Status messages are displayedNo
    -

    Example

    @@ -487,17 +465,13 @@
                  password="build"
                  projectpath="$/SourceRoot/project1"
                  sosserverpath="192.168.10.6:8888"
    -             vssserverpath="\\server2\vss\srcsafe.ini"/>
    -
    - -Connects to a SourceOffsite server on server1:8888 with build,build as -the username & password. The SourceSafe database resides on a different -box (server2) & the VSS database is on a share called -"vss". Checks-out "project1", Only the -"project1" directory will be locked as the recursive option -was not set. Extra status messages will be displayed on screen. The -soscmd(.exe) file to be used resides in /usr/local/bin.
    -
    + vssserverpath="\\server2\vss\srcsafe.ini"/> +

    Connects to a SourceOffsite server on server1:8888 with build, build +as the username & password. The SourceSafe database resides on a different box +(server2) & the VSS database is on a share +called vss. Checks-out project1, only the project1 directory will +be locked as the recursive option was not set. Extra status messages will be displayed on +screen. The soscmd(.exe) file to be used resides in /usr/local/bin.

    diff -Nru ant-1.9.10/manual/Tasks/sound.html ant-1.10.3/manual/Tasks/sound.html --- ant-1.9.10/manual/Tasks/sound.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sound.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,67 +24,56 @@ -

    Sound

    +

    Sound

    Description

    -

    Plays a sound-file at the end of the build, according to whether -the build failed or succeeded. You can specify either a specific -sound-file to play, or, if a directory is specified, the -<sound> task will randomly select a file to play. -Note: At this point, the random selection is based on all the files -in the directory, not just those ending in appropriate suffixes -for sound-files, so be sure you only have sound-files in the -directory you specify.

    -

    More precisely <sound> registers a hook that is -triggered when the build finishes. Therefore you have to place this -task as top level or inside a target which is always executed.

    -

    -Unless you are running on Java 1.3 or later, you need the Java Media Framework -on the classpath (javax.sound). -

    +

    Plays a sound file at the end of the build, according to whether the build failed or +succeeded. You can specify either a specific sound file to play, or, if a directory is specified, +the <sound> task will randomly select a file to play. Note: At +this point, the random selection is based on all the files in the directory, not just those ending +in appropriate suffixes for sound files, so be sure you only have sound files in the directory you +specify.

    +

    More precisely <sound> registers a hook that is triggered when the build +finishes. Therefore you have to place this task as top level or inside a target which is always +executed.

    +

    Unless you are running on Java 1.3 or later, you need the Java Media Framework on the classpath +(javax.sound).

    - -

    Nested Elements

    +

    Parameters specified as nested elements

    success

    Specifies the sound to be played if the build succeeded.

    +

    fail

    Specifies the sound to be played if the build failed.

    -

    Nested Element Parameters

    -

    -The following attributes may be used on the <success> +

    Nested element parameters

    +

    The following attributes may be used on the <success> and <fail> elements:

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    sourcethe path to a sound-file directory, or the name of a -specific sound-file, to be played. If this file does not exist, an error message -will be logged. - Yessourcethe path to a sound file directory, or the name of a specific sound file, to be played. If + this file does not exist, an error message will be logged.Yes
    loopsthe number of extra times to play the sound-file; - default is 0. - Noloopsthe number of extra times to play the sound file.No; default is 0
    durationthe amount of time (in milliseconds) to play - the sound-file. - Nodurationthe amount of time (in milliseconds) to play the sound file.No

    Examples

    -
    +
     <target name="fun" if="fun" unless="fun.done">
       <sound>
    @@ -92,18 +81,11 @@
         <fail source="${user.home}/sounds/ohno.wav" loops="2"/>
       </sound>
       <property name="fun.done" value="true"/>
    -</target>
    -
    -
    -plays the bell.wav sound-file if the build succeeded, or -the ohno.wav sound-file if the build failed, three times, -if the fun property is set to true. -If the target -is a dependency of an "initialization" target that other -targets depend on, the -fun.done property prevents the target from being executed -more than once. -
    +</target> +

    plays the bell.wav sound file if the build succeeded, or the ohno.wav +sound file if the build failed, three times, if the fun property is set to true. +If the target is a dependency of an "initialization" target that other targets depend on, +the fun.done property prevents the target from being executed more than once.

     <target name="fun" if="fun" unless="fun.done">
       <sound>
    @@ -113,11 +95,7 @@
       <property name="fun.done" value="true"/>
     </target>
     
    -
    -randomly selects a sound-file to play when the build succeeds or fails. - - +

    randomly selects a sound file to play when the build succeeds or fails.

    - diff -Nru ant-1.9.10/manual/Tasks/splash.html ant-1.10.3/manual/Tasks/splash.html --- ant-1.9.10/manual/Tasks/splash.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/splash.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,131 +24,110 @@ -

    Splash

    +

    Splash

    by Les Hughes (leslie.hughes@rubus.com)

    Description

    -

    This task creates a splash screen. The splash screen is displayed -for the duration of the build and includes a handy progress bar as -well. Use in conjunction with the sound task to provide interest -whilst waiting for your builds to complete...

    +

    This task creates a splash screen. The splash screen is displayed for the duration of the build +and includes a handy progress bar as well. Use in conjunction with the sound task to +provide interest whilst waiting for your builds to complete...

    Parameters

    - +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequiredDefault
    imageurlA URL pointing to an image to display.Noantlogo.gif from the classpath
    showdurationInitial period to pause the build to show the - splash in milliseconds.No5000 ms
    progressregexpProgress regular expression which is used to - parse the output and dig out current progress. Exactly one group - pattern must exists, and it represents the progress number (0-100) - (i.e "Progress: (.*)%")
    - since Apache Ant 1.8.0
    Noprogress is increased every action - and log output line
    displaytextdisplay text presented in the splash window
    - since Ant 1.8.0
    NoBuilding ...AttributeDescriptionRequired
    imageurlA URL pointing to an image to display.No; defaults to antlogo.gif from the classpath
    showdurationInitial period to pause the build to show the splash in milliseconds.No; defaults to 5000
    progressregexpProgress regular expression which is used to parse the output and dig out current + progress. Exactly one group pattern must exists, and it represents the progress number (0-100) + (i.e Progress: (.*)%)
    since Apache Ant 1.8.0
    No; defaults to progress increase with every action and logged output line
    displaytextdisplay text presented in the splash window
    since Ant 1.8.0
    No; defaults to Building ...

    Deprecated properties

    -The following properties can be used to configure the proxy settings to retrieve -an image from behind a firewall. However, the settings apply not just to this -task, but to all following tasks. Therefore they are now deprecated in -preference to the <setproxy> task, that makes it clear to readers of -the build exactly what is going on. +

    The following properties can be used to configure the proxy settings to retrieve an image from +behind a firewall. However, the settings apply not just to this task, but to all following +tasks. Therefore they are now deprecated in preference to the <setproxy> task, +that makes it clear to readers of the build exactly what is going on.

    - +
    - - - - + + + - - - - + + + - - - - + + + - - - - - + + + - - - - + + + + + + + + -
    useproxyUse a proxy to access imgurl. Note: Only tested - on JDK 1.2.2 and aboveNoNoneAttributeDescriptionRequired
    proxyIP or hostname of the proxy serverNoNoneuseproxyUse a proxy to access imgurl.
    Note: Only tested on JDK 1.2.2 and above
    No
    portProxy portnumberNoNoneproxyIP or hostname of the proxy serverNo
    userUser to authenticate to the proxy as.NoNoneportProxy port numberNo
    passwordProxy passwordNoNoneuserUser to authenticate to the proxy asNo
    passwordProxy passwordNo

    Examples

    -
    -<splash/>
    -
    -

    Splash images/ant_logo_large.gif from the classpath.

    -
    +
    <splash/>
    +

    Splash images/ant_logo_large.gif from the classpath.

    +
     <splash imageurl="http://jakarta.apache.org/images/jakarta-logo.gif"
    -           useproxy="true"
    -           showduration="5000"/>
    +        useproxy="true"
    +        showduration="5000"/>
     
    -
    +

    Splashes the jakarta logo, for an initial period of 5 seconds.

    Splash with controlled progress and nondefault text

    -
    -        <target name="test_new_features">
    -                <echo>New features</echo>
    -                <splash progressRegExp="Progress: (.*)%" showduration="0" displayText="Test text"/>
    -                <sleep seconds="1"/>
    -                <echo>Progress: 10%</echo>
    -                <sleep seconds="1"/>
    -                <echo>Progress: 20%</echo>
    -                <sleep seconds="1"/>
    -                <echo>Progress: 50%</echo>
    -                <sleep seconds="1"/>
    -                <echo>Progress: 70%</echo>
    -                <sleep seconds="1"/>
    -                <echo>Progress: 100%</echo>
    -                <sleep seconds="3"/>
    -        </target>
    -
    - - +
    +<target name="test_new_features">
    +    <echo>New features</echo>
    +    <splash progressRegExp="Progress: (.*)%" showduration="0" displayText="Test text"/>
    +    <sleep seconds="1"/>
    +    <echo>Progress: 10%</echo>
    +    <sleep seconds="1"/>
    +    <echo>Progress: 20%</echo>
    +    <sleep seconds="1"/>
    +    <echo>Progress: 50%</echo>
    +    <sleep seconds="1"/>
    +    <echo>Progress: 70%</echo>
    +    <sleep seconds="1"/>
    +    <echo>Progress: 100%</echo>
    +    <sleep seconds="3"/>
    +</target>
    +
    - diff -Nru ant-1.9.10/manual/Tasks/sql.html ant-1.10.3/manual/Tasks/sql.html --- ant-1.9.10/manual/Tasks/sql.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sql.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,446 +22,389 @@ -

    Sql

    +

    Sql

    Description

    -

    Executes a series of SQL statements via JDBC to a database. Statements can -either be read in from a text file using the src attribute or from -between the enclosing SQL tags.

    - -

    Multiple statements can be provided, separated by semicolons (or the -defined delimiter). Individual lines within the statements can be -commented using either --, // or REM at the start of the line.

    - -

    The autocommit attribute specifies whether auto-commit should be -turned on or off whilst executing the statements. If auto-commit is turned -on each statement will be executed and committed. If it is turned off the -statements will all be executed as one transaction.

    - -

    The onerror attribute specifies how to proceed when an error occurs -during the execution of one of the statements. -The possible values are: continue execution, only show the error; -stop execution, log the error but don't fail the task -and abort execution and transaction and fail task.

    - -

    -Proxies. Some JDBC drivers (including the Oracle thin driver), - use the JVM's proxy settings to route their JDBC operations to the database. - Since Apache Ant1.7, Ant running on Java1.5 or later defaults to - using - the proxy settings of the operating system. - Accordingly, the OS proxy settings need to be valid, or Ant's proxy - support disabled with -noproxy option. -

    +

    Executes a series of SQL statements via JDBC to a database. Statements can either be read in from +a text file using the src attribute or from between the enclosing SQL tags.

    + +

    Multiple statements can be provided, separated by semicolons (or the +defined delimiter). Individual lines within the statements can be commented using +either --, // or REM at the start of the line.

    + +

    The autocommit attribute specifies whether auto-commit should be turned on or off +whilst executing the statements. If auto-commit is turned on each statement will be executed +and committed. If it is turned off the statements will all be executed as one +transaction.

    + +

    The onerror attribute specifies how to proceed when an error occurs during the +execution of one of the statements. The possible values are: continue execution, only show +the error; stop execution, log the error but don't fail the task and abort execution +and transaction and fail task.

    + +

    Proxies. Some JDBC drivers (including the Oracle thin driver), use the JVM's +proxy settings to route their JDBC operations to the database. Since Apache Ant 1.7, Ant +running on Java 5 or later defaults to using the proxy settings of the +operating system. Accordingly, the OS proxy settings need to be valid, or Ant's proxy support +disabled with -noproxy option.

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    AttributeDescriptionRequired
    driverClass name of the jdbc driverYes
    urlDatabase connection urlYes
    useridDatabase user nameYes
    passwordDatabase passwordYes
    srcFile containing SQL statementsYes, unless statements enclosed within tags
    encodingThe encoding of the files containing SQL statementsNo - defaults to default JVM encoding
    outputencodingThe encoding of the files holding - results. since 1.9.4 - No - defaults to default JVM encoding
    delimiterString that separates SQL statementsNo, default ";"
    autocommitAuto commit flag for database connection (default false)No, default "false"
    printPrint result sets from the statements (default false)No, default "false"
    showheadersPrint headers for result sets from the statements (default true)No, default "true"
    showtrailersPrint trailer for number of rows affected (default true)No, default "true"
    outputOutput file for result sets (defaults to System.out) - Since Ant 1.8 can specify any Resource that supports output (see - note). - No (print to System.out by default)
    appendwhether output should be appended to or overwrite - an existing file. Defaults to false.No, ignored if output does not - specify a filesystem destination.
    classpathClasspath used to load driverNo (use system classpath)
    classpathrefThe classpath to use, given as a reference to a path defined elsewhere.No (use system classpath)
    onerrorAction to perform when statement fails: continue, stop, abortNo, default "abort"
    rdbmsExecute task only if this rdbmsNo (no restriction)
    versionExecute task only if rdbms version matchNo (no restriction)
    cachingShould the task cache loaders and the driver?No (default=true)
    delimitertypeControl whether the delimiter will only be recognized on a line by itself.
    - Can be "normal" -anywhere on the line, or "row", meaning it must be on a line by itself
    No (default:normal)
    keepformatControl whether the format of the sql will be preserved.
    - Useful when loading packages and procedures. -
    No (default=false)
    escapeprocessingControl whether the Java statement - object will perform escape substitution.
    - See Statement's - API docs for details. Since Ant 1.6. -
    No (default=true)
    expandpropertiesSet to true to turn on property expansion in - nested SQL, inline in the task or nested transactions. Since Ant 1.7. - No (default=true)
    rawblobsIf true, will write raw streams rather than hex encoding when - printing BLOB results. Since Ant 1.7.1.No, default false
    failOnConnectionErrorIf false, will only print a warning - message and not execute any statement if the task fails to connect - to the database. Since Ant 1.8.0.No, default true
    strictDelimiterMatchingIf false, delimiters will be searched - for in a case-insensitive manner (i.e. delimiter="go" matches "GO") - and surrounding whitespace will be ignored (delimiter="go" matches - "GO "). Since Ant 1.8.0.No, default true
    showWarningsIf true, SQLWarnings will be logged at - the WARN level. Since Ant 1.8.0.
    - Note: even if the attribute is set to false, warnings that - apply to the connection will be logged at the verbose level.
    No, default false
    treatWarningsAsErrorsIf true, SQLWarnings will be treated - like errors - and the logic selected via the onError attribute - applies. - Since Ant 1.8.0.No, default false
    csvColumnSeparatorThe column separator used when printing - the results. - Since Ant 1.8.0.No, default ','
    csvQuoteCharacterThe character used to quote column - values.
    - If set, columns that contain either the column separator or the - quote character itself will be surrounded by the quote character. - The quote character itself will be doubled if it appears inside of - the column's value.
    - Note: BLOB values will never be quoted. - Since Ant 1.8.0.
    No, default is not set (i.e. no quoting - ever occurs)
    forceCsvQuoteCharIf true, quoting always occursNo, default is not set (i.e. quoting - occurs only where needed)
    errorpropertyThe name of a property to set in the event of an - error. Since Ant 1.8.0No
    warningpropertyThe name of a property to set in the event of an - warning. Since Ant 1.8.0No
    rowcountpropertyThe name of a property to set to the number of rows - updated by the first statement/transaction that actually returned - a row count. Since Ant 1.8.0No
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    driverClass name of the jdbc driverYes
    urlDatabase connection URLYes
    useridDatabase user nameYes
    passwordDatabase passwordYes
    srcFile containing SQL statementsYes, unless statements enclosed within tags
    encodingThe encoding of the files containing SQL statementsNo; defaults to default JVM character encoding
    outputencodingThe encoding of the files holding results. since Ant 1.9.4No; defaults to default JVM character encoding
    delimiterString that separates SQL statementsNo; defaults to ;;
    autocommitAuto commit flag for database connectionNo; defaults to false
    printPrint result sets from the statementsNo; defaults to false
    showheadersPrint headers for result sets from the statementsNo; defaults to true
    showtrailersPrint trailer for number of rows affectedNo; defaults to true
    outputOutput file for result sets. Since Ant 1.8 can specify any Resource that supports + output (see note).No; print to System.out by default
    appendwhether output should be appended to or overwrite an existing file.No; defaults to false, ignored if output does not specify a filesystem + destination
    classpathClasspath used to load driverNo; defaults to system classpath
    classpathrefThe classpath to use, given as a reference to a path + defined elsewhere.No; defaults to system classpath
    onerrorAction to perform when statement fails: continue, stop, abortNo; defaults to abort
    rdbmsExecute task only if this rdbmsNo; unrestricted by default
    versionExecute task only if rdbms version matchNo; unrestricted by default
    cachingShould the task cache loaders and the driver?No; defaults to true
    delimitertypeControl whether the delimiter will only be recognized on a line by itself.
    Can + be normal—anywhere on the line, or row, meaning it must be on a line by + itself
    No; defaults to normal
    keepformatControl whether the format of SQL will be preserved.
    Useful when loading packages and + procedures. +
    No; defaults to false
    escapeprocessingControl whether the Java statement object will perform escape substitution.
    + See Statement's API docs for details. Since Ant 1.6. +
    No; defaults to true
    expandpropertiesSet to true to turn on property expansion in nested SQL, inline in the task or nested + transactions. Since Ant 1.7. + No; defaults to true
    rawblobsIf true, will write raw streams rather than hex encoding when printing BLOB + results. Since Ant 1.7.1.No; defaults to false
    failOnConnectionErrorIf false, will only print a warning message and not execute any statement if the task + fails to connect to the database. Since Ant 1.8.0.No; defaults to true
    strictDelimiterMatchingIf false, delimiters will be searched for in a case-insensitive manner + (i.e. delimiter=go matches GO) and surrounding whitespace will be + ignored (delimiter=go matches GO ). Since Ant 1.8.0.No; defaults to true
    showWarningsIf true, SQLWarnings will be logged at the warning level. Since Ant + 1.8.0.
    Note: even if the attribute is set to false, warnings + that apply to the connection will be logged at the verbose level.
    No; defaults to false
    treatWarningsAsErrorsIf true, SQLWarnings will be treated like errors—and the logic selected via + the onError attribute applies. Since Ant 1.8.0.No; defaults to false
    csvColumnSeparatorThe column separator used when printing the results. Since Ant 1.8.0.No; defaults to ,
    csvQuoteCharacterThe character used to quote column values.
    If set, columns that contain either the + column separator or the quote character itself will be surrounded by the quote character. The + quote character itself will be doubled if it appears inside of the column's + value.
    Note: BLOB values will never be quoted. Since Ant + 1.8.0.
    No; default is not set (i.e. no quoting ever occurs)
    forceCsvQuoteCharIf true, quoting always occursNo; default is not set (i.e. quoting occurs only where needed)
    errorpropertyThe name of a property to set in the event of an error. Since Ant 1.8.0No
    warningpropertyThe name of a property to set in the event of an warning. Since Ant 1.8.0No
    rowcountpropertyThe name of a property to set to the number of rows updated by the first + statement/transaction that actually returned a row count. Since Ant 1.8.0No

    Parameters specified as nested elements

    transaction

    -

    Use nested <transaction> -elements to specify multiple blocks of commands to the executed -executed in the same connection but different transactions. This -is particularly useful when there are multiple files to execute -on the same schema.

    - - - - - +

    Use nested <transaction> elements to specify multiple blocks of commands to +the executed executed in the same connection but different transactions. This is particularly useful +when there are multiple files to execute on the same schema.

    +
    AttributeDescriptionRequired
    + + + + - - - + + +
    AttributeDescriptionRequired
    srcFile containing SQL statementsYes, unless statements enclosed within tagssrcFile containing SQL statementsYes, unless statements enclosed within tags
    -

    The <transaction> element supports any resource or single element -resource collection as nested element to specify the resource -containing the SQL statements.

    - -

    any resource or resource -collection

    - -

    You can specify multiple sources via nested resource collection -elements. Each resource of the collection will be run in a -transaction of its own. Prior to Ant 1.7 only filesets were -supported. Use a sort resource collection to get a predictable order -of transactions.

    +

    The <transaction> element supports +any resource or single element resource collection as nested +element to specify the resource containing the SQL statements.

    + +

    any resource or resource collection

    + +

    You can specify multiple sources via nested resource collection elements. Each resource of the +collection will be run in a transaction of its own. Prior to Ant 1.7 only filesets were supported. +Use a sort resource collection to get a predictable order of transactions.

    classpath

    -

    Sql's classpath attribute is a PATH like structure and can also be set via a nested -classpath element. It is used to load the JDBC classes.

    +

    Sql's classpath attribute is a path-like +structure and can also be set via a nested classpath element. It is used to load the +JDBC classes.

    connectionProperty

    Since Ant 1.8.0

    -

    Use nested <connectionProperty> elements to - specify additional JDBC properties that need to be set when - connecting to the database.

    - +

    Use nested <connectionProperty> elements to specify additional JDBC properties +that need to be set when connecting to the database.

    +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    nameName of the propertyYesnameName of the propertyYes
    valueValue of the propertyYesvalueValue of the propertyYes

    Examples

    -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass"
    -    src="data.sql"
    -/>
    -
    - -

    Connects to the database given in url as the sa user using the -org.database.jdbcDriver and executes the SQL statements contained within -the file data.sql

    - -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass"
    -    src="data.sql">
    +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass"
    +     src="data.sql"/>
    + +

    Connects to the database given in url as the sa user using +the org.database.jdbcDriver and executes the SQL statements contained within the +file data.sql

    + +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass"
    +     src="data.sql">
       <connectionProperty name="internal_logon" value="SYSDBA">
    -</sql>
    -
    +</sql> -

    Connects to the database given in url as the sa user using -the org.database.jdbcDriver and executes the SQL statements contained -within the file data.sql. Also sets the -property internal_logon to the value SYSDBA.

    - -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass"
    -    >
    +

    Connects to the database given in url as the sa user using +the org.database.jdbcDriver and executes the SQL statements contained within the +file data.sql. Also sets the property internal_logon to the +value SYSDBA.

    + +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass">
     insert
     into table some_table
     values(1,2,3,4);
     
     truncate table some_other_table;
    -</sql>
    -
    +</sql> -

    Connects to the database given in url as the sa - user using the org.database.jdbcDriver and executes the two SQL statements - inserting data into some_table and truncating some_other_table. Ant Properties - in the nested text will not be expanded.

    - -

    Note that you may want to enclose your statements in -<![CDATA[ ... ]]> sections so you don't -need to escape <, > & -or other special characters. For example:

    - -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass"
    -    ><![CDATA[
    +

    Connects to the database given in url as the sa user using +the org.database.jdbcDriver and executes the two SQL statements inserting data +into some_table and truncating some_other_table. Ant Properties in the +nested text will not be expanded.

    + +

    Note that you may want to enclose your statements in <![CDATA[ +... ]]> sections so you don't need to +escape <, >, & or other special characters. For +example:

    + +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass"><![CDATA[
     
     update some_table set column1 = column1 + 1 where column2 < 42;
     
    -]]></sql>
    -
    +]]></sql> -The following command turns property expansion in nested text on (it is off purely for backwards -compatibility), then creates a new user in the HSQLDB database using Ant properties. +

    The following command turns property expansion in nested text on (it is off purely for backwards +compatibility), then creates a new user in the HSQLDB database using Ant properties.

    -
    <sql
    -    driver="org.hsqldb.jdbcDriver";
    -    url="jdbc:hsqldb:file:${database.dir}"
    -    userid="sa"
    -    password=""
    -    expandProperties="true"
    -    >
    +
    +<sql driver="org.hsqldb.jdbcDriver";
    +     url="jdbc:hsqldb:file:${database.dir}"
    +     userid="sa"
    +     password=""
    +     expandProperties="true">
       <transaction>
         CREATE USER ${newuser} PASSWORD ${newpassword}
       </transaction>
    -</sql>
    -
    +</sql> - -

    The following connects to the database given in url as the sa user using -the org.database.jdbcDriver and executes the SQL statements contained within -the files data1.sql, data2.sql and data3.sql and then executes the truncate -operation on some_other_table.

    - -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass" >
    +

    The following connects to the database given in url as the sa user using +the org.database.jdbcDriver and executes the SQL statements contained within the +files data1.sql, data2.sql and data3.sql and then executes +the truncate operation on some_other_table.

    + +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass">
       <transaction  src="data1.sql"/>
       <transaction  src="data2.sql"/>
       <transaction  src="data3.sql"/>
       <transaction>
         truncate table some_other_table;
       </transaction>
    -</sql>
    -
    +</sql> -

    The following example does the same as (and may execute additional -SQL files if there are more files matching the pattern -data*.sql) but doesn't guarantee that data1.sql will be -run before data2.sql.

    - -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass">
    +

    The following example does the same as (and may execute additional SQL files if there are more +files matching the pattern data*.sql) but doesn't guarantee that data1.sql +will be run before data2.sql.

    + +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass">
       <path>
         <fileset dir=".">
           <include name="data*.sql"/>
    @@ -470,49 +413,43 @@
       <transaction>
         truncate table some_other_table;
       </transaction>
    -</sql>
    -
    +</sql> -

    The following connects to the database given in url as the sa user using the -org.database.jdbcDriver and executes the SQL statements contained within the -file data.sql, with output piped to outputfile.txt, searching /some/jdbc.jar -as well as the system classpath for the driver class.

    - -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass"
    -    src="data.sql"
    -    print="yes"
    -    output="outputfile.txt"
    -    >
    -<classpath>
    -	<pathelement location="/some/jdbc.jar"/>
    -</classpath>
    -</sql>
    -
    - -

    The following will only execute if the RDBMS is "oracle" and the version -starts with "8.1."

    - -
    <sql
    -    driver="org.database.jdbcDriver"
    -    url="jdbc:database-url"
    -    userid="sa"
    -    password="pass"
    -    src="data.sql"
    -    rdbms="oracle"
    -    version="8.1."
    -    >
    +

    The following connects to the database given in url as the sa user using +the org.database.jdbcDriver and executes the SQL statements contained within the +file data.sql, with output piped to outputfile.txt, +searching /some/jdbc.jar as well as the system classpath for the driver class.

    + +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass"
    +     src="data.sql"
    +     print="yes"
    +     output="outputfile.txt">
    +  <classpath>
    +    <pathelement location="/some/jdbc.jar"/>
    +  </classpath>
    +</sql>
    + +

    The following will only execute if the RDBMS is oracle and the version starts +with 8.1.

    + +
    +<sql driver="org.database.jdbcDriver"
    +     url="jdbc:database-url"
    +     userid="sa"
    +     password="pass"
    +     src="data.sql"
    +     rdbms="oracle"
    +     version="8.1.">
     insert
     into table some_table
     values(1,2,3,4);
     
     truncate table some_other_table;
    -</sql>
    -
    - +</sql> diff -Nru ant-1.9.10/manual/Tasks/sshexec.html ant-1.10.3/manual/Tasks/sshexec.html --- ant-1.9.10/manual/Tasks/sshexec.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sshexec.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,285 +24,246 @@ -

    SSHEXEC

    +

    SSHEXEC

    +

    Since Apache Ant 1.6

    Description

    -

    since Apache Ant 1.6

    +

    Runs a command on a remote machine running SSH daemon.

    -

    Runs a command on a remote machine running SSH daemon. -

    - -

    Note: This task depends on external libraries not included -in the Ant distribution. See Library Dependencies -for more information. This task has been tested with jsch-0.1.29 and above -and won't work with versions of jsch earlier than -0.1.28.

    +

    Note: This task depends on external libraries not included in the Ant +distribution. See Library Dependencies for more +information. This task has been tested with JSCh 0.1.29 and above and won't work with versions of +JSCh earlier than 0.1.28.

    See also the scp task

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    hostThe hostname or IP address of the remote host to which you wish to connect.YeshostThe hostname or IP address of the remote host to which you wish to connect.Yes
    usernameThe username on the remote host to which you are connecting.YesusernameThe username on the remote host to which you are connecting.Yes
    commandThe command to run on the remote host.Either this or commandResource must be setcommandThe command to run on the remote host.Exactly one of the two
    commandResourceThe resource (file) that contains the commands to run on the remote host. - Since Ant 1.7.1Either this or command must be setcommandResourceThe resource (file) that contains the commands to run on the remote + host. Since Ant 1.7.1
    portThe port to connect to on the remote host.No, defaults to 22.portThe port to connect to on the remote host.No; defaults to 22
    trustThis trusts all unknown hosts if set to yes/true.
    - Note If you set this to false (the default), the - host you connect to must be listed in your knownhosts file, this - also implies that the file exists.
    No, defaults to No.trustThis trusts all unknown hosts if set to yes + or true.
    Note: If you set this to false (the default), the + host you connect to must be listed in your knownhosts file, this also implies that + the file exists.
    No; defaults to no
    knownhostsThis sets the known hosts file to use to validate - the identity of the remote host. This must be a SSH2 format file. - SSH1 format is not supported.No, defaults to - ${user.home}/.ssh/known_hosts.knownhostsThis sets the known hosts file to use to validate the identity of the remote host. This + must be a SSH2 format file. SSH1 format is not supported.No; defaults to ${user.home}/.ssh/known_hosts
    failonerrorWhether to halt the build if the command does not complete successfully. - No; defaults to true.failonerrorWhether to halt the build if the command does not complete successfully.No; defaults to true
    passwordThe password.Not if you are using key based - authentication or the password has been given in the file or - todir attribute.passwordThe password.Yes, unless you are using key based authentication or the password has been given in the + file or todir attribute.
    keyfileLocation of the file holding the private key.Yes, if you are using key based - authentication.keyfileLocation of the file holding the private key.Yes, if you are using key based authentication
    passphrasePassphrase for your private key.No, defaults to an empty string.passphrasePassphrase for your private key.No; defaults to an empty string
    suppresssystemoutWhether to suppress system out. - since Ant 1.9.0No, defaults to falsesuppresssystemoutWhether to suppress system out. since Ant 1.9.0No; defaults to false
    suppresssystemerrWhether to suppress system err. - since Ant 1.9.4No, defaults to falsesuppresssystemerrWhether to suppress System.err. since Ant 1.9.4No; defaults to false
    outputName of a file to which to write the output.NooutputName of a file to which to write the output.No
    errorOutputThe file to which the standard error of the - command should be redirected. since Ant 1.9.4NoerrorOutputThe file to which the standard error of the command should be redirected. since Ant + 1.9.4No
    appendWhether output file should be appended to or overwritten. Defaults to false, meaning overwrite any existing file.NoappendWhether output file should be appended to or overwritten.No; defaults to false, meaning overwrite any existing file
    errAppendWhether errorOutput file should be appended to or - overwritten. Defaults to false, meaning overwrite any existing - file. since Ant 1.9.4NoerrAppendWhether errorOutput file should be appended to or overwritten. since Ant + 1.9.4No; defaults to false, meaning overwrite any existing file
    outputpropertyThe name of a property in which the output of the - command should be stored. If you use the commandResource - attribute, each command's output will be prefixed by the + outputpropertyThe name of a property in which the output of the command should be stored. If you use + the commandResource attribute, each command's output will be prefixed by the command itself.NoNo
    errorpropertyThe name of a property in which the standard error of the - command should be stored. since Ant 1.9.4No
    resultpropertythe name of a property in which the return code - of the command should be stored. Only of interest if - failonerror=false. since Ant 1.9.4No
    timeoutStop the command if it doesn't finish within the - specified time (given in milliseconds unlike telnet, which - expects a timeout in seconds). - Defaults to 0 which means "wait forever".No
    inputA file from which the executed command's standard - input is taken. This attribute is mutually exclusive with the - inputstring and inputproperty attributes.
    - When executing more than one command via commandResource, input - will be read for each command. - since Ant 1.8.0
    No
    verboseDetermines whether sshexec outputs verbosely to the user.
    - Similar output is generated as the ssh commandline tool wit the -v option. - since Ant 1.8.0
    No, defaults to false
    inputpropertyName of a property who's content serves as the - input stream for the executed command. This attribute is - mutually exclusive with the input and inputstring - attributes.
    - When executing more than one command via commandResource, input - will be read for each command. - since Ant 1.8.0
    No
    inputstringA string which serves as the input stream for the - executed command. This attribute is mutually exclusive with the - input and inputproperty attributes.
    - When executing more than one command via commandResource, input - will be read for each command. - since Ant 1.8.3
    No
    useptyWhether to allocate a pseudo-tty (like ssh -t). - since Ant 1.8.3No, defaults to false
    useSystemInWhether to pass the current standard input to the - remote process. - since Ant 1.9.4No, defaults to false
    serverAliveIntervalSecondsSets a timeout interval in seconds after which if no data has - been received from the server, the task will send a message through - the encrypted channel to request a response from the server. - since Ant 1.9.7No, the default is 0, indicating - that these messages will not be sent to the server
    serverAliveCountMaxThe number of server alive messages which may be - sent without receiving any messages back from the server. Only - used if serverAliveIntervalSeconds is not 0. - since Ant 1.9.7No, defaults to 3errorpropertyThe name of a property in which the standard error of the command should be + stored. since Ant 1.9.4No
    resultpropertythe name of a property in which the return code of the command should be stored. Only of + interest if failonerror=false. since Ant 1.9.4No
    timeoutStop the command if it doesn't finish within the specified time (given in + milliseconds unlike telnet, which expects a timeout in + seconds).No; defaults to 0 which means never
    inputA file from which the executed command's standard input is taken. This attribute is mutually + exclusive with the inputstring and inputproperty attributes.
    When + executing more than one command via commandResource, input will be read for each + command. since Ant 1.8.0
    No
    verboseDetermines whether sshexec outputs verbosely to the user.
    Similar output + is generated as the ssh command line tool with the -v + option. since Ant 1.8.0
    No; defaults to false
    inputpropertyName of a property content of which serves as the input stream for the executed + command. This attribute is mutually exclusive with the input + and inputstring attributes.
    When executing more than one command + via commandResource, input will be read for each command. since Ant + 1.8.0
    No
    inputstringA string which serves as the input stream for the executed command. This attribute is + mutually exclusive with the input and inputproperty attributes.
    + When executing more than one command via commandResource, input will be read for + each command. since Ant 1.8.3
    No
    useptyWhether to allocate a pseudo-tty (like ssh -t). since Ant 1.8.3No; defaults to false
    useSystemInWhether to pass the current standard input to the remote process. since Ant + 1.9.4No; defaults to false
    serverAliveIntervalSecondsSets a timeout interval in seconds after which if no data has been received from the server, + the task will send a message through the encrypted channel to request a response from the + server. since Ant 1.9.7No, the default is 0, indicating that these messages will not be sent to the + server
    serverAliveCountMaxThe number of server alive messages which may be sent without receiving any messages back + from the server. Only used if serverAliveIntervalSeconds is + not 0. since Ant 1.9.7No; defaults to 3

    Examples

    -

    Run a command on a remote machine using password authentication

    -
    -  <sshexec host="somehost"
    -	username="dude"
    -	password="yo"
    -	command="touch somefile"/>
    -
    - -

    Run a command on a remote machine using key authentication

    -
    -  <sshexec host="somehost"
    -	username="dude"
    -	keyfile="${user.home}/.ssh/id_dsa"
    -	passphrase="yo its a secret"
    -	command="touch somefile"/>
    -
    - -

    Run a command on a remote machine using key authentication with no passphrase

    -
    -  <sshexec host="somehost"
    -	username="dude"
    -	keyfile="${user.home}/.ssh/id_dsa"
    -	command="touch somefile"/>
    -
    - -

    Run a set of commands from a command resource (file) on a remote machine using key authentication with no passphrase

    -
    -  <sshexec host="somehost"
    -	username="dude"
    -	keyfile="${user.home}/.ssh/id_dsa"
    -	commandResource="to_run"/>
    -
    - - -

    Security Note: Hard coding passwords and/or usernames -in sshexec task can be a serious security hole. Consider using variable -substitution and include the password on the command line. For example:
    +

    Run a command on a remote machine using password authentication

    -  <sshexec host="somehost"
    -	username="${username}"
    -	password="${password}"
    -	command="touch somefile"/>
    -
    -Invoking ant with the following command line: -
    -    ant -Dusername=me -Dpassword=mypassword target1 target2
    -
    - -Is slightly better, but the username/password is exposed to all users -on an Unix system (via the ps command). The best approach is to use -the -<input> task and/or retrieve the password from a (secured) -.properties file. -

    +<sshexec host="somehost" + username="dude" + password="yo" + command="touch somefile"/> + +

    Run a command on a remote machine using key authentication

    +
    +<sshexec host="somehost"
    +         username="dude"
    +         keyfile="${user.home}/.ssh/id_dsa"
    +         passphrase="yo its a secret"
    +         command="touch somefile"/>
    + +

    Run a command on a remote machine using key authentication with no passphrase

    +
    +<sshexec host="somehost"
    +         username="dude"
    +         keyfile="${user.home}/.ssh/id_dsa"
    +         command="touch somefile"/>
    + +

    Run a set of commands from a command resource (file) on a remote machine using key authentication with no passphrase

    +
    +<sshexec host="somehost"
    +         username="dude"
    +         keyfile="${user.home}/.ssh/id_dsa"
    +         commandResource="to_run"/>
    + +

    Security Note: Hardcoding passwords and/or usernames in sshexec task +can be a serious security hole. Consider using variable substitution and include the password on the +command line. For example:

    +
    +<sshexec host="somehost"
    +         username="${username}"
    +         password="${password}"
    +         command="touch somefile"/>
    +

    Invoking Ant with the following command line:

    +
    ant -Dusername=me -Dpassword=mypassword target1 target2
    +

    is slightly better, but the username/password is exposed to all users on an Unix system (via +the ps command). The best approach is to use the <input> task and/or +retrieve the password from a (secured) .properties file.

    diff -Nru ant-1.9.10/manual/Tasks/sshsession.html ant-1.10.3/manual/Tasks/sshsession.html --- ant-1.9.10/manual/Tasks/sshsession.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sshsession.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,265 +24,227 @@ -

    SSHSESSION

    +

    SSHSESSION

    +

    Since Apache Ant 1.8.0

    Description

    -

    since Apache Ant 1.8.0

    +

    A Task which establishes an SSH connection with a remote machine running SSH daemon, optionally +establishes any number of local or remote tunnels over that connection, then executes any nested +tasks before taking down the connection.

    + +

    Note: This task depends on external libraries not included in the Ant +distribution. See Library Dependencies for more +information. This task has been tested with JSCh 0.1.33 and above and won't work with versions of +JSCh earlier than 0.1.28.

    -

    A Task which establishes an SSH connection with a remote machine -running SSH daemon, optionally establishes any number of local or -remote tunnels over that connection, then executes any nested tasks -before taking down the connection. -

    - -

    Note: This task depends on external libraries not included -in the Ant -distribution. See Library -Dependencies for more information. This task has been tested with -jsch-0.1.33 and above and won't work with versions of jsch earlier -than 0.1.28.

    - -

    See also the sshexec -and scp tasks

    +

    See also the sshexec and scp tasks

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - + - + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    hostThe hostname or IP address of the remote host to which you wish to connect.YeshostThe hostname or IP address of the remote host to which you wish to connect.Yes
    usernameThe username on the remote host to which you are connecting.YesusernameThe username on the remote host to which you are connecting.Yes
    portThe port to connect to on the remote host.No, defaults to 22.portThe port to connect to on the remote host.No; defaults to 22
    localtunnelsA comma-delimited list of - colon-delimited lport:rhost:rport triplets defining - local port forwarding.
    If - nested localtunnel elements are also +
    localtunnelsA comma-delimited list of colon-delimited lport:rhost:rport triplets defining + local port forwarding.
    If nested localtunnel elements are also provided, both sets of tunnels will be established.
    NoNo
    remotetunnelsA comma-delimited list of - colon-delimited rport:lhost:lport triplets defining - remote port forwarding.
    If - nested remotetunnel elements are +
    remotetunnelsA comma-delimited list of colon-delimited rport:lhost:lport triplets defining + remote port forwarding.
    If nested remotetunnel elements are also provided, both sets of tunnels will be established.
    NoNo
    trustThis trusts all unknown hosts if set to yes/true.
    - Note If you set this to false (the default), the - host you connect to must be listed in your knownhosts file, this - also implies that the file exists.
    No, defaults to No.trustThis trusts all unknown hosts if set to yes + or true.
    Note: If you set this to false (the default), the + host you connect to must be listed in your knownhosts file, this also implies that + the file exists.
    No; defaults to no
    knownhostsThis sets the known hosts file to use to validate - the identity of the remote host. This must be a SSH2 format file. - SSH1 format is not supported.No, defaults to - ${user.home}/.ssh/known_hosts.knownhostsThis sets the known hosts file to use to validate the identity of the remote host. This must + be a SSH2 format file. SSH1 format is not supported.No; defaults to ${user.home}/.ssh/known_hosts
    failonerrorWhether to halt the build if the command does not complete successfully. - No; defaults to true.failonerrorWhether to halt the build if the command does not complete successfully.No; defaults to true
    passwordThe password.Not if you are using key based - authentication or the password has been given in the file or - todir attribute.passwordThe password.Yes, unless you are using key based authentication or the password has been given in the + file or todir attribute
    keyfileLocation of the file holding the private key.Yes, if you are using key based - authentication.keyfileLocation of the file holding the private key.Yes, if you are using key based authentication
    passphrasePassphrase for your private key.No, defaults to an empty string.passphrasePassphrase for your private key.No; defaults to an empty string
    timeoutGive up if the connection cannot be established - within the specified time (given in milliseconds). Defaults to 0 - which means "wait forever".NotimeoutGive up if the connection cannot be established within the specified time (given in + milliseconds).No; defaults to 0 which means never

    Parameters specified as nested elements

    -

    localtunnel

    -

    Optionally, any number of localtunnel elements can be used to -define local port forwarding over the SSH connection. If the -localtunnels parameter was also specified, both sets of tunnels will -be established.

    +

    localtunnel

    +

    Optionally, any number of localtunnel elements can be used to define local port +forwarding over the SSH connection. If the localtunnels parameter was also specified, +both sets of tunnels will be established.

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    lportThe number of the local port to be forwarded.YeslportThe number of the local port to be forwarded.Yes
    rhostThe hostname or IP address of the remote host to - which the local port should be forwarded.YesrhostThe hostname or IP address of the remote host to which the local port should be + forwarded.Yes
    rportThe number of the port on the remote host to - which the local port should be forwarded.YesrportThe number of the port on the remote host to which the local port should be forwarded.Yes
    -

    remotetunnel

    -

    Optionally, any number of remotetunnel elements can be used to -define remote port forwarding over the SSH connection. If the -remotetunnels parameter was also specified, both sets of tunnels will -be established.

    +

    remotetunnel

    +

    Optionally, any number of remotetunnel elements can be used to define remote port +forwarding over the SSH connection. If the remotetunnels parameter was also specified, +both sets of tunnels will be established.

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    rportThe number of the remote port to be forwarded.YesrportThe number of the remote port to be forwarded.Yes
    lhostThe hostname or IP address of the local host to - which the remote port should be forwarded.YeslhostThe hostname or IP address of the local host to which the remote port should be + forwarded.Yes
    lportThe number of the port on the local host to which - the remote port should be forwarded.YeslportThe number of the port on the local host to which the remote port should be forwarded.Yes
    -

    sequential

    -

    The sequential element is a required parameter. It is a container -for nested Tasks which are to be executed once the SSH connection is -established and all local and/or remote tunnels established.

    +

    sequential

    +

    The sequential element is a required parameter. It is a container for nested Tasks +which are to be executed once the SSH connection is established and all local and/or remote tunnels +established.

    Examples

    -

    Connect to a remote machine using password authentication, -forward the local cvs port to the remote host, and execute a cvs -command locally, which can use the tunnel.

    +

    Connect to a remote machine using password authentication, forward the local CVS port to +the remote host, and execute a CVS command locally, which can use the tunnel.

    -  <sshsession host="somehost"
    -    username="dude"
    -    password="yo"
    -    localtunnels="2401:localhost:2401"
    -  >
    -    <sequential>
    -      <cvs  command="update ${cvs.parms} ${module}"
    -        cvsRoot="${cvs.root}"
    -        dest="${local.root}"
    -        failonerror="true"
    -      />
    -    </sequential>
    -  </sshsession>
    -
    +<sshsession host="somehost" + username="dude" + password="yo" + localtunnels="2401:localhost:2401"> + <sequential> + <cvs command="update ${cvs.parms} ${module}" + cvsRoot="${cvs.root}" + dest="${local.root}" + failonerror="true"/> + </sequential> +</sshsession> -

    Do the same thing using nested localtunnel element.

    -
    -  <sshsession host="somehost"
    -    username="dude"
    -    password="yo"
    -  >
    -    <localtunnel lport="2401" rhost="localhost" rport="2401"/>
    -    <sequential>
    -      <cvs  command="update ${cvs.parms} ${module}"
    -        cvsRoot="${cvs.root}"
    -        dest="${local.root}"
    -        failonerror="true"
    -    />
    -    </sequential>
    -  </sshsession>
    -
    - -

    Connect to a remote machine using key authentication, forward -port 1080 to port 80 of an intranet server which is not directly -accessible, then run a get task using that tunnel.

    +

    Do the same thing using nested localtunnel element.

    -  <sshsession host="somehost"
    -  username="dude"
    -  keyfile="${user.home}/.ssh/id_dsa"
    -  passphrase="yo its a secret"/>
    -    <LocalTunnel lport="1080" rhost="intranet.mycomp.com" rport="80"/>
    -    <sequential>
    -      <get src="http://localhost:1080/somefile" dest="temp/somefile"/>
    -    </sequential>
    -  </sshsession>
    -
    - - -

    Security Note: Hard coding passwords or -passphrases and/or usernames in sshsession task can be a serious -security hole. Consider using variable substitution and include the -password on the command line. For example:
    +<sshsession host="somehost" + username="dude" + password="yo"> + <localtunnel lport="2401" rhost="localhost" rport="2401"/> + <sequential> + <cvs command="update ${cvs.parms} ${module}" + cvsRoot="${cvs.root}" + dest="${local.root}" + failonerror="true"/> + </sequential> +</sshsession> + +

    Connect to a remote machine using key authentication, forward port 1080 to port 80 of an +intranet server which is not directly accessible, then run a get task using that +tunnel.

    -  <sshsession host="somehost"
    -  username="${username}"
    -  password="${password}"
    -  localtunnels="2401:localhost:2401">
    -    <sequential>
    -      <sometask/>
    -    </sequential>
    -  </sshsession>
    -
    - -Invoking ant with the following command line: +<sshsession host="somehost" + username="dude" + keyfile="${user.home}/.ssh/id_dsa" + passphrase="yo its a secret"/> + <LocalTunnel lport="1080" rhost="intranet.mycomp.com" rport="80"/> + <sequential> + <get src="http://localhost:1080/somefile" dest="temp/somefile"/> + </sequential> +</sshsession> + +

    Security Note: Hardcoding passwords or passphrases and/or usernames +in sshsession task can be a serious security hole. Consider using variable substitution +and include the password on the command line. For example:

    -    ant -Dusername=me -Dpassword=mypassword target1 target2
    -
    - -Is slightly better, but the username/password is exposed to all users -on an Unix system (via the ps command). The best approach is to use -the -<input> task and/or retrieve the password from a (secured) -.properties file. -

    +<sshsession host="somehost" + username="${username}" + password="${password}" + localtunnels="2401:localhost:2401"> + <sequential> + <sometask/> + </sequential> +</sshsession> + +

    Invoking Ant with the following command line:

    +
    ant -Dusername=me -Dpassword=mypassword target1 target2
    +

    is slightly better, but the username/password is exposed to all users on an Unix system (via +the ps command). The best approach is to use the <input> task and/or +retrieve the password from a (secured) .properties file.

    diff -Nru ant-1.9.10/manual/Tasks/style.html ant-1.10.3/manual/Tasks/style.html --- ant-1.9.10/manual/Tasks/style.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/style.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,566 +24,504 @@ -

    XSLT

    -

    The name style is a deprecated name for the same task.

    +

    XSLT

    +

    The name style is a deprecated name for the same task.

    Description

    Process a set of documents via XSLT.

    -

    This is useful for building views of XML based documentation, -or for generating code.

    -

    Note: If you are using JDK 1.4 or higher, this task does not require external libraries -not supplied in the Apache Ant distribution. However, often the built in XSL engine is not as up -to date as a fresh download, so an update is still highly recommended - in particular since the built-in XSLT processors of Java 5 (and to a - certain extent Java 6) are known to have serious issues. -See Library Dependencies for more information.

    -

    It is possible to refine the set of files that are being processed. This can be -done with the includes, includesfile, excludes, excludesfile and defaultexcludes -attributes. With the includes or includesfile attribute you specify the files you want to -have included by using patterns. The exclude or excludesfile attribute is used to specify -the files you want to have excluded. This is also done with patterns. And -finally with the defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the +

    This is useful for building views of XML based documentation, or for generating code.

    +

    Note: If you are using JDK 1.4 or higher, this task does not require external +libraries not supplied in the Apache Ant distribution. However, often the built in XSL engine is not +as up to date as a fresh download, so an update is still highly recommended in particular since the +built-in XSLT processors of Java 5 (and to a certain extent Java 6) are known to have serious +issues. See Library Dependencies for more +information.

    +

    It is possible to refine the set of files that are being processed. This can be done with +the includes, includesfile, excludes, excludesfile +and defaultexcludes attributes. With the includes or includesfile +attribute you specify the files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This is +also done with patterns. And finally with the defaultexcludes attribute, you can specify +whether you want to use default exclusions or not. See the section +on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.

    This task forms an implicit FileSet and supports all - attributes of <fileset> (dir becomes basedir) - as well as the nested <include>, <exclude> - and <patternset> elements.

    - -

    Note: Unlike other similar tasks, this task treats -directories that have been matched by the include/exclude patterns of -the implicit fileset in a special way. It will apply the stylesheets -to all files contain in them as well. Since the default include -pattern is ** this means it will apply the stylesheet to -all files. If you specify an excludes pattern, it may still work on -the files matched by those patterns because the parent directory has -been matched. If this behavior is not what you want, set the -scanincludedirectories attribute to false.

    - -

    Starting with Ant 1.7 this task supports nested resource collections -in addition to (or instead of, depending on the useImplicitFileset -attribute) the implicit fileset formed by this task.

    - -

    This task supports the use of a nested <param> element which is used to pass values - to an <xsl:param> declaration.

    -

    This task supports the use of a nested xmlcatalog -element which is used to perform Entity and URI resolution.

    - -

    Note on XSLT extension functions: when using the default - TraX implementation of the Java class library and - a SecurityManager is active - e.g. when running from - within an IDE - XSLT extension functions cannot be used as "secure - processing" is active in Java 7 and above. Ant contains a special - "hack" that allows XSLT extensions to be used in Java 7 and 8, but - this hack fails for Java 9. If you want to use extensions like the - redirect extension that are provided by the Java class library - itself, you can allow them by enabling the - feature http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions - in Java 9 and above. If you need to use an extension function not - provided by Java itself you can set the - attribute jdk.xml.transform.extensionClassLoader to a - classloader (reference to an Ant PATH-like structure).

    +attributes of <fileset> (dir becomes basedir) as well +as the nested <include>, <exclude> +and <patternset> elements.

    + +

    Note: Unlike other similar tasks, this task treats directories that have been +matched by the include/exclude patterns of the implicit fileset in a special way. It will apply the +stylesheets to all files contain in them as well. Since the default includes pattern +is ** this means it will apply the stylesheet to all files. If you specify +an excludes pattern, it may still work on the files matched by those patterns because the +parent directory has been matched. If this behavior is not what you want, set +the scanincludedirectories attribute to false.

    + +

    Since Ant 1.7, this task supports +nested resource collections in addition to (or +instead of, depending on the useImplicitFileset attribute) the implicit fileset formed by +this task.

    + +

    This task supports the use of a nested <param> element which is used to pass +values to an <xsl:param> declaration.

    +

    This task supports the use of a nested xmlcatalog element +which is used to perform Entity and URI resolution.

    + +

    Note on XSLT extension functions: when using the default TrAX implementation of +the Java class library and a SecurityManager is active—e.g. when running from +within an IDE—XSLT extension functions cannot be used as "secure processing" is active in Java +7 and above. Ant contains a special "hack" that allows XSLT extensions to be used in Java 7 and 8, +but this hack fails for Java 9. If you want to use extensions like the redirect extension that are +provided by the Java class library itself, you can allow them by enabling the +feature http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions in Java 9 and +above. If you need to use an extension function not provided by Java itself you can set the +attribute jdk.xml.transform.extensionClassLoader to a classloader (reference to an Ant +path-like structure).

    Parameters

    - +
    - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + +
    AttributeDescriptionRequired
    basedirwhere to find the source XML file, default is the - project's basedir.No
    destdirdirectory in which to store the results.Yes, unless in and out have been - specified.
    extensiondesired file extension to be used for the targets. If not - specified, the default is ".html". Will be ignored if - a nested <mapper> or both in and - out have been specified.No
    stylename of the stylesheet to use - given either relative - to the project's basedir or as an absolute path.
    -
    - Alternatively, a nested element which ant can interpret as a resource - can be used to indicate where to find the stylesheet
    - deprecated variation :
    - If the stylesheet cannot be found, and if you have specified the - attribute basedir for the task, ant will assume that the style - attribute is relative to the basedir of the task. -
    No, if the location of - the stylesheet is specified using a nested <style> elementAttributeDescriptionRequired
    classpaththe classpath to use when looking up the XSLT - processor.Nobasedirwhere to find the source XML file.No; defaults to the project's basedir
    classpathrefthe classpath to use, given as reference to a path defined elsewhere.Nodestdirdirectory in which to store the results.Yes, unless in and out have been specified.
    forceRecreate target files, even if they are newer - than their corresponding source files or the stylesheet.No; default is falseextensiondesired file extension to be used for the targets.No; default is .html, ignored if a nested <mapper> or + both in and out have been specified
    processorname of the XSLT processor to use. - Permissible value is :
      -
    • "trax" for a TraX compliant processor (ie JAXP interface - implementation such as Xalan 2 or Saxon)
    - Defaults to trax. -
    - Support for xalan1 has been removed in ant 1.7. -
    Nostylename of the stylesheet to use—given either relative to the + project's basedir or as an absolute path.
    Alternatively, a nested element + which Ant can interpret as a resource can be used to indicate where to find the + stylesheet.
    Deprecated variation:
    If the stylesheet cannot be found, + and if you have specified the attribute basedir for the task, Ant will assume that + the style attribute is relative to the basedir of the task.
    No, if the location of the stylesheet is specified using a nested <style> + element
    classpaththe classpath to use when looking up the XSLT processor.No
    classpathrefthe classpath to use, given as reference to a path + defined elsewhere.No
    includescomma- or space-separated list of patterns of files that must be included. - All files are included when omitted.NoforceRecreate target files, even if they are newer than their corresponding source files or the + stylesheet.No; default is false
    includesfilethe name of a file. Each line of this file is taken to be - an include patternNoprocessorname of the XSLT processor to use. Permissible value is: +
      +
    • trax for a TraX compliant processor (ie JAXP interface implementation such as + Xalan 2 or Saxon)
    • +
    + Support for Xalan 1 has been removed since Ant 1.7. +
    No; defaults to trax
    excludescomma- or space-separated list of patterns of files that must be excluded. - No files (except default excludes) are excluded when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    excludesfilethe name of a file. Each line of this file is taken to be - an exclude patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    inspecifies a single XML document to be styled. Should be used - with the out attribute.Noexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
    outspecifies the output name for the styled result from the - in attribute.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    scanincludeddirectoriesIf any directories are matched by the - includes/excludes patterns, try to transform all files in these - directories. Default is trueNoinspecifies a single XML document to be styled. Should be used + with the out attribute.No
    reloadstylesheetControl whether the stylesheet transformer is created - anew for every transform operation. If you set this to true, performance may - suffer, but you may work around a bug in certain Xalan-J versions. - Default is false. Since Ant 1.5.2.Nooutspecifies the output name for the styled result from the in attribute.No
    useImplicitFilesetWhether the implicit fileset formed by this task - shall be used. If you set this to false you must use nested - resource collections - or the in attribute, in which case this - attribute has no impact anyway. Default is true. - Since Ant 1.7.NoscanincludeddirectoriesIf any directories are matched by the includes/excludes patterns, try + to transform all files in these directories. + No; default is true
    filenameparameterSpecifies a xsl parameter for accessing the name - of the current processed file. If not set, the file name is not - passed to the transformation. - Since Ant 1.7.NoreloadstylesheetControl whether the stylesheet transformer is created anew for every transform operation. If + you set this to true, performance may suffer, but you may work around a bug in certain + Xalan versions. Since Ant 1.5.2.No; default is false
    filedirparameterSpecifies a xsl parameter for accessing the directory - of the current processed file. For files in the current directory a - value of '.' will be passed to the transformation. - If not set, the directory is not passed to the transformation. - Since Ant 1.7.NouseImplicitFilesetWhether the implicit fileset formed by this task shall be used. If you set this + to false you must use nested resource collections—or the in attribute, + in which case this attribute has no impact anyway. Since Ant 1.7.No; default is true
    suppressWarningsWhether processor warnings shall be suppressed. - This option requires support by the processor, it is supported by - the trax processor bundled with Ant. - Since Ant 1.8.0.No, default is false.filenameparameterSpecifies an XSL parameter for accessing the name of the current processed file. If not set, + the file name is not passed to the transformation. Since Ant 1.7.No
    failOnErrorWhether the build should fail if any error - occurs. Note that transformation errors can still be suppressed by - setting failOnTransformationError to false even if this attribute - is true. - Since Ant 1.8.0.No, default is true.filedirparameterSpecifies a XSL parameter for accessing the directory of the current processed file. For + files in the current directory, a value of . will be passed to the transformation. If + not set, the directory is not passed to the transformation. Since Ant 1.7.No
    failOnTransformationErrorWhether the build should fail if an error occurs - while transforming the document. Note that this attribute has no - effect of failOnError is false. - Since Ant 1.8.0.No, default is true.suppressWarningsWhether processor warnings shall be suppressed. This option requires support by the + processor, it is supported by the TrAX processor bundled with Ant. Since Ant + 1.8.0.No; default is false
    failOnNoResourcesWhether the build should fail if the nested - resource collection is empty. Note that this attribute has no - effect of failOnError is false. - Since Ant 1.8.0.No, default is true.failOnErrorWhether the build should fail if any error occurs. Note that transformation errors can + still be suppressed by setting failOnTransformationError to false even if + this attribute is true. Since Ant 1.8.0.No; default is true
    failOnTransformationErrorWhether the build should fail if an error occurs while transforming the document. Note that + this attribute has no effect if failOnError is false. Since Ant + 1.8.0.No; default is true
    failOnNoResourcesWhether the build should fail if the nested resource collection is empty. Note that this + attribute has no effect of failOnError is false. Since Ant + 1.8.0.No; default is true

    Parameters specified as nested elements

    -

    any resource -collection

    +

    any resource collection

    -

    since Ant 1.7

    +

    Since Ant 1.7

    -

    Use resource collections to specify resources that the stylesheet -should be applied to. Use a nested mapper and the task's destdir -attribute to specify the output files.

    +

    Use resource collections to specify resources that the stylesheet should be applied to. Use a +nested mapper and the task's destdir attribute to specify the output files.

    -

    classpath

    +

    classpath

    The classpath to load the processor from can be specified via a -nested <classpath>, as well - that is, a -path-like structure.

    +nested <classpath>, as well—that is, +a path-like structure.

    xmlcatalog

    -

    The xmlcatalog -element is used to perform Entity and URI resolution.

    +

    The xmlcatalog element is used to perform Entity and URI +resolution.

    param

    -

    Param is used to pass a parameter to the XSL stylesheet.

    -
    -

    Parameters

    - - - - - - - - - - - - - - - - +

    Param is used to pass a parameter to the XSL stylesheet.

    + +
    Parameters
    +
    AttributeDescriptionRequired
    nameName of the XSL parameterYes
    expression - The value to be placed into the param or an XPath expression - (depending on type). - Yes
    - - + + + + + + + + + + + + + + + + - + - - - + + + - - - + + + -
    type - Data type of the parameter. Possible values are: -
      -
    • STRING
    • -
    • BOOLEAN
    • -
    • INT
    • -
    • LONG
    • -
    • DOUBLE
    • -
    • XPATH_STRING
    • -
    • XPATH_BOOLEAN
    • -
    • XPATH_NUMBER
    • -
    • XPATH_NODE
    • -
    • XPATH_NODESET
    • -
    - since Ant 1.9.3 +
    AttributeDescriptionRequired
    nameName of the XSL parameterYes
    expressionThe value to be placed into the param or an XPath expression (depending + on type).Yes
    typeData type of the parameter. Possible values are: +
      +
    • STRING
    • +
    • BOOLEAN
    • +
    • INT
    • +
    • LONG
    • +
    • DOUBLE
    • +
    • XPATH_STRING
    • +
    • XPATH_BOOLEAN
    • +
    • XPATH_NUMBER
    • +
    • XPATH_NODE
    • +
    • XPATH_NODESET
    • +
    since Ant 1.9.3
    No; default is STRINGNo; default is STRING
    ifThe param will only be passed if this property is set.NoifThe param will only be passed if this property is + set.No
    unlessThe param will not be passed if this property is set.NounlessThe param will not be passed if this property is + set.No
    -
    - -

    - The XPATH_* types says that the expression is not just a primitive-type value but an XPath expression. - This expression will be evaluated on an empty XML document and the result will be passed to the XSLT transformer as a parameter of given type. - In these expressions the declared Ant properties can be used as XPath variables e.g. $someProperty. - So you can compute something using standard XPath functions and operators. -

    -

    - If you write ${someProperty} instead of $someProperty, - the value will be simply substituted by Ant before evaluating the XPath expression - (this substitution works also for primitive types). -

    - -

    outputproperty ('trax' processors only)

    -

    Used to specify how you wish the result tree to be output -as specified in the -XSLT specifications. -

    -

    Parameters

    - - - - - - - - - - - - - - - +

    The XPATH_* types says that the expression is not just a primitive-type value +but an XPath expression. This expression will be evaluated on an empty XML document and the result +will be passed to the XSLT transformer as a parameter of given type. In these expressions the +declared Ant properties can be used as XPath variables e.g. $someProperty. So you can +compute something using standard XPath functions and operators.

    +

    If you write ${someProperty} instead of $someProperty, the value will +be simply substituted by Ant before evaluating the XPath expression (this substitution works also +for primitive types).

    + +

    outputproperty (trax processors only)

    +

    Used to specify how you wish the result tree to be output as specified in +the XSLT specifications. + +

    Parameters
    +
    AttributeDescriptionRequired
    nameName of the propertyYes
    valuevalue of the property.Yes
    + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    nameName of the propertyYes
    valueValue of the propertyYes
    -
    -

    factory ('trax' processors only)

    -Used to specify factory settings. -
    -

    Parameters

    - - - - - - - - - - +

    factory (trax processors only)

    +

    Since Ant 1.9.8

    +

    Used to specify factory settings.

    + +
    Parameters
    +
    AttributeDescriptionRequired
    namefully qualified classname of the - transformer factory to use. For example - org.apache.xalan.processor.TransformerFactoryImpl - or org.apache.xalan.xsltc.trax.TransformerFactoryImpl - or net.sf.saxon.TransformerFactoryImpl... - No. Defaults to the JAXP lookup mechanism.
    + + + + + + + + +
    AttributeDescriptionRequired
    namefully qualified classname of the transformer factory to use. For + example org.apache.xalan.processor.TransformerFactoryImpl + or org.apache.xalan.xsltc.trax.TransformerFactoryImpl + or net.sf.saxon.TransformerFactoryImpl...No; defaults to the JAXP lookup mechanism
    -

    Parameters specified as nested elements

    -

    attribute

    -

    Used to specify settings of the processor factory. -The attribute names and values are entirely processor specific -so you must be aware of the implementation to figure them out. -Read the documentation of your processor. -For example, in Xalan 2.x: +

    Parameters specified as nested elements
    +
    attribute
    +

    Used to specify settings of the processor factory. The attribute names and values are entirely +processor specific so you must be aware of the implementation to figure them out. Read the +documentation of your processor. For example, in Xalan 2.x:

      -
    • http://xml.apache.org/xalan/features/optimize (boolean)
    • -
    • http://xml.apache.org/xalan/features/incremental (boolean)
    • -
    • ...
    • +
    • http://xml.apache.org/xalan/features/optimize (boolean)
    • +
    • http://xml.apache.org/xalan/features/incremental (boolean)
    • +
    • ...
    -And in Saxon 7.x: +

    And in Saxon 7.x:

      -
    • http://saxon.sf.net/feature/allow-external-functions (boolean)
    • -
    • http://saxon.sf.net/feature/timing (boolean)
    • -
    • http://saxon.sf.net/feature/traceListener (string)
    • -
    • http://saxon.sf.net/feature/treeModel (integer)
    • -
    • http://saxon.sf.net/feature/linenumbering (integer)
    • -
    • ...
    • +
    • http://saxon.sf.net/feature/allow-external-functions (boolean)
    • +
    • http://saxon.sf.net/feature/timing (boolean)
    • +
    • http://saxon.sf.net/feature/traceListener (string)
    • +
    • http://saxon.sf.net/feature/treeModel (integer)
    • +
    • http://saxon.sf.net/feature/linenumbering (integer)
    • +
    • ...
    -

    Parameters

    - +
    Parameters
    +
    - - - + + + - - - + + + - - - + + + - - + + - - + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    nameName of the attributeYesnameName of the attributeYes
    valuevalue of the attribute.Exactly one of thesevalueValue of the attribute.Exactly one of these
    valuerefvalue of the attribute is the value of the - project reference with the given id. since Ant 1.9.8valuerefValue of the attribute is the value of the project reference with the given + id. since Ant 1.9.8
    classloaderforpathvalue of the attribute is a classloader that uses - the classpath specified by a path that is the project reference - with the given id. since Ant 1.9.8classloaderforpathValue of the attribute is a classloader that uses the classpath specified by a + path that is the project reference with the given id. since Ant 1.9.8
    +
    -

    Examples

    +
    Examples
    -  <path id="extension-path">
    -    ...
    -  </path>
    +<path id="extension-path">
    +  ...
    +</path>
     
    +<xslt ...>
    +  <factory>
    +    <attribute name="jdk.xml.transform.extensionClassLoader"
    +               classloaderforpath="extension-path"/>
    +  </factory>
    +</xslt ...>
    - <xslt ...> - <factory> - <attribute name="jdk.xml.transform.extensionClassLoader" - classloaderforpath="extension-path"/> - </factory> - </xslt ...> - -

    Sets the classloader to use when loading extension functions to a - classloader using the path with the - id extension-path. -

    -

    feature

    -

    since Ant 1.9.8

    -

    Used to specify settings of the processor factory. The feature -names are mostly processor specific so you must be aware of the -implementation to figure them out. Read the documentation of your -processor. The only feature all implementations are required to -support -is http://javax.xml.XMLConstants/feature/secure-processing. +

    Sets the classloader to use when loading extension functions to a classloader using +the path with the id extension-path.

    + +
    feature
    +

    Used to specify settings of the processor factory. The feature names are mostly processor +specific so you must be aware of the implementation to figure them out. Read the documentation of +your processor. The only feature all implementations are required to support +is http://javax.xml.XMLConstants/feature/secure-processing.

    -

    Parameters

    - +
    Parameters
    +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    nameName of the featureYesnameName of the featureYes
    valuevalue of the feature. A boolean value - (i.e. permitted values are true,false,yes,no,on,off).No, defaults to falsevalueValue of the feature. A boolean value (i.e. permitted values + are true, false, yes, no, on, off).No; defaults to false
    - +

    mapper

    -

    since Ant 1.6.2

    +

    Since Ant 1.6.2

    -

    You can define filename transformations by using a nested mapper element. The default mapper -used by <xslt> removes the file extension from the -source file and adds the extension specified via the extension -attribute.

    +

    You can define filename transformations by using a +nested mapper element. The default mapper used +by <xslt> removes the file extension from the source file and adds the extension +specified via the extension attribute.

    style

    Since Ant 1.7

    -

    The nested style element can be used to specify your stylesheet in terms -of Ant's resource types. With -this element, the stylesheet should be specified as a nested resource or -single-element collection. Alternatively, use the refid to -specify the resource or collection as a reference.

    +

    The nested style element can be used to specify your stylesheet in terms of +Ant's resource types. With this element, the stylesheet +should be specified as a nested resource or single-element collection. Alternatively, use +the refid to specify the resource or collection as a reference.

    sysproperty

    -

    Use nested <sysproperty> elements to specify -system properties required by the factory or transformation. These -properties will be made available to the VM during the execution of -the class. The attributes for this element are the same as -for environment variables.

    -

    since Ant 1.8.0.

    +

    Since Ant 1.8.0.

    +

    Use nested <sysproperty> elements to specify system properties required by the +factory or transformation. These properties will be made available to JVM during the execution of +the class. The attributes for this element are the same as for environment +variables.

    syspropertyset

    +

    Since Ant 1.8.0.

    +

    You can specify a set of properties to be used as system properties with syspropertysets.

    -

    since Ant 1.8.0.

    -

    Examples

    -
    -
    +
     <xslt basedir="doc" destdir="build/doc"
            extension=".html" style="style/apache.xsl"/>
    -

    Using an xmlcatalog

    -
    +

    Using an xmlcatalog

    +
     <xslt basedir="doc" destdir="build/doc"
           extension=".html" style="style/apache.xsl">
       <xmlcatalog refid="mycatalog"/>
     </xslt>
     
     <xslt basedir="doc" destdir="build/doc"
    -   extension=".html" style="style/apache.xsl">
    +      extension=".html" style="style/apache.xsl">
        <xmlcatalog>
            <dtd
              publicId="-//ArielPartners//DTD XML Article V1.0//EN"
              location="com/arielpartners/knowledgebase/dtd/article.dtd"/>
        </xmlcatalog>
    -</xslt>
    -
    -

    Using XSL parameters

    -

    Simple String parameter:

    +</xslt>
    +

    Using XSL parameters

    +

    Simple String parameter:

     <xslt basedir="doc" destdir="build/doc"
           extension=".html" style="style/apache.xsl">
       <param name="date" expression="07-01-2000"/>
     </xslt>
    -

    Then if you declare a global parameter "date" with the top-level - element <xsl:param name="date"/>, the variable - $date will subsequently have the value 07-01-2000. -

    - -

    Various data types and XPath expressions:

    - -
    <property name="antProperty1" value="ANT_PROPERTY_1"/>
    +

    Then if you declare a global parameter date with the top-level element <xsl:param +name="date"/>, the variable $date will subsequently have the value +07-01-2000.

    + +

    Various data types and XPath expressions:

    + +
    +<property name="antProperty1" value="ANT_PROPERTY_1"/>
     <property name="antProperty2" value="ANT_PROPERTY_2"/>
     <property name="antProperty3" value="3"/>
     <property name="antProperty4" value="substring-before"/>
    @@ -594,43 +532,43 @@
     -->
     
     <xslt in="in.xml" out="out.xml" style="template.xsl">
    -  
    +
       <!-- Simple String parameter: -->
       <param name="p0" expression="some nice string" type="STRING"/>
    -  
    +
       <!-- A value substituted by Ant -->
       <param name="p1" expression="some string with ${antProperty1} constructed by Ant" type="STRING"/>
    -  
    +
       <!-- XPath resulting in: and this is done in XPath: ANT_PROPERTY_2 -->
       <param name="p2" expression="concat('and this is done in XPath: ', $antProperty2)" type="XPATH_STRING"/>
    -  
    +
       <!-- Some XPath math, result: 42 -->
       <param name="p3" expression="64 * 64 div 128 + 10" type="XPATH_NUMBER"/>
    -  
    +
       <!-- Some numeric parameter: -->
       <param name="p4" expression="123.45" type="DOUBLE"/>
    -  
    +
       <!-- XPath expression, result: true boolean -->
       <param name="p5" expression="$antProperty1 = 'ANT_PROPERTY_1'" type="XPATH_BOOLEAN"/>
    -  
    +
       <!-- First one is an XPath variable, second one is a text substituted by Ant, result: true boolean -->
       <param name="p6" expression="$antProperty2 = '${antProperty2}'" type="XPATH_BOOLEAN"/>
    -  
    +
       <!-- Some XPath math with a variable, result: 64 -->
       <param name="p7" expression="$antProperty3 * 4 * 5 + 4" type="XPATH_NUMBER"/>
    -  
    -  <!-- 
    +
    +  <!--
         XPath expression with substituted function name and a variable:
         substring-before($antProperty2, '_')
         result: ANT
       -->
       <param name="p8" expression="${antProperty4}($antProperty2, '_')" type="XPATH_STRING"/>
    -  
    +
       <!-- Without type attribute: -->
       <param name="p9" expression="default type is String"/>
     </xslt>
    -

    Using output properties

    +

    Using output properties

     <xslt in="doc.xml" out="build/doc/output.xml"
           style="style/apache.xsl">
    @@ -638,10 +576,9 @@
       <outputproperty name="standalone" value="yes"/>
       <outputproperty name="encoding" value="iso8859_1"/>
       <outputproperty name="indent" value="yes"/>
    -</xslt>
    -
    +</xslt>
    -

    Using factory settings

    +

    Using factory settings

     <xslt in="doc.xml" out="build/doc/output.xml"
           style="style/apache.xsl">
    @@ -650,15 +587,15 @@
       </factory>
     </xslt>
    -

    Using a mapper

    +

    Using a mapper

     <xslt basedir="in" destdir="out"
           style="style/apache.xsl">
       <mapper type="glob" from="*.xml.en" to="*.html.en"/>
     </xslt>
    -

    Using a nested resource to define the stylesheet

    -
    +

    Using a nested resource to define the stylesheet

    +
     <xslt in="data.xml" out="${out.dir}/out.xml">
         <style>
             <url url="${printParams.xsl.url}"/>
    @@ -666,25 +603,24 @@
         <param name="set" expression="value"/>
     </xslt>
    -

    Print the current processed file name

    +

    Print the current processed file name

     <project>
       <xslt style="printFilename.xsl" destdir="out" basedir="in" extension=".txt"
             filenameparameter="filename"
    -        filedirparameter="filedir"
    -  />
    +        filedirparameter="filedir"/>
     </project>
     
     <xsl:stylesheet
    -  version="1.0"
    -  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    +     version="1.0"
    +     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     
    -    <xsl:param name="filename"></xsl:param>
    -    <xsl:param name="filedir">.</xsl:param>
    +  <xsl:param name="filename"></xsl:param>
    +  <xsl:param name="filedir">.</xsl:param>
     
    -<xsl:template match="/">
    -  Current file is <xsl:value-of select="$filename"/> in directory <xsl:value-of select="$filedir"/>.
    -</xsl:template>
    +  <xsl:template match="/">
    +    Current file is <xsl:value-of select="$filename"/> in directory <xsl:value-of select="$filedir"/>.
    +  </xsl:template>
     
     </xsl:stylesheet>
     
    @@ -694,12 +630,9 @@
     <xslt ...>
         <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
    -                 value="org.apache.xerces.parsers.XIncludeParserConfiguration"
    -     />
    +                 value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
     <xslt>
     
    -
    - diff -Nru ant-1.9.10/manual/Tasks/subant.html ant-1.10.3/manual/Tasks/subant.html --- ant-1.9.10/manual/Tasks/subant.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/subant.html 2018-03-24 12:37:12.000000000 +0000 @@ -18,591 +18,246 @@ + Subant Task - - - + +

    Subant Task

    +

    Since Apache Ant 1.6

    +

    Description

    +

    Calls a given target for all defined sub-builds. This is an extension of Ant for bulk project +execution. This task must not be used outside of a target if it invokes the +same build file it is part of.

    + +

    subant uses ant internally so many things said +in ant's manual page apply here as well.

    + +

    Use with directories

    +

    subant can be used with directory sets to execute a build from different +directories. 2 different options are offered:

    +
      +
    • to run the same build file /somepath/otherpath/mybuild.xml with different base + directories, use the genericantfile attribute
    • +
    • if you want to + run directory1/mybuild.xml, directory2/mybuild.xml, ..., + use the antfile attribute. The subant task does not set the base + directory for you in this case, because you can specify it in each build file.
    • +
    - +

    Parameters

    +
    - - - - - - - -
    - - - -
    - Subant Task -
    Calls a given target for all defined sub-builds. -
    - - - Apache Ant - -
    -
    - - - - - - - - - - -
     
    - - - Description -
    -

    - Calls a given target for all defined sub-builds. - This is an extension - of ant for bulk project execution. - - This task must not be used outside of a - target if it invokes the same build file it is - part of. -

    -

    Since Apache Ant 1.6

    - -

    subant uses ant internally so many things - said in ant's manual page apply - here as well.

    - - - - - - -
    - - - Use with directories -
    -

    - subant can be used with directory sets to execute a build from different directories. - 2 different options are offered : -

    -
      -
    • - to run the same build file /somepath/otherpath/mybuild.xml - with different base directories, use the genericantfile attribute -
    • -
    • if you want to run directory1/mybuild.xml, directory2/mybuild.xml, ...., - use the antfile attribute. The subant task does not set the base directory for you in this case, because you can specify it in each build file. -
    • -
    - -
    - -
    - - - - - - - - - - - - -
     
    - - - Parameters -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Attribute - - Description - - Type - - Requirement -
    - antfile - - Build file name, to use in conjunction with directories.
    Defaults to "build.xml".
    If genericantfile is set, this attribute is ignored.
    -
    - String - - Optional -
    - buildpath - - Set the buildpath to be used to find sub-projects. - - Path -
    - buildpathref - - Buildpath to use, by reference. - - Reference -
    - failonerror - - Sets whether to fail with a build exception on error, or go on. - - boolean -
    - genericantfile - - Build file path, to use in conjunction with directories.
    Use genericantfile, in order to run the same build file with different basedirs.
    If this attribute is set, antfile is ignored.
    -
    - File -
    - inheritall - - Corresponds to - <ant>'s - inheritall attribute but defaults - to false in this task.. - - boolean -
    - inheritrefs - - Corresponds to <ant>'s inheritrefs attribute. - - boolean -
    - output - - Corresponds to <ant>'s output attribute. - - String -
    - target - - - - String -
    - verbose - - - Enable/ disable log messages showing when each sub-build path is entered/ exited. - The default value is false. - - boolean -
    -
    - - - - - - - - - - -
     
    - - - Parameters as nested elements -
    - - - - - -
     
    - - any filesystem based resource collection -
    - This includes <fileset>, - <dirset> and <filelist> - which are the nested resource collections supported prior - to Ant 1.7. - - - -
    - - - - - - -
     
    - - dirset (org.apache.tools.ant.types.DirSet) -
    - Adds a directory set to the implicit build path.

    Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead! - - - -

    - - - - - - -
     
    - - filelist (org.apache.tools.ant.types.FileList) -
    - Adds an ordered file list to the implicit build path.

    Note that contrary to file and directory sets, file lists can reference non-existent files or directories! - - - -

    - - - - - - -
     
    - - fileset (org.apache.tools.ant.types.FileSet) -
    - Adds a file set to the implicit build path.

    Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead! - - - -

    - - - - - - -
     
    - - property (org.apache.tools.ant.taskdefs.Property) -
    - Corresponds to <ant>'s nested <property> element. - -

    When more than one nested <property> element - would set a property of the same name, the one declared last will - win. This is for backwards compatibility reasons even so it is - different from the way <property> tasks in build - files behave.

    - - - - -
    - - - - - - -
     
    - - propertyset (org.apache.tools.ant.types.PropertySet) -
    - Corresponds to <ant>'s nested <propertyset> element. - - - -
    - - - - - - -
     
    - - buildpath (org.apache.tools.ant.types.Path) -
    - Creates a nested build path, and add it to the implicit build path. - - - -
    - - - - - - -
     
    - - buildpathelement (org.apache.tools.ant.types.Path.PathElement) -
    - Creates a nested <buildpathelement>, and add it to the implicit build path. - - - -
    - - - - - - - - - - - -
     
    - - target (org.apache.tools.ant.taskdefs.Ant.TargetElement) -
    - You can specify multiple targets using nested <target> elements - instead of using the target attribute. These will be executed as if - Ant had been invoked with a single target whose dependencies are the - targets so specified, in the order specified. - - - - - - - - - - - - - -
    AttributeDescriptionRequired
    nameThe name of the called target.Yes
    -

    since Ant 1.7.

    -
    - - - -
    - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    - - - Examples -
    -
    -        <project name="subant" default="subant1">
    -            <property name="build.dir" value="subant.build"/>
    -            <target name="subant1">
    -                <subant target="">
    -                    <property name="build.dir" value="subant1.build"/>
    -                    <property name="not.overloaded" value="not.overloaded"/>
    -                    <fileset dir="." includes="*/build.xml"/>
    -                </subant>
    -            </target>
    -        </project>
    -        
    -

    - this snippet build file will run ant in each subdirectory of the project directory, - where a file called build.xml can be found. - The property build.dir will have the value subant1.build in the ant projects called by subant. -

    -
    -          <subant target="">
    -              <propertyset>
    -                  <propertyref prefix="toplevel"/>
    -                  <mapper type="glob" from="foo*" to="bar*"/>
    -              </propertyset>
    -              <fileset dir="." includes="*/build.xml"/>
    -          </subant>
    -        
    -

    - this snippet build file will run ant in each subdirectory of the project directory, - where a file called build.xml can be found. - All properties whose name starts with "foo" are passed, their names are changed to start with "bar" instead -

    +
    AttributeDescriptionTypeRequired
    antfileBuild file name, to use in conjunction with directories.StringNo; defaults to build.xml, ignored if genericantfile is set
    buildpathSet the buildpath to be used to find sub-projects.PathNo
    buildpathrefBuildpath to use, by reference.Reference
    failonerrorSets whether to fail with a build exception on error, or go on.boolean
    genericantfileBuild file path, to use in conjunction with directories.
    Use genericantfile, + in order to run the same build file with different basedirs.
    If this attribute + is set, antfile is ignored.
    File
    inheritallCorresponds to <ant>'s inheritall attribute but defaults + to false in this task.boolean
    inheritrefsCorresponds to <ant>'s inheritrefs attribute.boolean
    outputCorresponds to <ant>'s output attribute.String
    target String
    verboseEnable/disable log messages showing when each sub-build path is entered/exited.booleanNo; default is false
    +

    Parameters as nested elements

    +

    any filesystem based resource collection

    +

    This includes <fileset>, <dirset> +and <filelist> which are the nested resource collections supported prior to Ant +1.7.

    +

    dirset (org.apache.tools.ant.types.DirSet)

    +Adds a directory set to the implicit build path. +

    Note that the directories will be added to the build path in no particular order, so if order +is significant, one should use a file list instead!

    +

    filelist (org.apache.tools.ant.types.FileList)

    +

    Adds an ordered file list to the implicit build path.

    +

    Note that contrary to file and directory sets, file lists can reference non-existent files or +directories!

    +

    fileset (org.apache.tools.ant.types.FileSet)

    +

    Adds a file set to the implicit build path.

    +

    Note that the directories will be added to the build path in no particular order, so if order +is significant, one should use a file list instead!

    +

    property (org.apache.tools.ant.taskdefs.Property)

    +

    Corresponds to <ant>'s nested <property> element.

    +

    When more than one nested <property> element would set a property of the same +name, the one declared last will win. This is for backwards compatibility reasons even so it is +different from the way <property> tasks in build files behave.

    +

    propertyset (org.apache.tools.ant.types.PropertySet)

    +

    Corresponds to <ant>'s nested <propertyset> element.

    +

    buildpath (org.apache.tools.ant.types.Path)

    +

    Creates a nested build path, and add it to the implicit build path.

    +

    buildpathelement (org.apache.tools.ant.types.Path.PathElement)

    +

    Creates a nested <buildpathelement>, and add it to the implicit build +path.

    +

    target (org.apache.tools.ant.taskdefs.Ant.TargetElement)

    +

    Since Ant 1.7.

    +

    You can specify multiple targets using nested <target> elements instead of +using the target attribute. These will be executed as if Ant had been invoked with a single target +whose dependencies are the targets so specified, in the order specified.

    + + + + + + + + + + + +
    AttributeDescriptionRequired
    nameThe name of the called target.Yes
    +

    Examples

    -          <subant target="compile" genericantfile="/opt/project/build1.xml">
    -              <dirset dir="." includes="projects*"/>
    -          </subant>
    -        
    -

    - assuming the subdirs of the project dir are called projects1, projects2, projects3 - this snippet will execute the compile target of /opt/project/build1.xml, - setting the basedir to projects1, projects2, projects3 -

    - - -

    Now a little more complex - but useful - scenario. Assume that we have - a directory structure like this:

    -
    -        root
    -          |  common.xml
    -          |  build.xml
    -          |
    -          +-- modules
    -                +-- modA
    -                |     +-- src
    -                +-- modB
    -                      +-- src
    -
    -        common.xml:
    - <project> - <property name="src.dir" value="src"/> - <property name="build.dir" value="build"/> - <property name="classes.dir" value="${build.dir}/classes"/> - - <target name="compile"> - <mkdir dir="${classes.dir}"/> - <javac srcdir="${src.dir}" destdir="${classes.dir}"/> - </target> - - <!-- more targets --> - </project> - - build.xml:
    - <project> - - <macrodef name="iterate"> - <attribute name="target"/> - <sequential> - <subant target="@{target}"> - <fileset dir="modules" includes="*/build.xml"/> - </subant> - </sequential> - </macrodef> - - - <target name="compile"> - <iterate target="compile"/> - </target> - - <!-- more targets --> - </project> - - modules/modA/build.xml:
    - <project name="modA"> - <import file="../../common.xml"/> - </project> -
    - -

    This results in very small buildfiles in the modules, maintainable - buildfile (common.xml) and a clear project structure. Additionally - the root buildfile is capable to run the whole build over all - modules. -

    - -
    -        <subant failonerror="false">
    -            <fileset dir="." includes="**/build.xml" excludes="build.xml"/>
    -            <target name="clean"/>
    -            <target name="build"/>
    +<project name="subant" default="subant1">
    +    <property name="build.dir" value="subant.build"/>
    +    <target name="subant1">
    +        <subant target="">
    +            <property name="build.dir" value="subant1.build"/>
    +            <property name="not.overloaded" value="not.overloaded"/>
    +            <fileset dir="." includes="*/build.xml"/>
             </subant>
    -        
    - -

    Does a "clean build" for each subproject.

    -

    Hint: because buildfiles are plain xml, you could generate the - masterbuildfile from the common buildfile by using a XSLT transformation: -

    - -
    -        <xslt in="common.xml"
    -              out="master.xml"
    -              style="${ant.home}/etc/common2master.xsl"
    -        />
    -        
    - - - -
    - - - - + </target> +</project> +

    this snippet build file will run ant in each subdirectory of the project directory, +where a file called build.xml can be found. The property build.dir will +have the value subant1.build in the Ant projects called by subant.

    +
    +<subant target="">
    +    <propertyset>
    +        <propertyref prefix="toplevel"/>
    +        <mapper type="glob" from="foo*" to="bar*"/>
    +    </propertyset>
    +    <fileset dir="." includes="*/build.xml"/>
    +</subant>
    +

    this snippet build file will run ant in each subdirectory of the project directory, +where a file called build.xml can be found. All properties whose name starts +with foo are passed, their names are changed to start with bar instead

    +
    +<subant target="compile" genericantfile="/opt/project/build1.xml">
    +    <dirset dir="." includes="projects*"/>
    +</subant>
    +

    assuming the subdirs of the project dir are +called projects1, projects2, projects3 this snippet will +execute the compile target of /opt/project/build1.xml, setting the basedir +to projects1, projects2, projects3

    +

    Now a little more complex—but useful—scenario. Assume that we have a directory +structure like this:

    +
    +root
    +  |  common.xml
    +  |  build.xml
    +  |
    +  +-- modules
    +        +-- modA
    +        |     +-- src
    +        +-- modB
    +              +-- src
    +
    +common.xml:
    +<project> + <property name="src.dir" value="src"/> + <property name="build.dir" value="build"/> + <property name="classes.dir" value="${build.dir}/classes"/> + + <target name="compile"> + <mkdir dir="${classes.dir}"/> + <javac srcdir="${src.dir}" destdir="${classes.dir}"/> + </target> + + <!-- more targets --> +</project> + +build.xml:
    +<project> + <macrodef name="iterate"> + <attribute name="target"/> + <sequential> + <subant target="@{target}"> + <fileset dir="modules" includes="*/build.xml"/> + </subant> + </sequential> + </macrodef> + + <target name="compile"> + <iterate target="compile"/> + </target> + + <!-- more targets --> +</project> + +modules/modA/build.xml:
    +<project name="modA"> + <import file="../../common.xml"/> +</project>
    + +

    This results in very small build files in the modules, maintainable build file +(common.xml) and a clear project structure. Additionally the root build file is capable +to run the whole build over all modules.

    - +
    +<subant failonerror="false">
    +    <fileset dir="." includes="**/build.xml" excludes="build.xml"/>
    +    <target name="clean"/>
    +    <target name="build"/>
    +</subant>
    + +

    Does a "clean build" for each subproject.

    +

    Hint: because build files are plain xml, you could generate the master build +file from the common build file by using a XSLT transformation:

    +
    +<xslt in="common.xml"
    +      out="master.xml"
    +      style="${ant.home}/etc/common2master.xsl"/>
    diff -Nru ant-1.9.10/manual/Tasks/symlink.html ant-1.10.3/manual/Tasks/symlink.html --- ant-1.9.10/manual/Tasks/symlink.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/symlink.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,123 +24,101 @@ -

    Symlink

    +

    Description

    -

    Manages symbolic links on Unix based platforms. Can be used to -make an individual link, delete a link, create multiple links from properties files, -or create properties files describing links in the specified directories. -Existing links are not overwritten by default. - -

    FileSets are used to select a -set of links to record, or a set of property files to create links from.

    +

    Manages symbolic links on platforms where Java supports symbolic links. Can be used to make an +individual link, delete a link, create multiple links from properties files, or create properties +files describing links in the specified directories. Existing files are not overwritten by +default.

    +

    FileSets are used to select a set of links to record, or a +set of property files to create links from.

    Parameters

    - +
    + + + + + + + + + + - - - - - - - - - - - - + - + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequired
    actionThe type of action to perform, may be single, "record, recreate + or delete.No; defaults to single
    AttributeDescriptionRequired
    actionThe type of action to perform, may be "single", - "record", "recreate" or "delete".No, defaults to single.
    linkThe name of the link to be created or deleted.
    - Note this attribute is resolved against the current - working directory rather than the project's basedir for - historical reasons. It is recommended you always use an - absolute path or a path like ${basedir}/some-path - as its value. +
    linkThe name of the link to be created or deleted.
    Note: this attribute is + resolved against the current working directory rather than the project's basedir + for historical reasons. It is recommended you always use an absolute path or a path + like ${basedir}/some-path as its value.
    required for - action="single" or "delete". Ignored in other actions.Yes, for action=single or delete; ignored in other actions
    resourceThe resource the link should point to.required for action="single". Ignored in other actions.resourceThe resource the link should point to.Yes, for action=single; ignored in other actions
    linkfilenameThe name of the properties file to create in - each included directory.required for action="record". - Ignored in other actions.linkfilenameThe name of the properties file to create in each included directory.Yes, for action=record; ignored in other actions
    overwriteOverwrite existing links or not.No; defaults to false.overwriteOverwrite existing files or not. If overwrite is set to true, then any existing file, + specified by the link attribute, will be overwritten irrespective of whether or not the + existing file is a symbolic link.No; defaults to false
    failonerrorStop build if true, log a warning message, but do not stop the build, - when the an error occurs if false. - No; defaults to true.failonerrorStop build if true, log a warning message, but do not stop the build, when the an error + occurs if false.No; defaults to true

    Parameters specified as nested elements

    - +

    fileset

    -

    FileSets - are used when action = "record" to select directories and linknames to be recorded. - They are also used when action = "recreate" to specify both the name of the property - files to be processed, and the directories in which they can be found. At least one - fileset is required for each case.

    - -

    Examples

    +

    FileSets are used when action=record to +select directories and link names to be recorded. They are also used +when action=recreate to specify both the name of the property files to be +processed, and the directories in which they can be found. At least one fileset is required for each +case.

    -

    Make a link named "foo" to a resource named "bar.foo" in subdir:

    -
    -  <symlink link="${dir.top}/foo" resource="${dir.top}/subdir/bar.foo"/>
    -  
    - -

    Record all links in subdir and it's descendants in files named - "dir.links"

    -
    -  <symlink action="record" linkfilename="dir.links">
    -     <fileset dir="${dir.top}" includes="subdir/**"/>
    -  </symlink>
    -  
    - -

    Recreate the links recorded in the previous example:

    -
    -  <symlink action="recreate">
    -     <fileset dir="${dir.top}" includes="subdir/**/dir.links"/>  
    -  </symlink>
    -  
    - -

    Delete a link named "foo": -

    - <symlink action="delete" link="${dir.top}/foo"/>
    - 
    - -

    Java 1.2 and earlier: Due to limitations on executing system - level commands in Java versions earlier than 1.3 this task may have difficulty - operating with a relative path in ANT_HOME. The typical symptom is an - IOException where Apache Ant can't find /some/working/directory${ANT_HOME}/bin/antRun - or something similar. The workaround is to change your ANT_HOME environment - variable to an absolute path, which will remove the /some/working/directory portion - of the above path and allow ant to find the correct commandline execution script. - -

    LIMITATIONS: Because Java has no direct support for - handling symlinks this task divines them by comparing canonical and - absolute paths. On non-unix systems this may cause false positives. - Furthermore, any operating system on which the command - ln -s <linkname> <resourcename> is not a valid - command on the command line will not be able to use action="single" or - action="recreate". Action="record" and action=delete should still work. Finally, - the lack of support for symlinks in Java means that all links are recorded as - links to the canonical resource name. Therefore the link: - link --> subdir/dir/../foo.bar will be recorded as - link=subdir/foo.bar and restored as - link --> subdir/foo.bar

    +

    Examples

    +

    Make a link named foo to a resource named bar.foo +in subdir:

    +
    <symlink link="${dir.top}/foo" resource="${dir.top}/subdir/bar.foo"/>
    + +

    Record all links in subdir and it's descendants in files +named dir.links

    +
    +<symlink action="record" linkfilename="dir.links">
    +    <fileset dir="${dir.top}" includes="subdir/**"/>
    +</symlink>
    + +

    Recreate the links recorded in the previous example:

    +
    +<symlink action="recreate">
    +    <fileset dir="${dir.top}" includes="subdir/**/dir.links"/>
    +</symlink>
    + +

    Delete a link named foo:

    +
    <symlink action="delete" link="${dir.top}/foo"/>
    + +

    Java 1.2 and earlier: Due to limitations on executing system level commands in +Java versions earlier than 1.3 this task may have difficulty operating with a relative path +in ANT_HOME. The typical symptom is an IOException where Apache Ant can't +find /some/working/directory${ANT_HOME}/bin/antRun or something similar. The workaround +is to change your ANT_HOME environment variable to an absolute path, which will remove +the /some/working/directory portion of the above path and allow Ant to find the correct +command line execution script.

    +

    Note: Since Ant 1.10.2, this task relies on the symbolic link support +introduced in Java 7 through the java.nio.file.Files APIs

    diff -Nru ant-1.9.10/manual/Tasks/sync.html ant-1.10.3/manual/Tasks/sync.html --- ant-1.9.10/manual/Tasks/sync.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/sync.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,143 +24,120 @@ -

    Sync

    +

    Sync

    Since Apache Ant 1.6

    Description

    Synchronize a target directory from the files defined in one or -more Resource Collections.

    +more resource collections.

    -

    Any file in the target directory that has not been matched by at -least one of the nested resource collections gets removed. I.e. if you exclude a -file in your sources and a file of that name is present in the target -dir, it will get removed from the target.

    +

    Any file in the target directory that has not been matched by at least one of the nested resource +collections gets removed. I.e. if you exclude a file in your sources and a file of that name is +present in the target dir, it will get removed from the target.

    Parameters

    - +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    todirthe target directory to sync with the resource collectionsYes
    overwriteOverwrite existing files even if the destination - files are newer.No; defaults to false.
    includeEmptyDirsCopy any empty directories included in the - resource collection(s).
    - Note this attribute also controls the behavior for any - nested <preserveintarget> element. If this attribute is - false (the default) empty directories that only exist in the - target directory will be removed even if they are matched by - the patterns of <preserveintarget>. This can be - overridden by <preserveintarget>'s - preserveEmptyDirs attribute. -
    No; defaults to false.
    failonerrorIf is set to false, log a warning message, but do not stop the build, - when one of the nested filesets points to a directory that - doesn't exist. - No; defaults to true.
    verboseLog the files that are being copied.No; defaults to false.
    granularityThe 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, or 2 seconds on DOS - systems. This can also be useful if source and target files live - on separate machines with clocks being out of sync. since Ant - 1.6.2.No.AttributeDescriptionRequired
    todirthe target directory to sync with the resource collectionsYes
    overwriteOverwrite existing files even if the destination files are newer.No; defaults to false
    includeEmptyDirsCopy any empty directories included in the resource + collection(s).
    Note: this attribute also controls the behavior for any + nested <preserveintarget> element. If this attribute is false (the + default) empty directories that only exist in the target directory will be removed even if + they are matched by the patterns of <preserveintarget>. This can be + overridden by <preserveintarget>'s preserveEmptyDirs + attribute.
    No; defaults to false
    failonerrorIf set to false, log a warning message, but do not stop the build, when one of the + nested filesets points to a directory that doesn't exist.No; defaults to true
    verboseLog the files that are being copied.No; defaults to false
    granularityThe 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. This can also be useful if source and target files live on separate + machines with clocks being out of sync. since Ant 1.6.2.No; default is 0 milliseconds, or 2 seconds on DOS systems.

    Parameters specified as nested elements

    -

    fileset or any other resource collection

    -

    Resource -Collections are used to select groups of files to copy.

    -

    Prior to Ant 1.7 only <fileset> has been -supported as a nested element.

    +

    any resource collection

    +

    resource collections are used to select groups +of files to copy.

    +

    Prior to Ant 1.7 only <fileset> has been supported as a nested element.

    preserveInTarget

    Since Ant 1.7.0

    -

    Specifies files or directories that should be kept in the target -directory even if they are not present in one of the source -directories.

    - -

    This nested element is like a FileSet except that it doesn't -support the dir attribute and the usedefaultexcludes attribute -defaults to false.

    - -
    Additional Parameters
    - - - - - - - - - - - +

    Specifies files or directories that should be kept in the target directory even if they are not +present in one of the source directories.

    + +

    This nested element is like a FileSet except that it doesn't +support the dir attribute and the usedefaultexcludes attribute defaults +to false.

    + +
    Additional parameters
    +
    AttributeDescriptionRequired
    preserveEmptyDirsOverrules the includeEmptydirs setting for - directories matched by this element. If you want to preserve - empty directories that are not in your source directory you can - either set the task's includeemptydirs attribute or this one. - If the two attribute values conflict, this attribute - "wins".No, defaults to the value of the - task's includeemptydirs attribute
    + + + + + + + + + +
    AttributeDescriptionRequired
    preserveEmptyDirsOverrules the includeEmptydirs setting for directories matched by this element. + If you want to preserve empty directories that are not in your source directory you can either + set the task's includeemptydirs attribute or this one. If the two attribute values + conflict, this attribute "wins".No; defaults to the value of the task's includeemptydirs attribute

    Examples

    -
    +
     <sync todir="site">
       <fileset dir="generated-site"/>
    -</sync>
    -
    -

    overwrites all files in site with newer files from -generated-site, deletes files from site that are not -present in generated-site.

    +</sync> +

    overwrites all files in site with newer files from generated-site, +deletes files from site that are not present in generated-site.

    -
    +
     <sync todir="site">
       <fileset dir="generated-site"/>
       <preserveintarget>
         <include name="**/CVS/**"/>
       </preserveintarget>
    -</sync>
    -
    -

    overwrites all files in site with newer files from -generated-site, deletes files from site that are not -present in generated-site but keeps all files in any -CVS sub-directory.

    - - +</sync> +

    overwrites all files in site with newer files from generated-site, +deletes files from site that are not present in generated-site but keeps +all files in any CVS sub-directory.

    - diff -Nru ant-1.9.10/manual/Tasks/tar.html ant-1.10.3/manual/Tasks/tar.html --- ant-1.9.10/manual/Tasks/tar.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/tar.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,183 +24,162 @@ -

    Tar

    +

    Tar

    Description

    Creates a tar archive.

    -

    The basedir attribute is the reference directory from where to tar.

    -

    This task is a directory based task -and, as such, forms an implicit Fileset. This -defines which files, relative to the basedir, will be included in the -archive. The tar task supports all the attributes of Fileset to refine the -set of files to be included in the implicit fileset.

    - -

    In addition to the implicit fileset, the tar task supports nested - resource collections and a special form of filesets. These -filesets are extended to allow control over the access mode, username and groupname -to be applied to the tar entries. This is useful, for example, when preparing archives for - Unix systems where some files need to have execute permission. By - default this task will use Unix permissions of 644 for files and 755 - for directories.

    - -

    Early versions of tar did not support path lengths greater than 100 - characters. Over time several incompatible extensions have been - developed until a new POSIX standard was created that added so - called PAX extension headers (as the pax utility first introduced - them) that among another things addressed file names longer than 100 - characters. All modern implementations of tar support PAX extension - headers.

    - -

    Ant's tar support predates the standard with PAX extension headers, - it supports different dialects that can be enabled using the - longfile attribute. -If the longfile attribute is set to fail, any long paths will -cause the tar task to fail. If the longfile attribute is set to -truncate, any long paths will be truncated to the 100 character -maximum length prior to adding to the archive. If the value of the longfile -attribute is set to omit then files containing long paths will be -omitted from the archive. Either option ensures that the archive can be -untarred by any compliant version of tar.

    - -

    If the loss of path or file -information is not acceptable, and it rarely is, longfile may be set to the -value gnu or posix. With posix - Ant will add PAX extension headers, with gnu it adds - GNU tar specific extensions that newer versions of GNU tar call - "oldgnu". GNU tar still creates these extensions by default but - supports PAX extension headers as well. Either choice will produce - a tar file which -can have arbitrary length paths. Note however, that the resulting archive will -only be able to be untarred with tar tools that support the chosen format. - -

    The default for the longfile -attribute is warn which behaves just like the gnu option except -that it produces a warning for each file path encountered that does not match -the limit. It uses gnu rather than posix for backwards compatibility - reasons.

    +

    The basedir attribute is the reference directory from where to tar.

    +

    This task is a directory based task and, as +such, forms an implicit Fileset. This defines which files, +relative to the basedir, will be included in the archive. The tar task +supports all the attributes of Fileset to refine the set of files to be included in the implicit +fileset.

    + +

    In addition to the implicit fileset, the tar task supports nested resource +collections and a special form of filesets. These filesets are extended to allow control over the +access mode, username and groupname to be applied to the tar entries. This is useful, for example, +when preparing archives for Unix systems where some files need to have execute permission. By +default this task will use Unix permissions of 644 for files and 755 for directories.

    + +

    Early versions of tar utility did not support paths longer than 100 characters. Over +time several incompatible extensions have been developed until a new POSIX standard was created that +added so called PAX extension headers (as the pax utility first introduced them) that +among another things addressed file names longer than 100 characters. All modern implementations +of tar support PAX extension headers.

    + +

    Ant's tar support predates the standard with PAX extension headers, it supports +different dialects that can be enabled using the longfile attribute. If +the longfile attribute is set to fail, any long paths will cause +the tar task to fail. If the longfile attribute is set to truncate, +any long paths will be truncated to the 100 character maximum length prior to adding to the +archive. If the value of the longfile attribute is set to omit then files +containing long paths will be omitted from the archive. Either option ensures that the archive can +be untarred by any compliant version of tar.

    + +

    If the loss of path or file information is not acceptable, and it rarely is, longfile +may be set to the value gnu or posix. With posix Ant will add PAX extension +headers, with gnu it adds GNU tar specific extensions that newer versions of +GNU tar call oldgnu. GNU tar still creates these extensions by default +but supports PAX extension headers as well. Either choice will produce a tar file which can have +arbitrary length paths. Note however, that the resulting archive will only be able to be untarred +with tar tools that support the chosen format.

    + +

    The default for the longfile attribute is warn which behaves just like +the gnu option except that it produces a warning for each filepath encountered that does not +match the limit. It uses gnu rather than posix for backwards compatibility +reasons.

    -

    To achivieve best interoperability you should use - either fail or posix for the longfile attribute.

    +

    To achieve best interoperability you should use either fail or posix for +the longfile attribute.

    -

    This task can perform compression by setting the compression attribute to "gzip" -or "bzip2".

    +

    This task can perform compression by setting the compression attribute +to gzip, bzip2, or xz.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    destfilethe tar-file to create.Yesdestfilethe tar file to create.Yes
    basedirthe directory from which to tar the files.Nobasedirthe directory from which to tar the files.No
    longfileDetermines how long files (>100 chars) are to be - handled. Allowable values are "truncate", "fail", - "warn", "omit", "gnu" and "posix". Default is - "warn".NolongfileDetermines how long filenames (> 100 chars) are to be handled. Allowed values + are truncate, fail, warn, omit, gnu and posix.No; default is warn
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    compressioncompression method. Allowable values are - "none", "gzip" and "bzip2". Default is - "none".Nocompressioncompression method. Allowable values are none, gzip, xz + and bzip2.No; default is warn
    encodingThe character encoding to use for filenames - inside the tar file. For a list of possible values see the Supported Encodings.
    - Defaults to the platform's default character encoding. - Since Ant 1.9.5 -
    NoencodingThe character encoding to use for filenames inside the tar file. For a list of possible + values see + the Supported Encodings.
    Since Ant 1.9.5 +
    No; defaults to default JVM character encoding
    -

    Nested Elements

    +

    Parameters specified as nested elements

    -The tar task supports nested tarfileset elements. These are -extended FileSets which, -in addition to the standard elements, support one additional -attributes +

    The task supports nested tarfileset elements. These +are extended FileSets which, in addition to the standard +elements, support one additional attributes

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    preserveLeadingSlashesIndicates whether leading `/'s should - be preserved in the file names. Default is false.NopreserveLeadingSlashesIndicates whether leading / should be preserved in the file names.No; default is false

    any other resource collection

    -

    Resource -Collections are used to select groups of files to archive.

    -

    Prior to Apache Ant 1.7 only <fileset> has been -supported as a nested element.

    +

    resource collections are used to select groups +of files to archive.

    +

    Prior to Apache Ant 1.7 only <fileset> has been supported as a nested +element.

    Examples

     <tar destfile="${dist}/manual.tar" basedir="htdocs/manual"/>
     <gzip destfile="${dist}/manual.tar.gz" src="${dist}/manual.tar"/>
    -

    tars all files in the htdocs/manual directory into a file called manual.tar -in the ${dist} directory, then applies the gzip task to compress -it.

    + +

    tars all files in the htdocs/manual directory into a file +called manual.tar in the ${dist} directory, then applies +the gzip task to compress it.

     <tar destfile="${dist}/manual.tar"
          basedir="htdocs/manual"
    -     excludes="mydocs/**, **/todo.html"
    -/>
    -

    tars all files in the htdocs/manual directory into a file called manual.tar -in the ${dist} directory. Files in the directory mydocs, -or files with the name todo.html are excluded.

    + excludes="mydocs/**, **/todo.html"/> + +

    tars all files in the htdocs/manual directory into a file +called manual.tar in the ${dist} directory. Files in the +directory mydocs, or files with the name todo.html are excluded.

     <tar destfile="${basedir}/docs.tar">
    @@ -215,14 +194,11 @@
         <include name="*.html"/>
       </tarfileset>
     </tar>
    -

    - Writes the file docs/readme.txt as - /usr/doc/ant/README into the archive. All - *.html files in the docs directory are - prefixed by /usr/doc/ant, so for example - docs/index.html is written as - /usr/doc/ant/index.html to the archive. -

    + +

    Writes the file docs/readme.txt as /usr/doc/ant/README into the +archive. All *.html files in the docs directory are prefixed +by /usr/doc/ant, so for example docs/index.html is written +as /usr/doc/ant/index.html to the archive.

     <tar longfile="gnu"
    @@ -236,46 +212,35 @@
         <exclude name="${dist.name}/bootstrap.sh"/>
         <exclude name="${dist.name}/build.sh"/>
       </tarfileset>
    -</tar>
    -
    -

    This example shows building a tar which uses the GNU extensions for long paths and -where some files need to be marked as executable (mode 755) -and the rest are use the default mode (read-write by owner). The first -fileset selects just the executable files. The second fileset must exclude -the executable files and include all others.

    - - - -

    Note: The tar task does not ensure that a file is only selected -by one resource collection. If the same file is selected by more than one collection, it will be included in the -tar file twice, with the same path.

    - -

    Note: The patterns in the include and exclude -elements are considered to be relative to the corresponding dir -attribute as with all other filesets. In the example above, -${dist.name} is not an absolute path, but a simple name -of a directory, so ${dist.name} is a valid path relative -to ${dist.name}/...

    +</tar> +

    This example shows building a tar which uses the GNU extensions for long paths and where some +files need to be marked as executable (mode 755) and the rest are use the default mode (read-write +by owner). The first fileset selects just the executable files. The second fileset must exclude the +executable files and include all others.

    + +

    Note: The tar task does not ensure that a file is only selected by +one resource collection. If the same file is selected by more than one collection, it will be +included in the tar file twice, with the same path.

    + +

    Note: The patterns in the include and exclude elements +are considered to be relative to the corresponding dir attribute as with all other +filesets. In the example above, ${dist.name} is not an absolute path, but a simple +name of a directory, so ${dist.name} is a valid path relative +to ${dist.name}/...

     <tar destfile="release.tar.gz" compression="gzip">
       <zipfileset src="release.zip"/>
    -</tar>
    -
    -

    Re-packages a ZIP archive as a GZip compressed tar archive. If -Unix file permissions have been stored as part of the ZIP file, they -will be retained in the resulting tar archive.

    +</tar> +

    Re-packages a ZIP archive as a GZip compressed tar archive. If Unix file permissions have been +stored as part of the ZIP file, they will be retained in the resulting tar archive.

    -

    Note: - Please note the tar task creates a tar file, it does not append - to an existing tar file. The existing tar file is replaced instead. - As with most tasks in Ant, the task only takes action if the output - file (the tar file in this case) is older than the input files, or - if the output file does not exist. -

    +

    Note: Please note the tar task creates a tar file, it does not +append to an existing tar file. The existing tar file is replaced instead. As with most tasks in +Ant, the task only takes action if the output file (the tar file in this case) is older than the +input files, or if the output file does not exist.

    - diff -Nru ant-1.9.10/manual/Tasks/taskdef.html ant-1.10.3/manual/Tasks/taskdef.html --- ant-1.9.10/manual/Tasks/taskdef.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/taskdef.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,21 +24,18 @@ -

    Taskdef

    +

    Taskdef

    Description

    -

    Adds a task definition to the current project, such that this new task can be - used in the current project.

    -

    This task is a form of Typedef with the - attributes "adapter" and "adaptto" set to the values - "org.apache.tools.ant.TaskAdapter" and "org.apache.tools.ant.Task" - respectively. Anything said in the manual - page of typedef applies to taskdef as well.

    +

    Adds a task definition to the current project, such that this new task can be used in the current +project.

    +

    This task is a form of Typedef with the attributes adapter +and adaptto set to the values org.apache.tools.ant.TaskAdapter +and org.apache.tools.ant.Task respectively. Anything said in +the manual page of typedef applies to taskdef as well.

    Examples

    -
      <taskdef name="myjavadoc" classname="com.mydomain.JavadocTask"/>
    -

    makes a task called myjavadoc available to Apache Ant. The class com.mydomain.JavadocTask -implements the task.

    - +
    <taskdef name="myjavadoc" classname="com.mydomain.JavadocTask"/>
    +

    makes a task called myjavadoc available to Apache Ant. The +class com.mydomain.JavadocTask implements the task.

    - diff -Nru ant-1.9.10/manual/Tasks/telnet.html ant-1.10.3/manual/Tasks/telnet.html --- ant-1.9.10/manual/Tasks/telnet.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/telnet.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,93 +24,86 @@ -

    Telnet

    +

    Telnet

    Description

    -Task to automate a remote telnet session. The task uses -nested <read> to indicate strings to wait for, and -<write> tags to specify text to send. - -

    If you do specify a userid and password, the system will -assume a common unix prompt to wait on. This behavior can be easily over-ridden.

    -

    Note: This task depends on external libraries not included in the Apache Ant distribution. -See Library Dependencies for more information.

    +

    Task to automate a remote telnet session. The task uses nested <read> to +indicate strings to wait for, and <write> tags to specify text to send.

    + +

    If you do specify a userid and password, the system will assume a common Unix prompt to wait +on. This behavior can be easily overridden.

    +

    Note: This task depends on external libraries not included in the Apache Ant +distribution. See Library Dependencies for more +information.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    Attribute Values Required
    useridthe login id to use on the telnet server.Only if password is specifieduseridthe login id to use on the telnet server.Only if password is specified
    passwordthe login password to use on the telnet server.Only if userid is specifiedpasswordthe login password to use on the telnet server.Only if userid is specified
    serverthe address of the remote telnet server.Yesserverthe address of the remote telnet server.Yes
    portthe port number of the remote telnet server. Defaults to port 23.Noportthe port number of the remote telnet server.No; defaults to 23
    initialCRsend a cr after connecting ("yes"). Defaults to "no".NoinitialCRsend a cr after connecting if yes.No; defaults to no
    timeoutset a default timeout to wait for a response. Specified in seconds. Default is no timeout.Notimeoutset a default timeout to wait for a response. Specified in seconds.No; default is no timeout
    -

    Nested Elements

    -The commands to send to the server, and responses to wait for, are -described as nested elements. +

    Parameters specified as nested elements

    +

    The commands to send to the server, and responses to wait for, are described as nested +elements.

    read

    -

    declare (as a text child of this element) a string to wait for. -The element supports the timeout attribute, which overrides any -timeout specified for the task as a whole. It also has a string -attribute, which is an alternative to specifying the string as -a text element. -

    -Always declare an opening and closing -<read> element to ensure that statements are not sent before -the connection is ready, and that the connection is not broken before -the final command has completed. - +

    declare (as a text child of this element) a string to wait for. The element supports +the timeout attribute, which overrides any timeout specified for the task as a whole. It +also has a string attribute, which is an alternative to specifying the string as a text +element.

    +

    Always declare an opening and closing <read> element to ensure that +statements are not sent before the connection is ready, and that the connection is not broken before +the final command has completed.

    +

    write

    +

    describes the text to send to the server. The echo boolean attribute controls whether +the string is echoed to the local log; this is true by default.

    -

    describes the text to send to the server. The echo boolean -attribute controls whether the string is echoed to the local log; -this is "true" by default -

    Examples

    -A simple example of connecting to a server and running a command. This assumes - a prompt of "ogin:" for the userid, and a prompt of "assword:" - for the password. +

    A simple example of connecting to a server and running a command. This assumes a prompt +of ogin: for the userid, and a prompt of assword: for the password.

    -
    +
     <telnet userid="bob" password="badpass" server="localhost">
        <read>/home/bob</read>
        <write>ls</write>
        <read string="/home/bob"/>
    -</telnet>
    -
    +</telnet> -This task can be rewritten as: -
    +

    This task can be rewritten as:

    +
     <telnet server="localhost">
        <read>ogin:</read>
        <write>bob</write>
    @@ -119,37 +112,32 @@
        <read>/home/bob</read>
        <write>ls</write>
        <read>/home/bob</read>
    -</telnet>
    -
    +</telnet> -A timeout can be specified at the <telnet> level or at the <read> level. -This will connect, issue a sleep command that is suppressed from displaying and wait -10 seconds before quitting. -
    +

    A timeout can be specified at the <telnet> level or at +the <read> level. This will connect, issue a sleep command that is +suppressed from displaying and wait 10 seconds before quitting.

    + +
     <telnet userid="bob" password="badpass" server="localhost" timeout="20">
        <read>/home/bob</read>
        <write echo="false">sleep 15</write>
        <read timeout="10">/home/bob</read>
    -</telnet>
    -
    +</telnet> -The task can be used with other ports as well: -
    +

    The task can be used with other ports as well:

    +
     <telnet port="80" server="localhost" timeout="20">
        <read/>
        <write>GET / http/0.9</write>
        <write/>
        <read timeout="10">&lt;/HTML&gt;</read>
    -</telnet>
    -
    -

    -To use this task against the WinNT telnet service, you need to configure the service to use -classic authentication rather than NTLM negotiated authentication. -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. -

    +</telnet> +

    To use this task against the Windows NT telnet service, you need to configure the service to use +classic authentication rather than NTLM negotiated authentication. 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.

    - diff -Nru ant-1.9.10/manual/Tasks/tempfile.html ant-1.10.3/manual/Tasks/tempfile.html --- ant-1.9.10/manual/Tasks/tempfile.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/tempfile.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,216 +14,74 @@ See the License for the specific language governing permissions and limitations under the License. --> - + + Tempfile Task - - - - - + +

    Tempfile Task

    +

    Description

    +

    This task sets a property to the name of a temporary file. +Unlike java.io.File.createTempFile, this task does not actually create the +temporary file, but it does guarantee that the file did not exist when the task was executed.

    +

    Parameters

    +
    - + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -
    - - - -
    - Tempfile Task -
    This task sets a property to the name of a temporary file. -
    - - - Apache Ant - -
    -
    AttributeDescriptionTypeRequired
    - - - - - - - - - - -
     
    - - - Description -
    - - This task sets a property to the name of a temporary file. - Unlike java.io.File.createTempFile, - this task does not actually create the temporary file, but it does guarantee that the - file did not exist when the task was executed. - -

    Examples: - -

    <tempfile property="temp.file"/>
    - - create a temporary file - -
    <tempfile property="temp.file" suffix=".xml"/>
    - - create a temporary file with the .xml suffix - -
    <tempfile property="temp.file" destDir="build"/>
    - - create a temporary file in the build subdirectory - -
    - - - - - - - - - - - - -
     
    - - - Parameters -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Attribute - - Description - - Type - - Requirement -
    - property - - Sets the property you wish to assign the temporary file to. - - String - - Required -
    - destdir - - Sets the destination directory. If not set, the basedir directory is used instead. - - File - - Optional -
    - prefix - - Sets the optional prefix string for the temp file. - - String -
    - suffix - - Sets the optional suffix string for the temp file. - - String -
    - deleteonexit - - Whether the temp file will be marked for deletion on normal exit of the Java Virtual Machine (even though the file may never be created); default false. Since Apache Ant 1.7 - - boolean -
    - createfile - - Whether the temp file should be created by this task; default false.Since Ant 1.8 - - boolean -
    -
    - - - - - - - - - - -
     
    - - - Parameters as nested elements -
    - -
    - - - -
    propertySets the property you wish to assign the temporary file to.StringYes
    destdirSets the destination directory.FileNo; defaults to basedir
    prefixSets the optional prefix string for the temp file.StringNo
    suffixSets the optional suffix string for the temp file.StringNo
    deleteonexitWhether the temp file will be marked for deletion on normal exit of JVM (even though the + file may never be created). Since Apache Ant 1.7booleanNo; defaults to false
    createfileWhether the temp file should be created by this task. Since Ant 1.8booleanNo; defaults to false
    +

    Examples

    +
    <tempfile property="temp.file"/>
    +

    create a temporary file

    + +
    <tempfile property="temp.file" suffix=".xml"/>
    +

    create a temporary file with the .xml suffix

    +
    <tempfile property="temp.file" destDir="build"/>
    +

    create a temporary file in the build subdirectory

    diff -Nru ant-1.9.10/manual/Tasks/touch.html ant-1.10.3/manual/Tasks/touch.html --- ant-1.9.10/manual/Tasks/touch.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/touch.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,136 +24,124 @@ -

    Touch

    +

    Touch

    Description

    -

    Changes the modification time of a resource and possibly creates it -at the same time. In addition to working with a single file, this Task -can also work on resources and -resource collections (which also includes directories). Prior to Apache Ant -1.7 only FileSet or Filelist -(since Ant 1.6) have been supported.

    - -

    Ant uses the API of java.io.File to set the last - modification time which has some limitations. For example the - timestamp granularity depends on the operating system and sometimes - the operating system may allow a granularity smaller than - milliseconds. If you need more control you have to fall back to - the <exec> task and native commands.

    - -

    Starting with Ant 1.8.2 Ant will log a warning message if it fails - to change the file modification time. This will happen if you try - to change the modification time of a file you do not own on many - Unix systems, for example.

    +

    Changes the modification time of a resource and possibly creates it at the same time. In addition +to working with a single file, this Task can also work +on resources and resource collections (which also includes +directories). Prior to Apache Ant 1.7 only FileSet or Filelist +(since Ant 1.6) were supported.

    + +

    Ant uses the API of java.io.File to set the last modification time +which has some limitations. For example, the timestamp granularity depends on the operating system +and sometimes the operating system may allow a granularity smaller than milliseconds. If you need +more control you have to fall back to the <exec> task and native commands.

    + +

    Since Ant 1.8.2, a warning message is logged upon failure to change the file +modification time. This will happen if you try to change the modification time of a file you do not +own on many Unix systems, for example.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    fileThe name of the file.Unless a nested resource collection element - has been specified.fileThe name of the file.Unless a nested resource collection element has been specified
    millisSpecifies the new modification time of the file - in milliseconds since midnight Jan 1 1970.No--datetime takes - precedence, however if both are omitted the current time is assumed.millisSpecifies the new modification time of the file in milliseconds since midnight Jan 1 + 1970.No; datetime takes precedence, however if both are omitted then + current time is assumed
    datetimeSpecifies the new modification time of the file. The - special value "now" indicates the current time - (now supported since Ant 1.8).datetimeSpecifies the new modification time of the file. Since Ant 1.8, the + special value now indicates the current time.
    patternSimpleDateFormat-compatible pattern string using - the current locale. - Defaults to "MM/dd/YYYY hh:mm a" or "MM/dd/yyyy hh:mm:ss a" - using the US locale. - Since Ant 1.6.3NopatternSimpleDateFormat-compatible pattern string using the current locale. Since Ant + 1.6.3No; defaults to MM/dd/YYYY hh:mm a or MM/dd/yyyy hh:mm:ss a using the US + locale.
    mkdirsWhether to create nonexistent parent - directories when touching new files. Since Ant 1.6.3No, default false.mkdirsWhether to create nonexistent parent directories when touching new files. Since Ant + 1.6.3No; default false
    verboseWhether to log the creation of new files. - Since Ant 1.6.3No, default true.verboseWhether to log the creation of new files. Since Ant 1.6.3No; default true

    Parameters specified as nested elements

    any resource collection

    -

    You can use any number of nested resource collection elements to -define the resources for this task and refer to resources defined -elsewhere. Note: resources passed to this task must implement -the org.apache.tools.ant.types.resources.Touchable -interface, this is true for all filesystem-based resources like those -returned by path, fileset ot filelist.

    - -

    For backwards compatibility directories matched by nested filesets -will be "touched" as well, use a <type> selector to suppress -this. This only applies to filesets nested into the task directly, -not to filesets nested into a path or any other resource -collection.

    +

    You can use any number of nested resource collection elements to define the resources for this +task and refer to resources defined elsewhere. Note: resources passed to this task +must implement the org.apache.tools.ant.types.resources.Touchable +interface, this is true for all filesystem-based resources like those returned by path, fileset ot +filelist.

    + +

    For backwards compatibility directories matched by nested filesets will be "touched" as well, use +a type selector to suppress this. This only applies to filesets nested into the task +directly, not to filesets nested into a path or any other resource collection.

    mapper

    -

    Since Ant 1.6.3, a nested - mapper can be specified. Files specified via nested - filesets, filelists, or the file - attribute are mapped using the specified mapper. For each file mapped, - the resulting files are touched. If no time has been specified and - the original file exists its timestamp will be used. - If no time has been specified and the original file does not exist the - current time is used. Since Ant 1.8 the task settings (millis, - and datetime) have priority over the timestamp of the original - file.

    +

    Since Ant 1.6.3, a nested mapper can be specified. +Files specified via nested filesets, filelists, or the file +attribute are mapped using the specified mapper. For each file mapped, the resulting files are +touched. If no time has been specified and the original file exists its timestamp will be used. If +no time has been specified and the original file does not exist the current time is used. Since +Ant 1.8, the task settings (millis and datetime) have priority over the +timestamp of the original file.

    Examples

    -
      <touch file="myfile"/>
    -

    creates myfile if it doesn't exist and changes the -modification time to the current time.

    -
      <touch file="myfile" datetime="06/28/2000 2:02 pm"/>
    -

    creates myfile if it doesn't exist and changes the -modification time to Jun, 28 2000 2:02 pm (14:02 for those used to 24 -hour times).

    -
      <touch datetime="09/10/1974 4:30 pm">
    -    <fileset dir="src_dir"/>
    -  </touch>
    -

    changes the modification time to Oct, 09 1974 4:30 pm of all files and directories - found in src_dir.

    -
      <touch file="myfile" datetime="06/28/2000 2:02:17 pm"/>
    -

    creates myfile if it doesn't exist and changes the -modification time to Jun, 28 2000 2:02:17 pm (14:02:17 for those used to 24 -hour times), if the filesystem allows a precision of one second - a -time close to it otherwise.

    -
      <touch file="foo">
    -    <mapper type="glob" from="foo" to="bar" />
    -  </touch>
    -
    -

    creates bar if it doesn't exist and changes the -modification time to that of foo.

    - -
      <touch file="foo" datetime="now">
    -    <mapper type="regexp" from="^src(.*)\.java" to="shadow\1.empty" />
    -  </touch>
    -
    -

    creates files in the shadow directory for every java file in the - src directory if it doesn't exist and changes the modification - time of those files to the current time.

    +
    <touch file="myfile"/>
    +

    creates myfile if it doesn't exist and changes the modification time to the current +time.

    + +
    <touch file="myfile" datetime="06/28/2000 2:02 pm"/>
    +

    creates myfile if it doesn't exist and changes the modification time to Jun, 28 2000 +2:02 pm (14:02 for those used to 24 hour time).

    + +
    +<touch datetime="09/10/1974 4:30 pm">
    +    <fileset dir="src_dir"/>
    +</touch>
    +

    changes the modification time to Oct, 09 1974 4:30 pm of all files and directories found +in src_dir.

    + +
    <touch file="myfile" datetime="06/28/2000 2:02:17 pm"/>
    +

    creates myfile if it doesn't exist and changes the modification time to Jun, 28 2000 +2:02:17 pm (14:02:17 for those used to 24 hour time), if the filesystem allows a precision of one +second—a time close to it otherwise.

    + +
    +<touch file="foo">
    +    <mapper type="glob" from="foo" to="bar"/>
    +</touch>
    +

    creates bar if it doesn't exist and changes the modification time to that +of foo.

    + +
    +<touch file="foo" datetime="now">
    +    <mapper type="regexp" from="^src(.*)\.java" to="shadow\1.empty"/>
    +</touch>
    +

    creates files in the shadow directory for every .java file in +the src directory if it doesn't exist and changes the modification time of those files +to the current time.

    diff -Nru ant-1.9.10/manual/Tasks/translate.html ant-1.10.3/manual/Tasks/translate.html --- ant-1.9.10/manual/Tasks/translate.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/translate.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,27 +24,19 @@ -

    Translate

    +

    Translate

    Description

    -

    Identifies keys in files delimited by special tokens -and translates them with values read from resource bundles. -

    -

    -A resource bundle contains locale-specific key-value pairs. -A resource bundle is a hierarchical set of property files. -A bundle name makes up its base family name. Each file that -makes up this bundle has this name plus its locale. For example, -if the resource bundle name is MyResources, the file that contains -German text will take the name MyResources_de. In addition to -language, country and variant are also used to form the files in -the bundle. -

    -

    -The resource bundle lookup searches for resource files with various -suffixes on the basis of (1) the desired locale and (2) the default -locale (basebundlename), in the following order from lower-level -(more specific) to parent-level (less specific): -

    +

    Identifies keys in files delimited by special tokens and translates them with values read from +resource bundles.

    +

    A resource bundle contains locale-specific key-value pairs. A resource bundle is a hierarchical +set of property files. A bundle name makes up its base family name. Each file that makes up this +bundle has this name plus its locale. For example, if the resource bundle name +is MyResources, the file that contains German text will take the +name MyResources_de. In addition to language, country and variant are also used to +form the files in the bundle.

    +

    The resource bundle lookup searches for resource files with various suffixes on the basis of (1) +the desired locale and (2) the default locale (basebundlename), in the following order from +lower-level (more specific) to parent-level (less specific):

     basebundlename + "_" + language1 + "_" + country1 + "_" + variant1
     basebundlename + "_" + language1 + "_" + country1
    @@ -54,129 +46,103 @@
     basebundlename + "_" + language2 + "_" + country2
     basebundlename + "_" + language2
     
    -

    -The file names generated thus are appended with the string ".properties" -to make up the file names that are to be used. -

    -

    -File encoding is supported. The encoding scheme of the source files, -destination files and the bundle files can be specified. - -Destination files can be explicitly overwritten using the -forceoverwrite attribute. If forceoverwrite -is false, the destination file is overwritten only if either the -source file or any of the files that make up the bundle have been -modified after the destination file was last modified. -

    -

    -New in Apache Ant 1.6:
    -Line endings of source files are preserved in the translated files. -

    -

    FileSets are used to select files to -translate. -

    +

    The file names generated thus are appended with the string .properties to make up +the file names that are to be used.

    +

    File encoding is supported. The encoding scheme of the source files, destination files and the +bundle files can be specified.

    +

    Destination files can be explicitly overwritten using the forceoverwrite attribute. +If forceoverwrite is false, the destination file is overwritten only if either the +source file or any of the files that make up the bundle have been modified after the destination +file was last modified.

    +

    Since Apache Ant 1.6 line endings of source files are preserved in the translated +files.

    +

    FileSets are used to select files to translate.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    todirDestination directory where destination files are - to be created.YestodirDestination directory where destination files are to be created.Yes
    starttokenThe starting token to identify keys.YesstarttokenThe starting token to identify keys.Yes
    endtokenThe ending token to identify keys.YesendtokenThe ending token to identify keys.Yes
    bundleFamily name of resource bundle.YesbundleFamily name of resource bundle.Yes
    bundlelanguage - Locale specific language of resource bundle. Defaults to - default locale's language. - NobundlelanguageLocale specific language of resource bundle.No; defaults to default locale's language
    bundlecountry - Locale specific country of resource bundle. Defaults to - default locale's country. - NobundlecountryLocale specific country of resource bundle.No; defaults to default locale's country
    bundlevariant - Locale specific variant of resource bundle. Defaults to - the default variant of the country and language being used. - NobundlevariantLocale specific variant of resource bundle.No; defaults to bundlelanguage_bundlecountry
    srcencodingSource file encoding scheme. Defaults to - system default file encoding.NosrcencodingSource file encoding scheme.No; defaults to default JVM character encoding
    destencodingDestination file encoding scheme. Defaults to - source file encoding.NodestencodingDestination file encoding scheme.No; defaults to srcencoding
    bundleencodingResource Bundle file encoding scheme. Defaults to - source file encoding.NobundleencodingResource Bundle file encoding scheme.No; defaults to srcencoding
    forceoverwriteOverwrite existing files even if the destination - files are newer. Defaults to "no".NoforceoverwriteOverwrite existing files even if the destination files are newer.No; defaults to no

    Parameters specified as nested elements

    fileset

    -

    FileSets are used to select files that - contain keys for which value translated files are to be generated. -

    +

    FileSets are used to select files that contain keys for which +value translated files are to be generated.

    +

    Examples

    -

    Translate source file encoded in english into its japanese -equivalent using a resource bundle encoded in japanese. -

    +

    Translate source file encoded in English into its Japanese equivalent using a resource +bundle encoded in Japanese.

    -  <translate toDir="$(dest.dir}/ja"
    -        starttoken="#"
    -        endtoken="#"
    -        bundle="resource/BaseResource"
    -        bundlelanguage="ja"
    -        forceoverwrite="yes"
    -        srcencoding="ISO8859_1"
    -        destencoding="SJIS"
    -        bundleencoding="SJIS">
    -        <fileset dir="${src.dir}">
    -            <include name="**/*.jsp"/>
    -        </fileset>
    -  </translate>
    -
    +<translate toDir="$(dest.dir}/ja" + starttoken="#" + endtoken="#" + bundle="resource/BaseResource" + bundlelanguage="ja" + forceoverwrite="yes" + srcencoding="ISO8859_1" + destencoding="SJIS" + bundleencoding="SJIS"> + <fileset dir="${src.dir}"> + <include name="**/*.jsp"/> + </fileset> +</translate> diff -Nru ant-1.9.10/manual/Tasks/truncate.html ant-1.10.3/manual/Tasks/truncate.html --- ant-1.9.10/manual/Tasks/truncate.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/truncate.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,86 +24,78 @@ -

    Truncate

    +

    Truncate

    +

    Since Apache Ant 1.7.1

    Description

    -

    Set the length of one or more files, as the intermittently available -truncate Unix utility/function. In addition to working with -a single file, this Task can also work on -resources and resource collections. -Since Apache Ant 1.7.1. -

    +

    Set the length of one or more files, as the truncate Unix function or GNU +utility. In addition to working with a single file, this Task can also work +on resources and resource collections.

    Parameters

    - +
    - - - + + + - - - + + + - - + - - - + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    fileThe name of the file.Unless a nested resource collection element - has been specified.fileThe name of the file.Unless a nested resource collection element has been specified
    lengthSpecifies the new file length (in bytes) to set. - The following suffixes are supported: + lengthSpecifies the new file length (in bytes) to set. The following suffixes are supported:
      -
    • K : Kilobytes (1024 bytes)
    • -
    • M : Megabytes (1024 K)
    • -
    • G : Gigabytes (1024 M)
    • -
    • T : Terabytes (1024 G)
    • -
    • P : Petabytes (1024 T)
    • +
    • K : Kilobytes (1024 bytes)
    • +
    • M : Megabytes (1024 K)
    • +
    • G : Gigabytes (1024 M)
    • +
    • T : Terabytes (1024 G)
    • +
    • P : Petabytes (1024 T)
    At most one of these. - Omitting both implies length="0". + At most one of these; omitting both implies length=0
    adjustSpecifies the number of bytes - (and positive/negative direction) - by which to adjust file lengths. The same suffixes are supported - for this attribute as for the length attribute. + adjustSpecifies the number of bytes (and positive/negative direction) by which to + adjust file lengths. The same suffixes are supported for this attribute as for + the length attribute.
    createWhether to create nonexistent files.No, default true.createWhether to create nonexistent files.No; default true
    mkdirsWhether to create nonexistent parent - directories when creating new files.No, default false.mkdirsWhether to create nonexistent parent directories when creating new files.No; default false

    Parameters specified as nested elements

    any resource collection

    -

    You can use any number of nested resource collection elements to -define the resources for this task and refer to resources defined -elsewhere. Note: resources passed to this task are expected -to be filesystem-based.

    +

    You can use any number of nested resource collection elements to define the resources for this +task and refer to resources defined elsewhere. Note: resources passed to this task +are expected to be filesystem-based.

    Examples

    -
      <truncate file="foo" />
    -

    Sets the length of file foo to zero.

    +
    <truncate file="foo"/>
    +

    Sets the length of file foo to zero.

    -
      <truncate file="foo" length="1K" />
    -

    Sets the length of file foo to 1 kilobyte (1024 bytes).

    +
    <truncate file="foo" length="1K"/>
    +

    Sets the length of file foo to 1 kilobyte (1024 bytes).

    -
      <truncate file="foo" adjust="1K" />
    -

    Adjusts the length of file foo upward by 1 kilobyte.

    +
    <truncate file="foo" adjust="1K"/>
    +

    Adjusts the length of file foo upward by 1 kilobyte.

    -
      <truncate file="foo" adjust="-1M" />
    -

    Adjusts the length of file foo downward by 1 megabyte.

    +
    <truncate file="foo" adjust="-1M"/>
    +

    Adjusts the length of file foo downward by 1 megabyte.

    diff -Nru ant-1.9.10/manual/Tasks/tstamp.html ant-1.10.3/manual/Tasks/tstamp.html --- ant-1.9.10/manual/Tasks/tstamp.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/tstamp.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,144 +24,128 @@ -

    Tstamp

    +

    Tstamp

    Description

    -

    Sets the DSTAMP, TSTAMP, and TODAY -properties in the current project. By default, -the DSTAMP property is in the -format "yyyyMMdd", TSTAMP is in the -format "hhmm", and TODAY is in the -format "MMMM dd yyyy". Use the nested <format> element -to specify a different format.

    - -

    These properties can be used in the build-file, for instance, to create -time-stamped filenames, or used to replace placeholder tags inside documents -to indicate, for example, the release date. The best place for this task is -probably in an initialization target.

    - -

    Since Ant 1.9.10 the magic - property ant.tstamp.now can be used to specify a fixed - date value in order to create reproducible builds. Its value must be - a number and is interpreted as seconds since the epoch (midnight - 1970-01-01).

    +

    Sets the DSTAMP, TSTAMP, and TODAY properties in the +current project. By default, the DSTAMP property is in the +format yyyyMMdd, TSTAMP is in the format hhmm, and TODAY is +in the format MMMM dd yyyy. Use the nested <format> element to specify a +different format.

    + +

    These properties can be used in the build file, for instance, to create timestamped filenames, or +used to replace placeholder tags inside documents to indicate, for example, the release date. The +best place for this task is probably in an initialization target.

    + +

    Since Ant 1.10.2 the magic property ant.tstamp.now can be used to specify a +fixed date value in order to create reproducible builds. Its value must be a number and is +interpreted as seconds since the epoch (midnight 1970-01-01). With ant.tstamp.now.iso +you could also specify that value in ISO-8601 format (1972-04-17T08:07:00Z). If you +specify a value in an invalid format an INFO message will be logged and the value will be +ignored.

    Parameters

    - +
    - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    prefixPrefix used for all properties set. The default is no prefix.NoprefixPrefix used for all properties set.No; default is no prefix
    -

    Nested Elements

    -The Tstamp task supports a <format> nested element that -allows a property to be set to the current date and time in a given format. -The date/time patterns are as defined in the Java -SimpleDateFormat class. -The format element also allows offsets to be applied to the time to generate different time values. -

    - - - - - - - - - - - - - - - +

    Parameters specified as nested elements

    +

    The task supports a <format> nested element that allows a property to be set +to the current date and time in a given format. The date/time patterns are as defined in the +Java SimpleDateFormat class. The format element also allows offsets to be applied to +the time to generate different time values.

    +
    AttributeDescriptionRequired
    property - The property to receive the date/time string in the given pattern. - Yes
    patternThe date/time pattern to be used. The values are as defined by the Java SimpleDateFormat class.Yes
    + + + + + + + + + - - - - - - - - + + + - - + + + + + + + + + + + - + - - - + + +
    AttributeDescriptionRequired
    propertyThe property to receive the date/time string in the given pattern.Yes
    timezoneThe timezone to use for displaying time. The values are as defined by the Java TimeZone class.No
    offsetThe numeric offset to the current timeNopatternThe date/time pattern to be used. The values are as defined by the Java SimpleDateFormat + class.Yes
    unitThe unit of the offset to be applied to the current time. - Valid Values are -
      -
    • millisecond
    • -
    • second
    • -
    • minute
    • -
    • hour
    • -
    • day
    • -
    • week
    • -
    • month
    • -
    • year
    • -
    +
    timezoneThe timezone to use for displaying time. The values are as defined by the + Java TimeZone class.No
    offsetThe numeric offset to the current timeNo
    unitThe unit of the offset to be applied to the current time. Valid values are +
      +
    • millisecond
    • +
    • second
    • +
    • minute
    • +
    • hour
    • +
    • day
    • +
    • week
    • +
    • month
    • +
    • year
    • +
    NoNo
    localeThe locale used to create date/time string. The general - form is "language, country, variant" but either variant or variant and - country may be omitted. For more information please refer to documentation - for the - Locale - class.NolocaleThe locale used to create date/time string. The general form is language[, country[, + variant]] (either variant or both variant and country may be + omitted). For more information please refer to documentation for + the Locale class.No

    Examples

    -
    -  <tstamp/>
    -
    +
    <tstamp/>
    +

    sets the standard DSTAMP, TSTAMP, and TODAY properties +according to the default formats.

    -

    -sets the standard DSTAMP, TSTAMP, -and TODAY properties according to the default formats.

    -  <tstamp>
    +<tstamp>
         <format property="TODAY_GB" pattern="d-MMMM-yyyy" locale="en,GB"/>
    -  </tstamp>
    -
    -

    -sets the standard properties as well as the property -TODAY_UK with the date/time pattern "d-MMMM-yyyy" -using English locale (eg. 21-May-2001).

    - -
    -  <tstamp>
    -      <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa"
    -              offset="-5" unit="hour"/>
    -  </tstamp>
    -
    -

    -Creates a timestamp, in the property touch.time, 5 hours before the current time. The format in this example -is suitable for use with the <touch> task. The standard properties are set also.

    +</tstamp> +

    sets the standard properties as well as the property TODAY_UK with the date/time +pattern d-MMMM-yyyy using English locale (eg. 21-May-2001).

    -  <tstamp prefix="start"/>
    -
    -

    -Sets three properties with the standard formats, prefixed with "start.": -start.DSTAMP, start.TSTAMP, and start.TODAY.

    - - - +<tstamp> + <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" + offset="-5" unit="hour"/> +</tstamp> +

    Creates a timestamp, in the property touch.time, 5 hours before the current +time. The format in this example is suitable for use with the <touch> task. The +standard properties are set also.

    + +
    <tstamp prefix="start"/>
    +

    Sets three properties with the standard formats, prefixed +with start.: start.DSTAMP, start.TSTAMP, +and start.TODAY.

    diff -Nru ant-1.9.10/manual/Tasks/typedef.html ant-1.10.3/manual/Tasks/typedef.html --- ant-1.9.10/manual/Tasks/typedef.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/typedef.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,246 +24,178 @@ -

    Typedef

    +

    Typedef

    Description

    -

    - Adds a task or a data type definition to the current project - such that this new type or task can be used in the current project. -

    -

    - A Task is any class that extends org.apache.tools.ant.Task or - can be adapted as a Task using an adapter class. -

    -

    - Data types are things like paths or - filesets that can be defined at - the project level and referenced via their ID attribute. - Custom data types usually need custom tasks to put them to good use. -

    -

    - Two attributes are needed to make a definition: the name that - identifies this data type uniquely, and the full name of the class - (including its package name) that implements this type. -

    -

    - You can also define a group of definitions at once using the file or - resource attributes. These attributes point to files in the format of - Java property files or an xml format. -

    -

    - For property files each line defines a single data type in the - format:

    -
    -    typename=fully.qualified.java.classname
    -  
    - -

    - The xml format is described in the - Antlib section. -

    - -

    If you are defining tasks or types that share the same classpath - with multiple taskdef or typedef tasks, the corresponding classes - will be loaded by different - Java ClassLoaders. - Two classes with the same name loaded via different ClassLoaders - are not the same class from the point of view of the Java VM, they - don't share static variables and instances of these classes can't - access private methods or attributes of instances defined by "the - other class" of the same name. They don't even belong to the same - Java package and can't access package private code, either.

    - -

    The best way to load several tasks/types that are supposed to - cooperate with each other via shared Java code is to use the - resource attribute and an antlib descriptor. If this is not - possible, the second best option is to use the loaderref attribute - and specify the same name for each and every typedef/taskdef - - this way the classes will share the same ClassLoader. Note that - the typedef/taskdef tasks must use identical classpath definitions - (this includes the order of path components) for the loaderref - attribute to work.

    +

    Adds a task or a data type definition to the current project such that this new type or task can +be used in the current project.

    +

    A Task is any class that extends org.apache.tools.ant.Task or can be adapted +as a Task using an adapter class.

    +

    Data types are things like paths +or filesets that can be defined at the project level and +referenced via their id attribute. Custom data types usually need custom tasks to put +them to good use.

    +

    Two attributes are needed to make a definition: the name that identifies this data type uniquely, +and the full name of the class (including its package name) that implements this type.

    +

    You can also define a group of definitions at once using the file or resource attributes. These +attributes point to files in the format of Java property files or an xml format.

    +

    For property files each line defines a single data type in the format:

    +
    typename=fully.qualified.java.classname
    +

    The xml format is described in the Antlib section.

    + +

    If you are defining tasks or types that share the same classpath with +multiple taskdef or typedef tasks, the corresponding classes will be +loaded by different +Java ClassLoaders. Two classes with the same name loaded via different ClassLoaders +are not the same class from the point of view of JVM, they don't share static variables and +instances of these classes can't access private methods or attributes of instances defined by "the +other class" of the same name. They don't even belong to the same Java package and can't access +package private code, either.

    + +

    The best way to load several tasks/types that are supposed to cooperate with each other via +shared Java code is to use the resource attribute and an antlib descriptor. +If this is not possible, the second best option is to use the loaderref attribute and +specify the same name for each and every typedef/taskdef—this way +the classes will share the same ClassLoader. Note that +the typedef/taskdef tasks must use identical classpath definitions (this +includes the order of path components) for the loaderref attribute to work.

    Parameters

    - +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    namethe name of the data typeYes, unless the file or resource type - attributes have been specified.
    classnamethe full class name implementing the data typeYes, unless file or resource - have been specified.
    fileName of the file to load definitions from.No
    resource - Name of the resource to load definitions from. - If multiple resources by this name are found along the classpath, - and the format is "properties", the first resource will be loaded; - otherwise all such resources will be loaded. - No
    formatThe format of the file or resource. The values - are "properties" or "xml". If the value is "properties" the file/resource - is a property file contains name to classname pairs. If the value - is "xml", the file/resource is an xml file/resource structured according - to Antlib. - The default is "properties" unless the file/resource name ends with - ".xml", in which case the format attribute will have the value "xml". - since Apache Ant 1.6 - No
    classpath the classpath to - use when looking up classname.No
    classpathref - a reference to a classpath to use when looking up classname. - No
    loaderRefthe 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. since Ant 1.5 No
    onerrorThe action to take if there was a failure in defining the - type. The values are fail: cause a build exception; report: - output a warning, but continue; ignore: do nothing. - since Ant 1.6 - An additional value is failall: cause all behavior of fail, - as well as a build exception for the resource or file attribute - if the resource or file is not found. since Ant 1.7 - The default is fail. - No
    adapterA class that is used to adapt the defined class to - another interface/class. The adapter class must implement the interface - "org.apache.tools.ant.TypeAdapter". The adapter class will be used - to wrap the defined class unless the defined class implements/extends - the class defined by the attribute "adaptto". - If "adaptto" is not set, the defined class will always be wrapped. - since Ant 1.6 - No
    adapttoThis attribute is used in conjunction with the - adapter attribute. - If the defined class does not implement/extend the interface/class - specified by this attribute, the adaptor class will be used - to wrap the class. since Ant 1.6 - No
    uri - The uri that this definition should live in. - since Ant 1.6 - NoAttributeDescriptionRequired
    namethe name of the data typeYes, unless file or resource attributes have been + specified.
    classnamethe full class name implementing the data type
    fileName of the file to load definitions from.No
    resourceName of the resource to load definitions from. If multiple resources by this name are found + along the classpath, and format is properties, the first resource will be + loaded; otherwise all such resources will be loaded.No
    formatThe format of the file or resource. The values are properties" or xml. If the + value is properties the file/resource is a property file contains name-classname + pairs. If the value is xml, the file/resource is an XML file/resource structured + according to Antlib. The default is properties + unless the file/resource name ends with .xml, in which case the format + attribute will have the value xml. Since Ant 1.6No
    classpaththe classpath to use when looking up classname.No
    classpathrefa reference to a classpath to use when looking up classname.No
    loaderRefthe 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. Since Ant 1.5No
    onerrorThe action to take if there was a failure in defining the type. The values are fail: + cause a build exception; report: output a warning, but continue; ignore: do + nothing. Since Ant 1.6, an additional value is failall: cause all behavior of + fail, as well as a build exception for the resource or file attribute if the resource or file + is not found.No; default is fail (since Ant 1.7)
    adapterA class that is used to adapt the defined class to another interface/class. The adapter + class must implement the interface org.apache.tools.ant.TypeAdapter. The adapter + class will be used to wrap the defined class unless the defined class implements/extends the + class defined by the attribute adaptto. If adaptto is not set, the defined + class will always be wrapped. Since Ant 1.6No
    adapttoThis attribute is used in conjunction with the adapter attribute. If the defined class does + not implement/extend the interface/class specified by this attribute, the adaptor class will + be used to wrap the class. Since Ant 1.6No
    uriThe uri that this definition should live in. Since Ant 1.6No
    -

    Parameters specified as nested elements

    -

    classpath

    -

    Typedef's classpath attribute is a - path-like structure and can also be set - via a nested classpath element.

    +

    Parameters specified as nested elements

    +

    classpath

    +

    Typedef's classpath attribute is a path-like +structure and can also be set via a nested classpath element.

    Examples

    - The following fragment defines define a type called urlset. -
    -    <typedef name="urlset" classname="com.mydomain.URLSet"/> 
    - The data type is now available to Ant. The - class com.mydomain.URLSet implements this type.

    - - -

    - Assuming a class org.acme.ant.RunnableAdapter that - extends Task and implements org.apache.tools.ant.TypeAdapter, - and in the execute method invokes run on the proxied object, - one may use a Runnable class as an Ant task. The following fragment - defines a task called runclock. -

    -
    -    <typedef name="runclock"
    -             classname="com.acme.ant.RunClock"
    -             adapter="org.acme.ant.RunnableAdapter"/>
    -  
    - - -

    - The following fragment shows the use of the classpathref and - loaderref to load up two definitions. -

    -
    -    <path id="lib.path">
    -      <fileset dir="lib" includes="lib/*.jar"/>
    -    </path>
    -
    -    <typedef name="filter1"
    -             classname="org.acme.filters.Filter1"
    -             classpathref="lib.path"
    -             loaderref="lib.path.loader"
    -             />
    -    <typedef name="filter2"
    -             classname="org.acme.filters.Filter2"
    -             loaderref="lib.path.loader"
    -             />
    -  
    - - -

    - If you want to load an antlib into a special xml-namespace, the uri attribute - is important: -

    -
    -  <project xmlns:antcontrib="antlib:net.sf.antcontrib">
    +

    The following fragment defines define a type called urlset.

    +
    <typedef name="urlset" classname="com.mydomain.URLSet"/>
    +

    The data type is now available to Ant. The class com.mydomain.URLSet implements this +type.

    + +

    Assuming a class org.acme.ant.RunnableAdapter that extends Task and +implements org.apache.tools.ant.TypeAdapter, and in +the execute() method invokes run() on the +proxied object, one may use a Runnable class as an Ant task. The following fragment +defines a task called runclock.

    +
    +<typedef name="runclock"
    +         classname="com.acme.ant.RunClock"
    +         adapter="org.acme.ant.RunnableAdapter"/>
    + +

    The following fragment shows the use of the classpathref and loaderref to +load up two definitions.

    +
    +<path id="lib.path">
    +    <fileset dir="lib" includes="lib/*.jar"/>
    +</path>
    +
    +<typedef name="filter1"
    +         classname="org.acme.filters.Filter1"
    +         classpathref="lib.path"
    +         loaderref="lib.path.loader"/>
    +<typedef name="filter2"
    +         classname="org.acme.filters.Filter2"
    +         loaderref="lib.path.loader"/>
    + +

    If you want to load an antlib into a special xml-namespace, the uri attribute is +important:

    +
    +<project xmlns:antcontrib="antlib:net.sf.antcontrib">
          <taskdef uri="antlib:net.sf.antcontrib"
                   resource="net/sf/antcontrib/antlib.xml"
    -              classpath="path/to/ant-contrib.jar"/>
    -  
    - -

    Here the namespace - declaration xmlns:antcontrib="antlib:net.sf.antcontrib" - allows tasks and types of the AntContrib Antlib to be used with the - antcontrib prefix - like <antcontrib:if>. - The normal rules of XML namespaces apply and you can declare the - prefix at any element to make it usable for the element it is - declared on as well as all its child elements.

    + classpath="path/to/ant-contrib.jar"/>
    +

    Here the namespace declaration xmlns:antcontrib="antlib:net.sf.antcontrib" allows +tasks and types of the Ant-Contrib Antlib to be used with the antcontrib prefix +like <antcontrib:if>. The normal rules of XML namespaces apply and you can +declare the prefix at any element to make it usable for the element it is declared on as well as all +its child elements.

    - diff -Nru ant-1.9.10/manual/Tasks/unpack.html ant-1.10.3/manual/Tasks/unpack.html --- ant-1.9.10/manual/Tasks/unpack.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/unpack.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,94 +24,85 @@ -

    GUnzip/BUnzip2

    +

    GUnzip/BUnzip2/UnXZ

    Description

    -

    Expands a resource packed using GZip or BZip2.

    +

    Expands a resource packed using GZip, BZip2 or XZ.

    -

    If dest is a directory the name of the destination file is -the same as src (with the ".gz" or ".bz2" -extension removed if present). If dest is omitted, the parent -dir of src is taken. The file is only expanded if the source -resource is newer than the destination file, or when the destination file -does not exist.

    +

    If dest is a directory the name of the destination file is the same as src +(with the .gz, .bz2 or .xz extension removed if present). If dest is +omitted, the parent dir of src is taken. The file is only expanded if the source resource +is newer than the destination file, or when the destination file does not exist.

    + +

    XZ compression support has been added since Apache Ant 1.10.1 and depends on external +libraries not included in the Ant distribution. +See Library Dependencies for more information.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    srcthe file to expand.Yes, or a nested resource collection.srcthe file to expand.Yes, or a nested resource collection
    destthe destination file or directory.Nodestthe destination file or directory.No

    Parameters specified as nested elements

    -

    any resource or single element -resource collection

    +

    any resource or single element resource collection

    -

    The specified resource will be used as src.

    +

    The specified resource will be used as src.

    Examples

    -
    -<gunzip src="test.tar.gz"/>
    -
    -

    expands test.tar.gz to test.tar

    -
    -<bunzip2 src="test.tar.bz2"/>
    -
    -

    expands test.tar.bz2 to test.tar

    -
    -<gunzip src="test.tar.gz" dest="test2.tar"/>
    -
    -

    expands test.tar.gz to test2.tar

    -
    -<gunzip src="test.tar.gz" dest="subdir"/>
    -
    -

    expands test.tar.gz to subdir/test.tar (assuming -subdir is a directory).

    -
    -<gunzip dest=".">
    -  <url url="http://example.org/archive.tar.gz"/>
    -</gunzip>
    -
    -

    downloads http://example.org/archive.tar.gz and expands it -to archive.tar in the project's basedir on the fly.

    +
    <gunzip src="test.tar.gz"/>
    +

    expands test.tar.gz to test.tar

    -

    Related tasks

    +
    <bunzip2 src="test.tar.bz2"/>
    +

    expands test.tar.bz2 to test.tar

    + +
    <unxz src="test.tar.xz"/>
    +

    expands test.tar.xz to test.tar

    + +
    <gunzip src="test.tar.gz" dest="test2.tar"/>
    +

    expands test.tar.gz to test2.tar

    + +
    <gunzip src="test.tar.gz" dest="subdir"/>
    +

    expands test.tar.gz to subdir/test.tar (assuming subdir is a +directory).

    -<gunzip src="some-archive.gz" dest="some-dest-dir"/>
    +<gunzip dest=".">
    +  <url url="http://example.org/archive.tar.gz"/>
    +</gunzip>
     
    +

    downloads http://example.org/archive.tar.gz and expands it +to archive.tar in the project's basedir on the fly.

    -is identical to +

    Related tasks

    +
    <gunzip src="some-archive.gz" dest="some-dest-dir"/>
    +

    is identical to

     <copy todir="some-dest-dir">
       <gzipresource>
         <file file="some-archive.gz"/>
       </gzipresource>
       <mapper type="glob" from="*.gz" to="*"/>
    -</copy>
    -
    - -

    The same is also true for <bunzip2> and -<bzip2resource>. <copy> offers -additional features like filtering files on the fly, -allowing a file to be mapped to multiple destinations, preserving the -last modified time or a configurable file system timestamp -granularity.

    - +</copy> +

    The same is also true for <bunzip2> and <bzip2resource> +or <unxz> and <xzresource>. <copy> offers +additional features like filtering files on the fly, +allowing a file to be mapped to multiple destinations, preserving the last modified time or a +configurable file system timestamp granularity.

    diff -Nru ant-1.9.10/manual/Tasks/untar.html ant-1.10.3/manual/Tasks/untar.html --- ant-1.9.10/manual/Tasks/untar.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/untar.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,12 +24,11 @@ -

    Untar

    +

    Untar

    Description

    Untars a tarfile.

    -This document has moved here +This document has moved here - diff -Nru ant-1.9.10/manual/Tasks/unzip.html ant-1.10.3/manual/Tasks/unzip.html --- ant-1.9.10/manual/Tasks/unzip.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/unzip.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,130 +24,106 @@ -

    Unjar/Untar/Unwar/Unzip

    +

    Unjar/Untar/Unwar/Unzip

    Description

    Unzips a zip-, war-, or jar file.

    -

    PatternSets are used to select files to extract -from the archive. If no patternset is used, all files are extracted. -

    - -

    Resource -Collections may be used to select archived files to perform -unarchival upon. Only file system based resource collections are -supported by Unjar/Unwar/Unzip, this includes fileset, filelist, path, and files. -Untar supports arbitrary resource collections. -Prior to Apache Ant 1.7 only fileset has been supported as a nested element.

    - -

    You can define filename transformations by using a nested mapper element. The default mapper is the -identity mapper. -

    -

    File permissions will not be restored on extracted files.

    -

    The untar task recognizes the long pathname entries used by GNU tar.

    +

    PatternSets are used to select files to +extract from the archive. If no patternset is used, all files are extracted.

    -

    Please note that different ZIP tools handle timestamps -differently when it comes to applying timezone offset calculations of -files. Some ZIP libraries will store the timestamps as they've been -read from the filesystem while others will modify the timestamps both -when reading and writing the files to make all timestamps use the same -timezone. A ZIP archive created by one library may extract files with -"wrong timestamps" when extracted by another library.

    - -

    Ant's ZIP classes use the same algorithm as the InfoZIP tools and -zlib (timestamps get adjusted), Windows' "compressed folders" function -and WinZIP don't change the timestamps. This means that using the -unzip task on files created by Windows' compressed folders function -may create files with timestamps that are "wrong", the same is true if -you use Windows' functions to extract an Ant generated ZIP -archive.

    +

    resource collections may be used to select +archived files to perform unarchival upon. Only file system based resource collections are +supported by Unjar/Unwar/Unzip, this +includes fileset, filelist, path, +and files. Untar supports arbitrary +resource collections. Prior to Apache Ant 1.7 only fileset has been supported as a +nested element.

    + +

    You can define filename transformations by using a +nested mapper element. The default mapper is the +identity mapper.

    +

    File permissions will not be restored on extracted files.

    +

    The untar task recognizes the long pathname entries used by GNU tar.

    +

    Please note that different ZIP tools handle timestamps differently when it comes +to applying timezone offset calculations of files. Some ZIP libraries will store the timestamps as +they've been read from the filesystem while others will modify the timestamps both when reading and +writing the files to make all timestamps use the same timezone. A ZIP archive created by one +library may extract files with "wrong timestamps" when extracted by another library.

    + +

    Ant's ZIP classes use the same algorithm as the InfoZIP tools and zlib (timestamps get adjusted), +Windows' "compressed folders" function and WinZIP don't change the timestamps. This means that +using the unzip task on files created by Windows' compressed folders function may +create files with timestamps that are "wrong", the same is true if you use Windows' functions to +extract an Ant generated ZIP archive.

    Parameters

    - +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +
    AttributeDescriptionRequired
    srcarchive file to expand.Yes, unless filesets are used
    destdirectory where to store the expanded files.Yes
    overwriteOverwrite files, even if they are newer than the corresponding entries in the archive + (true|false).No; default is true
    compressionNote: This attribute is only available for the untar task.
    + compression method. Allowable values are none, gzip, xz + and bzip2.
    No; default is none
    encodingThe character encoding that has been used for filenames inside the zip file. For a list of + possible values see + the Supported Encodings.
    Use the magic value native-encoding for + default JVM character encoding.
    See also the discussion in + the zip task page
    No; defaults to UTF8 for unzip and default JVM character encoding + for untar task
    AttributeDescriptionRequired
    srcarchive file to expand.Yes, if filesets are not used.
    destdirectory where to store the expanded files.Yes
    overwriteOverwrite files, even if they are newer than the - corresponding entries in the archive (true or false, default is - true).No
    compressionNote: This attribute is only available for - the untar task.
    - compression method. Allowable values are "none", - "gzip" and "bzip2". Default is - "none".
    No
    encoding - The character encoding that has been used for filenames - inside the zip file. For a list of possible values see the Supported Encodings.
    - Defaults to "UTF8" for the unzip and the - platform's default encoding for the untar task. Use - the magic value - native-encoding for the platform's default character - encoding. -
    See also the discussion in the - zip task page
    No
    failOnEmptyArchivewhether trying to extract an empty archive is an - error. since Ant 1.8.0No, defaults to false
    stripAbsolutePathSpecwhether Ant should remove leading '/' or '\' - characters from the extracted file name before extracting it. - Note that this changes the entry's name before applying - include/exclude patterns and before using the nested mappers (if - any). since Ant 1.8.0No, defaults to false
    scanForUnicodeExtraFieldsNote: This attribute is not available for - the untar task.
    - If the archive contains uncode extra fields then use them to set - the file names, ignoring the specified encoding. -
    See also the discussion in the - zip task page
    No, defaults to truefailOnEmptyArchivewhether trying to extract an empty archive is an error. since Ant 1.8.0No; defaults to false
    stripAbsolutePathSpecwhether Ant should remove leading / or \ characters from the extracted file + name before extracting it. Note that this changes the entry name before + applying include/exclude patterns and before using the nested + mappers (if any). since Ant 1.8.0No; defaults to false
    scanForUnicodeExtraFieldsNote: This attribute is not available for the untar task.
    + If the archive contains Unicode extra fields then use them to set the file names, ignoring the + specified encoding.
    See also the discussion in the zip task + page
    No; defaults to true

    Examples

    -
    -<unzip src="${tomcat_src}/tools-src.zip" dest="${tools.home}"/>
    -
    -

    +

    <unzip src="${tomcat_src}/tools-src.zip" dest="${tools.home}"/>
     <gunzip src="tools.tar.gz"/>
    -<untar src="tools.tar" dest="${tools.home}"/>
    -
    +<untar src="tools.tar" dest="${tools.home}"/>
     <unzip src="${tomcat_src}/tools-src.zip"
            dest="${tools.home}">
    @@ -155,9 +131,7 @@
             <include name="**/*.java"/>
             <exclude name="**/Test*.java"/>
         </patternset>
    -</unzip>
    -
    -

    +</unzip>

     <unzip dest="${tools.home}">
         <patternset>
    @@ -168,17 +142,14 @@
             <include name="**/*.zip"/>
             <exclude name="**/tmp*.zip"/>
         </fileset>
    -</unzip>
    -
    -

    +</unzip>

     <unzip src="apache-ant-bin.zip" dest="${tools.home}">
         <patternset>
             <include name="apache-ant/lib/ant.jar"/>
         </patternset>
         <mapper type="flatten"/>
    -</unzip>
    -
    +</unzip>

    Related tasks

    @@ -188,10 +159,9 @@ <include name="some-pattern"/> </patternset> <mapper type="some-mapper"/> -</unzip> - +</unzip> -is identical to +

    is identical to

     <copy todir="some-dir" preservelastmodified="true">
    @@ -201,21 +171,19 @@
         </patternset>
       </zipfileset>
       <mapper type="some-mapper"/>
    -</copy>
    -
    +</copy> -

    The same is also true for <untar> and -<tarfileset>. <copy> offers -additional features like filtering files on the fly, -allowing a file to be mapped to multiple destinations or a -configurable file system timestamp granularity.

    +

    The same is also true for <untar> +and <tarfileset>. <copy> offers additional features +like filtering files on the fly, allowing a file to be +mapped to multiple destinations or a configurable file system timestamp granularity.

    <zip destfile="new.jar">
       <zipfileset src="old.jar">
         <exclude name="do/not/include/this/class"/>
       </zipfileset>
    -</zip>
    -
    +</zip> +

    "Deletes" files from a zipfile.

    @@ -223,11 +191,11 @@
       <patternset>
         <include name="images/"/>
       </patternset>
    -</unzip>
    -
    -

    This extracts all images from ant.jar which are stored in the images directory -of the Jar (or somewhere under it). While extracting the directory structure (images) -will be taken.

    +</unzip> + +

    This extracts all images from ant.jar which are stored in the images +directory of the Jar (or somewhere under it). While extracting the directory structure +(images) will be taken.

     <unzip src="${ant.home}/lib/ant.jar" dest="...">
    @@ -235,10 +203,11 @@
         <include name="**/ant_logo_large.gif"/>
         <include name="**/LICENSE.txt"/>
       </patternset>
    -</unzip>
    -
    -

    This extracts the two files ant_logo_large.gif and LICENSE.txt from the -ant.jar. More exactly: it extracts all files with these names from anywhere in the source file. While extracting the directory structure will be taken.

    +</unzip> + +

    This extracts the two files ant_logo_large.gif and LICENSE.txt from +the ant.jar. More exactly: it extracts all files with these names from anywhere in the +source file. While extracting the directory structure will be taken.

    diff -Nru ant-1.9.10/manual/Tasks/uptodate.html ant-1.10.3/manual/Tasks/uptodate.html --- ant-1.9.10/manual/Tasks/uptodate.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/uptodate.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,154 +24,129 @@ -

    Uptodate

    +

    Uptodate

    Description

    -

    Sets a property if a target file or set of target files is more up-to-date -than a source file or set of source files. A single source file is specified -using the srcfile attribute. A set of source files is specified -using the nested <srcfiles> -elements. These are FileSets, -whereas multiple target files are specified using a nested -<mapper> element.

    -

    By default, the value of the property is set to true if -the timestamp of the source file(s) is not more recent than the timestamp of -the corresponding target file(s). You can set the value to something other -than the default by specifying the value attribute.

    +

    Sets a property if a target file or set of target files is more up-to-date than a source file or +set of source files. A single source file is specified using the srcfile attribute. A set +of source files is specified using the nested <srcfiles> elements. These +are FileSets, whereas multiple target files are specified using +a nested <mapper> element.

    +

    By default, the value of the property is set to true if the timestamp of the source +file(s) is not more recent than the timestamp of the corresponding target file(s). You can set the +value to something other than the default by specifying the value attribute.

    If a <srcfiles> element is used, without also specifying -a <mapper> element, the default behavior is to use a -merge mapper, with the -to attribute set to the value of the -targetfile attribute.

    -

    Normally, this task is used to set properties that are useful to avoid -target execution depending on the relative age of the specified files.

    +a <mapper> element, the default behavior is to use +a merge mapper, with the to attribute set +to the value of the targetfile attribute.

    +

    Normally, this task is used to set properties that are useful to avoid target execution depending +on the relative age of the specified files.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    propertyThe name of the property to set.YespropertyThe name of the property to set.Yes
    valueThe value to set the property to.No; defaults to true.valueThe value to set the property to.No; defaults to true.
    srcfileThe file to check against the target file(s).Yes, unless a nested + srcfileThe file to check against the target file(s).Yes, unless a nested <srcfiles> or <srcresources> element is present.
    targetfileThe file for which we want to determine the status.Yes, unless a nested - <mapper> element is present.targetfileThe file for which we want to determine the status.Yes, unless a nested <mapper> element is present.

    Parameters specified as nested elements

    -

    srcfiles

    -

    The nested <srcfiles> element is a -fileset and allows you to -specify a set of files to check against the target file(s).

    - -

    Note: You can specify either the srcfile -attribute or nested <srcfiles> elements, but not both. - -

    Note that the task will completely ignore any directories that seem - to be matched by the srcfiles fileset, it will only consider normal - files. If you need logic that applies to directories as well, use a - nested srcresource and a dirset (for example).

    - -

    srcresources

    -

    The nested <srcresources> element is a union and allows you to -specify a collection of resources to check against the target file(s). -Since Apache Ant 1.7

    - -

    mapper

    -

    The nested <mapper> element allows you to specify -a set of target files to check for being up-to-date with respect to a -set of source files.

    -

    - The mapper "to" attribute is relative to the target file, or to - the "dir" attribute of the nested srcfiles element. -

    -

    - Since Ant 1.6.3, - one can use a filenamemapper type in place of the mapper element. -

    +

    srcfiles

    +

    The nested <srcfiles> element is a fileset +and allows you to specify a set of files to check against the target file(s).

    + +

    Note: You can specify either the srcfile attribute or +nested <srcfiles> elements, but not both. + +

    Note that the task will completely ignore any directories that seem to be matched by +the srcfiles fileset, it will only consider normal files. If you need logic that applies +to directories as well, use a nested srcresources element and a dirset +(for example).

    + +

    srcresources

    +

    Since Apache Ant 1.7

    +

    The nested <srcresources> element is +a union and allows you to specify a collection of +resources to check against the target file(s).

    + +

    mapper

    +

    The nested <mapper> element allows you to specify a set of target files to +check for being up-to-date with respect to a set of source files.

    +

    The mapper to attribute is relative to the target file, or to the dir +attribute of the nested srcfiles element.

    +

    Since Ant 1.6.3, one can use a filenamemapper type in place of the mapper +element.

    Examples

    -
      <uptodate property="xmlBuild.notRequired" targetfile="${deploy}\xmlClasses.jar" >
    -    <srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
    -  </uptodate>
    -

    sets the property xmlBuild.notRequired to true -if the ${deploy}/xmlClasses.jar file is more up-to-date than -any of the DTD files in the ${src}/xml directory.

    +
    +<uptodate property="xmlBuild.notRequired" targetfile="${deploy}\xmlClasses.jar">
    +  <srcfiles dir="${src}/xml" includes="**/*.dtd"/>
    +</uptodate>
    +

    sets the property xmlBuild.notRequired to true if +the ${deploy}/xmlClasses.jar file is more up-to-date than any of the DTD files in +the ${src}/xml directory.

    This can be written as:

    -
      <uptodate property="xmlBuild.notRequired">
    -    <srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
    -    <mapper type="merge" to="${deploy}\xmlClasses.jar"/>
    -  </uptodate>
    -as well. - -The xmlBuild.notRequired property can then be used in a -<target> tag's unless attribute to -conditionally run that target. For example, running the following target:

    +
    +<uptodate property="xmlBuild.notRequired">
    +  <srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
    +  <mapper type="merge" to="${deploy}\xmlClasses.jar"/>
    +</uptodate>
    +

    as well.

    + +

    The xmlBuild.notRequired property can then be used in a <target> +tag's unless attribute to conditionally run that target. For example, running the +following target:

     <target name="xmlBuild" depends="chkXmlBuild" unless="xmlBuild.notRequired">
       ...
    -</target>
    -
    -will first run the chkXmlBuild target, which contains -the <uptodate> task that determines whether -xmlBuild.notRequired gets set. The property named in -the unless attribute is then checked for being set/not set. -If it did get set (ie., the jar file is up-to-date), -then the xmlBuild target won't be run. -

    - -

    The following example shows a single source file being checked -against a single target file:

    -
      <uptodate property="isUpToDate"
    -            srcfile="/usr/local/bin/testit"
    -            targetfile="${build}/.flagfile"/>
    -
    -

    sets the property isUpToDate to true -if /usr/local/bin/testit is not newer than -${build}/.flagfile.

    -

    -

    - The following shows usage of a relative mapper. -

    -
    -    <uptodate property="checkUptodate.uptodate">
    -      <srcfiles dir="src" includes="*"/>
    -      <mapper type="merge" to="../dest/output.done"/>
    -    </uptodate>
    -    <echo message="checkUptodate result: ${checkUptodate.uptodate}"/>
    -  
    -

    - The previous example can be a bit confusing, so it may be better to - use absolute paths: -

    -
    -    <property name="dest.dir" location="dest"/>
    -    <uptodate property="checkUptodate.uptodate">
    -      <srcfiles dir="src" includes="*"/>
    -      <mapper type="merge" to="${dest.dir}/output.done"/>
    -    </uptodate>
    -  
    - +</target> +

    will first run the chkXmlBuild target, which contains the <uptodate> +task that determines whether xmlBuild.notRequired gets set. The property named in +the unless attribute is then checked for being set/not set. If it did get set (ie., the +jar file is up-to-date), then the xmlBuild target won't be run.

    +

    The following example shows a single source file being checked against a single target file:

    +
    +<uptodate property="isUpToDate"
    +          srcfile="/usr/local/bin/testit"
    +          targetfile="${build}/.flagfile"/>
    +
    +

    sets the property isUpToDate to true if /usr/local/bin/testit is +not newer than ${build}/.flagfile.

    +

    The following shows usage of a relative mapper.

    +
    +<uptodate property="checkUptodate.uptodate">
    +  <srcfiles dir="src" includes="*"/>
    +  <mapper type="merge" to="../dest/output.done"/>
    +</uptodate>
    +<echo message="checkUptodate result: ${checkUptodate.uptodate}"/>
    +

    The previous example can be a bit confusing, so it may be better to use absolute paths:

    +
    +<property name="dest.dir" location="dest"/>
    +<uptodate property="checkUptodate.uptodate">
    +  <srcfiles dir="src" includes="*"/>
    +  <mapper type="merge" to="${dest.dir}/output.done"/>
    +</uptodate>
    - diff -Nru ant-1.9.10/manual/Tasks/verifyjar.html ant-1.10.3/manual/Tasks/verifyjar.html --- ant-1.9.10/manual/Tasks/verifyjar.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/verifyjar.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,122 +24,114 @@ -

    VerifyJar

    +

    VerifyJar

    Description

    -

    Verifies JAR files with the jarsigner command line tool. -It will take a named file in the jar attribute. Nested paths are also -supported -

    - +

    Verifies JAR files with +the jarsigner command line tool. It will take a named file in +the jar attribute. Nested paths are also supported.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    jarthe jar file to verifyYes, unless nested paths have - been used.jarthe jar file to verifyYes, unless nested paths have been used
    aliasthe alias to verify underYes.aliasthe alias to verify underYes
    storepasspassword for keystore integrity.Yes.storepasspassword for keystore integrity. + Note that + jarsigner does not read the password from stdin during + verification, so the password must be send via a command line + interface and may be visible to other users of the system.No
    keystorekeystore locationNokeystorekeystore locationNo
    storetypekeystore typeNostoretypekeystore typeNo
    keypasspassword for private key (if different)Nokeypasspassword for private key (if different)No
    certificates(true | false) display information about certificatesNo; default falsecertificates(true|false) display information about certificatesNo; default false
    verbose(true | false) verbose output when verifyingNo; default falseverbose(true|false) verbose output when verifyingNo; default false
    strict(true | false) strict checking when verifying.
    since Ant 1.9.1.
    No; default falsestrict(true|false) strict checking when verifying.
    since Ant 1.9.1.
    No; default false
    maxmemorySpecifies the maximum memory the jarsigner VM will use. Specified in the - style of standard java memory specs (e.g. 128m = 128 MBytes)NomaxmemorySpecifies the maximum memory the jarsigner JVM will use. Specified in the style + of standard Java memory specs (e.g. 128m = 128 MBytes)No
    executableSpecify a particular jarsigner executable - to use in place of the default binary (found in the same JDK as - Apache Ant is running in).
    - Must support the same command line options as the Sun JDK - jarsigner command. - since Ant 1.8.0.
    No
    executableSpecify a particular jarsigner executable to use in place of the default binary + (found in the same JDK as Apache Ant is running in).
    Must support the same command line + options as the Sun JDK jarsigner command. since Ant 1.8.0.
    No

    Parameters as nested elements

    - +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    pathpath of JAR files to verify. since Ant 1.7Nopathpath of JAR files to verify. since Ant 1.7No
    filesetfileset of JAR files to verify. Nofilesetfileset of JAR files to verify.No
    syspropertyJVM system properties, with the syntax of Ant - environment variables No, and only one can be suppliedsyspropertyJVM system properties, with the syntax of Ant environment + variablesNo, and only one can be supplied
    -

    Examples

    -
    +
     <verifyjar jar="${dist}/lib/ant.jar"
    -alias="apache-group" storepass="secret"/>
    -
    -

    - verifies the ant.jar with alias "apache-group" accessing the - keystore and private key via "secret" password. -

    - - + alias="apache-group" storepass="secret"/> +

    verifies the ant.jar with alias apache-group accessing the keystore and +private key via secret password.

    - diff -Nru ant-1.9.10/manual/Tasks/vss.html ant-1.10.3/manual/Tasks/vss.html --- ant-1.9.10/manual/Tasks/vss.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/vss.html 2018-03-24 12:37:12.000000000 +0000 @@ -17,330 +17,310 @@ -Microsoft Visual SourceSafe(VSS) Tasks +Microsoft Visual SourceSafe (VSS) Tasks

    Microsoft Visual SourceSafe Tasks User Manual

    by

    -
    +
  • Craig Cottingham
  • +
  • Andrew Everitt
  • +
  • Balazs Fejes 2
  • +
  • Glenn_Twiggs@bmc.com
  • +
  • Martin Poeschl (mpoeschl@marmot.at)
  • +
  • Phillip Wells
  • +
  • Jon Skeet (jon.skeet@peramon.com)
  • +
  • Nigel Magnay (nigel.magnay@parsec.co.uk)
  • +
  • Gary S. Weaver
  • +
  • Jesse Stockall
  • + +

    Contents

    -
    -

    Introduction

    -

    These tasks provide an interface to the -Microsoft Visual SourceSafe SCM. -The org.apache.tools.ant.taskdefs.optional.vss package consists of a simple framework to support -vss functionality as well as some Apache Ant tasks encapsulating frequently used vss commands. -Although it is possible to use these commands on the desktop, -they were primarily intended to be used by automated build systems.

    -

    -If you get a CreateProcess IOError=2 when running these, it means -that ss.exe was not found. Check to see if you can run it from the -command line -you may need to alter your path, or set the ssdir -property. -

    The Tasks

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    +

    Introduction

    +

    These tasks provide an interface to +the Microsoft Visual SourceSafe SCM. +The org.apache.tools.ant.taskdefs.optional.vss package consists of a +simple framework to support VSS functionality as well as some Apache Ant tasks encapsulating +frequently used VSS commands. Although it is possible to use these commands on the desktop, they +were primarily intended to be used by automated build systems.

    +

    If you get a CreateProcess error=2 when running these, it means +that ss.exe was not found. Check to see if you can run it from the command line—you +may need to alter your path, or set the ssdir property.

    +

    The Tasks

    + +
    vssgetRetrieves a copy of the specified VSS file(s).
    vsslabelAssigns a label to the specified version or current version of a file or project.
    vsshistoryShows the history of a file or project in VSS.
    vsscheckinUpdates VSS with changes made to a checked out file, and unlocks the VSS master copy.
    vsscheckoutCopies a file from the current project to the current folder, for the purpose of editing.
    vssaddAdds a new file into the VSS Archive
    vsscpChange the current project being used in VSS
    vsscreateCreates a project in VSS.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TaskDescription
    vssgetRetrieves a copy of the specified VSS file(s).
    vsslabelAssigns a label to the specified version or current version of a file or project.
    vsshistoryShows the history of a file or project in VSS.
    vsscheckinUpdates VSS with changes made to a checked out file, and unlocks the VSS master copy.
    vsscheckoutCopies a file from the current project to the current folder, for the purpose of editing.
    vssaddAdds a new file into the VSS Archive
    vsscpChange the current project being used in VSS
    vsscreateCreates a project in VSS.
    -
    +

    Task Descriptions

    -

    VssGet

    +

    VssGet

    Description

    -Task to perform GET commands to Microsoft Visual SourceSafe. -

    If you specify two or more attributes from version, date and -label only one will be used in the order version, date, label.

    +

    Task to perform GET commands to Microsoft Visual SourceSafe.

    +

    If you specify two or more attributes from version, date and label only one will be used in the +order version, date, label.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + +
    Attribute Values Required
    vsspathSourceSafe path which specifies the project/file(s) you wish to - perform the action on.YesvsspathSourceSafe path which specifies the project/file(s) you wish to perform the action on.Yes
    loginusername[,password] - The username and password needed to get access - to VSS. Note that you may need to specify both (if you have a password) - - Ant/VSS will hang if you leave the password out and VSS does not accept - login without a password. Nologinusername[,password]—The username and password needed to get access to VSS. Note + that you may need to specify both (if you have a password)—Ant/VSS will hang if you + leave the password out and VSS does not accept login without a password.No
    localpathOverride the working directory and get to the specified pathNolocalpathOverride the working directory and get to the specified pathNo
    ssdirdirectory where ss.exe resides. By default the - task expects it to be in the PATH.Nossdirdirectory where ss.exe resides.No; by default expected to be in PATH
    serverPathdirectory where srcsafe.ini resides.NoserverPathdirectory where srcsafe.ini resides.No
    writabletrue or false; default falseNowritabletrue|falseNo; default false
    recursivetrue or false; default false. Note however that in the SourceSafe UI - , there is a setting accessed via Tools/Options/GeneralTab called - "Act on projects recursively". If this setting is checked, - then the recursive attribute is effectively ignored, and the get - will always be done recursively - Norecursivetrue|false. Note however that in the SourceSafe UI there is a setting accessed + via Tools/Options/GeneralTab called Act on projects recursively. If this + setting is checked, then the recursive attribute is effectively ignored, and get + will always be done recursivelyNo; default false
    versiona version number to getNo, only one of these allowedversiona version number to getNo; only one of these may be used
    datea date stamp to get atdatea date stamp to get at
    labela label to get forlabela label to get for
    quietsuppress output (off by default)Noquietsuppress outputNo; defaults to off
    autoresponseWhat to respond with (sets the -I option). By default, -I- is - used; values of Y or N will be appended to this.NoautoresponseWhat to respond with (sets the -I option). By default, -I- is + used; values of Y or N will be appended to this.No
    writablefilesBehavior when local files are writable. Valid options are: replace, - skip and fail; Defaults to fail -
    skip implies failonerror=false
    NoBehavior when local files are writable. Valid options are: replace, skip + and fail; skip implies failonerror=falseNo; defaults to fail
    failonerrorStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to trueNoStop the build process if ss.exe exits with a return code 100No; defaults to true
    filetimestampSet the behavior for timestamps of local files. Valid options are current, - modified, or updated. Defaults to current.NoSet the behavior for timestamps of local files. Valid options + are current, modified, or updated.No; defaults to current

    Note that only one of version, date or label should be specified

    Examples

    -
    +
     <vssget localPath="C:\mysrc\myproject"
             recursive="true"
             label="Release1"
             login="me,mypassword"
             vsspath="$/source/aProject"
    -        writable="true"/>
    -
    -
    -

    Does a get on the VSS-Project $/source/myproject using the username -me and the password mypassword. It will recursively get the files -which are labeled Release1 and write them to the local directory -C:\mysrc\myproject. The local files will be writable.

    -
    + writable="true"/> - +

    Does a get on the VSS Project $/source/myproject using the username me and +the password mypassword. It will recursively get the files which are labeled Release1 +and write them to the local directory C:\mysrc\myproject. The local files will be +writable.

    -

    VssLabel

    +
    + +

    VssLabel

    Description

    -Task to perform LABEL commands to Microsoft Visual SourceSafe. -

    Assigns a label to the specified version or current version of a file or -project.

    +

    Task to perform LABEL commands to Microsoft Visual SourceSafe.

    +

    Assigns a label to the specified version or current version of a file or project.

    Parameters

    - - - - - - +
    AttributeValuesRequired
    - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - + + + + - - + + + + + + + + + + + + + + + + + + + + + +
    vsspathSourceSafe path which specifies the project/file(s) you wish to - perform the action on.YesAttributeValuesRequired
    loginusername[,password] - The username and password needed to get access - to VSS. Note that you may need to specify both (if you have a password) - - Ant/VSS will hang if you leave the password out and VSS does not accept - login without a password. NovsspathSourceSafe path which specifies the project/file(s) you wish to perform the action on.Yes
    ssdirdirectory where ss.exe resides. By default the - task expects it to be in the PATH.Nologinusername[,password]—The username and password needed to get access to VSS. Note + that you may need to specify both (if you have a password)—Ant/VSS will hang if you + leave the password out and VSS does not accept login without a password.No
    serverPathdirectory where srcsafe.ini resides.Nossdirdirectory where ss.exe resides.No; by default expected to be in PATH
    labelA label to apply to the hierarchyYes
    versionAn existing file or project version to label. By default the current - version is labeled.No
    commentThe comment to use for this label. Empty or '-' for no comment.No
    autoresponseWhat to respond with (sets the -I option). By default, -I- is - used; values of Y or N will be appended to this.No
    serverPathdirectory where srcsafe.ini resides.No
    failonerrorStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to truelabelA label to apply to the hierarchyYes
    versionAn existing file or project version to label. By default the current version is + labeled.No
    commentThe comment to use for this label. Empty or - for no comment. No
    autoresponseWhat to respond with (sets the -I option). By default, -I- is + used; values of Y or N will be appended to this.No
    failonerrorStop the build process if ss.exe exits with a return code 100.No; defaults to true

    Examples

    -
    +
     <vsslabel vsspath="$/source/aProject"
               login="me,mypassword"
    -          label="Release1"/>
    -
    -
    -

    Labels the current version of the VSS project $/source/aProject with -the label Release1 using the username me and the password -mypassword. -

    -
    + label="Release1"/> + +

    Labels the current version of the VSS project $/source/aProject with the +label Release1 using the username me and the password mypassword.

    +
     <vsslabel vsspath="$/source/aProject/myfile.txt"
               version="4"
    -          label="1.03.004"/>
    -
    -
    -

    Labels version 4 of the VSS file $/source/aProject/myfile.txt with the -label 1.03.004. If this version already has a label, the operation (and -the build) will fail. -

    -
    + label="1.03.004"/> - +

    Labels version 4 of the VSS file $/source/aProject/myfile.txt with the +label 1.03.004. If this version already has a label, the operation (and the build) will +fail.

    -

    VssHistory

    +
    + +

    VssHistory

    Description

    Task to perform HISTORY commands to Microsoft Visual SourceSafe.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + @@ -354,10 +334,10 @@ - - + + @@ -381,13 +361,13 @@ - + - - + + @@ -396,43 +376,39 @@ - - + +
    Attribute Values Required
    vsspathSourceSafe path which specifies the project/file(s) you wish to - perform the action on.YesvsspathSourceSafe path which specifies the project/file(s) you wish to perform the action on.Yes
    loginusername[,password] - The username and password needed to get access - to VSS. Note that you may need to specify both (if you have a password) - - Ant/VSS will hang if you leave the password out and VSS does not accept - login without a password. Nologinusername[,password]—The username and password needed to get access to VSS. Note + that you may need to specify both (if you have a password)—Ant/VSS will hang if you + leave the password out and VSS does not accept login without a password.No
    ssdirdirectory where ss.exe resides. By default the - task expects it to be in the PATH.Nossdirdirectory where ss.exe resides.No; by default expected to be in PATH
    serverPathdirectory where srcsafe.ini resides.NoserverPathdirectory where srcsafe.ini resides.No
    fromDate
    dateFormatFormat of dates in fromDate and toDate. Used when calculating dates with - the numdays attribute. This string uses the formatting rules of SimpleDateFormat. - Defaults to DateFormat.SHORT.NoFormat of dates in fromDate and toDate. Used when calculating dates + with the numdays attribute. This string uses the formatting rules of + SimpleDateFormat.No; defaults to DateFormat.SHORT
    fromLabel
    recursivetrue or falsetrue|false No
    stylebrief, codediff, default or nofile. The default is default.Nobrief, codediff, default or nofile.No; defaults to default
    user
    failonerrorStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to trueNoStop the build process if ss.exe exits with a return code 100No; defaults to true

    Specifying the time-frame

    There are different ways to specify what time-frame you wish to evaluate:

      -
    • Changes between two dates: Specify both fromDate and toDate
    • -
    • Changes before a date: Specify toDate
    • -
    • Changes after a date: Specify fromDate
    • -
    • Changes X Days before a date: Specify toDate and (negative!) numDays
    • -
    • Changes X Days after a date: Specify fromDate and numDays
    • +
    • Changes between two dates: Specify both fromDate and toDate
    • +
    • Changes before a date: Specify toDate
    • +
    • Changes after a date: Specify fromDate
    • +
    • Changes X Days before a date: Specify toDate and (negative!) numDays
    • +
    • Changes X Days after a date: Specify fromDate and numDays
    -

    Examples

    -
    -
    +
    +
     <vsshistory vsspath="$/myProject" recursive="true"
                 fromLabel="Release1"
    -            toLabel="Release2"/>
    -
    -
    -

    Shows all changes between "Release1" and "Release2".

    + toLabel="Release2"/> + +

    Shows all changes between Release1 and Release2.

    -
    -
    +
     <vsshistory vsspath="$/myProject" recursive="true"
                 fromDate="01.01.2001"
    -            toDate="31.03.2001"/>
    -
    -
    -

    Shows all changes between January 1st 2001 and March 31st 2001 (in Germany, date must be specified according to your locale).

    + toDate="31.03.2001"/> -
    -
    +

    Shows all changes between January 1st 2001 and March 31st 2001 (in Germany, date must be +specified according to your locale).

    + +
     <tstamp>
       <format property="to.tstamp" pattern="M-d-yy;h:mma"/>
     </tstamp>
    @@ -440,19 +416,17 @@
     <vsshistory vsspath="$/myProject" recursive="true"
                 numDays="-14"
                 dateFormat="M-d-yy;h:mma"
    -            toDate="${to.tstamp}"/>
    -
    -
    + toDate="${to.tstamp}"/> +

    Shows all changes in the 14 days before today.

    -
    +
    - -

    VssCheckin

    +

    VssCheckin

    Description

    -Task to perform CHECKIN commands to Microsoft Visual SourceSafe. +

    Task to perform CHECKIN commands to Microsoft Visual SourceSafe.

    Parameters

    - +
    @@ -460,16 +434,14 @@ - + - + @@ -479,295 +451,278 @@ - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + +
    Attribute Values
    vsspathSourceSafe path which specifies the project/file(s) you wish to - perform the action on.SourceSafe path which specifies the project/file(s) you wish to perform the action on. Yes
    loginusername[,password] - The username and password needed to get access - to VSS. Note that you may need to specify both (if you have a password) - - Ant/VSS will hang if you leave the password out and VSS does not accept - login without a password. username[,password]—The username and password needed to get access to + VSS. Note that you may need to specify both (if you have a password)—Ant/VSS will hang + if you leave the password out and VSS does not accept login without a password. No
    ssdirdirectory where ss.exe resides. By default the - task expects it to be in the PATH.Nodirectory where ss.exe resides.No; by default expected to be in PATH
    serverPathdirectory where srcsafe.ini resides.NoserverPathdirectory where srcsafe.ini resides.No
    writabletrue or falseNowritabletrue|falseNo
    recursivetrue or falseNorecursivetrue|falseNo
    commentComment to use for the files that where checked in.NocommentComment to use for the files that where checked in.No
    autoresponse'Y', 'N' or empty. Specify how to reply to questions from VSS.NoautoresponseY, N or empty. Specify how to reply to questions from VSS.No
    failonerrorStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to trueNoStop the build process if ss.exe exits with a return code 100.No; defaults to true

    Examples

    -
    +
     <vsscheckin vsspath="$/test/test*"
                 localpath="D:\build\"
                 comment="Modified by automatic build"/>
     
    -
    -

    Checks in the file(s) named test* in the project $/test using -the local directory D:\build.

    -
    - +

    Checks in the file(s) named test* in the project $/test using the local +directory D:\build.

    -

    VssCheckout

    +
    + +

    VssCheckout

    Description

    -Task to perform CHECKOUT commands to Microsoft Visual SourceSafe. -

    If you specify two or more attributes from version, date and -label only one will be used in the order version, date, label.

    +

    Task to perform CHECKOUT commands to Microsoft Visual SourceSafe.

    +

    If you specify two or more attributes from version, date +and label only one will be used in the +order version, date, label.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + +
    Attribute Values Required
    vsspathSourceSafe path which specifies the project/file(s) you wish to - perform the action on.YesvsspathSourceSafe path which specifies the project/file(s) you wish to perform the action on.Yes
    loginusername[,password] - The username and password needed to get access - to VSS. Note that you may need to specify both (if you have a password) - - Ant/VSS will hang if you leave the password out and VSS does not accept - login without a password. Nologinusername[,password]—The username and password needed to get access to VSS. Note + that you may need to specify both (if you have a password)—Ant/VSS will hang if you + leave the password out and VSS does not accept login without a password.No
    localpathOverride the working directory and get to the specified pathNolocalpathOverride the working directory and get to the specified pathNo
    ssdirdirectory where ss.exe resides. By default the - task expects it to be in the PATH.Nossdirdirectory where ss.exe resides.No; by default expected to be in PATH
    serverPathdirectory where srcsafe.ini resides.NoserverPathdirectory where srcsafe.ini resides.No
    writabletrue or falseNowritabletrue|falseNo
    recursivetrue or falseNorecursivetrue|falseNo
    versiona version number to getNo, only one of these allowedversiona version number to getNo; only one of these may be used
    datea date stamp to get atdatea date stamp to get at
    labela label to get forlabela label to get for
    writablefilesBehavior when local files are writable. Valid options are: replace, - skip and fail; Defaults to fail -
    skip implies failonerror=false
    NoBehavior when local files are writable. Valid options are: replace, skip + and fail; skip implies failonerror=falseNo; defaults to fail
    failonerrorStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to trueNoStop the build process if ss.exe exits with a return code 100.No; defaults to true
    filetimestampSet the behavior for timestamps of local files. Valid options are current, - modified, or updated. Defaults to current.NoSet the behavior for timestamps of local files. Valid options + are current, modified, or updated.No; defaults to current
    getlocalcopySet the behavior to retrieve local copies of the files. Defaults to true.NoSet the behavior to retrieve local copies of the files.No; defaults to true

    Examples

    -
    +
     <vsscheckout vsspath="$/test"
                  localpath="D:\build"
                  recursive="true"
    -             login="me,mypass"/>
    -
    -
    -

    Does a recursive checkout of the project $/test to the directory D:\build. -

    -
    + login="me,mypass"/> - +

    Does a recursive checkout of the project $/test to the +directory D:\build.

    -

    VssAdd

    +
    + +

    VssAdd

    Description

    Task to perform ADD commands to Microsoft Visual SourceSafe.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + +
    Attribute Values Required
    localpathSpecify the local file(s) to add to VSSYeslocalpathSpecify the local file(s) to add to VSSYes
    loginusername[,password] - The username and password needed to get access - to VSS. Note that you may need to specify both (if you have a password) - - Ant/VSS will hang if you leave the password out and VSS does not accept - login without a password. Nologinusername[,password]—The username and password needed to get access to VSS. Note + that you may need to specify both (if you have a password)—Ant/VSS will hang if you + leave the password out and VSS does not accept login without a password.No
    ssdirdirectory where ss.exe resides. By default the - task expects it to be in the PATH.Nossdirdirectory where ss.exe resides.No; by default expected to be in PATH
    serverPathdirectory where srcsafe.ini resides.NoserverPathdirectory where srcsafe.ini resides.No
    writabletrue or falseNowritabletrue|falseNo
    recursivetrue or falseNorecursivetrue|falseNo
    commentComment to use for the files that where checked in.NocommentComment to use for the files that where checked in.No
    autoresponse'Y', 'N' or empty. Specify how to reply to questions from VSS.NoautoresponseY, N or empty. Specify how to reply to questions from VSS.No
    failonerrorStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to trueNoStop the build process if ss.exe exits with a return code 100.No; defaults to true

    Examples

    -
    +
     <vssadd localpath="D:\build\build.00012.zip"
    -            comment="Added by automatic build"/>
    -
    -
    -

    Add the file named build.00012.zip into the project current working -directory (see vsscp).

    -
    + comment="Added by automatic build"/> - +

    Add the file named build.00012.zip into the project current working directory +(see vsscp).

    -

    VssCp

    +
    + +

    VssCp

    Description

    Task to perform CP (Change Project) commands to Microsoft Visual SourceSafe.

    -

    This task is typically used before a VssAdd in order to set the target project

    +

    This task is typically used before a VssAdd in order to set the target project

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - + +
    Attribute Values Required
    vsspathSourceSafe path which specifies the project you wish to - make the current project.YesvsspathSourceSafe path which specifies the project you wish to make the current project.Yes
    loginusername[,password] - The username and password needed to get access - to VSS. Note that you may need to specify both (if you have a password) - - Ant/VSS will hang if you leave the password out and VSS does not accept - login without a password. Nologinusername[,password]—The username and password needed to get access to VSS. Note + that you may need to specify both (if you have a password)—Ant/VSS will hang if you + leave the password out and VSS does not accept login without a password.No
    ssdirdirectory where ss.exe resides. By default the - task expects it to be in the PATH.Nossdirdirectory where ss.exe resides.No; by default expected to be in PATH
    serverPathdirectory where srcsafe.ini resides.NoserverPathdirectory where srcsafe.ini resides.No
    failonerrorStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to trueNoStop the build process if ss.exe exits with a return code 100.No; defaults to true

    Examples

    -
    -
    -<vsscp vsspath="$/Projects/ant"/>
    -
    -
    -

    Sets the current VSS project to $/Projects/ant.

    -
    - +
    <vsscp vsspath="$/Projects/ant"/>
    -

    VssCreate

    -

    Description

    - Task to perform CREATE commands to Microsoft Visual Source Safe. -

    Creates a new project in VSS.

    +

    Sets the current VSS project to $/Projects/ant.

    + +
    + +

    VssCreate

    +

    Description

    +

    Task to perform CREATE commands to Microsoft Visual Source Safe.

    +

    Creates a new project in VSS.

    Parameters

    - +
    @@ -775,7 +730,7 @@ - + @@ -785,39 +740,36 @@ - - + + - - - + + + - - + + - + - +
    Attribute Values
    loginusername,passwordusername,password No
    ssdirdirectory where ss.exe resides. By default the task expects it to be in the PATH.Nodirectory where ss.exe resides.No; by default expected to be in PATH
    quietsuppress output (off by default)No
    suppress outputNo; defaults to off
    failOnErrorfail if there is an error creating the project (true by default)Nofail if there is an error creating the project.No; defaults to true
    autoresponseWhat to respond with (sets the -I option). By default, -I- is used; values of Y or N will be appended to this.What to respond with (sets the -I option). By default, -I- is + used; values of Y or N will be appended to this. No
    commentThe comment to use for this label. Empty or '-' for no comment.The comment to use for this label. Empty or - for no comment. No

    Examples

    -
    -
    -<vsscreate vsspath="$/existingProject/newProject"/>
    -
    -
    -

    Creates the VSS-Project $/existingProject/newProject.

    -
    - +
    <vsscreate vsspath="$/existingProject/newProject"/>
    + +

    Creates the VSS Project $/existingProject/newProject.

    + diff -Nru ant-1.9.10/manual/Tasks/waitfor.html ant-1.10.3/manual/Tasks/waitfor.html --- ant-1.9.10/manual/Tasks/waitfor.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/waitfor.html 2018-03-24 12:37:12.000000000 +0000 @@ -26,108 +26,95 @@

    Waitfor

    Description

    -

    Blocks execution until a set of specified conditions become true. This is intended - to be used with the parallel task to - synchronize a set of processes.

    -

    The conditions to wait for are defined in nested elements, -if multiple conditions are specified, then the task will wait until all conditions are true..

    -

    -

    If both maxwait and maxwaitunit are not specified, the maxwait is 3 minutes (180000 milliseconds).

    -

    If the timeoutproperty attribute has been set, a -property of that name will be created if the condition didn't come -true within the specified time.

    +

    Blocks execution until a set of specified conditions become true. This is intended to be used +with the parallel task to synchronize a set of processes.

    +

    The conditions to wait for are defined in nested elements, if +multiple conditions are specified, then the task will wait until all conditions are true.

    +

    If both maxwait and maxwaitunit are not specified, +default maxwait is 3 minutes (180000 milliseconds).

    +

    If the timeoutproperty attribute has been set, a property of that name will be created +if the condition didn't come true within the specified time.

    Parameters

    - +
    - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + - - - + + + + + + + + + + + + +
    AttributeDescriptionRequired
    maxwaitThe maximum amount of time to wait for all the required conditions - to become true before failing the task. Defaults to 180000 maxwaitunits.No
    maxwaitunitThe unit of time that must be used to interpret the value of the - maxwait attribute. Defaults to millisecond. - Valid Values are -
      -
    • millisecond
    • -
    • second
    • -
    • minute
    • -
    • hour
    • -
    • day
    • -
    • week
    • -
    -
    No
    checkeveryThe amount of time to wait between each test of the conditions. - Defaults to 500 checkeveryunits.No
    checkeveryunitThe unit of time that must be used to interpret the value of the - checkevery attribute. Defaults to millisecond. - Valid Values are -
      -
    • millisecond
    • -
    • second
    • -
    • minute
    • -
    • hour
    • -
    • day
    • -
    • week
    • -
    +
    AttributeDescriptionRequired
    maxwaitThe maximum amount of time to wait for all the required conditions to become true before + failing the task.No; defaults to 180000 maxwaitunits
    maxwaitunitThe unit of time that must be used to interpret the value of the maxwait + attribute. Valid values are +
      +
    • millisecond
    • +
    • second
    • +
    • minute
    • +
    • hour
    • +
    • day
    • +
    • week
    • +
    NoNo; defaults to millisecond
    timeoutpropertythe name of the property to set if maxwait has - been exceeded.NocheckeveryThe amount of time to wait between each test of the conditions.No; defaults to 500 checkeveryunits
    checkeveryunitThe unit of time that must be used to interpret the value of the checkevery + attribute. Valid values are +
      +
    • millisecond
    • +
    • second
    • +
    • minute
    • +
    • hour
    • +
    • day
    • +
    • week
    • +
    +
    No; defaults to millisecond
    timeoutpropertythe name of the property to set if maxwait has been exceeded.No
    -

    Nested Elements

    -

    The available conditions that satisfy the -<waitfor> task are the same as those for the -<condition> task. See -here for the full list.

    +

    Parameters specified as nested elements

    +

    The available conditions that satisfy the <waitfor> task are the same as those +for the <condition> +task. See here for the full list.

    Examples

    -
    +
     <waitfor maxwait="30" maxwaitunit="second">
    -        <available file="errors.log"/>
    -</waitfor>
    -
    -

    waits up to 30 seconds for a file called errors.log to appear.

    -
    +    <available file="errors.log"/>
    +</waitfor>
    +

    waits up to 30 seconds for a file called errors.log to appear.

    +
     <waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
    -        <http url="http://localhost/myapp/index.html"/>
    -</waitfor>
    -
    -

    waits up to 3 minutes (and checks every 500 milliseconds) for a web server on localhost - to serve up the specified URL.

    -
    +    <http url="http://localhost/myapp/index.html"/>
    +</waitfor>
    +

    waits up to 3 minutes (and checks every 500 milliseconds) for a web server +on localhost to serve up the specified URL.

    +
     <waitfor maxwait="10" maxwaitunit="second">
    -        <and>
    -            <socket server="dbserver" port="1521"/>
    -            <http url="http://webserver/mypage.html"/>
    -        </and>
    -</waitfor>
    -
    -

    waits up to 10 seconds for a server on the dbserver machine to begin listening - on port 1521 and for the http://webserver/mypage.html web page - to become available.

    - + <and> + <socket server="dbserver" port="1521"/> + <http url="http://webserver/mypage.html"/> + </and> +</waitfor> +

    waits up to 10 seconds for a server on the dbserver machine to begin listening on +port 1521 and for the http://webserver/mypage.html web page to become available.

    - diff -Nru ant-1.9.10/manual/Tasks/war.html ant-1.10.3/manual/Tasks/war.html --- ant-1.9.10/manual/Tasks/war.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/war.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,285 +24,248 @@ -

    War

    +

    War

    Description

    -

    An extension of the Jar task with special -treatment for files that should end up in the -WEB-INF/lib, WEB-INF/classes or -WEB-INF directories of the Web Application Archive.

    -

    (The War task is a shortcut for specifying the particular layout of a WAR file. -The same thing can be accomplished by using the prefix and fullpath -attributes of zipfilesets in a Zip or Jar task.)

    -

    The extended zipfileset element from the zip task - (with attributes prefix, fullpath, and src) - is available in the War task. The task is also resource-enabled - and will add nested resources and resource collections to the archive.

    - -

    - Before Servlet API 2.5/Java EE 5, a WEB-INF/web.xml file was mandatory in a - WAR file, so this task failed if the webxml attribute was missing. - As the web.xml file is now optional, the webxml attribute may now - be made optional. However, as most real web applications do need a web.xml file, - it is not optional by default. The task will fail if the file is not - included, unless the needxmlfile attribute - is set to false. The task - will warn if more than one web.xml file is added to the JAR - through the filesets. -

    - - -

    Please note that the Zip format allows multiple files of the same -fully-qualified name to exist within a single archive. This has been -documented as causing various problems for unsuspecting users. If you wish -to avoid this behavior you must set the duplicate attribute -to a value other than its default, "add".

    +

    An extension of the Jar task with special treatment for files that should +end up in the WEB-INF/lib, WEB-INF/classes or WEB-INF +directories of the Web Application Archive.

    + +

    (The War task is a shortcut for specifying the particular layout of a WAR file. The +same thing can be accomplished by using the prefix and fullpath attributes +of zipfilesets in a Zip or Jar task.)

    +

    The extended zipfileset element from the zip task (with +attributes prefix, fullpath, and src) is available in +the War task. The task is also resource-enabled and will add nested resources and +resource collections to the archive.

    + +

    Before Servlet API 2.5/Java EE 5, a WEB-INF/web.xml file was mandatory in a WAR +file, so this task failed if the webxml attribute was missing. As +the web.xml file is now optional, the webxml attribute may now be made +optional. However, as most real web applications do need a web.xml file, it is not +optional by default. The task will fail if the file is not included, unless +the needxmlfile attribute is set to false. The task will warn if more than +one web.xml file is added to the JAR through the filesets.

    + +

    Please note that the Zip format allows multiple files of the same fully-qualified name to +exist within a single archive. This has been documented as causing various problems for +unsuspecting users. If you wish to avoid this behavior you must set the duplicate +attribute to a value other than its default, add.

    Parameters

    - +
    - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    destfilethe WAR file to create.Exactly one of the two.destfilethe WAR file to create.Exactly one of the two
    warfileDeprecated name of the file to create - -use destfile instead.warfileDeprecated name of the file to + create—use destfile instead.
    webxmlThe servlet configuration descriptor to use (WEB-INF/web.xml).Yes, unless needxmlfile is true, - the file is pulled in via a nested fileset, or an existing WAR file is - being updated.webxmlThe servlet configuration descriptor to use (WEB-INF/web.xml).Yes, unless needxmlfile is true, the file is pulled in via a nested + fileset, or an existing WAR file is being updated.
    needxmlfileFlag to indicate whether or not the web.xml file is needed. - It should be set to false when generating - servlet 2.5+ WAR files without a web.xml file. - Since Apache Ant 1.7No -default "true"needxmlfileFlag to indicate whether or not the web.xml file is needed. It should be set + to false when generating servlet 2.5+ WAR files without a web.xml + file. Since Apache Ant 1.7No; default is true
    basedirthe directory from which to jar the files.Nobasedirthe directory from which to jar the files.No
    compressNot only store data but also compress them, - defaults to true. Unless you set the keepcompression - attribute to false, this will apply to the entire archive, not - only the files you've added while updating.NocompressNot only store data but also compress them. Unless you set the keepcompression + attribute to false, this will apply to the entire archive, not only the files you've + added while updating.No; defaults to true
    keepcompressionFor entries coming from existing archives (like - nested zipfilesets or while updating the archive), keep - the compression as it has been originally instead of using the - compress attribute. Defaults false. Since Ant - 1.6NokeepcompressionFor entries coming from existing archives (like nested zipfilesets or while + updating the archive), keep the compression as it has been originally instead of using + the compress attribute. Since Ant 1.6No; defaults to false
    encodingThe character encoding to use for filenames - inside the archive. Defaults to UTF8. It is not - recommended to change this value as the created archive will most - likely be unreadable for Java otherwise. -
    See also the discussion in the - zip task page
    NoencodingThe character encoding to use for filenames inside the archive. It is not + recommended to change this value as the created archive will most likely be unreadable for + Java otherwise.
    See also the discussion in the zip + task page
    No; defaults to UTF8
    filesonlyStore only file entries, defaults to falseNofilesonlyStore only file entriesNo; defaults to false
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.NoincludesComma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfileName of a file. Each line of this file is taken to be an include patternNo
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.NoexcludesComma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfileName of a file. Each line of this file is taken to be an exclude patternNo
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.NodefaultexcludesIndicates whether default excludes should be used or not (yes|no).No; defaults to yes
    manifestthe manifest file to use.Nomanifestthe manifest file to use.No
    filesetmanifestbehavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. Valid values are "skip", "merge", and "mergewithoutmain". "merge" will merge all of the manifests together, and merge this into any other specified manifests. "mergewithoutmain" merges everything but the Main section of the manifests. Default value is "skip". + filesetmanifestbehavior when a manifest is found in a zipfileset + or zipgroupfileset file. Valid values are skip, merge, + and mergewithoutmain. merge will merge all of the manifests together, and merge + this into any other specified manifests. mergewithoutmain merges everything but the + Main section of the manifests. NoNo; defaults to skip
    whenmanifestonlybehavior when no files match. Valid values are "fail", "skip", and "create". Default is "create".No
    updateindicates whether to update or overwrite - the destination file if it already exists. Default is "false".No
    duplicatebehavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". No
    roundupWhether the file modification times will be - rounded up to the next even number of seconds.
    - Zip archives store file modification times with a granularity of - two seconds, so the times will either be rounded up or down. If - you round down, the archive will always seem out-of-date when you - rerun the task, so the default is to round up. Rounding up may - lead to a different type of problems like JSPs inside a web - archive that seem to be slightly more recent than precompiled - pages, rendering precompilation useless.
    - Defaults to true. Since Ant 1.6.2
    No
    levelNon-default level at which file compression should be - performed. Valid values range from 0 (no compression/fastest) to 9 - (maximum compression/slowest). Since Ant 1.7No
    preserve0permissionswhen updating an archive or adding entries from a - different archive Ant will assume that a Unix permissions value of - 0 (nobody is allowed to do anything to the file/directory) means - that the permissions haven't been stored at all rather than real - permissions and will instead apply its own default values.
    - Set this attribute to true if you really want to preserve the - original permission field.since Ant 1.8.0 -
    No, default is falsewhenmanifestonlybehavior when no files match. Valid values are fail, skip, + and create.No; defaults to create
    updateindicates whether to update or overwrite the destination file if it already exists.No; defaults to false
    duplicatebehavior when a duplicate file is found. Valid values are add, preserve, + and fail.No; defaults to add
    roundupWhether the file modification times will be rounded up to the next even number of + seconds.
    Zip archives store file modification times with a granularity of 2 seconds, so + the times will either be rounded up or down. If you round down, the archive will always seem + out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a + different type of problems like JSPs inside a web archive that seem to be slightly more recent + than precompiled pages, rendering precompilation useless. Since Ant 1.6.2
    No; defaults to true
    levelNon-default level at which file compression should be performed. Valid values range + from 0 (no compression/fastest) to 9 (maximum compression/slowest). Since + Ant 1.7No
    useLanguageEncodingFlagWhether to set the language encoding flag if the - encoding is UTF-8. This setting doesn't have any effect if the - encoding is not UTF-8. - Since Ant 1.8.0. -
    See also the discussion in the - zip task page
    No, default is true
    createUnicodeExtraFieldsWhether to create unicode extra fields to store - the file names a second time inside the entry's metadata. -
    Possible values are "never", "always" and "not-encodeable" - which will only add Unicode extra fields if the file name cannot - be encoded using the specified encoding. - Since Ant 1.8.0. -
    See also the discussion in the - zip task page
    No, default is "never"
    fallbacktoUTF8Whether to use UTF-8 and the language encoding - flag instead of the specified encoding if a file name cannot be - encoded using the specified encoding. - Since Ant 1.8.0. -
    See also the discussion in the - zip task page
    No, default is false
    mergeClassPathAttributesWhether to merge the Class-Path attributes found - in different manifests (if merging manifests). If false, only - the attribute of the last merged manifest will be preserved. - Since Ant 1.8.0. -
    unless you also set flattenAttributes to true this may - result in manifests containing multiple Class-Path attributes - which violates the manifest specification.
    No, default is false
    flattenAttributesWhether to merge attributes occurring more than - once in a section (this can only happen for the Class-Path - attribute) into a single attribute. - Since Ant 1.8.0.No, default is false
    zip64ModeWhen to use Zip64 extensions for entries. The - possible values are "never", "always" and "as-needed". - Since Ant 1.9.1. -
    See also the discussion in the - zip task page
    No, default is "never"preserve0permissionswhen updating an archive or adding entries from a different archive Ant will assume that a + Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means + that the permissions haven't been stored at all rather than real permissions and will instead + apply its own default values.
    Set this attribute to true if you really want to + preserve the original permission field. since Ant 1.8.0
    No; default is false
    useLanguageEncodingFlagWhether to set the language encoding flag if the encoding is UTF-8. This setting doesn't + have any effect if the encoding is not UTF-8. Since Ant 1.8.0.
    See also + the discussion in the zip task page
    No; default is true
    createUnicodeExtraFieldsWhether to create Unicode extra fields to store the file names a second time inside the + entry's metadata.
    Possible values are never, always + and not-encodeable which will only add Unicode extra fields if the file name cannot be + encoded using the specified encoding. Since Ant 1.8.0.
    See also + the discussion in the zip task page
    No; default is never
    fallbacktoUTF8Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a + file name cannot be encoded using the specified encoding. Since Ant 1.8.0.
    See + also the discussion in the zip task page
    No; default is false
    mergeClassPathAttributesWhether to merge the Class-Path attributes found in different manifests (if + merging manifests). If false, only the attribute of the last merged manifest will be + preserved. Since Ant 1.8.0.
    Unless you also set flattenAttributes + to true this may result in manifests containing multiple Class-Path + attributes which violates the manifest specification.
    No; default is false
    flattenAttributesWhether to merge attributes occurring more than once in a section (this can only happen for + the Class-Path attribute) into a single attribute. Since Ant 1.8.0.No; default is false
    zip64ModeWhen to use Zip64 extensions for entries. The possible values + are never, always and as-needed. Since Ant 1.9.1.
    See also + the discussion in the zip task page
    No; default is never
    -

    Nested elements

    +

    Parameters specified as nested elements

    lib

    -

    The nested lib element specifies a FileSet. All files included in this fileset will -end up in the WEB-INF/lib directory of the war file.

    +

    The nested lib element specifies a FileSet. All +files included in this fileset will end up in the WEB-INF/lib directory of the war +file.

    classes

    -

    The nested classes element specifies a FileSet. All files included in this fileset will -end up in the WEB-INF/classes directory of the war file.

    +

    The nested classes element specifies +a FileSet. All files included in this fileset will end up in +the WEB-INF/classes directory of the war file.

    webinf

    -

    The nested webinf element specifies a FileSet. All files included in this fileset will -end up in the WEB-INF directory of the war file. If this -fileset includes a file named web.xml, the file is -ignored and you will get a warning.

    +

    The nested webinf element specifies +a FileSet. All files included in this fileset will end up in +the WEB-INF directory of the war file. If this fileset includes a file +named web.xml, the file is ignored and you will get a warning.

    metainf

    -

    The nested metainf element specifies a FileSet. All files included in this fileset will -end up in the META-INF directory of the war file. If this -fileset includes a file named MANIFEST.MF, the file is -ignored and you will get a warning.

    +

    The nested metainf element specifies +a FileSet. All files included in this fileset will end up in +the META-INF directory of the war file. If this fileset includes a file +named MANIFEST.MF, the file is ignored and you will get a warning.

    manifest, indexjars, service

    These are inherited from <jar> @@ -318,9 +281,8 @@ src/html/myapp/index.html src/jsp/myapp/front.jsp src/graphics/images/gifs/small/logo.gif -src/graphics/images/gifs/large/logo.gif - -then the war file myapp.war created with +src/graphics/images/gifs/large/logo.gif +then the war file myapp.war created with
     <war destfile="myapp.war" webxml="src/metadata/myapp.xml">
       <fileset dir="src/html/myapp"/>
    @@ -331,9 +293,8 @@
       <classes dir="build/main"/>
       <zipfileset dir="src/graphics/images/gifs"
                   prefix="images"/>
    -</war>
    -
    -will consist of +</war> +

    will consist of

     WEB-INF/web.xml
     WEB-INF/lib/jdbc2.jar
    @@ -342,23 +303,19 @@
     index.html
     front.jsp
     images/small/logo.gif
    -images/large/logo.gif
    -
    +images/large/logo.gif using Ant's default manifest file. The content of -WEB-INF/web.xml is identical to -src/metadata/myapp.xml. - -

    We regularly receive bug reports that this task is creating the WEB-INF -directory as web-inf (all lower case), and thus it is our fault your webapp doesn't work. The cause -of these complaints lies in WinZip, which turns an all upper-case -directory into an all lower case one in a fit of helpfulness. Please check that -jar xvf yourwebapp.war shows the same behaviour before filing another -report.
    -Winzip has an option allowing all uppercase names (which is off by default!). It can be enabled by: -Menu "Options" -> "Configuration", "View" property/tab page, then "General" group box has an option called "Allow all uppercase file names". -

    - +WEB-INF/web.xml is identical to +src/metadata/myapp.xml. +

    We regularly receive bug reports that this task is creating the WEB-INF directory +as web-inf (all lower case), and thus it is our fault your webapp doesn't work. The +cause of these complaints lies in WinZip, which turns an all upper-case directory into an all +lower-case one in a fit of helpfulness. Please check that jar xvf yourwebapp.war shows +the same behaviour before filing another report.
    WinZip has an option allowing all uppercase +names (which is off by default!). It can be enabled by: Menu Options +→ Configuration, View property/tab page, then General group box has an +option called Allow all uppercase file names.

    diff -Nru ant-1.9.10/manual/Tasks/whichresource.html ant-1.10.3/manual/Tasks/whichresource.html --- ant-1.9.10/manual/Tasks/whichresource.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/whichresource.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,107 +14,76 @@ See the License for the specific language governing permissions and limitations under the License. --> - + - - Whichresource Task - - + + Whichresource Task - -

    Whichresource

    +

    Whichresource

    Description

    -

    - Find a class or resource on the supplied classpath, or the - system classpath if none is supplied. - The named property is set if the item can be found. - For example: -

    -
    -  <whichresource resource="/log4j.properties" property="log4j.url" >
    -
    +

    Find a class or resource on the supplied classpath, or the system classpath if none is + supplied. The named property is set if the item can be found. For example:

    +
    <whichresource resource="/log4j.properties" property="log4j.url"/>

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    property - The property to fill with the URL of the resource of class. - YespropertyThe property to fill with the URL of the resource of class.Yes
    class - The name of the class to look for. - Exactly one of these.classThe name of the class to look for.Exactly one of these
    resource - The name of the resource to look for. - resourceThe name of the resource to look for.
    classpath - The classpath to use when looking up class - or resource. - NoclasspathThe classpath to use when looking up class or resource.No
    classpathref - The classpath to use, given as a - reference - to a path defined elsewhere. - Since Apache Ant 1.7.1. - NoclasspathrefThe classpath to use, given as a reference to a + path defined elsewhere. Since Apache Ant 1.7.1.No

    Parameters specified as nested elements

    classpath

    -

    - Whichresource's classpath attribute is a - path-like structure and can also be - set via a nested <classpath> element. -

    +

    Whichresource's classpath attribute is + a path-like structure and can also be set via a + nested <classpath> element.

    Examples

    -

    - The following shows using a classpath reference. -

    -
    -  <path id="bsf.classpath">
    -    <fileset dir="${user.home}/lang/bsf" includes="*.jar"/>
    -  </path>
    -  <whichresource property="bsf.class.location"
    -                 class="org.apache.bsf.BSFManager"
    -                 classpathref="bsf.classpath"/>
    -  <echo>${bsf.class.location}</echo>
    -
    -

    - The following shows using a nested classpath. -

    -
    -  <whichresource
    -    property="ant-contrib.antlib.location"
    -    resource="net/sf/antcontrib/antlib.xml">
    -    <classpath>
    -      <path path="f:/testing/ant-contrib/target/ant-contrib.jar"/>
    -    </classpath>
    -  </whichresource>
    -  <echo>${ant-contrib.antlib.location}</echo>
    -
    +

    The following shows using a classpath reference.

    +
    +<path id="bsf.classpath">
    +  <fileset dir="${user.home}/lang/bsf" includes="*.jar"/>
    +</path>
    +<whichresource property="bsf.class.location"
    +               class="org.apache.bsf.BSFManager"
    +               classpathref="bsf.classpath"/>
    +<echo>${bsf.class.location}</echo>
    +

    The following shows using a nested classpath.

    +
    +<whichresource property="ant-contrib.antlib.location"
    +               resource="net/sf/antcontrib/antlib.xml">
    +  <classpath>
    +    <path path="f:/testing/ant-contrib/target/ant-contrib.jar"/>
    +  </classpath>
    +</whichresource>
    +<echo>${ant-contrib.antlib.location}</echo>
    diff -Nru ant-1.9.10/manual/Tasks/wljspc.html ant-1.10.3/manual/Tasks/wljspc.html --- ant-1.9.10/manual/Tasks/wljspc.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/wljspc.html 2018-03-24 12:37:12.000000000 +0000 @@ -15,65 +15,58 @@ limitations under the License. --> - -WLJSPC Task + + + WLJSPC Task +

    wljspc

    Description

    -

    Class to precompile JSP's using weblogic's jsp compiler (weblogic.jspc)

    -Tested only on Weblogic 4.5.1 - NT4.0 and Solaris 5.7,5.8
    +

    Class to precompile JSP's using WebLogic JSP compiler (weblogic.jspc)

    +

    Tested only on WebLogic 4.5.1—NT 4.0 and Solaris 7 & 8

    Parameters

    - - +
    + + + - + - - + + - - + + - - + +
    Attribute Values Required
    srcroot of source tree for JSP, ie, the document root for your weblogic serverroot of source tree for JSP, ie, the document root for your WebLogic server Yes
    -dest root of destination directory, what you have set as WorkingDir in the weblogic propertiesdestroot of destination directory, what you have set as WorkingDir in the + WebLogic properties Yes
    -package start package name under which your JSP's would be compiledpackagestart package name under which your JSPs would be compiled Yes
    -classpathClass path to use when compiling jsp'sclasspathClass path to use when compiling JSPs Yes
    -

    -
    - -A classpath should be set which contains the weblogic classes as well as all application classes
    -referenced by the JSP. The system classpath is also appended when the jspc is called, so you may
    -choose to put everything in the classpath while calling Apache Ant. However, since presumably the JSP's will reference
    -classes being build by Ant, it would be better to explicitly add the classpath in the task
    -
    -The task checks timestamps on the JSP's and the generated classes, and compiles
    -only those files that have changed.
    -
    -It follows the weblogic naming convention of putting classes in
    - _dirName/_fileName.class for dirname/fileName.jsp
    -
    -

    -


    -Example
    -

    -

    +

    A classpath should be set which contains the WebLogic classes as well as all application classes +referenced by JSP. The system classpath is also appended when the jspc is called, so +you may choose to put everything in the classpath while calling Apache Ant. However, since +presumably JSPs will reference classes being build by Ant, it would be better to explicitly add the +classpath in the task.

    +

    The task checks timestamps on the JSP's and the generated classes, and compiles only those files +that have changed.

    +

    It follows the WebLogic naming convention of putting classes in _dirName/_fileName.class +for dirname/fileName.jsp

    +

    Example

     <target name="jspcompile" depends="compile">
       <wljspc src="c:\\weblogic\\myserver\\public_html" dest="c:\\weblogic\\myserver\\serverclasses" package="myapp.jsp">
    @@ -82,17 +75,14 @@
           <pathelement path="${compile.dest}"/>
         </classpath>
       </wljspc>
    -</target>
    -
    - -

    +</target>

    Limitations

      -
    • This works only on weblogic 4.5.1
    • -
    • It compiles the files thru the Classic compiler only.
    • -
    • Since it is my experience that weblogic jspc throws out of memory error on being given too -many files at one go, it is called multiple times with one jsp file each.
    • +
    • This works only on WebLogic 4.5.1
    • +
    • It compiles the files through the Classic compiler only.
    • +
    • Since it is my experience that weblogic.jspc throws out of memory error on being + given too many files at one go, it is called multiple times with one JSP file each.
    diff -Nru ant-1.9.10/manual/Tasks/xmlproperty.html ant-1.10.3/manual/Tasks/xmlproperty.html --- ant-1.9.10/manual/Tasks/xmlproperty.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/xmlproperty.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,268 +22,236 @@ -

    XmlProperty

    +

    XmlProperty

    Description

    -

    -Loads property values from a well-formed xml file. There are no other restrictions -than "well-formed". You can choose the layout you want. For example this XML property file: +

    Loads property values from a well-formed xml file. There are no other restrictions than +"well-formed". You can choose the layout you want. For example this XML property file:

       <root>
         <properties>
           <foo>bar</foo>
         </properties>
    -  </root>
    -
    -is roughly equivalent to this Java property file: -
    -  root.properties.foo = bar
    -
    - -

    -By default, this load -does no processing of the input. In particular, unlike the -Property task, property references -(i.e., ${foo}) are not resolved. -

    - -

    Semantic Attributes

    - -Input processing can be enabled by using the semanticAttributes -attribute. If this attribute is set to true (its default is -false), the following processing occurs as the input XML file -is loaded: + </root> +

    is roughly equivalent to this Java property file:

    +
    root.properties.foo = bar
    + +

    By default, this load does no processing of the input. In particular, unlike +the Property task, property references (i.e., ${foo}) are +not resolved.

    +

    Semantic attributes

    +

    Input processing can be enabled by using the semanticAttributes attribute. If this +attribute is set to true (its default is false), the following processing occurs as +the input XML file is loaded:/p>

    • Property references are resolved.
    • The following attributes are treated differently:
        -
      • id: The property is associated with the given id value.
      • -
      • location: The property is treated as a file location
      • -
      • refid: The property is set to the value of the - referenced property.
      • -
      • value: The property is set to the value indicated.
      • +
      • id: The property is associated with the given id value.
      • +
      • location: The property is treated as a file location
      • +
      • refid: The property is set to the value of the referenced property.
      • +
      • value: The property is set to the value indicated.
    • -
    • Path-like Structures can be defined - by use of the following attributes: +
    • path-like structures can be defined by use of the following + attributes:
        -
      • pathid: The given id is used to identify a path. The - nested XML tag name is ignored. Child elements can be used - (XML tag names are ignored) to identify elements of the path.
      • +
      • pathid: The given id is used to identify a path. The nested XML tag + name is ignored. Child elements can be used (XML tag names are ignored) to identify + elements of the path.
    -

    -For example, with semantic attribute processing enabled, this XML property -file: +

    For example, with semantic attribute processing enabled, this XML property file:

    -  <root>
    -    <properties>
    -      <foo location="bar"/>
    -      <quux>${root.properties.foo}</quux>
    -    </properties>
    -  </root>
    -
    -is roughly equivalent to the following fragments in a build.xml file: -
    -  <property name="root.properties.foo" location="bar"/>
    -  <property name="root.properties.quux" value="${root.properties.foo}"/>
    -
    - -

    +<root> + <properties> + <foo location="bar"/> + <quux>${root.properties.foo}</quux> + </properties> +</root> +

    is roughly equivalent to the following fragments in a build.xml file:

    +
    +<property name="root.properties.foo" location="bar"/>
    +<property name="root.properties.quux" value="${root.properties.foo}"/>

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    fileThe XML file to parse.Yes, or a nested resource collection.fileThe XML file to parse.Yes, or a nested resource collection
    prefixThe prefix to prepend to each propertyNoprefixThe prefix to prepend to each property.No
    keepRootKeep the xml root tag as the - first value in the property name.No, default is true.keepRootKeep the XML root tag as the first value in the property name.No; default is true
    validateValidate the input file (e.g. by a DTD). Otherwise the XML must only be well-formed.No, default is false.validateValidate the input file (e.g. by a DTD). Otherwise the XML must only be well-formed.No; default is false
    collapseAttributesTreat attributes as nested elements.No, default is false.collapseAttributesTreat attributes as nested elements.No; default is false
    semanticAttributesEnable special handling of certain attribute names. - See the Semantic Attributes - section for more information.No, default is false.semanticAttributesEnable special handling of certain attribute names. See + the Semantic Attributes section for more information.No; default is false
    includeSemanticAttributeInclude the semantic attribute name - as part of the property name. Ignored if - semanticAttributes is not set to true. - See the Semantic Attributes - section for more information.No, default is false.includeSemanticAttributeInclude the semantic attribute name as part of the property name. Ignored + if semanticAttributes is not set to true. See + the Semantic Attributes section for more information.No; default is false
    rootDirectoryThe directory to use for resolving file references. Ignored - if semanticAttributes is not set to true.No, default is ${basedir}.rootDirectoryThe directory to use for resolving file references. Ignored if semanticAttributes + is not set to true.No; default is basedir
    delimiterDelimiter for splitting multiple values.
    since Apache Ant 1.7.1
    No, defaults to commadelimiterDelimiter for splitting multiple values.
    since Apache Ant 1.7.1
    No; defaults to , (comma)
    -

    Nested Elements

    +

    Parameters specified as nested elements

    xmlcatalog

    -

    The <xmlcatalog> -element is used to perform entity resolution.

    +

    The <xmlcatalog> element is used to +perform entity resolution.

    -

    any resource or single element -resource collection

    +

    any resource or single element resource collection

    The specified resource will be used as input.

    - -

    Examples

    -
    +

    Examples

    -

    Non-semantic Attributes

    +

    Non-semantic attributes

    -

    Here is an example xml file that does not have any semantic attributes.

    +

    Here is an example XML file that does not have any semantic attributes.

    -   <root-tag myattr="true">
    -    <inner-tag someattr="val">Text</inner-tag>
    -    <a2><a3><a4>false</a4></a3></a2>
    -   </root-tag>
    -
    +<root-tag myattr="true"> + <inner-tag someattr="val">Text</inner-tag> + <a2><a3><a4>false</a4></a3></a2> +</root-tag>
    default loading
    -

    This entry in a build file: -

       <xmlproperty file="somefile.xml"/>
    -is equivalent to the following properties: -
    -   root-tag(myattr)=true
    -   root-tag.inner-tag=Text
    -   root-tag.inner-tag(someattr)=val
    -   root-tag.a2.a3.a4=false
    -
    - -
    collapseAttributes=false
    -

    This entry in a build file: -

       <xmlproperty file="somefile.xml" collapseAttributes="true"/>
    -is equivalent to the following properties: -
    -   root-tag.myattr=true
    -   root-tag.inner-tag=Text
    -   root-tag.inner-tag.someatt=val
    -   root-tag.a2.a3.a4=false
    -
    - -
    keepRoot=false
    -

    This entry in a build file: -

       <xmlproperty file="somefile.xml" keepRoot="false"/>
    -is equivalent to the following properties: -
    -   inner-tag=Text
    -   inner-tag(someattr)=val
    -   a2.a3.a4=false
    -
    - -

    Semantic Attributes

    - -

    Here is an example xml file that has semantic attributes.

    -
    -  <root-tag>
    -    <version value="0.0.1"/>
    -    <build folder="build">
    -      <classes id="build.classes" location="${build.folder}/classes"/>
    -      <reference refid="build.classes"/>
    -    </build>
    -    <compile>
    -      <classpath pathid="compile.classpath">
    -        <pathelement location="${build.classes}"/>
    -      </classpath>
    -    </compile>
    -    <run-time>
    -      <jars>*.jar</jars>
    -      <classpath pathid="run-time.classpath">
    -        <path refid="compile.classpath"/>
    -        <pathelement path="${run-time.jars}"/>
    -      </classpath>
    -    </run-time>
    -  </root-tag>
    -
    - -
    default loading (semanticAttributes=true)
    -

    This entry in a build file: -

       <xmlproperty file="somefile.xml" keepRoot="false"
    -                semanticAttributes="true"/>
    -is equivalent to the following entries in a build file: -
    -  <property name="version" value="0.0.1"/>
    -  <property name="build.folder" value="build"/>
    -  <property name="build.classes" location="${build.folder}/classes" id="build.classes"/>
    -  <property name="build.reference" refid="build.classes"/>
    -
    -  <property name="run-time.jars" value="*.jar"/>
    -
    -  <path id="compile.classpath">
    -    <pathelement location="${build.classes}"/>
    -  </path>
    -
    -  <path id="run-time.classpath">
    -    <path refid="compile.classpath"/>
    -    <pathelement path="${run-time.jars}"/>
    -  </path>
    -
    - -
    includeSemanticAttribute="true"
    -

    This entry in a build file: -

       <xmlproperty file="somefile.xml"
    -                semanticAttributes="true" keepRoot="false"
    -                includeSemanticAttribute="true"/>
    -
    -is equivalent to the following entries in a build file: -
    -  <property name="version.value" value="0.0.1"/>
    -  <property name="build.folder" value="build"/>
    -  <property name="build.classes.location" location="${build.folder}/classes"/>
    -  <property name="build.reference.refid" refid="build.classes"/>
    -
    -  <property name="run-time.jars" value="*.jar"/>
    -
    -  <path id="compile.classpath">
    -    <pathelement location="${build.classes}"/>
    -  </path>
    -
    -  <path id="run-time.classpath">
    -    <path refid="compile.classpath"/>
    -    <pathelement path="${run-time.jars}"/>
    -  </path>
    -
    - - +

    This entry in a build file:

    +
    <xmlproperty file="somefile.xml"/>
    +

    is equivalent to the following properties:

    +
    +root-tag(myattr)=true
    +root-tag.inner-tag=Text
    +root-tag.inner-tag(someattr)=val
    +root-tag.a2.a3.a4=false
    + +
    collapseAttributes=false
    +

    This entry in a build file:

    +
    <xmlproperty file="somefile.xml" collapseAttributes="true"/>
    +

    is equivalent to the following properties:

    +
    +root-tag.myattr=true
    +root-tag.inner-tag=Text
    +root-tag.inner-tag.someatt=val
    +root-tag.a2.a3.a4=false
    + +
    keepRoot=false
    +

    This entry in a build file:

    +
    <xmlproperty file="somefile.xml" keepRoot="false"/>
    +

    is equivalent to the following properties:

    +
    +inner-tag=Text
    +inner-tag(someattr)=val
    +a2.a3.a4=false
    + +

    Semantic attributes

    + +

    Here is an example XML file that has semantic attributes.

    +
    +<root-tag>
    +  <version value="0.0.1"/>
    +  <build folder="build">
    +    <classes id="build.classes" location="${build.folder}/classes"/>
    +    <reference refid="build.classes"/>
    +  </build>
    +  <compile>
    +    <classpath pathid="compile.classpath">
    +      <pathelement location="${build.classes}"/>
    +    </classpath>
    +  </compile>
    +  <run-time>
    +    <jars>*.jar</jars>
    +    <classpath pathid="run-time.classpath">
    +      <path refid="compile.classpath"/>
    +      <pathelement path="${run-time.jars}"/>
    +    </classpath>
    +  </run-time>
    +</root-tag>
    + +
    default loading (semanticAttributes=true)
    +

    This entry in a build file:

    +
    +<xmlproperty file="somefile.xml" keepRoot="false"
    +             semanticAttributes="true"/>
    +

    is equivalent to the following entries in a build file:

    +
    +<property name="version" value="0.0.1"/>
    +<property name="build.folder" value="build"/>
    +<property name="build.classes" location="${build.folder}/classes" id="build.classes"/>
    +<property name="build.reference" refid="build.classes"/>
    +
    +<property name="run-time.jars" value="*.jar"/>
    +
    +<path id="compile.classpath">
    +  <pathelement location="${build.classes}"/>
    +</path>
    +
    +<path id="run-time.classpath">
    +  <path refid="compile.classpath"/>
    +  <pathelement path="${run-time.jars}"/>
    +</path>
    + +
    includeSemanticAttribute=true
    +

    This entry in a build file:

    +
    +<xmlproperty file="somefile.xml"
    +             semanticAttributes="true" keepRoot="false"
    +             includeSemanticAttribute="true"/>
    +

    is equivalent to the following entries in a build file:

    +
    +<property name="version.value" value="0.0.1"/>
    +<property name="build.folder" value="build"/>
    +<property name="build.classes.location" location="${build.folder}/classes"/>
    +<property name="build.reference.refid" refid="build.classes"/>
    +
    +<property name="run-time.jars" value="*.jar"/>
    +
    +<path id="compile.classpath">
    +  <pathelement location="${build.classes}"/>
    +</path>
    +
    +<path id="run-time.classpath">
    +  <path refid="compile.classpath"/>
    +  <pathelement path="${run-time.jars}"/>
    +</path>
    diff -Nru ant-1.9.10/manual/Tasks/xmlvalidate.html ant-1.10.3/manual/Tasks/xmlvalidate.html --- ant-1.9.10/manual/Tasks/xmlvalidate.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/xmlvalidate.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,202 +23,180 @@ -

    XMLValidate

    +

    XMLValidate

    Description

    -

    This task checks that XML files are valid (or only well formed). The -task uses the SAX2 parser implementation provided by JAXP by default -(probably the one that is used by Apache Ant itself), but one can specify any -SAX1/2 parser if needed.

    - -

    This task supports the use of nested -

  • <xmlcatalog> elements
  • -
  • <dtd> elements which are used to resolve DTDs and entities
  • -
  • <attribute> elements which are used to set features on the parser. - These can be any number of - http://xml.org/sax/features/ - or other features that your parser may support.
  • -
  • <property> elements, containing string properties -

    - -

    Warning : JAXP creates by default a non namespace aware parser. -The "http://xml.org/sax/features/namespaces" feature is set -by default to false by the JAXP implementation used by ant. To validate -a document containing namespaces, -set the namespaces feature to true explicitly by nesting the following element: -

    -  <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
    -
    -If you are using for instance a xsi:noNamespaceSchemaLocation attribute in your XML files, -you will need this namespace support feature. -

    -

    If you are using a parser not generated by JAXP, by using the classname attribute of xmlvalidate, this warning -may not apply.

    - +

    This task checks that XML files are valid (or only well formed). The task uses the SAX2 parser +implementation provided by JAXP by default (probably the one that is used by Apache Ant itself), but +one can specify any SAX1/2 parser if needed.

    + +

    This task supports the use of nested

    +
      +
    • <xmlcatalog> elements
    • +
    • <dtd> elements which are used to resolve DTDs and entities
    • +
    • <attribute> elements which are used to set features on the parser. These + can be any number + of http://xml.org/sax/features/ or other features that your parser + may support.
    • +
    • <property> elements, containing string properties
    • +
    + +

    Warning: By default, JAXP creates a non namespace aware parser. +The http://xml.org/sax/features/namespaces feature is set by default to false by +the JAXP implementation used by Ant. To validate a document containing namespaces, set the +namespaces feature to true explicitly by nesting the following element:

    +
    <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
    +

    If you are using for instance a xsi:noNamespaceSchemaLocation attribute in your XML +files, you will need this namespace support feature.

    +

    If you are using a parser not generated by JAXP, by using the classname attribute +of xmlvalidate, this warning may not apply.

    Parameters

    - +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    filethe file(s) you want to check. (optionally can use an embedded fileset)Nofilethe file(s) you want to check.Yes, unless an embedded <fileset> is specified
    lenient - if true, only check the XML document is well formed - (ignored if the specified parser is a SAX1 parser) - Nolenientif true, only check the XML document is well formed (ignored if the specified parser + is a SAX1 parser).No
    classnamethe parser to use.Noclassnamethe parser to use.No
    classpathrefwhere to find the parser class. Optionally can use an embedded <classpath> element.Noclasspathrefwhere to find the parser class.No, can use an embedded <classpath> element
    failonerrorfails on a error if set to true (defaults to true).Nofailonerrorfails on a error if set to true.No; defaults to true
    warnlog parser warn events.Nowarnlog parser warn events.No
    -

    Nested Elements

    +

    Parameters specified as nested elements

    dtd

    -

    -<dtd> is used to specify different locations for DTD resolution. -

    - - - - - - - - - - - - - - - +

    <dtd> is used to specify different locations for DTD resolution.

    +
    AttributeDescriptionRequired
    publicIdPublic ID of the DTD to resolveYes
    locationLocation of the DTD to use, which can be a file, - a resource, or a URLYes
    + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    publicIdPublic ID of the DTD to resolveYes
    locationLocation of the DTD to use, which can be a file, a resource, or a URLYes

    xmlcatalog

    -

    The <xmlcatalog> -element is used to perform entity resolution.

    +

    The <xmlcatalog> element is used to +perform entity resolution.

    attribute

    -

    The <attribute> element is used to set parser features.
    -Features usable with the xerces parser are defined here : - Setting features
    - -SAX features are defined here: - http://xml.org/sax/features/
    -

    - - - - - - - - - - - - - - - +

    The <attribute> element is used to set parser features.

    +

    Features usable with the Xerces parser are defined +here: Setting Features

    +

    SAX features are defined +here: SAX2 Standard Feature Flags

    +
    AttributeDescriptionRequired
    nameThe name of the featureYes
    valueThe boolean value of the featureYes
    + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    nameThe name of the featureYes
    valueThe boolean value of the featureYes
    -

    property

    -

    The <property> element is used to set properties. -These properties are defined here for the xerces XML parser implementation : - XML Parser properties -Properties can be used to set the schema used to validate the XML file. -

    - - - - - - - - - - - - - - - +

    The <property> element is used to set properties. These properties are +defined here for the Xerces XML parser +implementation: XML Parser +properties. Properties can be used to set the schema used to validate the XML file.

    +
    AttributeDescriptionRequired
    nameThe name of the featureYes
    valueThe string value of the propertyYes
    + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    nameThe name of the featureYes
    valueThe string value of the propertyYes
    -

    -

    Examples

    -
    -<xmlvalidate file="toto.xml"/>
    -
    -Validate toto.xml +
    <xmlvalidate file="toto.xml"/>
    +

    Validate toto.xml

     <xmlvalidate failonerror="no" lenient="yes" warn="yes"
                  classname="org.apache.xerces.parsers.SAXParser">
                  classpath="lib/xerces.jar">
       <fileset dir="src" includes="style/*.xsl"/>
    -</xmlvalidate>
    -
    -Validate all .xsl files in src/style, but only warn if there is an error, rather than -halt the build. +</xmlvalidate> +

    Validate all .xsl files in src/style, but only warn if there is an +error, rather than halt the build.

    -
     <xmlvalidate file="struts-config.xml" warn="false">
       <dtd publicId="-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
            location="struts-config_1_0.dtd"/>
    -</xmlvalidate>
    -
    +</xmlvalidate> -Validate a struts configuration, using a local copy of the DTD. -
     
    +

    Validate a struts configuration, using a local copy of the DTD.

    +
     <xmlvalidate failonerror="no">
       <fileset dir="${project.dir}" includes="**/*.xml"/>
       <xmlcatalog refid="mycatalog"/>
    -</xmlvalidate>
    -
    +</xmlvalidate>
    -Scan all XML files in the project, using a predefined catalog to map URIs to local files. +

    Scan all XML files in the project, using a predefined catalog to map URIs to local files.

     <xmlvalidate failonerror="no">
       <fileset dir="${project.dir}" includes="**/*.xml"/>
       <xmlcatalog>
    -       <dtd
    -         publicId="-//ArielPartners//DTD XML Article V1.0//EN"
    +    <dtd publicId="-//ArielPartners//DTD XML Article V1.0//EN"
              location="com/arielpartners/knowledgebase/dtd/article.dtd"/>
       </xmlcatalog>
    -</xmlvalidate>
    -
    -Scan all XML files in the project, using the catalog defined inline. +</xmlvalidate> +

    Scan all XML files in the project, using the catalog defined inline.

     <xmlvalidate failonerror="yes" lenient="no" warn="yes">
    @@ -226,38 +204,28 @@
       <attribute name="http://xml.org/sax/features/validation" value="true"/>
       <attribute name="http://apache.org/xml/features/validation/schema"  value="true"/>
       <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
    -</xmlvalidate>
    -
    -Validate all .xml files in xml directory with the parser configured to perform XSD validation. -Note: The parser must support the feature -http://apache.org/xml/features/validation/schema. -The schemavalidate task is better for validating -W3C XML Schemas, as it extends this task with the right options automatically enabled, -and makes it easy to add a list of schema files/URLs to act as sources. +</xmlvalidate> +

    Validate all .xml files in xml directory with the parser configured to +perform XSD validation. Note: The parser must support the +feature http://apache.org/xml/features/validation/schema. The schemavalidate +task is better for validating W3C XML Schemas, as it extends this task with the right options +automatically enabled, and makes it easy to add a list of schema files/URLs to act as sources.

    -
    +<!-- Convert path to URL format -->
     <pathconvert dirsep="/" property="xsd.file">
     <path>
        <pathelement location="xml/doc.xsd"/>
     </path>
     </pathconvert>
     
    -<xmlvalidate file="xml/endpiece-noSchema.xml" lenient="false"
    -  failonerror="true" warn="true">
    -  <attribute name="http://apache.org/xml/features/validation/schema"
    -  value="true"/>
    +<xmlvalidate file="xml/endpiece-noSchema.xml" lenient="false" failonerror="true" warn="true">
    +  <attribute name="http://apache.org/xml/features/validation/schema" value="true"/>
       <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
    -  <property
    -  name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"
    -  value="${xsd.file}"/>
    -</xmlvalidate>
    -
    -
    -Validate the file xml/endpiece-noSchema.xml against the schema xml/doc.xsd. -
    - - + <property name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation" + value="${xsd.file}"/> +</xmlvalidate> +

    Validate the file xml/endpiece-noSchema.xml against the +schema xml/doc.xsd.

    - diff -Nru ant-1.9.10/manual/Tasks/zip.html ant-1.10.3/manual/Tasks/zip.html --- ant-1.9.10/manual/Tasks/zip.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Tasks/zip.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,528 +24,461 @@ -

    Zip

    +

    Zip

    Description

    Creates a zipfile.

    -

    The basedir attribute is the reference directory from where to zip.

    +

    The basedir attribute is the reference directory from where to zip.

    Note that file permissions will not be stored in the resulting zipfile.

    -

    It is possible to refine the set of files that are being zipped. This can be -done with the includes, includesfile, excludes, excludesfile and defaultexcludes -attributes. With the includes or includesfile attribute you specify the files you want to -have included by using patterns. The exclude or excludesfile attribute is used to specify -the files you want to have excluded. This is also done with patterns. And -finally with the defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the -inclusion/exclusion of files works, and how to write patterns.

    -

    This task forms an implicit FileSet and -supports most attributes of <fileset> -(dir becomes basedir) as well as the nested -<include>, <exclude> and -<patternset> elements.

    -

    Or, you may place within it nested file sets, or references to file sets. -In this case basedir is optional; the implicit file set is only used -if basedir is set. You may use any mixture of the implicit file set -(with basedir set, and optional attributes like includes -and optional subelements like <include>); explicit nested -<fileset> elements so long as at least one fileset total is specified. The ZIP file will -only reflect the relative paths of files within each fileset. The Zip task and its derivatives know a special form of a fileset named zipfileset that has additional attributes (described below).

    -

    The Zip task also supports the merging of multiple zip files into the zip file. -This is possible through either the src attribute of any nested filesets -or by using the special nested fileset zipgroupfileset.

    - -

    The update parameter controls what happens if the ZIP -file already exists. When set to yes, the ZIP file is -updated with the files specified. (New files are added; old files are -replaced with the new versions.) When set to no (the -default) the ZIP file is overwritten if any of the files that would be -added to the archive are newer than the entries inside the archive. -Please note that ZIP files store file modification times with a -granularity of two seconds. If a file is less than two seconds newer -than the entry in the archive, Apache Ant will not consider it newer.

    - -

    The whenempty parameter controls what happens when no files match. -If skip (the default), the ZIP is not created and a warning is issued. -If fail, the ZIP is not created and the build is halted with an error. -If create, an empty ZIP file (explicitly zero entries) is created, -which should be recognized as such by compliant ZIP manipulation tools.

    -

    This task will now use the platform's default character encoding -for filenames - this is consistent with the command line ZIP tools, -but causes problems if you try to open them from within Java and your -filenames contain non US-ASCII characters. Use the encoding attribute -and set it to UTF8 to create zip files that can safely be read by -Java. For a more complete discussion, + +

    It is possible to refine the set of files that are being zipped. This can be done with +the includes, includesfile, excludes, excludesfile +and defaultexcludes attributes. With the includes or includesfile +attribute you specify the files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This is +also done with patterns. And finally with the defaultexcludes attribute, you can specify +whether you want to use default exclusions or not. See the section +on directory based tasks, on how the +inclusion/exclusion of files works, and how to write patterns.

    + +

    This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes basedir) as well as +the nested <include>, <exclude> +and <patternset> elements.

    + +

    Or, you may place within it nested file sets, or references to file sets. In this +case basedir is optional; the implicit file set is only used +if basedir is set. You may use any mixture of the implicit file set +(with basedir set, and optional attributes like includes and optional +subelements like <include>); explicit nested <fileset> +elements so long as at least one fileset total is specified. The ZIP file will only reflect the +relative paths of files within each fileset. The Zip task and its derivatives know a +special form of a fileset named zipfileset that has additional attributes (described +below).

    + +

    The Zip task also supports the merging of multiple zip files into the zip file. This is possible +through either the src attribute of any nested filesets or by using the special nested +fileset zipgroupfileset.

    + +

    The update parameter controls what happens if the ZIP file already exists. When set +to yes, the ZIP file is updated with the files specified. (New files are added; old files are +replaced with the new versions.) When set to no (the default) the ZIP file is overwritten if +any of the files that would be added to the archive are newer than the entries inside the archive. +Please note that ZIP files store file modification times with a granularity of 2 seconds. If a file +is less than 2 seconds newer than the entry in the archive, Apache Ant will not consider it +newer.

    + +

    The whenempty parameter controls what happens when no files match. If skip +(the default), the ZIP is not created and a warning is issued. If fail, the ZIP is not +created and the build is halted with an error. If create, an empty ZIP file (explicitly zero +entries) is created, which should be recognized as such by compliant ZIP manipulation tools.

    + +

    This task will now use default JVM character encoding for filenames—this is consistent with +the command line ZIP tools, but causes problems if you try to open them from within Java and your +filenames contain non US-ASCII characters. Use the encoding attribute and set it +to UTF8 to create zip files that can safely be read by Java. For a more complete discussion, see below

    -

    Starting with Ant 1.5.2, <zip> can store Unix permissions -inside the archive (see description of the filemode and dirmode -attributes for <zipfileset>). -Unfortunately there is no portable way to store these permissions. -Ant uses the algorithm used by Info-Zip's -implementation of the zip and unzip commands - these are the default -versions of zip and unzip for many Unix and Unix-like systems.

    - -

    Please note that the zip format allows multiple files of the same -fully-qualified name to exist within a single archive. This has been -documented as causing various problems for unsuspecting users. If you wish -to avoid this behavior you must set the duplicate attribute -to a value other than its default, "add".

    - -

    Please also note that different ZIP tools handle timestamps -differently when it comes to applying timezone offset calculations of -files. Some ZIP libraries will store the timestamps as they've been -read from the filesystem while others will modify the timestamps both -when reading and writing the files to make all timestamps use the same -timezone. A ZIP archive created by one library may extract files with -"wrong timestamps" when extracted by another library.

    - -

    Ant's ZIP classes use the same algorithm as the InfoZIP tools and -zlib (timestamps get adjusted), Windows' "compressed folders" function -and WinZIP don't change the timestamps. This means that using the -unzip task on files created by Windows' compressed folders function -may create files with timestamps that are "wrong", the same is true if -you use Windows' functions to extract an Ant generated ZIP -archive.

    +

    Since Ant 1.5.2, <zip> can store Unix permissions inside the archive +(see description of the filemode and dirmode attributes +for <zipfileset>). Unfortunately there is no portable +way to store these permissions. Ant uses the algorithm used by Info-Zip's implementation of the zip and unzip +commands—these are the default versions of zip and unzip for many +Unix(-like) systems.

    + +

    Please note that the zip format allows multiple files of the same fully-qualified name to +exist within a single archive. This has been documented as causing various problems for +unsuspecting users. If you wish to avoid this behavior you must set the duplicate +attribute to a value other than its default, add.

    + +

    Please also note that different ZIP tools handle timestamps differently when it +comes to applying timezone offset calculations of files. Some ZIP libraries will store the +timestamps as they've been read from the filesystem while others will modify the timestamps both +when reading and writing the files to make all timestamps use the same timezone. A ZIP archive +created by one library may extract files with "wrong timestamps" when extracted by another +library.

    + +

    Ant's ZIP classes use the same algorithm as the InfoZIP tools and zlib (timestamps get adjusted), +Windows' "compressed folders" function and WinZIP don't change the timestamps. This means that +using the unzip task on files created by Windows' compressed folders function may +create files with timestamps that are "wrong", the same is true if you use Windows' functions to +extract an Ant generated ZIP archive.

    Parameters

    - +
    - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    destfilethe zip-file to create.Exactly one of the two.destfilethe zip file to create.Exactly one of the two
    zipfilethe deprecated old name of destfile.zipfiledeprecated old name of destfile.
    basedirthe directory from which to zip the files.Nobasedirthe directory from which to zip the files.No
    compressNot only store data but also compress them, - defaults to true. Unless you set the keepcompression - attribute to false, this will apply to the entire archive, not - only the files you've added while updating.NocompressNot only store data but also compress them. Unless you set the keepcompression + attribute to false, this will apply to the entire archive, not only the files you've + added while updating.No; defaults to true
    keepcompressionFor entries coming from existing archives (like - nested zipfilesets or while updating the archive), keep - the compression as it has been originally instead of using the - compress attribute. Defaults false. Since Ant - 1.6NokeepcompressionFor entries coming from existing archives (like nested zipfilesets or while + updating the archive), keep the compression as it has been originally instead of using + the compress attribute. Since Ant 1.6No; defaults to false
    encodingThe character encoding to use for filenames - inside the zip file. For a list of possible values see the Supported Encodings.
    - Defaults to the platform's default character encoding. -
    See also the discussion below
    NoencodingThe character encoding to use for filenames inside the zip file. For a list of possible + values see + the Supported Encodings.No; defaults to default JVM character encoding
    filesonlyStore only file entries, defaults to falseNofilesonlyStore only file entries.No; defaults to false
    includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
    includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include pattern.No
    excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
    excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude pattern.No
    defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
    updateindicates whether to update or overwrite - the destination file if it already exists. Default is "false".Noupdateindicates whether to update or overwrite the destination file if it already exists.No; default is false
    whenemptybehavior when no files match. Valid values are "fail", "skip", and "create". Default is "skip".Nowhenemptybehavior when no files match. Valid values are fail, skip, + and create.No; default is skip
    duplicatebehavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". Noduplicatebehavior when a duplicate file is found. Valid values are add, preserve, + and fail.No; default is add
    roundupWhether the file modification times will be - rounded up to the next even number of seconds.
    - Zip archives store file modification times with a granularity of - two seconds, so the times will either be rounded up or down. If - you round down, the archive will always seem out-of-date when you - rerun the task, so the default is to round up. Rounding up may - lead to a different type of problems like JSPs inside a web - archive that seem to be slightly more recent than precompiled - pages, rendering precompilation useless.
    - Defaults to true. Since Ant 1.6.2
    NoroundupWhether the file modification times will be rounded up to the next even number of + seconds.
    Zip archives store file modification times with a granularity of 2 seconds, so + the times will either be rounded up or down. If you round down, the archive will always seem + out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a + different type of problems like JSPs inside a web archive that seem to be slightly more recent + than precompiled pages, rendering precompilation useless. Since Ant 1.6.2
    No; defaults to true
    commentComment to store in the archive. Since Ant 1.6.3NocommentComment to store in the archive. Since Ant 1.6.3No
    levelNon-default level at which file compression should be - performed. Valid values range from 0 (no compression/fastest) to 9 - (maximum compression/slowest). Since Ant 1.7NolevelNon-default level at which file compression should be performed. Valid values range + from 0 (no compression/fastest) to 9 (maximum compression/slowest). Since + Ant 1.7No
    preserve0permissionswhen updating an archive or adding entries from a - different archive Ant will assume that a Unix permissions value of - 0 (nobody is allowed to do anything to the file/directory) means - that the permissions haven't been stored at all rather than real - permissions and will instead apply its own default values.
    - Set this attribute to true if you really want to preserve the - original permission field.since Ant 1.8.0 +
    preserve0permissionswhen updating an archive or adding entries from a different archive Ant will assume that a + Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means + that the permissions haven't been stored at all rather than real permissions and will instead + apply its own default values.
    Set this attribute to true if you really want to + preserve the original permission field. Since Ant 1.8.0
    No, default is falseNo; default is false
    useLanguageEncodingFlagWhether to set the language encoding flag if the encoding is UTF-8. This setting doesn't + have any effect if the encoding is not UTF-8. Since Ant 1.8.0.
    See also + the discussion below
    No; default is true
    useLanguageEncodingFlagWhether to set the language encoding flag if the - encoding is UTF-8. This setting doesn't have any effect if the - encoding is not UTF-8. - Since Ant 1.8.0. -
    See also the discussion below
    No, default is true
    createUnicodeExtraFieldsWhether to create unicode extra fields to store - the file names a second time inside the entry's metadata. -
    Possible values are "never", "always" and "not-encodeable" - which will only add Unicode extra fields if the file name cannot - be encoded using the specified encoding. - Since Ant 1.8.0. -
    See also the discussion below
    No, default is "never"
    fallbacktoUTF8Whether to use UTF-8 and the language encoding - flag instead of the specified encoding if a file name cannot be - encoded using the specified encoding. - Since Ant 1.8.0. -
    See also the discussion below
    No, default is false
    zip64ModeWhen to use Zip64 extensions for entries. The - possible values are "never", "always" and "as-needed". - Since Ant 1.9.1. -
    See also the discussion below
    No, default is "as-needed"createUnicodeExtraFieldsWhether to create Unicode extra fields to store the file names a second time inside the + entry's metadata.
    Possible values are never, always + and not-encodeable which will only add Unicode extra fields if the file name cannot be + encoded using the specified encoding. Since Ant 1.8.0.
    See also + the discussion below
    No; default is never
    fallbacktoUTF8Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a + file name cannot be encoded using the specified encoding. Since Ant 1.8.0.
    See + also the discussion below
    No; default is false
    zip64ModeWhen to use Zip64 extensions for entries. The possible values + are never, always and as-needed. Since Ant 1.9.1.
    See also + the discussion below
    No; default is as-needed
    -

    Encoding of File Names

    +

    Encoding of file names

    + +

    Traditionally the ZIP archive format uses CodePage 437 as encoding for file name, which is not +sufficient for many international character sets.

    -

    Traditionally the ZIP archive format uses CodePage 437 as encoding - for file name, which is not sufficient for many international - character sets.

    - -

    Over time different archivers have chosen different ways to work - around the limitation - the java.util.zip packages - simply uses UTF-8 as its encoding for example.

    - -

    Ant has been offering the encoding attribute of the zip and unzip - task as a way to explicitly specify the encoding to use (or expect) - since Ant 1.4. It defaults to the platform's default encoding for - zip and UTF-8 for jar and other jar-like tasks (war, ear, ...) as - well as the unzip family of tasks.

    - -

    More recent versions of the ZIP specification introduce something - called the "language encoding flag" which can be used to - signal that a file name has been encoded using UTF-8. Starting with - Ant 1.8.0 all zip-/jar- and similar archives written by Ant will set - this flag, if the encoding has been set to UTF-8. Our - interoperabilty tests with existing archivers didn't show any ill - effects (in fact, most archivers ignore the flag to date), but you - can turn off the "language encoding flag" by setting the attribute - useLanguageEncodingFlag to false on the - zip-task if you should encounter problems.

    - -

    The unzip (and similar tasks) -task will recognize the language - encoding flag and ignore the encoding set on the task if it has been - found.

    - -

    The InfoZIP developers have introduced new ZIP extra fields that - can be used to add an additional UTF-8 encoded file name to the - entry's metadata. Most archivers ignore these extra fields. The - zip family of tasks support an - option createUnicodeExtraFields since Ant 1.8.0 which - makes Ant write these extra fields either for all entries ("always") - or only those whose name cannot be encoded using the specified - encoding (not-encodeable), it defaults to "never" since the extra - fields create bigger archives.

    - -

    The fallbackToUTF8 attribute of zip can be used to create archives - that use the specified encoding in the majority of cases but UTF-8 and - the language encoding flag for filenames that cannot be encoded - using the specified encoding.

    - -

    The unzip-task will recognize the unicode extra fields by default - and read the file name information from them, unless you set the - optional attribute scanForUnicodeExtraFields to - false.

    - -

    Recommendations for Interoperability

    - -

    The optimal setting of flags depends on the archivers you expect as - consumers/producers of the ZIP archives. Below are some test - results which may be superseeded with later versions of each - tool.

    +

    Over time different archivers have chosen different ways to work around the +limitation—the java.util.zip packages simply uses UTF-8 as its +encoding for example.

    + +

    Ant has been offering the encoding attribute of the zip +and unzip task as a way to explicitly specify the encoding to use (or expect) since +Ant 1.4. It defaults to default JVM character encoding for zip and UTF-8 +for jar and other jar-like tasks (war, ear, ...) as well as +the unzip family of tasks.

    + +

    More recent versions of the ZIP specification introduce something called the language encoding +flag which can be used to signal that a file name has been encoded using UTF-8. Since Ant +1.8.0, all zip, jar and similar archives written by Ant will set this flag, if the encoding has +been set to UTF-8. Our interoperability tests with existing archivers didn't show any ill effects +(in fact, most archivers ignore the flag to date), but you can turn off the language encoding +flag by setting the attribute useLanguageEncodingFlag to false on +the zip task if you should encounter problems.

    + +

    The unzip task (and similar tasks) will recognize the language encoding flag and +ignore the encoding set on the task if it has been found.

    + +

    The InfoZIP developers have introduced new ZIP extra fields that can be used to add an additional +UTF-8 encoded file name to the entry's metadata. Most archivers ignore these extra +fields. Since Ant 1.8.0, the zip family of tasks support an +option createUnicodeExtraFields, which makes Ant write these extra fields either for all +entries (always) or only those whose name cannot be encoded using the specified encoding +(not-encodeable), it defaults to never since the extra fields create bigger +archives.

    + +

    The fallbackToUTF8 attribute of zip can be used to create archives that +use the specified encoding in the majority of cases but UTF-8 and the language encoding flag for +filenames that cannot be encoded using the specified encoding.

    + +

    The unzip task will recognize the Unicode extra fields by default and read the file +name information from them, unless you set the optional +attribute scanForUnicodeExtraFields to false.

    + +

    Recommendations for interoperability

    + +

    The optimal setting of flags depends on the archivers you expect as consumers/producers of the +ZIP archives. Below are some test results which may be superseded with later versions of each +tool.

      -
    • The java.util.zip package used by the jar executable or to read - jars from your CLASSPATH reads and writes UTF-8 names, it doesn't - set or recognize any flags or unicode extra fields.
    • - -
    • Starting with Java7 java.util.zip writes UTF-8 by - default and uses the language encoding flag. It is possible to - specify a different encoding when reading/writing ZIPs via new - constructors. The package now recognizes the language encoding - flag when reading and ignores the Unicode extra fields.
    • - -
    • 7Zip writes CodePage 437 by default but uses UTF-8 and the - language encoding flag when writing entries that cannot be encoded - as CodePage 437 (similar to the zip task with fallbacktoUTF8 set - to true). It recognizes the language encoding flag when reading - and ignores the unicode extra fields.
    • - -
    • WinZIP writes CodePage 437 and uses unicode extra fields by - default. It recognizes the unicode extra field and the language - encoding flag when reading.
    • - -
    • Windows' "compressed folder" feature doesn't recognize any flag - or extra field and creates archives using the platforms default - encoding - and expects archives to be in that encoding when reading - them.
    • - -
    • InfoZIP based tools can recognize and write both, it is a - compile time option and depends on the platform so your mileage - may vary.
    • - -
    • PKWARE zip tools recognize both and prefer the language encoding - flag. They create archives using CodePage 437 if possible and UTF-8 - plus the language encoding flag for file names that cannot be - encoded as CodePage 437.
    • +
    • The java.util.zip package used by the jar executable or + to read jars from your CLASSPATH reads and writes UTF-8 names, it doesn't set or + recognize any flags or unicode extra fields.
    • +
    • Since Java 7, java.util.zip writes UTF-8 by default and uses the + language encoding flag. It is possible to specify a different encoding when reading/writing + ZIPs via new constructors. The package now recognizes the language encoding flag when reading + and ignores the Unicode extra fields.
    • +
    • 7Zip writes CodePage 437 by default but uses UTF-8 and the language encoding flag when writing + entries that cannot be encoded as CodePage 437 (similar to the zip task + with fallbacktoUTF8 set to true). It recognizes the language encoding flag + when reading and ignores the Unicode extra fields.
    • +
    • WinZIP writes CodePage 437 and uses Unicode extra fields by default. It recognizes the + Unicode extra field and the language encoding flag when reading.
    • +
    • Windows' "compressed folder" feature doesn't recognize any flag or extra field and creates + archives using the default platform encoding—and expects archives to be in that encoding + when reading them.
    • +
    • InfoZIP based tools can recognize and write both, it is a compile time option and depends on + the platform so your mileage may vary.
    • +
    • PKWARE zip tools recognize both and prefer the language encoding flag. They create archives + using CodePage 437 if possible and UTF-8 plus the language encoding flag for file names that + cannot be encoded as CodePage 437.

    So, what to do?

    -

    If you are creating jars, then java.util.zip is your main - consumer. We recommend you set the encoding to UTF-8 and keep the - language encoding flag enabled. The flag won't help or hurt - java.util.zip prior to Java7 but archivers that support it will show - the correct file names.

    - -

    For maximum interop it is probably best to set the encoding to - UTF-8, enable the language encoding flag and create unicode extra - fields when writing ZIPs. Such archives should be extracted - correctly by java.util.zip, 7Zip, WinZIP, PKWARE tools and most - likely InfoZIP tools. They will be unusable with Windows' - "compressed folders" feature and bigger than archives without the - unicode extra fields, though.

    - -

    If Windows' "compressed folders" is your primary consumer, then - your best option is to explicitly set the encoding to the target - platform. You may want to enable creation of unicode extra fields - so the tools that support them will extract the file names - correctly.

    - -

    Zip64 extensions

    - -

    Zip64 extensions provide a way to create archives bigger than 4GB - or holding more than 65535 entries - or add individual entries - bigger than 4GB using the ZIP extension field mechanism. These - extensions are supported by most modern ZIP implementations.

    - -

    When Ant writes compressed entries into the archive it creates it - doesn't know the compressed size of an entry before it has been - written. Unfortunately the decision whether a Zip64 extra field - will be written has to be made before writing the entry's - content.

    - -

    Starting with Ant 1.9.0 Ant supports Zip64 extensions but didn't - provide any control over their usage, starting with Ant 1.9.1 a - new zip64mode attribute was added to the zip - family of tasks. It supports three values: +

    If you are creating jars, then java.util.zip is your main consumer. We +recommend you set the encoding to UTF-8 and keep the language encoding flag enabled. The flag won't +help or hurt java.util.zip prior to Java 7 but archivers that support it +will show the correct file names.

    + +

    For maximum interoparability it is probably best to set the encoding to UTF-8, enable the +language encoding flag and create Unicode extra fields when writing ZIPs. Such archives should be +extracted correctly by java.util.zip, 7Zip, WinZIP, PKWARE tools and most +likely InfoZIP tools. They will be unusable with Windows' "compressed folders" feature and bigger +than archives without the Unicode extra fields, though.

    + +

    If Windows' "compressed folders" is your primary consumer, then your best option is to explicitly +set the encoding to the target platform. You may want to enable creation of Unicode extra fields so +the tools that support them will extract the file names correctly.

    + +

    Zip64 extensions

    + +

    Zip64 extensions provide a way to create archives bigger than 4 GB or holding more than 65535 +entries—or add individual entries bigger than 4 GB using the ZIP extension field mechanism. +These extensions are supported by most modern ZIP implementations.

    + +

    When Ant writes compressed entries into the archive it creates it doesn't know the compressed +size of an entry before it has been written. Unfortunately the decision whether a Zip64 extra field +will be written has to be made before writing the entry's content.

    + +

    Ant 1.9.0 introduced support for Zip64 extensions but didn't provide any control over their +usage. Since Ant 1.9.1, a new zip64mode attribute was added to +the zip family of tasks. It supports three values:

      -
    • never means no Zip64 extra fields will ever be - written, this is the behavior of Ant 1.8.x and earlier and the - default behavior of jar, ear - and war starting with Ant 1.9.1.
    • -
    • always means Zip64 extra fields are written for all - entries.
    • -
    • as-needed means Zip64 extra fields are written for all - compressed entries to the "local file header" (by default these - are all files but not the directories) but only written to the - central directory if the entry really required Zip64 features. - This is the default behavior of Ant 1.9.0 and remains the default - behavior of the zip task.
    • +
    • never means no Zip64 extra fields will ever be written. This is the behavior of Ant + prior to 1.9.0 and the default behavior of jar, ear + and war since Ant 1.9.1.
    • +
    • always means Zip64 extra fields are written for all entries.
    • +
    • as-needed means Zip64 extra fields are written for all compressed entries to the "local + file header" (by default these are all files but not the directories) but only written to the + central directory if the entry really required Zip64 features. This is the default behavior of + Ant 1.9.0 and remains the default behavior of the zip task.
    -

    as-needed provides a good compromise if you don't know - whether you archive will exceed the limits of traditional zip files - but don't want to waste too much space (the Zip64 extensions take up - extra space). Unfortunately some ZIP implementations don't - understand Zip64 extra fields or fail to parse archives with extra - fields in local file headers that are not present in the central - directory, one such implementation is the java.util.zip package of - Java5, that's why the jar tasks default - to never. Archives created with as-needed can be - read without problems with Java6 and later.

    +

    as-needed provides a good compromise if you don't know whether you archive will exceed the +limits of traditional zip files but don't want to waste too much space (the Zip64 extensions take up +extra space). Unfortunately some ZIP implementations don't understand Zip64 extra fields or fail to +parse archives with extra fields in local file headers that are not present in the central +directory, one such implementation is the java.util.zip package of Java 5, +that's why the jar tasks default to never. Archives created +with as-needed can be read without problems with Java 6 and later.

    Parameters specified as nested elements

    any resource collection

    -

    Resource -Collections are used to select groups of files to archive.

    -

    Prior to Ant 1.7 only <fileset> and -<zipfileset> have been supported as nested elements.

    - - -

    zipgroupfileset

    -

    A <zipgroupfileset> allows for multiple zip files to be -merged into the archive. Each file found in this fileset is added to the archive -the same way that zipfileset src files are added.

    - -

    <zipgroupfileset> is - a fileset and supports all - of its attributes and nested elements. +

    resource collections are used to select groups +of files to archive.

    +

    Prior to Ant 1.7 only <fileset> and <zipfileset> have been +supported as nested elements.

    + +

    zipgroupfileset

    +

    A <zipgroupfileset> allows for multiple zip files to be merged into the +archive. Each file found in this fileset is added to the archive the same way +that zipfileset src files are added.

    + +

    <zipgroupfileset> is a fileset and +supports all of its attributes and nested elements.

    Examples

    -
      <zip destfile="${dist}/manual.zip"
    -       basedir="htdocs/manual"
    -  />
    -

    zips all files in the htdocs/manual directory into a file called manual.zip -in the ${dist} directory.

    -
      <zip destfile="${dist}/manual.zip"
    -       basedir="htdocs/manual"
    -       update="true"
    -  />
    -

    zips all files in the htdocs/manual directory into a file called manual.zip -in the ${dist} directory. If manual.zip -doesn't exist, it is created; otherwise it is updated with the -new/changed files.

    -
      <zip destfile="${dist}/manual.zip"
    -       basedir="htdocs/manual"
    -       excludes="mydocs/**, **/todo.html"
    -  />
    -

    zips all files in the htdocs/manual directory. Files in the directory mydocs, -or files with the name todo.html are excluded.

    -
      <zip destfile="${dist}/manual.zip"
    -       basedir="htdocs/manual"
    -       includes="api/**/*.html"
    -       excludes="**/todo.html"
    -  />
    -

    zips all files in the htdocs/manual directory. Only html files under the directory api -are zipped, and files with the name todo.html are excluded.

    -
      <zip destfile="${dist}/manual.zip">
    -    <fileset dir="htdocs/manual"/>
    -    <fileset dir="." includes="ChangeLog.txt"/>
    -  </zip>
    -

    zips all files in the htdocs/manual directory, and also adds the file ChangeLog.txt in the -current directory. ChangeLog.txt will be added to the top of the ZIP file, just as if -it had been located at htdocs/manual/ChangeLog.txt.

    -
      <zip destfile="${dist}/manual.zip">
    -    <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
    -    <zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/>
    -    <zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/>
    -  </zip>
    -

    zips all files in the htdocs/manual directory into the docs/user-guide directory -in the archive, adds the file ChangeLog27.txt in the -current directory as docs/ChangeLog.txt, and includes all the html files in examples.zip -under docs/examples. The archive might end up containing the files:

    -
        docs/user-guide/html/index.html
    +
    +<zip destfile="${dist}/manual.zip"
    +     basedir="htdocs/manual"/>
    +

    zips all files in the htdocs/manual directory into a file +called manual.zip in the ${dist} directory.

    +
    +<zip destfile="${dist}/manual.zip"
    +     basedir="htdocs/manual"
    +     update="true"/>
    +

    zips all files in the htdocs/manual directory into a file +called manual.zip in the ${dist} directory. If manual.zip +doesn't exist, it is created; otherwise it is updated with the new/changed files.

    +
    +<zip destfile="${dist}/manual.zip"
    +     basedir="htdocs/manual"
    +     excludes="mydocs/**, **/todo.html"/>
    +

    zips all files in the htdocs/manual directory. Files in the +directory mydocs, or files with the name todo.html are excluded.

    +
    +<zip destfile="${dist}/manual.zip"
    +     basedir="htdocs/manual"
    +     includes="api/**/*.html"
    +     excludes="**/todo.html"/>
    +

    zips all files in the htdocs/manual directory. Only html files under +the directory api are zipped, and files with the name todo.html are +excluded.

    +
    +<zip destfile="${dist}/manual.zip">
    +  <fileset dir="htdocs/manual"/>
    +  <fileset dir="." includes="ChangeLog.txt"/>
    +</zip>
    +

    zips all files in the htdocs/manual directory, and also adds the +file ChangeLog.txt in the current directory. ChangeLog.txt will be added +to the top of the ZIP file, just as if it had been located +at htdocs/manual/ChangeLog.txt.

    +
    +<zip destfile="${dist}/manual.zip">
    +  <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
    +  <zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/>
    +  <zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/>
    +</zip>
    +

    zips all files in the htdocs/manual directory into the docs/user-guide +directory in the archive, adds the file ChangeLog27.txt in the current directory +as docs/ChangeLog.txt, and includes all the html files +in examples.zip under docs/examples. The archive might end up containing +the files:

    +
    +    docs/user-guide/html/index.html
         docs/ChangeLog.txt
    -    docs/examples/index.html
    -
    -

    -The code + docs/examples/index.html

    +

    The code

    -  <zip destfile="${dist}/manual.zip">
    -    <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
    -    <zipgroupfileset dir="." includes="examples*.zip"/>
    -  </zip>
    -
    -

    -

    zips all files in the htdocs/manual directory into the docs/user-guide directory in the archive and includes all the files in any file that matches examples*.zip, such as all files within examples1.zip or examples_for_brian.zip. -The same can be achieved with +<zip destfile="${dist}/manual.zip"> + <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/> + <zipgroupfileset dir="." includes="examples*.zip"/> +</zip> +

    zips all files in the htdocs/manual directory into the docs/user-guide +directory in the archive and includes all the files in any file that +matches examples*.zip, such as all files within examples1.zip +or examples_for_brian.zip. The same can be achieved with

    -  <zip destfile="${dist}/manual.zip">
    -    <mappedresources>
    -      <fileset dir="htdocs/manual"/>
    -      <globmapper from="*" to="docs/user-guide/*"/>
    -    </mappedresources>
    -    <archives>
    -      <zips>
    -        <fileset dir="." includes="examples*.zip"/>
    -      </zips>
    -    </archives>
    -  </zip>
    -
    +<zip destfile="${dist}/manual.zip"> + <mappedresources> + <fileset dir="htdocs/manual"/> + <globmapper from="*" to="docs/user-guide/*"/> + </mappedresources> + <archives> + <zips> + <fileset dir="." includes="examples*.zip"/> + </zips> + </archives> +</zip> -The next example +

    The next example

     <zip destfile="release.zip">
       <tarfileset src="release.tar"/>
    -</zip>
    -
    - -

    re-packages a TAR archive as a ZIP archive. If Unix file -permissions have been stored as part of the TAR file, they will be -retained in the resulting ZIP archive.

    - +</zip> +

    re-packages a TAR archive as a ZIP archive. If Unix file permissions have been stored as part of +the TAR file, they will be retained in the resulting ZIP archive.

    - diff -Nru ant-1.9.10/manual/tasksoverview.html ant-1.10.3/manual/tasksoverview.html --- ant-1.9.10/manual/tasksoverview.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/tasksoverview.html 2018-03-24 12:37:12.000000000 +0000 @@ -23,407 +23,357 @@ - -

    Overview of Apache Ant Tasks

    +

    Overview of Apache Ant Tasks

    Given the large number of tasks available with Ant, it may be difficult to get an overall view of what each task can do. The following tables provide a short description of each task and a link to the complete documentation.

    -Archive Tasks
    -Audit/Coverage Tasks
    -Compile Tasks
    -Deployment Tasks
    -Documentation Tasks
    -EJB Tasks
    -Execution Tasks
    -File Tasks
    -Java2 Extensions Tasks
    -Logging Tasks
    -Mail Tasks
    -Miscellaneous Tasks
    -Pre-process Tasks
    -Property Tasks
    -Remote Tasks
    -SCM Tasks
    -Testing Tasks
    - - -

    - - - - - -
    - -Archive Tasks - -[Back to top]
    - - - - +Archive Tasks
    +Audit/Coverage Tasks
    +Compile Tasks
    +Deployment Tasks
    +Documentation Tasks
    +EJB Tasks
    +Execution Tasks
    +File Tasks
    +Java Extensions Tasks
    +Logging Tasks
    +Mail Tasks
    +Miscellaneous Tasks
    +Pre-process Tasks
    +Property Tasks
    +Remote Tasks
    +SCM Tasks
    +Testing Tasks
    + +
    + Archive Tasks + 🔝 +
    + +
    Task NameDescription
    + + + - - - + + + - - - + + - - - + + + - - - + + - - - - - - - - - - - - + + - - - + + + - - + + - - - + + + - - - + + - - + + - - + + - - + + - - + + - - + + - - + + + with special treatment for files that should end up in + the WEB-INF/lib, WEB-INF/classes, + or WEB-INF directories of the Web Application + Archive.

    - - + +
    Task NameDescription
    BUnzip2

    Expands a file packed using GZip or BZip2.

    GUnzip/BUnzip2/UnXZ

    Expands a file packed using GZip, BZip2 or XZ.

    BZip2

    Packs a file using the GZip or BZip2 algorithm. This task +

    GZip/BZip2/XZ

    Packs a file using the GZip, BZip2 or XZ algorithm. This task does not do any dependency checking; the output file is always generated

    Cab

    Creates Microsoft CAB archive files. It is invoked - similar to the Jar or - Zip tasks. This task will work on - Windows using the external cabarc tool (provided by Microsoft), - which must be located in your executable path.

    Cab

    Creates Microsoft CAB archive files. It is invoked similar + to the Jar + or Zip tasks. This task will work on + Windows using the external cabarc tool (provided by + Microsoft), which must be located in your executable + path.

    Ear

    An extension of the Jar task with - special treatment for files that should end up in an +

    Ear

    An extension of the Jar task + with special treatment for files that should end up in an Enterprise Application archive.

    GUnzip

    Expands a GZip file.

    GZip

    GZips a set of files.

    Jar
    Jar

    Jars a set of files.

    Jlink

    Deprecated. Use the zipfileset - and zipgroupfileset attributes of the - Jar or - Zip tasks instead.

    Jlink

    Deprecated. Use the zipfileset + and zipgroupfileset attributes of + the Jar + or Zip tasks instead.

    Manifest
    Manifest

    Creates a manifest file.

    Rpm

    Invokes the rpm executable to build a Linux installation - file. This task currently only works on Linux or other Unix platforms - with RPM support.

    Rpm

    Invokes the rpm executable to build a Linux + installation file. This task currently only works on Linux or + other Unix platforms with RPM support.

    SignJar

    Signs a jar or zip file with the javasign +

    SignJar

    Signs a jar or zip file with the javasign command-line tool.

    Tar
    Tar

    Creates a tar archive.

    Unjar
    Unjar

    Unzips a jarfile.

    Untar
    Untar

    Untars a tarfile.

    Unwar
    Unwar

    Unzips a warfile.

    Unzip
    Unzip

    Unzips a zipfile.

    War
    War

    An extension of the Jar task - with special treatment for files that should end up in the - WEB-INF/lib, WEB-INF/classes, or - WEB-INF directories of the Web Application Archive.

    Zip
    Zip

    Creates a zipfile.

    -

    - - - - - -
    - -Audit/Coverage Tasks -[Back to top]
    - - - +
    + Audit/Coverage Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + -
    Task Name Description
    JDepend

    Invokes the - JDepend parser. This parser "traverses a set of Java source-file - directories and generates design-quality metrics for each Java - package".

    JDepend

    Invokes + the JDepend parser. This parser "traverses a + set of Java source-file directories and generates design-quality + metrics for each Java package".

    -

    - - - - - -
    - -Compile Tasks -[Back to top]
    - - - +
    + Compile Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + -
    Task Name Description
    Depend

    Determines which classfiles are out-of-date with respect to their - source, removing the classfiles of any other classes that depend on the - out-of-date classes, forcing the re-compile of the removed classfiles. - Typically used in conjunction with the +

    Depend

    Determines which class files are out-of-date with respect + to their source, removing the class files of any other classes + that depend on the out-of-date classes, forcing the re-compile of + the removed class files. Typically used in conjunction with the Javac task.

    Javac
    Javac

    Compiles the specified source file(s) within the running - (Ant) VM, or in another VM if the fork attribute is + (Ant) JVM, or in another JVM if the fork attribute is specified.

    Apt

    Runs the annotation processor tool (apt), and then optionally compiles - the original code, and any generated source code.

    JspC

    Runs the JSP compiler. It can be used to precompile JSP pages - for fast initial invocation of JSP pages, deployment on a server without - the full JDK installed, or simply to syntax-check the pages without - deploying them. The Javac task - can be used to compile the generated Java source. - (For Weblogic JSP compiles, - see the Wljspc task.)

    NetRexxC

    Compiles a - NetRexx - source tree within the running (Ant) VM.

    Rmic

    Runs the rmic compiler on the specified file(s).

    Wljspc

    Compiles JSP pages using Weblogic's JSP compiler, - weblogic.jspc. (For non-Weblogic JSP compiles, see the - JspC task.

    JspC

    Runs the JSP compiler. It can be used to precompile JSP + pages for fast initial invocation of JSP pages, deployment on a + server without the full JDK installed, or simply to syntax-check + the pages without deploying + them. The Javac task can be used + to compile the generated Java source. (For WebLogic JSP + compiler, see the Wljspc + task.)

    NetRexxC

    Compiles + a NetRexx source tree within the running (Ant) + JVM.

    Rmic

    Runs the rmic compiler on the specified file(s).

    Wljspc

    Compiles JSP pages using WebLogic JSP + compiler, weblogic.jspc. (For non-WebLogic JSP + compiler, see the JspC + task.

    -

    - - - - - -
    - -Deployment Tasks -[Back to top]
    - - - +
    + Deployment Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + +
    Task Name Description
    ServerDeploy

    Task to run a "hot" deployment tool for vendor-specific - J2EE server. -

    ServerDeploy

    Runs a "hot" deployment tool for vendor-specific + J2EE server.

    -

    - - - - - -
    - -Documentation Tasks -[Back to top]
    - - - +
    + Documentation Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + -
    Task Name Description
    Javadoc/Javadoc2

    Generates code documentation using the javadoc tool. - The Javadoc2 task is deprecated; use the Javadoc task instead.

    Javadoc

    Generates code documentation using the javadoc + tool. The Javadoc2 task is deprecated; use + the Javadoc task instead.

    -

    - - - - - -
    - -EJB Tasks -[Back to top]
    - - - +
    + EJB Tasks + 🔝 +
    + +
    Task Name
    + + - - + +
    Task Name Description
    EJB Tasks
    EJB Tasks

    (See the documentation describing the EJB tasks.)

    -

    - - - - - -
    - -Execution Tasks -[Back to top]
    - - - +
    + Execution Tasks + 🔝 +
    + +
    Task Name
    + + - - + + - - + + - - - + + - - - + + + the target files, all the target files are removed.

    - - - + + - - - + + + - - + + - - + + - - - + + - - - + + + - - + +
    Task Name Description
    Ant
    Ant

    Runs Ant on a supplied buildfile, optionally passing properties (with possibly new values). This task can be used to build sub-projects.

    AntCall
    AntCall

    Runs another target within the same buildfile, optionally passing properties (with possibly new values).

    Apply/ExecOn

    Executes a system command. When the os attribute is +

    Apply/ExecOn

    Executes a system command. When the os attribute is specified, the command is only executed when Ant is run on one of the specified operating systems.

    Dependset

    This task compares a set of source files with a set of target +

    Dependset

    Compares a set of source files with a set of target files. If any of the source files is newer than any of - the target files, all the target files are removed.

    Exec

    Executes a system command. When the os attribute +

    Exec

    Executes a system command. When the os attribute is specified, the command is only executed when Ant is run on one of the specified operating systems.

    Java

    Executes a Java class within the running (Ant) VM, or in - another VM if the fork attribute is specified.

    Java

    Executes a Java class within the running (Ant) JVM, or in + another JVM if the fork attribute is specified.

    Parallel
    Parallel

    A container task that can contain other Ant tasks. Each nested task specified within the <parallel> tag will be executed in its own thread.

    Sequential
    Sequential

    A container task that can contain other Ant tasks. The nested tasks are simply executed in sequence. Its primary use is to support the sequential execution of a subset of tasks within the <parallel> tag.

    Sleep

    A task for suspending execution for a specified period of time. +

    Sleep

    Suspends execution for a specified period of time. Useful when a build or deployment process requires an interval between tasks.

    Subant

    Calls a given target for all defined sub-builds. This is an extension of ant for bulk project execution.

    Subant

    Calls a given target for all defined sub-builds. This is an + extension of ant for bulk project execution.

    Waitfor
    Waitfor

    Blocks execution until a set of specified conditions become true. This task is intended to be used with the Parallel task to synchronize @@ -431,768 +381,721 @@

    -

    - - - - - -
    - -File Tasks -[Back to top]
    - - - +
    + File Tasks + 🔝 +
    + +
    Task Name
    + + - - + + + files inside the specified directories. Currently, it has effect + only under Windows.

    - - + + - - + + + the specified directories. Currently, it has effect only under + Unix.

    - - + + + chmod command.

    - - + + + specified directories. Currently, it has effect only under + Unix.

    - - + + - - + + - - - + + + - - - + + + - - + + + in a specified directory, or a set of files specified by one or + more FileSets.

    - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + -
    Task Name Description
    Attrib
    Attrib

    Changes the permissions and/or attributes of a file or all - files inside the specified directories. Currently, it has effect - only under Windows.

    Checksum
    Checksum

    Generates a checksum for a file or set of files. This task can also be used to perform checksum verifications.

    Chgrp
    Chgrp

    Changes the group ownership of a file or all files inside - the specified directories. Currently, it has effect only under - Unix.

    Chmod
    Chmod

    Changes the permissions of a file or all files inside the specified directories. Currently, it has effect only under Unix. The permissions are also UNIX style, like the arguments for the - chmod command.

    Chown
    Chown

    Changes the owner of a file or all files inside the - specified directories. Currently, it has effect only under - Unix.

    Concat
    Concat

    Concatenates multiple files into a single one or to Ant's logging system.

    Copy
    Copy

    Copies a file or Fileset to a new file or directory.

    Copydir

    Deprecated. Use the - Copy task instead.

    Copydir

    Deprecated. Use + the Copy task instead.

    Copyfile

    Deprecated. Use the - Copy task instead.

    Copyfile

    Deprecated. Use + the Copy task instead.

    Delete
    Delete

    Deletes either a single file, all files and sub-directories - in a specified directory, or a set of files specified by one or more - FileSets.

    Deltree

    Deprecated. Use the - Delete task instead.

    Deltree

    Deprecated. Use + the Delete task instead.

    Filter

    Sets a token filter for this project, or reads multiple token - filters from a specified file and sets these as filters. Token filters - are used by all tasks that perform file-copying operations.

    Filter

    Sets a token filter for this project, or reads multiple + token filters from a specified file and sets these as + filters. Token filters are used by all tasks that perform + file-copying operations.

    FixCRLF

    Modifies a file to add or remove tabs, carriage returns, linefeeds, - and EOF characters.

    FixCRLF

    Modifies a file to add or remove tabs, carriage returns, + linefeeds, and EOF characters.

    Get
    Get

    Gets a file from a URL.

    Mkdir

    Creates a directory. Non-existent parent directories are created, - when necessary.

    Mkdir

    Creates a directory. Non-existent parent directories are + created, when necessary.

    Move

    Moves a file to a new file or directory, or a set(s) of file(s) to - a new directory.

    Move

    Moves a file to a new file or directory, or a set(s) of + file(s) to a new directory.

    Patch

    Applies a "diff" file to originals.

    Patch

    Applies a diff file to originals.

    Rename

    Deprecated. Use the Move - task instead.

    Rename

    Deprecated. Use + the Move task instead.

    - RenameExtensions

    Deprecated. Use the Move - task with a glob mapper +

    RenameExtensions

    Deprecated. Use + the Move task with + a glob mapper instead.

    Replace

    Replace is a directory-based task for replacing the occurrence - of a given string with another string in selected file.

    Replace

    Replaces the occurrence of a given string with another + string in a file or set of files.

    - ReplaceRegExp

    Directory-based task for replacing the occurrence of a given - regular expression with a substitution pattern in a file or set of - files.

    ReplaceRegExp

    Replaces the occurrence of a given regular expression with + a substitution pattern in a file or set of files.

    Sync

    Synchronize two directory trees.

    SetPermissions

    Changes the permissions of a collection of resources.

    Tempfile

    Generates a name for a new temporary file and sets the specified - property to that name.

    Sync

    Synchronizes two directory trees.

    Touch

    Changes the modification time of a file and possibly creates it at - the same time.

    Tempfile

    Generates a name for a new temporary file and sets the + specified property to that name.

    -

    - - - - - + + + +
    - -Java2 Extensions Tasks -[Back to top]
    Touch

    Changes the modification time of a file and possibly + creates it at the same time.

    - - - + +
    + Java Extensions Tasks + 🔝 +
    + +
    Task Name
    + + - - + - - - + - - - + - - - + -
    Task Name Description
    +
    Jarlib-available

    Check whether an extension is present in a FileSet or an - ExtensionSet. If the extension is present, the specified property is - set.

    +

    Checks whether an extension is present in a FileSet or an + ExtensionSet. If the extension is present, the specified + property is set.

    +
    Jarlib-display

    Display the "Optional Package" and - "Package Specification" information contained within the - specified jars.

    +

    Displays the Optional Package and Package + Specification information contained within the specified + jars.

    +
    Jarlib-manifest

    Task to generate a manifest that declares all the dependencies - in manifest. The dependencies are determined by looking in the - specified path and searching for Extension/"Optional Package" - specifications in the manifests of the jars.

    +

    Generates a manifest that declares all the dependencies in + manifest. The dependencies are determined by looking in the + specified path and searching for Extension/Optional + Package specifications in the manifests of the jars.

    +
    Jarlib-resolve

    Try to locate a jar to satisfy an extension, and place the - location of the jar into the specified property.

    +

    Tries to locate a jar to satisfy an extension, and places the + location of the jar into the specified property.

    -

    -

    - - - - - -
    - -Logging Tasks -[Back to top]
    - - - +
    + Logging Tasks + 🔝 +
    + +
    Task Name
    + + - - + +
    Task Name Description
    Record
    Record

    Runs a listener that records the logging output of the - build-process events to a file. Several recorders can exist + build process events to a file. Several recorders can exist at the same time. Each recorder is associated with a file.

    -

    - - - - - -
    - -Mail Tasks -[Back to top]
    - - - +
    + Mail Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + - - - + + + -
    Task Name Description
    Mail

    A task to send SMTP email.

    Mail

    Sends SMTP email.

    MimeMail

    Deprecated. Use the Mail - task instead.

    MimeMail

    Deprecated. Use + the Mail task instead.

    -

    - - - - - -
    - -Miscellaneous Tasks -[Back to top]
    - - - +
    + Miscellaneous Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + - - + + - - - + + + - - + + - - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + -
    Task Name Description
    Defaultexcludes

    Modify the list of default exclude patterns from within - your build file.

    Defaultexcludes

    Modifies the list of default exclude patterns from within + your build file.

    Echo
    Echo

    Echoes text to System.out or to a file.

    Fail

    Exits the current build by throwing a BuildException, - optionally printing additional information.

    Fail

    Exits the current build by throwing + a BuildException, optionally printing additional + information.

    GenKey
    GenKey

    Generates a key in keystore.

    HostInfo

    Sets properties related to the provided host, or to - the host the process is run on.

    HostInfo

    Sets properties related to the provided host, or to the + host the process is run on.

    Input

    Allows user interaction during the build process by displaying a - message and reading a line of input from the console.

    Input

    Allows user interaction during the build process by + displaying a message and reading a line of input from the + console.

    Script

    Executes a script in a - Apache BSF-supported language.

    Script

    Executes a script in + a Apache + BSF-supported language.

    Sound

    Plays a sound file at the end of the build, according to whether - the build failed or succeeded.

    Sound

    Plays a sound file at the end of the build, according to + whether the build failed or succeeded.

    Splash
    Splash

    Displays a splash screen.

    Sql

    Executes a series of SQL statements via JDBC to a database. - Statements can either be read in from a text file using the - src attribute, or from between the enclosing SQL +

    Sql

    Executes a series of SQL statements via JDBC to a + database. Statements can either be read in from a text file using + the src attribute, or from between the enclosing SQL tags.

    Taskdef

    Adds a task definition to the current project, such that this - new task can be used in the current project.

    TStamp

    Sets the DSTAMP, TSTAMP, and - TODAY properties in the current project, based on - the current date and time.

    Typedef

    Adds a data-type definition to the current project, such that this - new type can be used in the current project.

    XmlValidate

    Checks that XML files are valid (or only well-formed). This task - uses the XML parser that is currently used by Ant by default, but any SAX1/2 - parser can be specified, if needed.

    Taskdef

    Adds a task definition to the current project, such that + this new task can be used in the current project.

    TStamp

    Sets the DSTAMP, TSTAMP, + and TODAY properties in the current project, based + on the current date and time.

    -

    - - - - - + + + + + + + + +
    - -Pre-process Tasks -[Back to top]
    Typedef

    Adds a data-type definition to the current project, such + that this new type can be used in the current project.

    XmlValidate

    Checks that XML files are valid (or only well-formed). This + task uses the XML parser that is currently used by Ant by + default, but any SAX1/2 parser can be specified, if + needed.

    - - - + +
    + Pre-process Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + -
    Task Name Description
    ANTLR

    Invokes the ANTLR - Translator generator on a grammar file.

    ANTLR

    Invokes the ANTLR Translator generator on a grammar + file.

    AntStructure

    Generates a DTD for Ant buildfiles that contains information - about all tasks currently known to Ant.

    AntStructure

    Generates a DTD for Ant buildfiles that contains + information about all tasks currently known to Ant.

    Import

    Import another build file and potentially override targets - in it with targets of your own.

    Import

    Imports another build file and potentially overrides + targets in it with targets of your own.

    Include

    Include another build file.

    Include

    Includes another build file.

    JavaCC

    Invokes the - - JavaCC compiler-compiler on a grammar file.

    JavaCC

    Invokes the JavaCC compiler-compiler on a grammar + file.

    Javah
    Javah

    Generates JNI headers from a Java class.

    JJDoc

    Invokes the - JJDoc documentation generator for the JavaCC compiler-compiler. - JJDoc takes a JavaCC parser specification and produces documentation - for the BNF grammar. It can operate in three modes, determined by - command line options. This task only invokes JJDoc if the grammar file - is newer than the generated BNF grammar documentation.

    JJTree

    Invokes the - JJTree preprocessor for the JavaCC compiler-compiler. It inserts - parse-tree building actions at various places in the JavaCC source that - it generates. The output of JJTree is run through JavaCC to create the - parser. This task only invokes JJTree if the grammar file is newer than - the generated JavaCC file.

    Macrodef

    Define a new task as a macro built-up upon other tasks.

    - Native2Ascii

    Converts files from native encodings to ASCII with escaped Unicode. - A common usage is to convert source files maintained in a native - operating system encoding to ASCII, prior to compilation.

    Presetdef

    Define a new task by instrumenting an existing task with - default values for attributes or child elements.

    +
    JJDoc

    Invokes the JJDoc documentation generator for the JavaCC + compiler-compiler. JJDoc takes a JavaCC parser specification and + produces documentation for the BNF grammar. It can operate in + three modes, determined by command line options. This task only + invokes JJDoc if the grammar file is newer than the generated BNF + grammar documentation.

    JJTree

    Invokes the JJTree preprocessor for the JavaCC + compiler-compiler. It inserts parse-tree building actions at + various places in the JavaCC source that it generates. The output + of JJTree is run through JavaCC to create the parser. This task + only invokes JJTree if the grammar file is newer than the + generated JavaCC file.

    Macrodef

    Defines a new task as a macro built-up upon other tasks.

    Native2Ascii

    Converts files from native encodings to ASCII with escaped + Unicode. A common usage is to convert source files maintained in + a native operating system encoding to ASCII, prior to + compilation.

    Presetdef

    Defines a new task by instrumenting an existing task with + default values for attributes or child elements.

    Translate
    Translate

    Identifies keys in files, delimited by special tokens, and translates them with values read from resource bundles.

    XSLT
    XSLT

    Processes a set of documents via XSLT.

    -

    - - - - - -
    - -Property Tasks -[Back to top]
    - - - +
    + Property Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + - - - + + - - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + +
    Task Name Description
    Available

    Sets a property if a specified file, directory, class in the - classpath, or JVM system resource is available at runtime.

    Available

    Sets a property if a specified file, directory, class in + the classpath, or JVM system resource is available at + run time.

    Basename

    Sets a property to the last element of a specified path. +

    Basename

    Sets a property to the last element of a specified path.

    BuildNumber

    Task that can be used to track build numbers. +

    BuildNumber

    Helps tracking build numbers.

    Condition

    Sets a property if a certain condition holds true; this is a - generalization of Available and - Uptodate.

    Condition

    Sets a property if a certain condition holds true; this is + a generalization of Available + and Uptodate.

    Dirname
    Dirname

    Sets a property to the value of the specified file up to, - but not including, the last path element. + but not including, the last path element.

    - Echoproperties
    - -
    Echoproperties

    Lists the current properties.

    LoadFile
    LoadFile

    Loads a file into a property.

    LoadProperties

    Load a file's contents as Ant properties. This task is - equivalent to using <property file="..."/> - except that it supports nested <filterchain> elements, - and it cannot be specified outside a target.

    LoadProperties

    Loads a file's contents as Ant properties. This task is + equivalent to using <property + file="..."/> except that it supports + nested <filterchain> elements, and it cannot + be specified outside a target.

    MakeURL
    MakeURL

    Creates a URL (list) from a file/fileset or path

    PathConvert

    Converts a nested path, path reference, filelist reference, or - fileset reference to the form usable on a specified platform and/or - to a list of items separated by the specified separator and stores - the result in the specified property.

    PathConvert

    Converts a nested path, path reference, filelist reference, + or fileset reference to the form usable on a specified platform + and/or to a list of items separated by the specified separator + and stores the result in the specified property.

    Property
    Property

    Sets a property (by name and value), or set of properties (from a file or resource) in the project.

    - PropertyFile

    Creates or modifies property files. Useful when wanting to make - unattended modifications to configuration files for application - servers and applications. Typically used for things such as - automatically generating a build number and saving it to a build - properties file, or doing date manipulation.

    PropertyFile

    Creates or modifies property files. Useful when wanting to + make unattended modifications to configuration files for + application servers and applications. Typically used for things + such as automatically generating a build number and saving it to + a build properties file, or doing date manipulation.

    Uptodate

    Sets a property if a given target file is newer than a set of - source files.

    Uptodate

    Sets a property if a given target file is newer than a set + of source files.

    Whichresource

    Find a class or resource.

    Whichresource

    Finds a class or resource.

    XmlProperty
    XmlProperty

    Loads property values from a well-formed XML file.

    -

    - - - - - -
    - -Remote Tasks -[Back to top]
    - - - +
    + Remote Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + -
    Task Name Description
    FTP

    Implements a basic FTP client that can send, receive, - list, and delete files, and create directories.

    FTP

    Implements a basic FTP client that can send, receive, list, + and delete files, and create directories.

    Rexec

    Task to automate a remote rexec session.

    Rexec

    Automates a rexec session.

    Scp

    Copy files to or from a remote server using SSH.

    Scp

    Copies files to or from a remote server using SSH.

    setproxy

    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.

    setproxy

    Sets Java's HTTP proxy properties, so that tasks and code + run in the same JVM can have access to remote web sites through a + firewall.

    Sshexec

    Execute a command on a remote server using SSH.

    Sshexec

    Executes a command on a remote server using SSH.

    Telnet

    Task to automate a remote telnet session. This task uses - nested <read> and <write> tags - to indicate strings to wait for and specify text to send.

    Telnet

    Automates a telnet session. This task uses + nested <read> and <write> + tags to indicate strings to wait for and specify text to + send.

    -

    - - - - - -
    - -SCM Tasks -[Back to top]
    - - - +
    + SCM Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + - - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + - - - + + + -
    Task Name Description
    Cvs

    Handles packages/modules retrieved from a - CVS +

    Cvs

    Handles packages/modules retrieved from + a CVS repository.

    CvsChangeLog

    Generates an XML report of the changes recorded in a - CVS +

    CvsChangeLog

    Generates an XML report of the changes recorded in + a CVS repository.

    CVSPass

    Adds entries to a .cvspass file. Adding entries to this file - has the same affect as a cvs login command.

    CVSPass

    Adds entries to a .cvspass file. Adding + entries to this file has the same affect as a cvs + login command.

    CvsTagDiff

    Generates an XML-formatted report file of the changes between - two tags or dates recorded in a CVS repository.

    CvsTagDiff

    Generates an XML-formatted report file of the changes + between two tags or dates recorded in + a CVS + repository.

    ClearCase

    Tasks to perform the ClearCase cleartool checkin, checkout, - uncheckout, update, lock, unlock, mklbtype, rmtype, mklabel, mkattr, mkdir, mkelem, and mkbl commands.

    ClearCase

    Tasks to perform the ClearCase cleartool checkin, + checkout, uncheckout, update, + lock, unlock, mklbtype, rmtype, + mklabel, mkattr, mkdir, mkelem, + and mkbl commands.

    Continuus/Synergy

    Tasks to perform the Continuus ccmcheckin, - ccmcheckout, ccmcheckintask, ccmreconfigure, and - ccmcreateTask commands.

    Continuus/Synergy

    Tasks to perform the Continuus ccm checkin, + checkout, reconfigure, ccmcheckintask, + and ccmcreatetask commands.

    - Microsoft Visual SourceSafe

    Tasks to perform the Visual SourceSafe vssget, - vsslabel, vsshistory, vsscheckin, - vsscheckout, vssadd, vsscp, and vsscreate - commands.

    Microsoft Visual SourceSafe

    Tasks to perform the Visual SourceSafe ss get, + label, history, checkin, + checkout, add, cp, + and create commands.

    Pvcs

    Allows the user extract the latest edition of the source code - from a PVCS repository.

    Pvcs

    Allows the user extract the latest edition of the source + code from a PVCS repository.

    SourceOffSite

    Tasks to perform the SourceOffSite sosget, soslabel, - soscheckin, and soscheckout commands.

    SourceOffSite

    Tasks to perform the SourceOffSite sos get, label, + checkin, and checkout commands.

    -

    - - - - - -
    - -Testing Tasks -[Back to top]
    - - - +
    + Testing Tasks + 🔝 +
    + +
    Task Name
    + + - - - + + + - - - + + + -
    Task Name Description
    Junit

    Runs tests from the Junit - testing framework. This task has been tested with JUnit 3.0 up to - JUnit 3.7; it won't work with versions prior to JUnit 3.0.

    Junit

    Runs tests from the Junit testing framework. This task has been + tested with JUnit 3.0 and later; it won't work with versions + prior to JUnit 3.0.

    JunitReport

    Merges the individual XML files generated by the - Junit task and applies a - stylesheet on the resulting merged document to provide a browsable - report of the testcases results.

    JunitReport

    Merges the individual XML files generated by + the Junit task and applies a + stylesheet on the resulting merged document to provide a + browsable report of the testcases results.

    - - - diff -Nru ant-1.9.10/manual/toc.html ant-1.10.3/manual/toc.html --- ant-1.9.10/manual/toc.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/toc.html 2018-03-24 12:37:12.000000000 +0000 @@ -48,4 +48,3 @@ - diff -Nru ant-1.9.10/manual/tutorial-HelloWorldWithAnt.html ant-1.10.3/manual/tutorial-HelloWorldWithAnt.html --- ant-1.9.10/manual/tutorial-HelloWorldWithAnt.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/tutorial-HelloWorldWithAnt.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,84 +22,70 @@

    Tutorial: Hello World with Apache Ant

    -

    This document provides a step by step tutorial for starting java programming with Apache Ant. -It does not contain deeper knowledge about Java or Ant. This tutorial has the goal -to let you see, how to do the easiest steps in Ant.

    - - +

    This document provides a step by step tutorial for starting Java programming with Apache Ant. It +does not contain deeper knowledge about Java or Ant. This tutorial has the goal to let you see, how to +do the easiest steps in Ant.

    Content

    -

    +

    Preparing the project

    +

    We want to separate the source from the generated files, so our Java source files will be in src +folder. All generated files should be under build, and there split into several subdirectories for the +individual steps: classes for our compiled files and jar for our own JAR-file.

    - -

    Preparing the project

    -

    We want to separate the source from the generated files, so our java source files will -be in src folder. All generated files should be under build, and there -splitted into several subdirectories for the individual steps: classes for our compiled -files and jar for our own JAR-file.

    -

    We have to create only the src directory. (Because I am working on Windows, here is -the win-syntax - translate to your shell):

    +

    We have to create only the src directory. (Because I am working on Windows, here is the Windows +syntax—translate to your shell):

    -
    -md src
    -
    +
    md src
    -

    The following simple Java class just prints a fixed message out to STDOUT, -so just write this code into src\oata\HelloWorld.java.

    +

    The following simple Java class just prints a fixed message out to STDOUT, so just write this code +into src\oata\HelloWorld.java.

    -
    +
     package oata;
     
     public class HelloWorld {
         public static void main(String[] args) {
             System.out.println("Hello World");
         }
    -}
    -
    +}
    -

    Now just try to compile and run that: -

    +

    Now just try to compile and run that:

    +
     md build\classes
     javac -sourcepath src -d build\classes src\oata\HelloWorld.java
    -java -cp build\classes oata.HelloWorld
    -
    +java -cp build\classes oata.HelloWorld
    which will result in -
    -Hello World
    -
    -

    +
    Hello World
    -

    Creating a jar-file is not very difficult. But creating a startable jar-file needs more steps: create a +

    Creating a jar-file is not very difficult. But creating a startable jar-file needs more steps: create a manifest-file containing the start class, creating the target directory and archiving the files.

    -
    +
     echo Main-Class: oata.HelloWorld>myManifest
     md build\jar
     jar cfm build\jar\HelloWorld.jar myManifest -C build\classes .
    -java -jar build\jar\HelloWorld.jar
    -
    - -

    Note: Do not have blanks around the >-sign in the echo Main-Class instruction because it would -falsify it!

    +java -jar build\jar\HelloWorld.jar
    +

    Note: Do not have blanks around the >-sign in the echo Main-Class instruction because +it would falsify it!

    - -

    Four steps to a running application

    -

    After finishing the java-only step we have to think about our build process. We have to compile our code, otherwise we couldn't -start the program. Oh - "start" - yes, we could provide a target for that. We should package our application. -Now it's only one class - but if you want to provide a download, no one would download several hundreds files ... -(think about a complex Swing GUI - so let us create a jar file. A startable jar file would be nice ... And it's a -good practise to have a "clean" target, which deletes all the generated stuff. Many failures could be solved just -by a "clean build".

    +

    Four steps to a running application

    +

    After finishing the Java-only step we have to think about our build process. We have to compile our code, +otherwise we couldn't start the program. Oh—start—yes, we could provide a target for +that. We should package our application. Now it's only one class—but if you want to provide a download, +no one would download several hundreds files ... (think about a complex Swing GUI—so let us create a jar file. A +startable jar file would be nice ... And it's a good practise to have a clean target, which deletes all the +generated stuff. Many failures could be solved just by a "clean build".

    -

    By default Ant uses build.xml as the name for a buildfile, so our .\build.xml would be:

    -
    +

    By default Ant uses build.xml as the name for a buildfile, so our .\build.xml would be:

    +
     <project>
     
         <target name="clean">
    @@ -124,28 +110,24 @@
             <java jar="build/jar/HelloWorld.jar" fork="true"/>
         </target>
     
    -</project>
    -
    +</project>

    Now you can compile, package and run the application via

    -
    +
     ant compile
     ant jar
    -ant run
    -
    +ant run

    Or shorter with

    -
    -ant compile jar run
    -
    +
    ant compile jar run
    -

    While having a look at the buildfile, we will see some similar steps between Ant and the java-only commands: +

    While having a look at the buildfile, we will see some similar steps between Ant and the Java-only commands:

    - + - - + -
    java-onlyJava-only Ant
    +  
     md build\classes
     javac
         -sourcepath src
    @@ -161,15 +143,14 @@
     
     
     
    -java -jar build\jar\HelloWorld.jar
    -  
    +java -jar build\jar\HelloWorld.jar
     <mkdir dir="build/classes"/>
     <javac
         srcdir="src"
         destdir="build/classes"/>
    -<!-- automatically detected -->
    -<!-- obsolete; done via manifest tag -->
    +<!-- automatically detected -->
    +<!-- obsolete; done via manifest tag -->
     <mkdir dir="build/jar"/>
     <jar
         destfile="build/jar/HelloWorld.jar"
    @@ -179,23 +160,18 @@
             <attribute name="Main-Class" value="oata.HelloWorld"/>
         </manifest>
     </jar>
    -<java jar="build/jar/HelloWorld.jar" fork="true"/>
    -  
    -

    - - - - -

    Enhance the build file

    -

    Now we have a working buildfile we could do some enhancements: many time you are referencing the -same directories, main-class and jar-name are hard coded, and while invocation you have to remember -the right order of build steps.

    -

    The first and second point would be addressed with properties, the third with a special property - an attribute -of the <project>-tag and the fourth problem can be solved using dependencies.

    +<java jar="build/jar/HelloWorld.jar" fork="true"/> + + +

    Enhance the build file

    +

    Now that we have a working buildfile, we could do some enhancements: many times you are referencing the same +directories, main-class and jar-name are hardcoded, and while invoking you have to remember the right order of build +steps.

    +

    The first and second point would be addressed with properties, the third with a special property—an +attribute of the <project> tag and the fourth problem can be solved using dependencies.

    -
    +
     <project name="HelloWorld" basedir="." default="main">
     
         <property name="src.dir"     value="src"/>
    @@ -234,11 +210,9 @@
     
         <target name="main" depends="clean,run"/>
     
    -</project>
    -
    - +</project>
    -

    Now it's easier, just do a ant and you will get

    +

    Now it's easier, just do a ant and you will get

     Buildfile: build.xml
     
    @@ -257,29 +231,28 @@
     
     main:
     
    -BUILD SUCCESSFUL
    -
    +BUILD SUCCESSFUL - - -

    Using external libraries

    -

    Somehow told us not to use syso-statements. For log-Statements we should use a Logging-API - customizable on a high -degree (including switching off during usual life (= not development) execution). We use Log4J for that, because

      +

      Using external libraries

      +

      Somebody told us not to use System-statements. For output, we should use a Logging +API—customizable to a high degree (including switching off during usual life (= not development) execution). We +use Log4J for that, because

      +
      • it is not part of the JDK (1.4+) and we want to show how to use external libs
      • it can run under JDK 1.2 (as Ant)
      • it's highly configurable
      • it's from Apache ;-)
      • -

      -

      We store our external libraries in a new directory lib. Log4J can be -downloaded [1] from Logging's Homepage. -Create the lib directory and extract the log4j-1.2.9.jar into that lib-directory. After that we have to modify -our java source to use that library and our buildfile so that this library could be accessed during compilation and run. -

      -

      Working with Log4J is documented inside its manual. Here we use the MyApp-example from the -Short Manual [2]. First we have to modify the java source to -use the logging framework:

      +
    +

    We store our external libraries in a new directory lib. Log4J can +be downloaded +[1] from Logging's Homepage. Create the lib directory and extract the log4j-1.2.17.jar +into that directory. After that we have to modify our Java source file to use that library and our buildfile so that +this library could be accessed during compilation and run.

    +

    Working with Log4J is documented inside its manual. Here we use the MyApp-example from +the Short Manual [2]. First we have to +modify the java source to use the logging framework:

    -
    +
     package oata;
     
     import org.apache.log4j.Logger;
    @@ -290,19 +263,19 @@
     
         public static void main(String[] args) {
             BasicConfigurator.configure();
    -        logger.info("Hello World");          // the old SysO-statement
    +        logger.info("Hello World");          // the old SysO-statement
         }
    -}
    -
    +}

    Most of the modifications are "framework overhead" which has to be done once. The blue line is our "old System-out" statement.

    -

    Don't try to run ant - you will only get lot of compiler errors. Log4J is not inside the classpath so we have -to do a little work here. But do not change the CLASSPATH environment variable! This is only for this project and maybe -you would break other environments (this is one of the most famous mistakes when working with Ant). We introduce Log4J -(or to be more precise: all libraries (jar-files) which are somewhere under .\lib) into our buildfile:

    +

    Don't try to run ant—you will only get lot of compiler errors. Log4J is not on the classpath so we +have to do a little work here. But do not change the CLASSPATH environment variable! This is only for this +project and maybe you would break other environments (this is one of the most famous mistakes when working with Ant). We +introduce Log4J (or to be more precise: all libraries (jar-files) which are somewhere under .\lib) into our +buildfile:

    -
    +
     <project name="HelloWorld" basedir="." default="main">
         ...
         <property name="lib.dir"     value="lib"/>
    @@ -322,59 +295,57 @@
             <java fork="true" classname="${main-class}">
                 <classpath>
                     <path refid="classpath"/>
    -                <path location="${jar.dir}/${ant.project.name}.jar"/>
    +                <path location="${jar.dir}/${ant.project.name}.jar"/>
                 </classpath>
             </java>
         </target>
     
         ...
     
    -</project>
    -
    - -

    In this example we start our application not via its Main-Class manifest-attribute, because we could not provide -a jarname and a classpath. So add our class in the red line to the already defined path and start as usual. Running -ant would give (after the usual compile stuff):

    - -
    -[java] 0 [main] INFO oata.HelloWorld  - Hello World
    -
    +</project>
    -

    What's that?

      -
    • [java] Ant task running at the moment
    • -
    • 0 sorry don't know - some Log4J stuff
    • -
    • [main] the running thread from our application
    • -
    • INFO log level of that statement -
    • oata.HelloWorld source of that statement -
    • - separator
    • -
    • Hello World the message
    • +

      In this example we start our application not via its Main-Class manifest-attribute, because we could not +provide a jar-name and a classpath. So add our class in the red line to the already defined path and start as +usual. Running ant would give (after the usual compile stuff):

      + +
      [java] 0 [main] INFO oata.HelloWorld  - Hello World
      + +

      What's that?

      +
        +
      • [java] Ant task running at the moment
      • +
      • 0 sorry, don't know—some Log4J stuff
      • +
      • [main] the running thread from our application
      • +
      • INFO log level of that statement
      • +
      • oata.HelloWorld source of that statement
      • +
      • - separator
      • +
      • Hello World the message
      -For another layout ... have a look inside Log4J's documentation about using other PatternLayout's.

      - +

      For another layout ... have a look inside Log4J's documentation about using other PatternLayouts.

      - -

      Configuration files

      -

      Why we have used Log4J? "It's highly configurable"? No - all is hard coded! But that is not the debt of Log4J - it's -ours. We had coded BasicConfigurator.configure(); which implies a simple, but hard coded configuration. More -comfortable would be using a property file. In the java source delete the BasicConfiguration-line from the main() method -(and the related import-statement). Log4J will search then for a configuration as described in it's manual. Then create -a new file src/log4j.properties. That's the default name for Log4J's configuration and using that name would make -life easier - not only the framework knows what is inside, you too!

      +

      Configuration files

      +

      Why we have used Log4J? "It's highly configurable"? No—all is hardcoded! But that is not the fault of +Log4J—it's ours. We had coded BasicConfigurator.configure(); which implies a simple, but +hardcoded configuration. More comfortable would be using a property file. In the Java source file, delete +the BasicConfiguration line from the main() method (and the +related import statement). Log4J will search then for a configuration as described in its manual. Then +create a new file src/log4j.properties. That's the default name for Log4J's configuration and using that +name would make life easier—not only the framework knows what is inside, you too!

      -
      +
       log4j.rootLogger=DEBUG, stdout
       
       log4j.appender.stdout=org.apache.log4j.ConsoleAppender
       
       log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
      -log4j.appender.stdout.layout.ConversionPattern=%m%n
      +log4j.appender.stdout.layout.ConversionPattern=%m%n
       
      -

      This configuration creates an output channel ("Appender") to console named as stdout which prints the -message (%m) followed by a line feed (%n) - same as the earlier System.out.println() :-) Oooh kay - but we haven't -finished yet. We should deliver the configuration file, too. So we change the buildfile:

      +

      This configuration creates an output channel (Appender) to console named as stdout which prints +the message (%m) followed by a line feed (%n)—same as the +earlier System.out.println() :-) Oooh kay—but we haven't finished yet. We should deliver +the configuration file, too. So we change the buildfile:

      -
      +
           ...
           <target name="compile">
               <mkdir dir="${classes.dir}"/>
      @@ -383,35 +354,41 @@
                   <fileset dir="${src.dir}" excludes="**/*.java"/>
               </copy>
           </target>
      -    ...
      -
      + ...
      -

      This copies all resources (as long as they haven't the suffix ".java") to the build directory, so we could +

      This copies all resources (as long as they haven't the suffix .java) to the build directory, so we could start the application from that directory and these files will included into the jar.

      +

      Testing the class

      +

      In this step we will introduce the usage of the JUnit [3] test framework in combination with Ant. Because Ant has a +built-in JUnit 4.12 you could start directly using it. Write a test class +in src\oata\HelloWorldTest.java:

      + +
      +package oata;
      +
      +import org.junit.Test;
       
      -
      -

      Testing the class

      -

      In this step we will introduce the usage of the JUnit [3] testframework in combination with Ant. Because Ant -has a built-in JUnit 3.8.2 you could start directly using it. Write a test class in src\HelloWorldTest.java:

      +import static org.junit.Assert.fail; -
      -public class HelloWorldTest extends junit.framework.TestCase {
      +public class HelloWorldTest {
       
      +    @Test
           public void testNothing() {
           }
      -    
      +
      +    @Test
           public void testWillAlwaysFail() {
               fail("An error message");
           }
      -    
      +
       }
      -

      Because we dont have real business logic to test, this test class is very small: just show how to start. For -further information see the JUnit documentation [3] and the manual of junit task. -Now we add a junit instruction to our buildfile:

      +

      Because we don't have real business logic to test, this test class is very small: just showing how to start. For +further information see the JUnit documentation [3] and the manual of junit task. Now we +add a junit instruction to our buildfile:

      -
      +
           ...
       
           <path id="application" location="${jar.dir}/${ant.project.name}.jar"/>
      @@ -424,48 +401,45 @@
                   </classpath>
               </java>
           </target>
      -    
      +
           <target name="junit" depends="jar">
               <junit printsummary="yes">
                   <classpath>
                       <path refid="classpath"/>
                       <path refid="application"/>
                   </classpath>
      -            
      +
                   <batchtest fork="yes">
      -                <fileset dir="${src.dir}" includes="*Test.java"/>
      +                <fileset dir="${src.dir}" includes="**/*Test.java"/>
                   </batchtest>
               </junit>
           </target>
       
      -    ...
      -
      -
      + ...
      -

      We reuse the path to our own jar file as defined in run-target by - giving it an ID and making it globally available. -The printsummary=yes lets us see more detailed information than just a "FAILED" or "PASSED" message. -How much tests failed? Some errors? Printsummary lets us know. The classpath is set up to find our classes. -To run tests the batchtest here is used, so you could easily add more test classes in the future just -by naming them *Test.java. This is a common naming scheme.

      +

      We reuse the path to our own jar file as defined in run-target by giving it an id and making it +globally available. The printsummary=yes lets us see more detailed information than just a "FAILED" +or "PASSED" message. How much tests failed? Some errors? printsummary lets us know. The classpath is set up +to find our classes. To run tests the batchtest here is used, so you could easily add more test classes in +the future just by naming them *Test.java. This is a common naming scheme.

      -

      After a ant junit you'll get:

      +

      After a ant junit you'll get:

       ...
       junit:
      -    [junit] Running HelloWorldTest
      -    [junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 0,01 sec
      -    [junit] Test HelloWorldTest FAILED
      +    [junit] Running oata.HelloWorldTest
      +    [junit] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0,01 sec
      +    [junit] Test oata.HelloWorldTest FAILED
       
       BUILD SUCCESSFUL
      -...
      -
      +...
      -

      We can also produce a report. Something that you (and other) could read after closing the shell .... -There are two steps: 1. let <junit> log the information and 2. convert these to something readable (browsable).

      +

      We can also produce a report. Something that you (and others) could read after closing the shell ... There are two +steps: 1. let <junit> log the information and 2. convert these log files to something readable +(browsable).

      -

      +
           ...
           <property name="report.dir"  value="${build.dir}/junitreport"/>
           ...
      @@ -476,45 +450,38 @@
                       <path refid="classpath"/>
                       <path refid="application"/>
                   </classpath>
      -            
      +
                   <formatter type="xml"/>
      -            
      +
                   <batchtest fork="yes" todir="${report.dir}">
      -                <fileset dir="${src.dir}" includes="*Test.java"/>
      +                <fileset dir="${src.dir}" includes="**/*Test.java"/>
                   </batchtest>
               </junit>
           </target>
      -    
      +
           <target name="junitreport">
               <junitreport todir="${report.dir}">
                   <fileset dir="${report.dir}" includes="TEST-*.xml"/>
                   <report todir="${report.dir}"/>
               </junitreport>
      -    </target>
      -
      - -

      Because we would produce a lot of files and these files would be written to the current directory by default, -we define a report directory, create it before running the junit and redirect the logging to it. The log format -is XML so junitreport could parse it. In a second target junitreport should create a browsable -HTML-report for all generated xml-log files in the report directory. Now you can open the ${report.dir}\index.html and -see the result (looks something like JavaDoc).
      -Personally I use two different targets for junit and junitreport. Generating the HTML report needs some time and you dont -need the HTML report just for testing, e.g. if you are fixing an error or a integration server is doing a job. -

      - - - - - -

      Resources

      -
      -    [1] http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.zip
      -    [2] http://logging.apache.org/log4j/docs/manual.html
      -    [3] http://www.junit.org/index.htm
      -
      - - + </target>
      +

      Because we would produce a lot of files and these files would be written to the current directory by default, we +define a report directory, create it before running the junit and redirect the logging to it. The log format is +XML so junitreport could parse it. In a second target junitreport should create a browsable HTML report +for all generated XML log files in the report directory. Now you can open the ${report.dir}\index.html and +see the result (looks something like JavaDoc).
      Personally I use two different targets +for <junit> and <junitreport>. Generating the HTML report needs some time and you +don't need the HTML report just for testing, e.g. if you are fixing an error or a integration server is doing a job.

      + +

      Resources

      +
        +
      1. https://archive.apache.org/dist/logging/log4j/1.2.17/log4j-1.2.17.zip
      2. +
      3. https://logging.apache.org/log4j/1.2/manual.html
      4. +
      5. https://junit.org/junit4
      6. +
      diff -Nru ant-1.9.10/manual/tutorials.html ant-1.10.3/manual/tutorials.html --- ant-1.9.10/manual/tutorials.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/tutorials.html 2018-03-24 12:37:12.000000000 +0000 @@ -30,16 +30,14 @@

      Tutorials

      Hello World with Apache Ant
      -A step by step tutorial for starting java programming with Ant.

      +A step by step tutorial for starting Java programming with Ant.

      Writing Tasks
      A step by step tutorial for writing tasks.

      Tasks using Properties, Filesets & Paths
      -How to get and set properties and how to use nested filesets and paths +How to get and set properties and how to use nested filesets and paths while writing tasks. Finally it explains how to contribute tasks to Ant.

      - - diff -Nru ant-1.9.10/manual/tutorial-tasks-filesets-properties.html ant-1.10.3/manual/tutorial-tasks-filesets-properties.html --- ant-1.9.10/manual/tutorial-tasks-filesets-properties.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/tutorial-tasks-filesets-properties.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,12 +22,12 @@

      Tutorial: Tasks using Properties, Filesets & Paths

      -

      After reading the tutorial about writing -tasks [1] this tutorial explains how to get and set properties and how to use -nested filesets and paths. Finally it explains how to contribute tasks to Apache Ant.

      +

      After reading the tutorial about writing tasks [1] this tutorial explains +how to get and set properties and how to use nested filesets and paths. Finally it explains how to contribute tasks to +Apache Ant.

      Content

      -

      -

      Build environment

      -

      We can use the buildfile from the other tutorial and modify it a little bit. -That's the advantage of using properties - we can reuse nearly the whole script. :-)

      -
      -<?xml version="1.0" encoding="ISO-8859-1"?>
      +

      The goal

      +

      The goal is to write a task, which searches in a path for a file and saves the location of that file in a +property.

      + +

      Build environment

      +

      We can use the buildfile from the other tutorial and modify it a little bit. That's the advantage of using +properties—we can reuse nearly the whole script. :-)

      +
      +<?xml version="1.0" encoding="UTF-8"?>
       <project name="FindTask" basedir="." default="test">
           ...
           <target name="use.init" description="Taskdef's the Find-Task" depends="jar">
      @@ -58,31 +56,28 @@
       
           <!-- the other use.* targets are deleted -->
           ...
      -</project>
      -
      +</project>
      -

      The buildfile is in the archive -tutorial-tasks-filesets-properties.zip [2] in /build.xml.01-propertyaccess -(future version saved as *.02..., final version as build.xml; same for sources).

      - - -

      Property access

      -

      Our first step is to set a property to a value and print the value of that property. -So our scenario would be -

      +

      The buildfile is in the +archive tutorial-tasks-filesets-properties.zip [2] +in /build.xml.01-propertyaccess (future version saved as *.02..., final version as build.xml; +same for sources).

      + +

      Property access

      +

      Our first step is to set a property to a value and print the value of that property. So +our scenario would be

      +
           <find property="test" value="test-value"/>
      -    <find print="test"/>
      -
      -ok, can be rewritten with the core tasks -
      +    <find print="test"/>
      +

      Ok, it can be rewritten with the core tasks

      +
           <property name="test" value="test-value"/>
      -    <echo message="${test}"/>
      -
      -but I have to start on known ground :-)

      -

      So what to do? Handling three attributes (property, value, print) and an execute method. -Because this is only an introduction example I don't do much checking: + <echo message="${test}"/>

      +

      but I have to start on known ground :-)

      +

      So what to do? Handling three attributes (property, value, print) and an execute +method. Because this is only an introduction example I don't do much checking:

      -
      +
       import org.apache.tools.ant.BuildException;
       
       public class Find extends Task {
      @@ -107,47 +102,40 @@
                   getProject().setNewProperty(property, value);
               }
           }
      -}
      -
      +}
      -As said in the other tutorial, the property access is done via Project instance. -We get this instance via the public getProject() method which we inherit from -Task (more precise from ProjectComponent). Reading a property is done via -getProperty(propertyname) (very simple, isn't it?). This property returns -the value as String or null if not set.
      -Setting a property is ... not really difficult, but there is more than one setter. You can -use the setProperty() method which will do the job like expected. But there is -a golden rule in Ant: properties are immutable. And this method sets the property -to the specified value - whether it has a value before that or not. So we use another -way. setNewProperty() sets the property only if there is no property with that -name. Otherwise a message is logged.

      - -

      (by the way: a short word to ants "namespaces" (don't -be confused with xml namespaces: -an <antcall> creates a new space for property names. All properties from the caller -are passed to the callee, but the callee can set its own properties without notice by the -caller.)

      +

      As said in the other tutorial, the property access is done via Project instance. We get +this instance via the public getProject() method which we inherit +from Task (more precisely from ProjectComponent). Reading a property +is done via getProperty(propertyname) (very simple, isn't it?). This property returns +the value as String or null if not set.
      Setting a property is ... not really difficult, +but there is more than one setter. You can use the setProperty() method which will do the job +as expected. But there is a golden rule in Ant: properties are immutable. And this method sets the property to +the specified value—whether it has a value before that or not. So we use another +way. setNewProperty() sets the property only if there is no property with that name. Otherwise +a message is logged.

      + +

      (By the way, a short explanation of Ant's "namespaces"—not to be confused with XML namespaces: +an <antcall> creates a new space for property names. All properties from the caller are passed to the +callee, but the callee can set its own properties without notice by the caller.)

      -

      There are some other setter, too (but I haven't used them, so I can't say something -to them, sorry :-)

      +

      There are some other setters, too (but I haven't used them, so I can't say something to them, sorry :-)

      -

      After putting our two line example from above into a target names use.simple -we can call that from our testcase: +

      After putting our two line example from above into a target names use.simple we can call that from our +test case:

      -
      +
      +import org.junit.Assert;
      +import org.junit.Before;
       import org.junit.Rule;
       import org.junit.Test;
      -import org.junit.Before;
      -import org.junit.Assert;
       import org.apache.tools.ant.BuildFileRule;
       
      -
       public class FindTest {
       
           @Rule
           public final BuildFileRule buildRule = new BuildFileRule();
       
      -
           @Before
           public void setUp() {
               configureProject("build.xml");
      @@ -155,38 +143,32 @@
       
           @Test
           public void testSimple() {
      -        buildRule.executeTarget("useSimgle");
      +        buildRule.executeTarget("useSimple");
               Assert.assertEquals("test-value", buildRule.getLog());
           }
      -}
      -
      - -and all works fine.

      +}
      +

      and all works fine.

      - -

      Using filesets

      -

      Ant provides a common way of bundling files: the fileset. Because you are reading -this tutorial I think you know them and I don't have to spend more explanations about -their usage in buildfiles. Our goal is to search a file in path. And on this step the -path is simply a fileset (or more precise: a collection of filesets). So our usage -would be -

      +

      Using filesets

      +

      Ant provides a common way of bundling files: the fileset. Because you are reading this tutorial I think you know them +and I don't have to spend more explanations about their usage in buildfiles. Our goal is to search for a file in +path. And in this step the path is simply a fileset (or more precise: a collection of filesets). So our usage would +be

      +
           <find file="ant.jar" location="location.ant-jar">
               <fileset dir="${ant.home}" includes="**/*.jar"/>
      -    </find>
      -
      -

      + </find>
      -

      What do we need? A task with two attributes (file, location) and nested -filesets. Because we had attribute handling already explained in the example above and the -handling of nested elements is described in the other tutorial the code should be very easy: -

      +

      What do we need? A task with two attributes (file, location) and nested filesets. Because we +had attribute handling already explained in the example above and the handling of nested elements is described in the +other tutorial, the code should be very easy:

      +
       public class Find extends Task {
       
           private String file;
           private String location;
      -    private Vector filesets = new Vector();
      +    private List<FileSet> filesets = new ArrayList<>();
       
           public void setFile(String file) {
               this.file = file;
      @@ -202,66 +184,57 @@
       
           public void execute() {
           }
      -}
      -
      -Ok - that task wouldn't do very much, but we can use it in the described manner without -failure. On next step we have to implement the execute method. And before that we will -implement the appropriate testcases (TDD - test driven development).

      - -

      In the other tutorial we have reused the already written targets of our buildfile. -Now we will configure most of the testcases via java code (sometimes it's much easier -to write a target than doing it via java coding). What can be tested?

        -
      • not valid configured task (missing file, missing location, missing fileset)
      • +}
      +

      Ok—that task wouldn't do very much, but we can use it in the described manner without failure. In the next step +we have to implement the execute method. And before that we will implement the appropriate test cases (TDD—test +driven development).

      + +

      In the other tutorial we have reused the already written targets of our buildfile. Now we will configure most of the +test cases via Java code (sometimes it's much easier to write a target than doing it via Java coding). What can be +tested?

      +
        +
      • invalid configuration of the task (missing file, missing location, missing fileset)
      • don't find a present file
      • behaviour if file can't be found
      -Maybe you find some more testcases. But this is enough for now.
      -For each of these points we create a testXX method.

      +

      Maybe you find some more test cases. But this is enough for now.
      For each of these points we create +a testXX method.

      -
      +
       public class FindTest {
       
           @Rule
           public final BuildFileRule buildRule = new BuildFileRule();
       
      +    @Rule
      +    public ExpectedException tried = ExpectedException.none();
      +
           ... // constructor, setUp as above
       
           @Test
           public void testMissingFile() {
      +        tried.expect(BuildException.class);
      +        tried.expectMessage("file not set");
               Find find = new Find();
      -        try {
      -            find.execute();
      -            fail("No 'no-file'-exception thrown.");
      -        } catch (Exception e) {
      -            // exception expected
      -            String expected = "file not set";
      -            assertEquals("Wrong exception message.", expected, e.getMessage());
      -        }
      +        find.execute();
           }
       
           @Test
           public void testMissingLocation() {
      +        tried.expect(BuildException.class);
      +        tried.expectMessage("location not set");
               Find find = new Find();
               find.setFile("ant.jar");
      -        try {
      -            find.execute();
      -            fail("No 'no-location'-exception thrown.");
      -        } catch (Exception e) {
      -            ... // similar to testMissingFile()
      -        }
      +        find.execute();
           }
       
           @Test
           public void testMissingFileset() {
      +        tried.expect(BuildException.class);
      +        tried.expectMessage("fileset not set");
               Find find = new Find();
               find.setFile("ant.jar");
               find.setLocation("location.ant-jar");
      -        try {
      -            find.execute();
      -            fail("No 'no-fileset'-exception thrown.");
      -        } catch (Exception e) {
      -            ... // similar to testMissingFile()
      -        }
           }
       
           @Test
      @@ -278,65 +251,60 @@
               assertNotNull("Property not set.", result);
               assertTrue("Wrong file found.", result.endsWith("ant.jar"));
           }
      -}
      -
      +}
      -

      If we run this test class all test cases (except testFileNotPresent) fail. Now we -can implement our task, so that these test cases will pass.

      +

      If we run this test class all test cases (except testFileNotPresent) fail. Now we can +implement our task, so that these test cases will pass.

      -
      +
           protected void validate() {
      -        if (file==null) throw new BuildException("file not set");
      -        if (location==null) throw new BuildException("location not set");
      -        if (filesets.size()<1) throw new BuildException("fileset not set");
      +        if (file == null) throw new BuildException("file not set");
      +        if (location == null) throw new BuildException("location not set");
      +        if (filesets.size() < 1) throw new BuildException("fileset not set");
           }
       
           public void execute() {
               validate();                                                             // 1
               String foundLocation = null;
      -        for(Iterator itFSets = filesets.iterator(); itFSets.hasNext(); ) {      // 2
      -            FileSet fs = (FileSet)itFSets.next();
      +        for (FileSet fs : filesets) {                                           // 2
                   DirectoryScanner ds = fs.getDirectoryScanner(getProject());         // 3
      -            String[] includedFiles = ds.getIncludedFiles();
      -            for(int i=0; i<includedFiles.length; i++) {
      -                String filename = includedFiles[i].replace('\\','/');           // 4
      -                filename = filename.substring(filename.lastIndexOf("/")+1);
      -                if (foundLocation==null && file.equals(filename)) {
      +            for (String includedFile : ds.getIncludedFiles()) {
      +                String filename = includedFile.replace('\\','/');               // 4
      +                filename = filename.substring(filename.lastIndexOf("/") + 1);
      +                if (foundLocation == null && file.equals(filename)) {
                           File base  = ds.getBasedir();                               // 5
      -                    File found = new File(base, includedFiles[i]);
      +                    File found = new File(base, includedFile);
                           foundLocation = found.getAbsolutePath();
                       }
                   }
               }
      -        if (foundLocation!=null)                                                // 6
      +        if (foundLocation != null)                                              // 6
                   getProject().setNewProperty(location, foundLocation);
      -    }
      -
      + }
      -

      On //1 we check the prerequisites for our task. Doing that in a validate-method -is a common way, because we separate the prerequisites from the real work. On //2 we iterate -over all nested filesets. If we don't want to handle multiple filesets, the addFileset() -method has to reject the further calls. We can get the result of a fileset via its DirectoryScanner -like done in //3. After that we create a platform independent String representation of -the file path (//4, can be done in other ways of course). We have to do the replace(), -because we work with a simple string comparison. Ant itself is platform independent and can -therefore run on filesystems with slash (/, e.g. Linux) or backslash (\, e.g. Windows) as -path separator. Therefore we have to unify that. If we found our file we create an absolute -path representation on //5, so that we can use that information without knowing the basedir. -(This is very important on use with multiple filesets, because they can have different basedirs -and the return value of the directory scanner is relative to its basedir.) Finally we store the -location of the file as property, if we had found one (//6).

      - -

      Ok, much more easier in this simple case would be to add the file as additional -include element to all filesets. But I wanted to show how to handle complex situations -without being complex :-)

      - -

      The test case uses the ant property ant.home as reference. This property is set by the -Launcher class which starts ant. We can use that property in our buildfiles as a -build-in property [3]. But if we create a new ant -environment we have to set that value for our own. And we use the <junit> task in fork-mode. -Therefore we have do modify our buildfile: -

      +

      On //1 we check the prerequisites for our task. Doing that in a validate() +method is a common way, because we separate the prerequisites from the real work. On //2 we iterate +over all nested filesets. If we don't want to handle multiple filesets, the addFileset() +method has to reject the further calls. We can get the result of a fileset via +its DirectoryScanner like done in //3. After that we create a platform +independent String representation of the file path (//4, can be done in other ways of course). We have +to do the replace(), because we work with a simple string comparison. Ant itself is platform +independent and can therefore run on filesystems with slash (/, e.g. Linux) or backslash (\, e.g. Windows) +as path separator. Therefore we have to unify that. If we find our file, we create an absolute path representation +on //5, so that we can use that information without knowing the basedir. (This is very +important on use with multiple filesets, because they can have different basedirs and the return value of the +directory scanner is relative to its basedir.) Finally we store the location of the file as property, if we +had found one (//6).

      + +

      Ok, much more easier in this simple case would be to add the file as additional include +element to all filesets. But I wanted to show how to handle complex situations without being complex :-)

      + +

      The test case uses the Ant property ant.home as reference. This property is set by +the Launcher class which starts ant. We can use that property in our buildfiles as +a build-in property [3]. But if we create a new Ant environment we have to +set that value for our own. And we use the <junit> task in fork mode. Therefore we have +do modify our buildfile:

      +
           <target name="junit" description="Runs the unit tests" depends="jar">
               <delete dir="${junit.out.dir.xml}"/>
               <mkdir  dir="${junit.out.dir.xml}"/>
      @@ -348,114 +316,109 @@
                       <fileset dir="${src.dir}" includes="**/*Test.java"/>
                   </batchtest>
               </junit>
      -    </target>
      -
      - + </target>
      -

      Using nested paths

      -

      A task providing support for filesets is a very comfortable one. But there is another -possibility of bundling files: the <path>. Fileset are easy if the files are all under -a common base directory. But if this is not the case you have a problem. Another disadvantage -is its speed: if you have only a few files in a huge directory structure, why not use a -<filelist> instead? <path>s combines these datatypes in that way that a path contains -other paths, filesets, dirsets and filelists. This is why -Ant-Contribs [4] <foreach> task is modified to support paths instead of filesets. So we want that, -too.

      +

      Using nested paths

      +

      A task providing support for filesets is a very comfortable one. But there is another possibility of bundling files: +the <path>. Filesets are easy if the files are all under a common base directory. But if this is not +the case, you have a problem. Another disadvantage is its speed: if you have only a few files in a huge directory +structure, why not use a <filelist> instead? <path>s combines these datatypes in +that way that a path contains other paths, filesets, dirsets and filelists. This is +why Ant-Contrib [4] <foreach> task is +modified to support paths instead of filesets. So we want that, too.

      Changing from fileset to path support is very easy:

      -
      -Change java code from:
      -    private Vector filesets = new Vector();
      +Change Java code from:
      +
      +    private List<FileSet> filesets = new ArrayList<>();
           public void addFileset(FileSet fileset) {
               filesets.add(fileset);
      -    }
      -to:
      -    private Vector paths = new Vector();                      *1
      +    }
      +to: +
      +    private List<Path> paths = new ArrayList<>();             *1
           public void addPath(Path path) {                          *2
               paths.add(path);
      -    }
      -and build file from:
      +    }
      +and build file from: +
           <find file="ant.jar" location="location.ant-jar">
               <fileset dir="${ant.home}" includes="**/*.jar"/>
      -    </find>
      -to:
      +    </find>
      +to: +
           <find file="ant.jar" location="location.ant-jar">
               <path>                                                *3
                   <fileset dir="${ant.home}" includes="**/*.jar"/>
               </path>
      -    </find>
      -
      -

      On *1 we rename only the vector. It�s just for better reading the source. On *2 -we have to provide the right method: an addName(Type t). Therefore replace the -fileset with path here. Finally we have to modify our buildfile on *3 because our task -doesn�t support nested filesets any longer. So we wrap the fileset inside a path.

      - -

      And now we modify the testcase. Oh, not very much to do :-) Renaming the testMissingFileset() -(not really a must-be but better it�s named like the think it does) and update the -expected-String in that method (now a path not set message is expected). The more complex -test cases base on the buildscript. So the targets testFileNotPresent and testFilePresent have to be -modified in the manner described above.

      - -

      The test are finished. Now we have to adapt the task implementation. The easiest modification is -in the validate() method where we change le last line to if (paths.size()<1) throw new -BuildException("path not set");. In the execute() method we have a little more work. -... mmmh ... in reality it's lesser work, because the Path class does the whole DirectoryScanner-handling -and creating-absolute-paths stuff for us. So the execute method is just:

      + </find>
      +

      On *1 we rename only the list. It's just for better reading the source. On *2 we +have to provide the right method: an addName(Type t). Therefore replace the fileset with path +here. Finally we have to modify our buildfile on *3 because our task doesn't support nested filesets +any longer. So we wrap the fileset inside a path.

      + +

      And now we modify the test case. Oh, not very much to do :-) Renaming +the testMissingFileset() (not really a must-be but better it's named like the thing +it does) and update the expected-String in that method (now a path not set message is +expected). The more complex test cases base on the build script. So the targets testFileNotPresent +and testFilePresent have to be modified in the manner described above.

      + +

      The test are finished. Now we have to adapt the task implementation. The easiest modification is in +the validate() method where we change the last line to if +(paths.size()<1) throw new BuildException("path not set");. In the execute() method +we have a little more work. ... mmmh ... in reality it's less work, because the Path class +does the whole DirectoryScanner-handling and creating-absolute-paths stuff for us. So the +execute method becomes just:

      -
      +
           public void execute() {
               validate();
               String foundLocation = null;
      -        for(Iterator itPaths = paths.iterator(); itPaths.hasNext(); ) {
      -            Path path = (Path)itPaths.next();                                // 1
      -            String[] includedFiles = path.list();                            // 2
      -            for(int i=0; i<includedFiles.length; i++) {
      -                String filename = includedFiles[i].replace('\\','/');
      -                filename = filename.substring(filename.lastIndexOf("/")+1);
      -                if (foundLocation==null && file.equals(filename)) {
      -                    foundLocation = includedFiles[i];                        // 3
      +        for (Path path : paths) {                                        // 1
      +            for (String includedFile : path.list()) {                    // 2
      +                String filename = includedFile.replace('\\','/');
      +                filename = filename.substring(filename.lastIndexOf("/") + 1);
      +                if (foundLocation == null && file.equals(filename)) {
      +                    foundLocation = includedFile;                        // 3
                       }
                   }
               }
      -        if (foundLocation!=null)
      +        if (foundLocation != null)
                   getProject().setNewProperty(location, foundLocation);
           }
       
      -

      Of course we have to do the typecase to Path on //1. On //2 and //3 -we see that the Path class does the work for us: no DirectoryScanner (was at 2) and no -creating of the absolute path (was at 3).

      - - - -

      Returning a list

      -

      So far so good. But could a file be on more than one place in the path? - Of course.
      -And would it be good to get all of them? - It depends on ...

      - -

      In this section we will extend that task to support returning a list of all files. -Lists as property values are not supported by Ant natively. So we have to see how other -tasks use lists. The most famous task using lists is Ant-Contribs <foreach>. All list -elements are concatenated and separated with a customizable separator (default ',').

      +

      Of course we have to iterate through paths on //1. On //2 and //3 +we see that the Path class does the work for us: no DirectoryScanner (was at 2) and no creating of the absolute path +(was at 3).

      + +

      Returning a list

      +

      So far so good. But could a file be on more than one place in the path?—Of course.
      +And would it be good to get all of them?—It depends ...

      + +

      In this section we will extend that task to support returning a list of all files. Lists as property values are not +supported by Ant natively. So we have to see how other tasks use lists. The most famous task using lists is +Ant-Contrib's <foreach>. All list elements are concatenated and separated with a customizable +separator (default ,).

      So we do the following:

      -
      -    <find ... delimiter=""/> ... </find>
      -
      +
      <find ... delimiter=""/> ... </find>
      -

      If the delimiter is set we will return all found files as list with that delimiter.

      +

      if the delimiter is set, we will return all found files as list with that delimiter.

      -

      Therefore we have to

        +

        Therefore we have to

        +
        • provide a new attribute
        • collect more than the first file
        • delete duplicates
        • create the list if necessary
        • return that list
        • -

        +
      -

      So we add as testcase:

      -
      -in the buildfile:
      +

      So we add as test case:

      +in the buildfile: +
           <target name="test.init">
               <mkdir dir="test1/dir11/dir111"/>                             *1
               <mkdir dir="test1/dir11/dir112"/>
      @@ -484,27 +447,25 @@
                   <fileset dir="test1"/>
                   <fileset dir="test2"/>
               </delete>
      -    </target>
      -
      -in the test class:
      +    </target>
      +in the test class: +
           public void testMultipleFiles() {
               executeTarget("testMultipleFiles");
               String result = getProject().getProperty("location.test");
               assertNotNull("Property not set.", result);
               assertTrue("Only one file found.", result.indexOf(";") > -1);
      -    }
      -
      + }
      -

      Now we need a directory structure where we CAN find files with the same -name in different directories. Because we can't sure to have one we create -one on *1 and *2. And of course we clean up that on *4. The creation -can be done inside our test target or in a separate one, which will be better -for reuse later (*3). +

      Now we need a directory structure where we CAN find files with the same name in different directories. Because we +can't sure to have one we create one on *1 and *2. And of course we clean up that +on *4. The creation can be done inside our test target or in a separate one, which will be better for +reuse later (*3).

      The task implementation is modified as followed:

      -
      -    private Vector foundFiles = new Vector();
      +
      +    private List<String> foundFiles = new ArrayList<>();
           ...
           private String delimiter = null;
           ...
      @@ -515,73 +476,65 @@
           public void execute() {
               validate();
               // find all files
      -        for(Iterator itPaths = paths.iterator(); itPaths.hasNext(); ) {
      -            Path path = (Path)itPaths.next();
      -            String[] includedFiles = path.list();
      -            for(int i=0; i<includedFiles.length; i++) {
      -                String filename = includedFiles[i].replace('\\','/');
      +        for (Path path : paths) {
      +            for (File includedFile : path.list()) {
      +                String filename = includedFile.replace('\\','/');
                       filename = filename.substring(filename.lastIndexOf("/")+1);
      -                if (file.equals(filename) && !foundFiles.contains(includedFiles[i])) {   // 1
      -                    foundFiles.add(includedFiles[i]);
      +                if (file.equals(filename) && !foundFiles.contains(includedFile)) {  // 1
      +                    foundFiles.add(includedFile);
                       }
                   }
               }
       
               // create the return value (list/single)
               String rv = null;
      -        if (foundFiles.size() > 0) {                                        // 2
      -            if (delimiter==null) {
      +        if (!foundFiles.isEmpty()) {                                                // 2
      +            if (delimiter == null) {
                       // only the first
      -                rv = (String)foundFiles.elementAt(0);
      +                rv = foundFiles.get(0);
                   } else {
                       // create list
      -                StringBuffer list = new StringBuffer();
      -                for(Iterator it=foundFiles.iterator(); it.hasNext(); ) {    // 3
      +                StringBuilder list = new StringBuilder();
      +                for (String file : foundFiles) {                                    // 3
                           list.append(it.next());
      -                    if (it.hasNext()) list.append(delimiter);               // 4
      -                }
      +                    if (list.length() > 0) list.append(delimiter);                  // 4
      +                 }
                       rv = list.toString();
                   }
               }
       
               // create the property
      -        if (rv!=null)
      +        if (rv != null)
                   getProject().setNewProperty(location, rv);
      -    }
      -
      + }
      -

      The algorithm does: finding all files, creating the return value depending on the users -wish, returning the value as property. On //1 we eliminates the duplicates. //2 -ensures that we create the return value only if we have found one file. On //3 we -iterate over all found files and //4 ensures that the last entry has no trailing -delimiter.

      - -

      Ok, first searching for all files and then returning only the first one ... You can -tune the performance of your own :-)

      - - -

      Documentation

      -

      A task is useless if the only who is able to code the buildfile is the task developer -(and he only the next few weeks :-). So documentation is also very important. In which -form you do that depends on your favourite. But inside Ant there is a common format and -it has advantages if you use that: all task users know that form, this form is requested if -you decide to contribute your task. So we will doc our task in that form.

      +

      The algorithm does: finding all files, creating the return value depending on the users wish, returning the value as +property. On //1 we eliminates the duplicates. //2 ensures that we create the return +value only if we have found one file. On //3 we iterate over all found files and //4 +ensures that the last entry has no trailing delimiter.

      + +

      Ok, first searching for all files and then returning only the first one ... You can tune the performance of your own +:-)

      + +

      Documentation

      +

      A task is useless if the only who is able to code the buildfile is the task developer (and he only the next few weeks +:-). So documentation is also very important. In which form you do that depends on your favourite. But inside Ant there +is a common format and it has advantages if you use that: all task users know that form, this form is requested if you +decide to contribute your task. So we will doc our task in that form.

      -

      If you have a look at the manual page of the Java task [5] - you will see that it:

        +

        If you have a look at the manual page of the Java task [5] you will see that it:

        +
        • is plain html
        • starts with the name
        • -
        • has sections: description, parameters, nested elements, (maybe return codes) and (most -important :-) examples
        • -
        • parameters are listed in a table with columns for attribute name, its description and whether - it's required (if you add a feature after an Ant release, provide a since Ant xx - statement when it's introduced)
        • +
        • has sections: description, parameters, nested elements, (maybe return codes) and (most important :-) examples
        • +
        • parameters are listed in a table with columns for attribute name, its description and whether it's required (if you +add a feature after an Ant release, provide a since Ant xx statement when it's introduced)
        • describe the nested elements (since-statement if necessary)
        • provide one or more useful examples; first code, then description.
        -As a template we have: +

        As a template we have:

        -
        +
         <html>
         
         <head>
        @@ -591,23 +544,23 @@
         
         <body>
         
        -<h2><a name="taskname">Taskname</a></h2>
        +<h2 id="taskname">Taskname</h2>
         <h3>Description</h3>
        -<p> Describe the task.</p>
        +<p>Describe the task.</p>
         
         <h3>Parameters</h3>
        -<table border="1" cellpadding="2" cellspacing="0">
        +<table class="attr">
           <tr>
        -    <td valign="top"><b>Attribute</b></td>
        -    <td valign="top"><b>Description</b></td>
        -    <td align="center" valign="top"><b>Required</b></td>
        +    <th>Attribute</th>
        +    <th>Description</th>
        +    <th>Required</th>
           </tr>
         
           do this html row for each attribute (including inherited attributes)
           <tr>
        -    <td valign="top">classname</td>
        -    <td valign="top">the Java class to execute.</td>
        -    <td align="center" valign="top">Either jar or classname</td>
        +    <td>classname</td>
        +    <td>the Java class to execute.</td>
        +    <td>Either jar or classname</td>
           </tr>
         
         </table>
        @@ -626,11 +579,10 @@
         What should that example do?
         
         </body>
        -</html>
        -
        +</html>

        Here is an example documentation page for our task:

        -
        +
         <html>
         
         <head>
        @@ -640,32 +592,32 @@
         
         <body>
         
        -<h2><a name="find">Find</a></h2>
        +<h2 id="find">Find</h2>
         <h3>Description</h3>
        -<p>Searchs in a given path for a file and returns the absolute to it as property.
        +<p>Searches in a given path for a file and returns the absolute to it as property.
         If delimiter is set this task returns all found locations.</p>
         
         <h3>Parameters</h3>
        -<table border="1" cellpadding="2" cellspacing="0">
        +<table class="attr">
           <tr>
        -    <td valign="top"><b>Attribute</b></td>
        -    <td valign="top"><b>Description</b></td>
        -    <td align="center" valign="top"><b>Required</b></td>
        +    <th>Attribute</th>
        +    <th>Description</th>
        +    <th>Required</th>
           </tr>
           <tr>
        -    <td valign="top">file</td>
        -    <td valign="top">The name of the file to search.</td>
        -    <td align="center" valign="top">yes</td>
        +    <td>file</td>
        +    <td>The name of the file to search.</td>
        +    <td>yes</td>
           </tr>
           <tr>
        -    <td valign="top">location</td>
        -    <td valign="top">The name of the property where to store the location</td>
        -    <td align="center" valign="top">yes</td>
        +    <td>location</td>
        +    <td>The name of the property where to store the location</td>
        +    <td>yes</td>
           </tr>
           <tr>
        -    <td valign="top">delimiter</td>
        -    <td valign="top">A delimiter to use when returning the list</td>
        -    <td align="center" valign="top">only if the list is required</td>
        +    <td>delimiter</td>
        +    <td>A delimiter to use when returning the list</td>
        +    <td>only if the list is required</td>
           </tr>
         </table>
         
        @@ -676,318 +628,253 @@
         
         <h3>Examples</h3>
         <pre>
        -    <find file="ant.jar" location="loc">
        -        <path>
        -            <fileset dir="${ant.home}"/>
        -        <path>
        -    </find>
        -</pre>
        -Searches in Ants home directory for a file <i>ant.jar</i> and stores its location in
        -property <i>loc</i> (should be ANT_HOME/bin/ant.jar).
        +<find file="ant.jar" location="loc">
        +    <path>
        +        <fileset dir="${ant.home}"/>
        +    <path>
        +</find></pre>
        +Searches in Ant's home directory for a file <samp>ant.jar</samp> and stores its location in
        +property <code>loc</code> (should be <samp>ANT_HOME/bin/ant.jar</samp>).
         
         <pre>
        -    <find file="ant.jar" location="loc" delimiter=";">
        -        <path>
        -            <fileset dir="C:/"/>
        -        <path>
        -    </find>
        -    <echo>ant.jar found in: ${loc}</echo>
        -</pre>
        -Searches in Windows C: drive for all <i>ant.jar</i> and stores their locations in
        -property <i>loc</i> delimited with <i>';'</i>. (should need a long time :-)
        -After that it prints out the result (e.g. C:/ant-1.5.4/bin/ant.jar;C:/ant-1.6/bin/ant.jar).
        +<find file="ant.jar" location="loc" delimiter=";">
        +    <path>
        +        <fileset dir="C:/"/>
        +    <path>
        +</find>
        +<echo>ant.jar found in: ${loc}</echo></pre>
        +Searches in Windows C: drive for all <samp>ant.jar</samp> and stores their locations in
        +property <code>loc</code> delimited with <q>;</q>. (should need a long time :-)
        +After that it prints out the result (e.g. <samp>C:/ant-1.5.4/bin/ant.jar;C:/ant-1.6/bin/ant.jar</samp>).
         
         </body>
        -</html>
        -
        +</html>
        - -

        Contribute the new task

        -If we decide to contribute our task, we should do some things:
          +

          Contribute the new task

          +

          If we decide to contribute our task, we should do some things:

          +
          • is our task welcome? :-) Simply ask on the user list
          • -
          • is the right package used?
          • +
          • is the right package used?
          • does the code conform to the styleguide?
          • -
          • do all tests pass?
          • -
          • does the code compile on JDK 1.2 (and passes all tests there)?
          • +
          • do all tests pass?
          • +
          • does the code compile on JDK 5 (and passes all tests there)?
          • code under Apache license
          • create a patch file
          • publishing that patch file
          -The Ant Task Guidelines [6] support additional -information on that.

          +

          The Ant Task Guidelines [6] support +additional information on that.

          -

          Now we will check the "Checklist before submitting a new task" described in that guideline. +

          Now we will check the "Checklist before submitting a new task" described in that guideline.

            -
          • Java file begins with Apache license statement. must do that
          • -
          • Task does not depend on GPL or LGPL code. ok
          • -
          • Source code complies with style guidelines have to check (checkstyle)
          • -
          • Code compiles and runs on Java1.2 have to try
          • -
          • Member variables are private, and provide public accessor methods - if access is actually needed. have to check (checkstyle)
          • -
          • Maybe Task has failonerror attribute to control failure behaviour hasn't
          • -
          • New test cases written and succeed passed on JDK 1.4, have to try on JDK 1.2
          • -
          • Documentation page written ok
          • -
          • Example task declarations in the documentation tested. ok (used in tests)
          • -
          • Patch files generated using cvs diff -u to do
          • -
          • patch files include a patch to defaults.properties to register the -tasks to do
          • -
          • patch files include a patch to tasklist.html to link to the new task page to do
          • -
          • Message to dev contains [SUBMIT] and task name in subject to do
          • -
          • Message body contains a rationale for the task to do
          • -
          • Message attachments contain the required files -source, documentation, -test and patches zipped up to escape the HTML filter. to do
          • +
          • Java file begins with Apache license statement. must do that
          • +
          • Task does not depend on GPL or LGPL code. ok
          • +
          • Source code complies with style guidelines have to check (checkstyle)
          • +
          • Code compiles and runs on Java 5 have to try
          • +
          • Member variables are private, and provide public accessor methods if access is actually needed. have to +check (checkstyle)
          • +
          • Maybe Task has failonerror attribute to control failure +behaviour hasn't
          • +
          • New test cases written and succeed passed on JDK 8, have to try on JDK 5
          • +
          • Documentation page written ok
          • +
          • Example task declarations in the documentation tested. ok (used in tests)
          • +
          • Message to dev contains [SUBMIT] and task name in subject to do
          • +
          • Message body contains a rationale for the task to do
          • +
          • Message body contains the URL to GitHub pull request. to do
          -

          Package / Directories

          -

          This task does not depend on any external library. Therefore we can use this as -a core task. This task contains only one class. So we can use the standard package -for core tasks: org.apache.tools.ant.taskdefs. Implementations are in the -directory src/main, tests in src/testcases and buildfiles for -tests in src/etc/testcases.

          - -

          Now we integrate our work into Ants distribution. So first we do an update of our -cvs tree. If not done yet, you have to checkout the ant module from Apaches cvs server -as described in Access the Source Tree (AnonCVS) -[7] (password is anoncvs):

          -cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login                 //1
          -cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout ant          //2
          -
          -If you have a local copy of Ants sources just do an update -
          -cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login
          -cd ant                                                                       //3
          -cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic update                //4
          -

          - -

          We use the -d flag on //1 to specify the cvs directory. You can -specify the environment variable CVSROOT with that value and after that you haven�t -to use that flag any more. On //2 we get the whole cvs tree of ant. (Sorry, -but that uses a lot of time ... 10 up to 30 minutes are not unusual ... but this has -to be done only once :-). A cvs update doesn't use a modulename but you have to be -inside the directory. Therefore we go into that on //3 and do the update -on //4.

          - -

          Now we will build our Ant distribution and do a test. So we can see if there -are any tests failing on our machine. (We can ignore these failing tests on later -steps; windows syntax used here- translate to xNIX if needed): -

          -ANTHOME> build                                                    // 1
          -ANTHOME> set ANT_HOME=%CD%\dist                                   // 2
          -ANTHOME> ant test -Dtest.haltonfailure=false                      // 3
          -
          - -First we have to build our Ant distribution (//1). On //2 we set the ANT_HOME -environment variable to the directory where the new created distribution is stored -(%CD% is expanded to the current directory on Windows 2000 and XP, on 9x and NT -write it out). On //3 we let Ant do all the tests (which enforced a compile -of all tests) without stopping on first failure.

          - -

          Next we apply our work onto Ants sources. Because we haven't modified any, this is -a relative simple step. (Because I have a local copy of Ant and usually contribute my -work, I work on the local copy just from the beginning. The advantage: this step isn't -necessary and saves a lot of work if you modify existing source :-). +

          This task does not depend on any external library. Therefore we can use this as a core task. This task contains only +one class. So we can use the standard package for core +tasks: org.apache.tools.ant.taskdefs. Implementations are in the +directory src/main, tests in src/testcases and buildfiles for tests +in src/etc/testcases.

          + +

          Now we integrate our work into Ant distribution. So first we do an update of our Git tree. If not done yet, you +should clone the Ant repository on GitHub[7], then create a local clone:

          +
          git clone https://github.com/your-sig/ant.git
          + +

          Now we will build our Ant distribution and do a test. So we can see if there are any tests failing on our +machine. (We can ignore these failing tests on later steps; Windows syntax used here—translate to UNIX if +needed):

          +
          +ANTREPO> build                                                    // 1
          +ANTREPO> set ANT_HOME=%CD%\dist                                   // 2
          +ANTREPO> ant test -Dtest.haltonfailure=false                      // 3
          + +

          First we have to build our Ant distribution (//1). On //2 we set +the ANT_HOME environment variable to the directory where the new created distribution is stored +(%CD% is expanded to the current directory on Windows 2000 and later). On //3 we let Ant +do all the tests (which enforced a compile of all tests) without stopping on first failure.

          + +

          Next we apply our work onto Ant sources. Because we haven't modified any, this is a relatively simple +step. (Because I have a local Git clone of Ant and usually contribute my work, I work on the local copy just from +the beginning. The advantage: this step isn't necessary and saves a lot of work if you modify existing sources :-).

            -
          • move the Find.java to ANTHOME/src/main/org/apache/tools/ant/taskdefs/Find.java
          • -
          • move the FindTest.java to ANTHOME/src/testcases/org/apache/tools/ant/taskdefs/FindTest.java
          • -
          • move the build.xml to ANTHOME/src/etc/testcases/taskdefs/find.xml (!!! renamed !!!)
          • -
          • add a package org.apache.tools.ant.taskdefs; at the beginning of the two java files
          • -
          • delete all stuff from find.xml keeping the targets "testFileNotPresent", "testFilePresent", - "test.init" and "testMultipleFiles"
          • -
          • delete the dependency to "use.init" in the find.xml
          • -
          • in FindTest.java change the line configureProject("build.xml"); to - configureProject("src/etc/testcases/taskdefs/find.xml");
          • -
          • move the find.html to ANTHOME/docs/manual/Tasks/find.html
          • -
          • add a <a href="Tasks/find.html">Find</a><br> - in the ANTHOME/docs/manual/tasklist.html
          • +
          • move the Find.java to ANTREPO/src/main/org/apache/tools/ant/taskdefs/Find.java
          • +
          • move the FindTest.java to ANTREPO/src/testcases/org/apache/tools/ant/taskdefs/FindTest.java
          • +
          • move the build.xml to ANTREPO/src/etc/testcases/taskdefs/find.xml (!!! renamed !!!)
          • +
          • add a package org.apache.tools.ant.taskdefs; at the beginning of the two java files
          • +
          • delete all stuff from find.xml keeping the + targets testFileNotPresent, testFilePresent, test.init and testMultipleFiles
          • +
          • delete the dependency to use.init in the find.xml
          • +
          • in FindTest.java change the line configureProject("build.xml"); + to configureProject("src/etc/testcases/taskdefs/find.xml");
          • +
          • move the find.html to ANTREPO/docs/manual/Tasks/find.html
          • +
          • add a <a href="Tasks/find.html">Find</a><br> in + the ANTREPO/docs/manual/tasklist.html
          -Now our modifications are done and we will retest it: -
          -ANTHOME> build
          -ANTHOME> ant run-single-test                                      // 1
          +

          Now our modifications are done and we will retest it:

          +
          +ANTREPO> build
          +ANTREPO> ant run-single-test                                      // 1
                        -Dtestcase=org.apache.tools.ant.taskdefs.FindTest    // 2
          -             -Dtest.haltonfailure=false
          -
          -Because we only want to test our new class, we use the target for single tests, specify -the test to use and configure not to halt on the first failure - we want to see all -failures of our own test (//1 + 2).

          - -

          And ... oh, all tests fail: Ant could not find the task or a class this task relies upon.

          - -

          Ok: in the earlier steps we told Ant to use the Find class for the <find> task (remember the -<taskdef> statement in the "use.init" target). But now we want to introduce that task as -a core task. And nobody wants to taskdef the javac, echo, ... So what to do? The answer is the -src/main/.../taskdefs/default.properties. Here is the mapping between taskname and implementing -class done. So we add a find=org.apache.tools.ant.taskdefs.Find as the last core -task (just before the # optional tasks line). Now a second try: -

          -ANTHOME> build                                                    // 1
          -ANTHOME> ant run-single-test
          +             -Dtest.haltonfailure=false
          +

          Because we only want to test our new class, we use the target for single tests, specify the test to use and configure +not to halt on the first failure—we want to see all failures of our own test (//1 + 2).

          + +

          And ... oh, all tests fail: Ant could not find the task or a class this task relies upon.

          + +

          Ok: in the earlier steps we told Ant to use the Find class for the <find> task (remember +the <taskdef> statement in the use.init target). But now we want to introduce that task as a +core task. And nobody wants to taskdef the javac, echo, ... So what to do? The +answer is the src/main/.../taskdefs/default.properties. Here is the mapping between taskname and +implementing class done. So we add a find=org.apache.tools.ant.taskdefs.Find as the last core task (just +before the # optional tasks line). Now a second try:

          +
          +ANTREPO> build                                                    // 1
          +ANTREPO> ant run-single-test
                        -Dtestcase=org.apache.tools.ant.taskdefs.FindTest
          -             -Dtest.haltonfailure=false
          -
          -We have to rebuild (//1) Ant because the test look in the %ANT_HOME%\lib\ant.jar -(more precise: on the classpath) for the properties file. And we have only modified it in the -source path. So we have to rebuild that jar. But now all tests pass and we check whether our class -breaks some other tests. -
          -ANTHOME> ant test -Dtest.haltonfailure=false
          -
          -Because there are a lot of tests this step requires a little bit of time. So use the run-single-test -during development and do the test only at the end (maybe sometimes during development too). -We use the -Dtest.haltonfailure=false here because there could be other tests fail and we have -to look into them.

          - -

          This test run should show us two things: our test will run and the number of failing tests -is the same as directly after the cvs update (without our modifications).

          - + -Dtest.haltonfailure=false
          +

          We have to rebuild (//1) Ant because the test look in the %ANT_HOME%\lib\ant.jar (more +precise: on the classpath) for the properties file. And we have only modified it in the source path. So we have to +rebuild that jar. But now all tests pass and we check whether our class breaks some other tests.

          +
          ANTREPO> ant test -Dtest.haltonfailure=false
          +

          Because there are a lot of tests this step requires a little bit of time. So use the run-single-test during +development and do the test only at the end (maybe sometimes during development too). We use +the -Dtest.haltonfailure=false here because there could be other tests fail and we have to look into +them.

          +

          This test run should show us two things: our test will run and the number of failing tests is the same as directly +after git clone (without our modifications).

          Apache license statement

          Simply copy the license text from one the other source from the Ant source tree.

          - -

          Test on JDK 1.2

          -

          Until version 1.5 Ant must be able to run on a JDK 1.1. With version 1.6 this is not a -requisite any more. But JDK 1.2 is a must-to-work-with. So we have to test that. You can download older -JDKs from Oracle [8].

          - -

          Clean the ANT_HOME variable, delete the build, bootstrap and dist directory -and point JAVA_HOME to the JDK 1.2 home directory. Then do the build, set ANT_HOME -and run ant test (like above).

          +

          Test on JDK 5

          +

          Ant 1.10 uses Java 8 for development, but Ant 1.9 is actively maintained, too. That means that Ant code must be able +to run on a JDK 5. So we have to test that. You can download older JDKs +from Oracle [8].

          + +

          Clean the ANT_HOME variable, delete the build, bootstrap and dist +directories, and point JAVA_HOME to the JDK 5 home directory. Then create the patch with your commit, +checkout 1.9.x branch in Git, apply your patch and do the build, set ANT_HOME and +run ant test (like above).

          Our test should pass.

          - -

          Checkstyle

          -

          There are many things we have to ensure. Indentation with 4 spaces, blanks here and there, ... -(all described in the Ant Task Guidelines [6] which -includes the Sun code style -[9]). Because there are so many things we would be happy to have a tool for do the checks. -There is one: checkstyle. Checkstyle is available at -Sourceforge [10] and Ant provides with the check.xml a buildfile which will do the job -for us.

          - -

          Download it and put the checkstyle-*-all.jar into your %USERPROFILE%\.ant\lib directory. -All jar's stored there are available to Ant so you haven't to add it to you %ANT_HOME%\lib -directory (this feature was added with Ant 1.6).

          - -

          So we will run the tests with -

          -ANTHOME> ant -f check.xml checkstyle htmlreport
          -
          -I prefer the HTML report because there are lots of messages and we can navigate faster. -Open the ANTHOME/build/reports/checkstyle/html/index.html and navigate to the Find.java. Now we -see that there are some errors: missing whitespaces, unused imports, missing javadocs. So we have -to do that.

          - -

          Hint: start at the buttom of the file so the line numbers in the report will keep -up to date and you will find the next error place much more easier without redoing the checkstyle.

          - -

          After cleaning up the code according to the messages we delete the reports directory and -do a second checkstyle run. Now our task isn't listed. That's fine :-)

          +

          There are many things we have to ensure. Indentation with 4 spaces, blanks here and there, ... (all described in +the Ant Task Guidelines [6] which includes +the Sun code style +[9]). Because there are so many things we would be happy to have a tool for do the checks. There is one: +checkstyle. Checkstyle is available at Sourceforge [10] +and Ant provides with the check.xml a buildfile which will do the job for us.

          + +

          Download it and put the checkstyle-*-all.jar into your %USERPROFILE%\.ant\lib directory. +All jar's stored there are available to Ant so you haven't to add it to you %ANT_HOME%\lib directory (this +feature is available since Ant 1.6).

          + +

          So we will run the tests with

          +
          ANTREPO> ant -f check.xml checkstyle htmlreport
          +

          I prefer the HTML report because there are lots of messages and we can navigate faster. Open +the ANTREPO/build/reports/checkstyle/html/index.html and navigate to the Find.java. Now we see +that there are some errors: missing whitespaces, unused imports, missing javadocs. So we have to do that.

          +

          Hint: start at the bottom of the file so the line numbers in the report will keep up to date and you +will find the next error place much more easier without redoing the checkstyle.

          - - - +

          After cleaning up the code according to the messages we delete the reports directory and do a second checkstyle +run. Now our task isn't listed. That's fine :-)

          Publish the task

          -

          Finally we publish that archive. As described in the -Ant Task Guidelines [7] we can post it on the developer mailinglist or we create a BugZilla -entry. For both we need some information:

          +

          Finally we publish that archive. As described in the Ant Task Guidelines [7] we can announce it on the developer mailing list, create a BugZilla entry and +open a GitHub pull request. For both we need some information:

          - +
          + + + - + - - + + - - - + + +
          subjectshort descriptionshort description Task for finding files in a path
          bodymore details about the pathThis new task looks inside a nested <path/> for occurrences of a file and stores - all locations as a property. See the included manual for details.more details about the pathThis new task looks inside a nested <path/> for occurrences of a file and stores all locations + as a property. See the included manual for details.
          attachmentsall files needed to apply the pathArchive containing a patch with the new and modified resourcespull request referenceGitHub pull request URLhttps://github.com/apache/ant/pull/0
          -

          Sending an email with these information is very easy and I think I haven't to show that. -The other way - BugZilla - is slightly more difficult. But it has the advantage that entries -will not be forgotten (once per week a report is generated). So I will show this way.

          - -

          You must have a BugZilla account for that. So open the -BugZilla Main Page [11] and follow the link -Open a new Bugzilla account [12] +

          Sending an email with this information is very easy and I think I haven't to describe that. BugZilla is slightly +more difficult. But the advantage is that entries will not be forgotten (a report is generated once every weekend). So +I will describe the process.

          + +

          First, you must have a BugZilla account. So open the BugZilla Main Page [11] and follow the +link Open a new Bugzilla account [12] and the steps described there if you haven't one.

            -
          1. From the BugZilla main page choose Enter - a new bug report [13]
          2. -
          3. Choose "Ant" as product
          4. -
          5. Version is the last "Alpha (nightly)" (at this time 1.7)
          6. +
          7. From the BugZilla main page choose Enter a + new bug report [13]
          8. +
          9. Choose "Ant" as product
          10. +
          11. Version is the last "Alpha (nightly)" (at this time 1.10)
          12. Component is "Core tasks"
          13. Platform and Severity are ok with "Other" and "Normal"
          14. Initial State is ok with "New"
          15. Same with the empty "Assigned to"
          16. -
          17. It is not required to add yourself as CC, because you are the reporter and therefore will be - informed on changes
          18. -
          19. URL: no url required
          20. -
          21. Summary: add the subject from the table
          22. -
          23. Description: add the body from the table
          24. -
          25. Then press "Commit"
          26. -
          27. After redirecting to the new created bug entry click "Create a New Attachment"
          28. -
          29. Enter the path to your local path file into "File" or choose it via the "File"'s - button.
          30. -
          31. Enter a short description into "Description", so that you could guess, what the - path file includes. Here we could add "Initial Patch".
          32. -
          33. The "Content Type" is "auto-detect". You could use the "patch" type, if you only - provide a single path file, but we want do upload more that one, included in our - patch.zip.
          34. +
          35. It is not required to add yourself as CC, because you are the reporter and therefore will be informed on + changes
          36. +
          37. URL: GitHub pull request URL
          38. +
          39. Summary: add the subject from the table
          40. +
          41. Description: add the body from the table
          42. Then press "Commit"
          -Now the new task is uploaded into the bug database. - - -

          Resources

          -  [1] tutorial-writing-tasks.html
          -  [2] tutorial-tasks-filesets-properties.zip
          -  [3] properties.html#built-in-props
          -  [4] http://ant-contrib.sourceforge.net/
          -  [5] Tasks/java.html
          -  [6] http://ant.apache.org/ant_task_guidelines.html
          -  [7] http://ant.apache.org/cvs.html
          -  [8] http://www.oracle.com/technetwork/java/archive-139210.html
          -  [9] http://www.oracle.com/technetwork/java/codeconvtoc-136057.html
          -  [10] http://checkstyle.sourceforge.net/
          -  [11] http://issues.apache.org/bugzilla/
          -  [12] http://issues.apache.org/bugzilla/createaccount.cgi
          -  [13] http://issues.apache.org/bugzilla/enter_bug.cgi
          - - - - - +

          Now the new task is registered in the bug database.

          +

          Resources

          +
            +
          1. tutorial-writing-tasks.html
          2. +
          3. tutorial-tasks-filesets-properties.zip
          4. +
          5. properties.html#built-in-props
          6. +
          7. http://ant-contrib.sourceforge.net/
          8. +
          9. Tasks/java.html
          10. +
          11. https://ant.apache.org/ant_task_guidelines.html
          12. +
          13. https://github.com/apache/ant
          14. +
          15. https://www.oracle.com/technetwork/java/archive-139210.html
          16. +
          17. https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
          18. +
          19. http://checkstyle.sourceforge.net/
          20. +
          21. https://issues.apache.org/bugzilla/
          22. +
          23. https://issues.apache.org/bugzilla/createaccount.cgi
          24. +
          25. https://issues.apache.org/bugzilla/enter_bug.cgi
          26. +
          diff -Nru ant-1.9.10/manual/tutorial-writing-tasks.html ant-1.10.3/manual/tutorial-writing-tasks.html --- ant-1.9.10/manual/tutorial-writing-tasks.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/tutorial-writing-tasks.html 2018-03-24 12:37:12.000000000 +0000 @@ -17,7 +17,7 @@ Tutorial: Writing Tasks - +

          Tutorial: Writing Tasks

          @@ -41,22 +41,20 @@
        • Resources
        - -

        Set up the build environment

        -

        Apache Ant builds itself, we are using Ant too (why we would write -a task if not? :-) therefore we should use Ant for our build.

        -

        We choose a directory as root directory. All things will be done -here if I say nothing different. I will reference this directory -as root-directory of our project. In this root-directory we -create a text file names build.xml. What should Ant do for us?

        +

        Set up the build environment

        +

        Apache Ant builds itself, we are using Ant too (why we would write a task if not? :-) therefore we should use Ant for +our build.

        +

        We choose a directory as root directory. All things will be done here if I say nothing different. I will reference +this directory as root-directory of our project. In this root-directory we create a text file +names build.xml. What should Ant do for us?

        • compiles my stuff
        • make the jar, so that I can deploy it
        • clean up everything
        So the buildfile contains three targets. -
        -<?xml version="1.0" encoding="ISO-8859-1"?>
        +
        +<?xml version="1.0" encoding="UTF-8"?>
         <project name="MyTask" basedir="." default="jar">
         
             <target name="clean" description="Delete all generated files">
        @@ -72,16 +70,15 @@
                 <jar destfile="MyTask.jar" basedir="classes"/>
             </target>
         
        -</project>
        -
        +</project>
        -This buildfile uses often the same value (src, classes, MyTask.jar), so we should rewrite that -using <property>s. On second there are some handicaps: <javac> requires that the destination -directory exists; a call of "clean" with a non existing classes directory will fail; "jar" requires -the execution of some steps before. So the refactored code is: +This buildfile uses often the same value (src, classes, MyTask.jar), so we should +rewrite that using <property>s. On second there are some handicaps: <javac> +requires that the destination directory exists; a call of clean with a non existing classes directory will +fail; jar requires the execution of some steps before. So the refactored code is: -
        -<?xml version="1.0" encoding="ISO-8859-1"?>
        +
        +<?xml version="1.0" encoding="UTF-8"?>
         <project name="MyTask" basedir="." default="jar">
         
             <property name="src.dir" value="src"/>
        @@ -101,38 +98,29 @@
                 <jar destfile="${ant.project.name}.jar" basedir="${classes.dir}"/>
             </target>
         
        -</project>
        -
        -ant.project.name is one of the - -build-in properties [1] of Ant. - - - -

        Write the Task

        - -Now we write the simplest Task - a HelloWorld-Task (what else?). Create a text file -HelloWorld.java in the src-directory with: -
        +</project>
        +

        ant.project.name is one of the build-in +properties [1] of Ant.

        + +

        Write the Task

        + +

        Now we write the simplest Task—a HelloWorld Task (what else?). Create a text file HelloWorld.java +in the src-directory with:

        +
         public class HelloWorld {
             public void execute() {
                 System.out.println("Hello World");
             }
        -}
        -
        -and we can compile and jar it with ant (default target is "jar" and via -its depends-clause the "compile" is executed before). - - - - -

        Use the Task

        -

        But after creating the jar we want to use our new Task. Therefore we need a -new target "use". Before we can use our new task we have to declare it with - -<taskdef> [2]. And for easier process we change the default clause:

        -
        -<?xml version="1.0" encoding="ISO-8859-1"?>
        +}
        +

        and we can compile and jar it with ant (default target is jar and via its depends +attribute the compile is executed before).

        + +

        Use the Task

        +

        But after creating the jar we want to use our new Task. Therefore we need a new target use. Before we can use +our new task we have to declare it with <taskdef> +[2]. And for easier process we change the default attribute:

        +
        +<?xml version="1.0" encoding="UTF-8"?>
         <project name="MyTask" basedir="." default="use">
         
             ...
        @@ -142,13 +130,12 @@
                 <helloworld/>
             </target>
         
        -</project>
        -
        +</project>
        -

        Important is the classpath-attribute. Ant searches in its /lib directory for -tasks and our task isn't there. So we have to provide the right location.

        +

        Important is the classpath attribute. Ant searches in its /lib directory for tasks and our +task isn't there. So we have to provide the right location.

        -

        Now we can type in ant and all should work ...

        +

        Now we can type in ant and all should work ...

         Buildfile: build.xml
         
        @@ -163,23 +150,18 @@
         [helloworld] Hello World
         
         BUILD SUCCESSFUL
        -Total time: 3 seconds
        -
        - +Total time: 3 seconds
      - - -

      Integration with TaskAdapter

      -

      Our class has nothing to do with Ant. It extends no superclass and implements -no interface. How does Ant know to integrate? Via name convention: our class provides -a method with signature public void execute(). This class is wrapped by Ant's -org.apache.tools.ant.TaskAdapter which is a task and uses reflection for -setting a reference to the project and calling the execute() method.

      - -

      Setting a reference to the project? Could be interesting. The Project class -gives us some nice abilities: access to Ant's logging facilities getting and setting -properties and much more. So we try to use that class:

      -
      +

      Integration with TaskAdapter

      +

      Our class has nothing to do with Ant. It extends no superclass and implements no interface. How does Ant know to +integrate? Via name convention: our class provides a method with signature public void +execute(). This class is wrapped by Ant's org.apache.tools.ant.TaskAdapter which is a +task and uses reflection for setting a reference to the project and calling the execute() +method.

      + +

      Setting a reference to the project? Could be interesting. The Project class gives us some nice abilities: +access to Ant's logging facilities getting and setting properties and much more. So we try to use that class:

      +
       import org.apache.tools.ant.Project;
       
       public class HelloWorld {
      @@ -194,24 +176,19 @@
               String message = project.getProperty("ant.project.name");
               project.log("Here is project '" + message + "'.", Project.MSG_INFO);
           }
      -}
      -
      -and the execution with ant will show us the expected +}
      +

      and the execution with ant will show us the expected

       use:
      -Here is project 'MyTask'.
      -
      - +Here is project 'MyTask'.
      - -

      Deriving from Ant's Task

      -

      Ok, that works ... But usually you will extend org.apache.tools.ant.Task. -That class is integrated in Ant, get's the project-reference, provides documentation -fields, provides easier access to the logging facility and (very useful) gives you -the exact location where in the buildfile this task instance is used.

      +

      Deriving from Ant's Task

      +

      Ok, that works ... But usually you will extend org.apache.tools.ant.Task. That class is +integrated in Ant, gets the project reference, provides documentation fields, provides easier access to the logging +facility and (very useful) gives you the exact location where in the buildfile this task instance is used.

      -

      Oki-doki - let's us use some of these:

      -
      +

      Oki-doki—let's us use some of these:

      +
       import org.apache.tools.ant.Task;
       
       public class HelloWorld extends Task {
      @@ -225,35 +202,33 @@
               // where this task is used?
               log("I am used in: " +  getLocation() );
           }
      -}
      -
      +}

      which gives us when running

       use:
       [helloworld] Here is project 'MyTask'.
      -[helloworld] I am used in: C:\tmp\anttests\MyFirstTask\build.xml:23:
      -
      +[helloworld] I am used in: C:\tmp\anttests\MyFirstTask\build.xml:23: - -

      Accessing the Task's Project

      -

      The parent project of your custom task may be accessed through method getProject(). However, do not call this from the custom task constructor, as the return value will be null. Later, when node attributes or text are set, or method execute() is called, the Project object is available.

      +

      Accessing the Task's Project

      +

      The parent project of your custom task may be accessed through method getProject(). +However, do not call this from the custom task constructor, as the return value will be null. Later, when node +attributes or text are set, or method execute() is called, the Project object is +available.

      Here are two useful methods from class Project:

        -
      • String getProperty(String propertyName)
      • -
      • - String replaceProperties(String value) -
      • +
      • String getProperty(String propertyName)
      • +
      • String replaceProperties(String value)
      -

      The method replaceProperties() is discussed further in section Nested Text.

      +

      The method replaceProperties() is discussed further in section Nested +Text.

      - -

      Attributes

      -

      Now we want to specify the text of our message (it seems that we are -rewriting the <echo/> task :-). First we well do that with an attribute. -It is very easy - for each attribute provide a public void set<attributename>(<type> -newValue) method and Ant will do the rest via reflection.

      -
      +

      Attributes

      +

      Now we want to specify the text of our message (it seems that we are rewriting the <echo/> task +:-). First we well do that with an attribute. It is very easy—for each attribute provide +a public void setAttributename(Type newValue) method and Ant will do the rest +via reflection.

      +
       import org.apache.tools.ant.Task;
       import org.apache.tools.ant.BuildException;
       
      @@ -265,51 +240,48 @@
           }
       
           public void execute() {
      -        if (message==null) {
      +        if (message == null) {
                   throw new BuildException("No message set.");
               }
               log(message);
           }
       
      -}
      -
      -

      Oh, what's that in execute()? Throw a BuildException? Yes, that's the usual -way to show Ant that something important is missed and complete build should fail. The -string provided there is written as build-failes-message. Here it's necessary because -the log() method can't handle a null value as parameter and throws a NullPointerException. -(Of course you can initialize the message with a default string.)

      +}
      +

      Oh, what's that in execute()? Throw a BuildException? Yes, that's the usual +way to show Ant that something important is missed and complete build should fail. The string provided there is written +as build-fails-message. Here it's necessary because the log() method can't handle +a null value as parameter and throws a NullPointerException. (Of course you can initialize +the message with a default string.)

      After that we have to modify our buildfile:

      -
      +
           <target name="use" description="Use the Task" depends="jar">
               <taskdef name="helloworld"
                        classname="HelloWorld"
                        classpath="${ant.project.name}.jar"/>
               <helloworld message="Hello World"/>
      -    </target>
      -
      + </target>

      That's all.

      -

      Some background for working with attributes: Ant supports any of these datatypes as -arguments of the set-method:

        -
      • elementary data type like int, long, ...
      • -
      • its wrapper classes like java.lang.Integer, java.lang.Long, ...
      • -
      • java.lang.String
      • -
      • some more classes (e.g. java.io.File; see - Manual - 'Writing Your Own Task' [3])
      • +

        Some background for working with attributes: Ant supports any of these datatypes as arguments of the set-method:

        +
          +
        • primitive data types like int, long, ...
        • +
        • their wrapper classes like java.lang.Integer, java.lang.Long, +...
        • +
        • java.lang.String
        • +
        • some other classes (e.g. java.io.File; see Manual +'Writing Your Own Task' [3])
        • Any Java Object parsed from Ant 1.8's Property Helper
        -Before calling the set-method all properties are resolved. So a <helloworld message="${msg}"/> -would not set the message string to "${msg}" if there is a property "msg" with a set value. +

        Before calling the set-method all properties are resolved. So a <helloworld message="${msg}"/> +would not set the message string to ${msg} if there is a property msg with a set value.

        - - -

        Nested Text

        -

        Maybe you have used the <echo> task in a way like <echo>Hello World</echo>. -For that you have to provide a public void addText(String text) method.

        -
        +

        Nested Text

        +

        Maybe you have used the <echo> task in a way like <echo>Hello +World</echo>. For that you have to provide a public void addText(String text) +method.

        +
         ...
         public class HelloWorld extends Task {
             private String message;
        @@ -318,46 +290,42 @@
                 message = text;
             }
             ...
        -}
        -
        -

        But here properties are not resolved! For resolving properties we have to use -Project's replaceProperties(String propname) : String method which takes the -property name as argument and returns its value (or ${propname} if not set).

        -

        Thus, to replace properties in the nested node text, our method addText() can be written as:

        -
        +}
        +

        But here properties are not resolved! For resolving properties we have to use +Project's replaceProperties(String propname) method which takes the property name as argument +and returns its value (or ${propname} if not set).

        +

        Thus, to replace properties in the nested node text, our method addText() can be written +as:

        +
             public void addText(String text) {
                 message = getProject().replaceProperties(text);
        -    }
        -
        - + }
        - -

        Nested Elements

        +

        Nested Elements

        There are several ways for inserting the ability of handling nested elements. See -the Manual [4] for other. -We use the first way of the three described ways. There are several steps for that:

          -
        1. We create a class for collecting all the info the nested element should contain. - This class is created by the same rules for attributes and nested elements - as for the task (set<attributename>() methods).
        2. +the Manual [4] for other. We use the first way of the three described +ways. There are several steps for that:

          +
            +
          1. We create a class for collecting all the info the nested element should contain. This class is created by the same +rules for attributes and nested elements as for the task (setAttributename() +methods).
          2. The task holds multiple instances of this class in a list.
          3. -
          4. A factory method instantiates an object, saves the reference in the list - and returns it to Ant Core.
          5. -
          6. The execute() method iterates over the list and evaluates its values.
          7. +
          8. A factory method instantiates an object, saves the reference in the list and returns it to Ant Core.
          9. +
          10. The execute() method iterates over the list and evaluates its values.
          -
          -import java.util.Vector;
          -import java.util.Iterator;
          +
          +import java.util.ArrayList;
          +import java.util.List;
           ...
               public void execute() {
          -        if (message!=null) log(message);
          -        for (Iterator it=messages.iterator(); it.hasNext(); ) {      // 4
          -            Message msg = (Message)it.next();
          +        if (message != null) log(message);
          +        for (Message msg : messages) {      // 4
                       log(msg.getMsg());
                   }
               }
           
           
          -    Vector messages = new Vector();                                  // 2
          +    List<Message> messages = new ArrayList<>();                      // 2
           
               public Message createMessage() {                                 // 3
                   Message msg = new Message();
          @@ -372,26 +340,22 @@
                   public void setMsg(String msg) { this.msg = msg; }
                   public String getMsg() { return msg; }
               }
          -...
          -
          -

          Then we can use the new nested element. But where is xml-name for that defined? -The mapping XML-name : classname is defined in the factory method: -public classname createXML-name(). Therefore we write in -the buildfile

          -
          +...
          +

          Then we can use the new nested element. But where is XML-name for that defined? The mapping XML-name → +classname is defined in the factory method: public classname +createXML-name(). Therefore we write in the buildfile

          +
                   <helloworld>
                       <message msg="Nested Element 1"/>
                       <message msg="Nested Element 2"/>
          -        </helloworld>
          -
          -

          Note that if you choose to use methods 2 or 3, the class that represents the nested -element must be declared as static

          + </helloworld>
          +

          Note that if you choose to use methods 2 or 3, the class that represents the nested element must be declared +as static

          - -

          Our task in a little more complex version

          +

          Our task in a little more complex version

          For recapitulation now a little refactored buildfile:

          -
          -<?xml version="1.0" encoding="ISO-8859-1"?>
          +
          +<?xml version="1.0" encoding="UTF-8"?>
           <project name="MyTask" basedir="." default="use">
           
               <property name="src.dir" value="src"/>
          @@ -457,18 +421,15 @@
           
               <target name="use"
                       description="Try all (w/out use.fail)"
          -            depends="use.without,use.message,use.nestedText,use.nestedElement"
          -    />
          +            depends="use.without,use.message,use.nestedText,use.nestedElement"/>
           
          -</project>
          -
          - -And the code of the task: -
          +</project>
          +

          And the code of the task:

          +
           import org.apache.tools.ant.Task;
           import org.apache.tools.ant.BuildException;
          -import java.util.Vector;
          -import java.util.Iterator;
          +import java.util.ArrayList;
          +import java.util.List;
           
           /**
            * The task of the tutorial.
          @@ -502,18 +463,17 @@
                   if (fail) throw new BuildException("Fail requested.");
           
                   // handle attribute 'message' and nested text
          -        if (message!=null) log(message);
          +        if (message != null) log(message);
           
                   // handle nested elements
          -        for (Iterator it=messages.iterator(); it.hasNext(); ) {
          -            Message msg = (Message)it.next();
          +        for (Message msg : messages) {
                       log(msg.getMsg());
                   }
               }
           
           
               /** Store nested 'message's. */
          -    Vector messages = new Vector();
          +    List<Message> messages = new ArrayList<>();
           
               /** Factory method for creating nested 'message's. */
               public Message createMessage() {
          @@ -533,10 +493,8 @@
                   public String getMsg() { return msg; }
               }
           
          -}
          -
          - -And it works: +}
          +

          And it works:

           C:\tmp\anttests\MyFirstTask>ant
           Buildfile: build.xml
          @@ -585,36 +543,26 @@
           C:\tmp\anttests\MyFirstTask\build.xml:36: Fail requested.
           
           Total time: 1 second
          -C:\tmp\anttests\MyFirstTask>
          -
          -Next step: test ... +C:\tmp\anttests\MyFirstTask> +

          Next step: test ...

          - - - -

          Test the Task

          -

          We have written a test already: the use.* tasks in the buildfile. But its -difficult to test that automatically. Common (and in Ant) used is JUnit for -that. For testing tasks Ant provides a JUnit Rule org.apache.tools.ant.BuildFileRule. -This class provides some for testing tasks useful methods: -initialize Ant, load a buildfile, execute targets, capturing debug and run logs ...

          - -

          In Ant it is usual that the testcase has the same name as the task with a prepending -Test, therefore we will create a file HelloWorldTest.java. Because we -have a very small project we can put this file into src directory (Ant's own -testclasses are in /src/testcases/...). Because we have already written our tests -for "hand-test" we can use that for automatic tests, too. But there is one little -problem we have to solve: all test supporting classes are not part of the binary -distribution of Ant. So you can build the special jar file from source distro with -target "test-jar" or you can download a nightly build from - -http://gump.covalent.net/jars/latest/ant/ant-testutil.jar [5].

          +

          Test the Task

          +

          We have written a test already: the use.* targets in the buildfile. But it's difficult to test that +automatically. Commonly (and in Ant) JUnit is used for that. For testing tasks Ant provides a JUnit +Rule org.apache.tools.ant.BuildFileRule. This class provides some for testing tasks useful +methods: initialize Ant, load a buildfile, execute targets, capture debug and run logs ...

          + +

          In Ant it is usual that the testcase has the same name as the task with a prepended Test, therefore we +will create a file HelloWorldTest.java. Because we have a very small project we can put this file +into src directory (Ant's own testclasses are in /src/testcases/...). Because we have already +written our tests for "hand-test" we can use that for automatic tests, too. All test supporting classes are a part of +the binary distribution of Ant since Ant 1.7.0 in form of ant-testutil.jar. You can also build the +jar file from source distro with target "test-jar".

          For executing the test and creating a report we need the optional tasks <junit> and <junitreport>. So we add to the buildfile:

          -
          -...
          -<project name="MyTask" basedir="." default="test">
          +
          +<project name="MyTask" basedir="." default="test">
           ...
               <property name="ant.test.lib" value="ant-testutil.jar"/>
               <property name="report.dir"   value="report"/>
          @@ -639,10 +587,10 @@
                   </delete>
               </target>
           
          -    <target name="compile" description="Compiles the Task">
          +    <target name="compile" description="Compiles Vector the Task">
                   <mkdir dir="${classes.dir}"/>
          -        <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${ant.test.lib}"/>
          -    </target>
          +        <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${ant.test.lib}"/>
          +    </target>
           ...
               <target name="junit" description="Runs the unit tests" depends="jar">
                   <delete dir="${junit.out.dir.xml}"/>
          @@ -668,17 +616,16 @@
           
               <target name="test"
                       depends="junit,junitreport"
          -            description="Runs unit tests and creates a report"
          -    />
          +            description="Runs unit tests and creates a report"/>
           ...
          -
          +</project>
          -

          Back to the src/HelloWorldTest.java. We create a class with a public -BuildFileRule field annotated with JUnit's @Rule annotation. As per -conventional JUnit4 tests, this class should have no constructors, or a default no-args -constructor, setup methods should be annotated with @Before, tear down methods -annotated with @After and any test method annotated with @Test. -

          +

          Back to the src/HelloWorldTest.java. We create a class with a +public BuildFileRule field annotated with JUnit's @Rule +annotation. As per conventional JUnit4 tests, this class should have no constructors, nor a default no-args constructor, +setup methods should be annotated with @Before, tear down methods annotated +with @After and any test method annotated with @Test. +

           import org.apache.tools.ant.BuildFileRule;
           import org.junit.Assert;
           import org.junit.Test;
          @@ -736,11 +683,9 @@
                   AntAssert.assertContains("Nested Element 1", buildRule.getLog());
                   AntAssert.assertContains("Nested Element 2", buildRule.getLog());
               }
          -}
          -
          +}
          -

          When starting ant we'll get a short message to STDOUT and -a nice HTML-report.

          +

          When starting ant we'll get a short message to STDOUT and a nice HTML report.

           C:\tmp\anttests\MyFirstTask>ant
           Buildfile: build.xml
          @@ -768,30 +713,29 @@
           
           BUILD SUCCESSFUL
           Total time: 7 seconds
          -C:\tmp\anttests\MyFirstTask>
          -
          +C:\tmp\anttests\MyFirstTask> +

          Debugging

          - -

          Debugging

          - -

          Try running Ant with the flag -verbose. For more information, try flag -debug.

          -

          For deeper issues, you may need to run the custom task code in a Java debugger. First, get the source for Ant and build it with debugging information.

          -

          Since Ant is a large project, it can be a little tricky to set the right breakpoints. Here are two important breakpoints for version 1.8:

          +

          Try running Ant with the flag -verbose. For more information, try flag -debug.

          +

          For deeper issues, you may need to run the custom task code in a Java debugger. First, get the source for Ant and +build it with debugging information.

          +

          Since Ant is a large project, it can be a little tricky to set the right breakpoints. Here are two important +breakpoints for version 1.8:

            -
          • Initial main() function: com.apache.tools.ant.launch.Launcher.main()
          • -
          • Task entry point: com.apache.tools.ant.UnknownElement.execute()
          • +
          • Initial main() + function: com.apache.tools.ant.launch.Launcher.main()
          • +
          • Task entry point: com.apache.tools.ant.UnknownElement.execute()
          -

          If you need to debug when a task attribute or the text is set, begin by debugging into method execute() of your custom task. Then set breakpoints in other methods. This will ensure the class byte-code has been loaded by the Java VM.

          - - - - -

          Resources

          -

          This tutorial and its resources are available via -BugZilla [6]. -The ZIP provided there contains

            +

            If you need to debug when a task attribute or the text is set, begin by debugging into +method execute() of your custom task. Then set breakpoints in other methods. This will +ensure the class bytecode has been loaded by JVM.

            + +

            Resources

            +

            This tutorial and its resources are available via BugZilla [5]. The ZIP provided there contains

            +
            • this initial version of this tutorial
            • the buildfile (last version)
            • the source of the task (last version)
            • @@ -801,19 +745,19 @@
            • generated jar
            • generated reports
            -

            The last sources and the buildfile are also available -here [7] inside the manual. -

            - -

            Used Links:
            -  [1] http://ant.apache.org/manual/properties.html#built-in-props
            -  [2] http://ant.apache.org/manual/Tasks/taskdef.html
            -  [3] http://ant.apache.org/manual/develop.html#set-magic
            -  [4] http://ant.apache.org/manual/develop.html#nested-elements
            -  [5] http://gump.covalent.net/jars/latest/ant/ant-testutil.jar
            -  [6] http://issues.apache.org/bugzilla/show_bug.cgi?id=22570
            -  [7] tutorial-writing-tasks-src.zip
            -

            +

            The last sources and the buildfile are also available here [6] inside +the manual.

            + +

            Used Links:

            +
              +
            1. https://ant.apache.org/manual/properties.html#built-in-props
            2. +
            3. https://ant.apache.org/manual/Tasks/taskdef.html
            4. +
            5. https://ant.apache.org/manual/develop.html#set-magic
            6. +
            7. https://ant.apache.org/manual/develop.html#nested-elements
            8. +
            9. https://issues.apache.org/bugzilla/show_bug.cgi?id=22570
            10. +
            11. tutorial-writing-tasks-src.zip
            12. +
            diff -Nru ant-1.9.10/manual/Types/antlib.html ant-1.10.3/manual/Types/antlib.html --- ant-1.9.10/manual/Types/antlib.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/antlib.html 2018-03-24 12:37:12.000000000 +0000 @@ -17,250 +17,201 @@ - + AntLib -

            Antlib

            - +

            Antlib

            Description

            - An antlib file is an xml file with a root element of "antlib". - Antlib's elements are Apache Ant definition tasks - like - Taskdef - or any Ant task that extends - org.apache.tools.ant.taskdefs.AntlibDefinition. -

            -

            - The current set of declarations bundled with Ant that do this are: -

            -
              -
            1. Typedef -
            2. -
            3. Taskdef -
            4. -
            5. Macrodef -
            6. -
            7. Presetdef -
            8. -
            9. Scriptdef -
            10. -
            + An antlib file is an xml file with a root element of antlib. Antlib's elements + are Apache Ant definition tasks—like Taskdef or any + Ant task that + extends org.apache.tools.ant.taskdefs.AntlibDefinition. +

            +

            + The current set of declarations bundled with Ant that do this are: +

            +
              +
            1. Typedef
            2. +
            3. Taskdef
            4. +
            5. Macrodef
            6. +
            7. Presetdef
            8. +
            9. Scriptdef
            10. +

            - A group of tasks and types may be defined together in an antlib - file. For example the file sample.xml contains the following: + A group of tasks and types may be defined together in an antlib file. For example the + file sample.xml contains the following:

            -
            -
            +    
             <?xml version="1.0"?>
             <antlib>
            -   <typedef name="if" classname="org.acme.ant.If"/>
            -   <typedef name="scriptpathmapper"
            -            classname="org.acme.ant.ScriptPathMapper"
            -            onerror="ignore"/>
            -   <macrodef name="print">
            -      <attribute name="file"/>
            -      <sequential>
            -         <concat taskname="print">
            -            <fileset dir="." includes="@{file}"/>
            -         </concat>
            -      </sequential>
            -   </macrodef>
            -</antlib>
            -      
            -
            -

            - It defines two types or tasks, if and scriptpathmapper. - This antlib file may be used in a build script as follows: -

            -
            -
            -<typedef file="sample.xml"/>
            -      
            -
            -

            - The other attributes of <typedef> may be used as well. - For example, assuming that the sample.xml is in a jar - file sample.jar also containing the classes, the - following build fragment will define the if and scriptpathmapper - tasks/types and place them in the namespace uri samples:/acme.org. + <typedef name="if" classname="org.acme.ant.If"/> + <typedef name="scriptpathmapper" + classname="org.acme.ant.ScriptPathMapper" + onerror="ignore"/> + <macrodef name="print"> + <attribute name="file"/> + <sequential> + <concat taskname="print"> + <fileset dir="." includes="@{file}"/> + </concat> + </sequential> + </macrodef> +</antlib> +

            + It defines two types or tasks, if and scriptpathmapper. This + antlib file may be used in a build script as follows: +

            +
            <typedef file="sample.xml"/>
            +

            + The other attributes of <typedef> may be used as well. For example, + assuming that the sample.xml is in a jar file sample.jar also + containing the classes, the following build fragment will define the if + and scriptpathmapper tasks/types and place them in the namespace + uri samples:/acme.org.

            -
            -
            +    
             <typedef resource="org/acme/ant/sample.xml"
            -         uri="samples:/acme.org"/>
            -      
            -
            + uri="samples:/acme.org"/>

            The definitions may then be used as follows:

            -
            -
            +    
             <sample:if valuetrue="${props}" xmlns:sample="samples:/acme.org">
            -   <sample:scriptpathmapper language="beanshell">
            -      some bean shell
            -   </sample:scriptpathmapper>
            -</sample:if>
            -      
            -
            - + <sample:scriptpathmapper language="beanshell"> + some bean shell + </sample:scriptpathmapper> +</sample:if> -

            Antlib namespace

            +

            Antlib namespace

            - The name space URIs with the pattern antlib:java package - are given special treatment. + The name space URIs with the pattern antlib:java.package are given + special treatment.

            - When Ant encounters a element with a namespace URI with this pattern, it - will check to see if there is a resource of the name antlib.xml in - the package directory in the default classpath. + When Ant encounters a element with a namespace URI with this pattern, it will check to see + if there is a resource of the name antlib.xml in the package directory in the + default classpath.

            - For example, assuming that the file antcontrib.jar has been placed - in the directory ${ant.home}/lib and it contains the resource - net/sf/antcontrib/antlib.xml which has all antcontrib's definitions - defined, the following build file will automatically load the antcontrib - definitions at location HERE: + For example, assuming that the file antcontrib.jar has been placed in the + directory ${ant.home}/lib and it contains the + resource net/sf/antcontrib/antlib.xml which has all antcontrib's definitions + defined, the following build file will automatically load the antcontrib definitions at + location HERE:

            -
            -
            +    
             <project default="deletetest" xmlns:antcontrib="antlib:net.sf.antcontrib">
            -   <macrodef name="showdir">
            -      <attribute name="dir"/>
            -      <sequential>
            -         <antcontrib:shellscript shell="bash">  <!-- HERE -->
            -            ls -Rl @{dir}
            -         </antcontrib:shellscript>
            -      </sequential>
            -   </macrodef>
            -
            -   <target name="deletetest">
            -      <delete dir="a" quiet="yes"/>
            -      <mkdir dir="a/b"/>
            -      <touch file="a/a.txt"/>
            -      <touch file="a/b/b.txt"/>
            -      <delete>
            -         <fileset dir="a"/>
            -      </delete>
            -      <showdir dir="a"/>
            -   </target>
            -</project>
            -      
            -
            -

            - The requirement that the resource is in the default classpath - may be removed in future versions of Ant.

            -

            - - -

            Load antlib from inside of the buildfile

            -

            - If you want to separate the antlib from your local Ant installation, e.g. because you - want to hold that jar in your projects SCM system, you have to specify a classpath, so - that Ant could find that jar. The best solution is loading the antlib with <taskdef>. -

            -
            -
            -<project xmlns:antcontrib="antlib:net.sf.antcontrib">
            -   <taskdef uri="antlib:net.sf.antcontrib"
            -            resource="net/sf/antcontrib/antlib.xml"
            -            classpath="path/to/ant-contrib.jar"/>
            -   
            -   <target name="iterate">
            -      <antcontrib:for param="file">
            -         <fileset dir="."/>
            -         <sequential>
            -            <echo message="- @{file}"/>
            -         </sequential>
            -      </antcontrib:for>
            -   </target>
            -</project>
            -      
            -
            - - - - -

            Current namespace

            -

            - Definitions defined in antlibs may be used in antlibs. However - the namespace that definitions are placed in are dependent on - the <typedef> that uses the antlib. To deal with this - problem, the definitions are placed in the namespace URI ant:current - for the duration of the antlib execution. - For example the following antlib defines the task <if>, the - type <isallowed> and a macro - <ifallowed> that makes use of the task and type: + <macrodef name="showdir"> + <attribute name="dir"/> + <sequential> + <antcontrib:shellscript shell="bash"> <!-- HERE --> + ls -Rl @{dir} + </antcontrib:shellscript> + </sequential> + </macrodef> + + <target name="deletetest"> + <delete dir="a" quiet="yes"/> + <mkdir dir="a/b"/> + <touch file="a/a.txt"/> + <touch file="a/b/b.txt"/> + <delete> + <fileset dir="a"/> + </delete> + <showdir dir="a"/> + </target> +</project> +

            + The requirement that the resource is in the default classpath may be removed in future + versions of Ant. +

            +

            Load antlib from inside of the buildfile

            +

            + If you want to separate the antlib from your local Ant installation, e.g. because you want + to hold that jar in your project's SCM system, you have to specify a classpath, so that + Ant could find that jar. The best solution is loading the antlib + with <taskdef>. +

            +
            +<project xmlns:antcontrib="antlib:net.sf.antcontrib">
            +    <taskdef uri="antlib:net.sf.antcontrib"
            +             resource="net/sf/antcontrib/antlib.xml"
            +             classpath="path/to/ant-contrib.jar"/>
            +
            +    <target name="iterate">
            +        <antcontrib:for param="file">
            +            <fileset dir="."/>
            +            <sequential>
            +                <echo message="- @{file}"/>
            +            </sequential>
            +        </antcontrib:for>
            +    </target>
            +</project>
            +

            Current namespace

            +

            + Definitions defined in antlibs may be used in antlibs. However, the namespace that + definitions are placed in are dependent on the <typedef> that uses the + antlib. To deal with this problem, the definitions are placed in the namespace + URI ant:current for the duration of the antlib execution. For example, the + following antlib defines the task <if>, the + type <isallowed> and a macro <ifallowed> that makes + use of the task and type:

            -
            -
            +    
             <antlib xmlns:current="ant:current">
            -   <taskdef name="if" classname="org.acme.ant.If"/>
            -   <typedef name="isallowed" classname="org.acme.ant.Isallowed"/>
            -   <macrodef name="ifallowed">
            -      <attribute name="action"/>
            -      <element name="do"/>
            -      <sequential>
            -         <current:if>
            -            <current:isallowed test="@{action}"/>
            -            <current:then>
            -               <do/>
            -            </current:then>
            -         </current:if>
            -      </sequential>
            -   </macrodef>
            -</antlib>
            -      
            -
            - - + <taskdef name="if" classname="org.acme.ant.If"/> + <typedef name="isallowed" classname="org.acme.ant.Isallowed"/> + <macrodef name="ifallowed"> + <attribute name="action"/> + <element name="do"/> + <sequential> + <current:if> + <current:isallowed test="@{action}"/> + <current:then> + <do/> + </current:then> + </current:if> + </sequential> + </macrodef> +</antlib>

            Other examples and comments

            Antlibs may make use of other antlibs.

            - As the names defined in the antlib are in the namespace uri as - specified by the calling <typedef> or by automatic element - resolution, one may reuse names from core ant types and tasks, - provided the caller uses a namespace uri. For example, the - following antlib may be used to define defaults for various - tasks: + As the names defined in the antlib are in the namespace URI as specified by the + calling <typedef> or by automatic element resolution, one may reuse + names from core Ant types and tasks, provided the caller uses a namespace URI. For + example, the following antlib may be used to define defaults for various tasks:

            -
            -
            +    
             <antlib xmlns:antcontrib="antlib:net.sf.antcontrib">
            -   <presetdef name="javac">
            -      <javac deprecation="${deprecation}"
            -             debug="${debug}"/>
            -   </presetdef>
            -   <presetdef name="delete">
            -      <delete quiet="yes"/>
            -   </presetdef>
            -   <presetdef name="shellscript">
            -      <antcontrib:shellscript shell="bash"/>
            -   </presetdef>
            -</antlib>
            -      
            -
            + <presetdef name="javac"> + <javac deprecation="${deprecation}" + debug="${debug}"/> + </presetdef> + <presetdef name="delete"> + <delete quiet="yes"/> + </presetdef> + <presetdef name="shellscript"> + <antcontrib:shellscript shell="bash"/> + </presetdef> +</antlib>

            This may be used as follows:

            -
            -
            +    
             <project xmlns:local="localpresets">
            -   <typedef file="localpresets.xml" uri="localpresets"/>
            -   <local:shellscript>
            -      echo "hello world"
            -   </local:shellscript>
            -</project>
            -      
            -
            - - + <typedef file="localpresets.xml" uri="localpresets"/> + <local:shellscript> + echo "hello world" + </local:shellscript> +</project> - diff -Nru ant-1.9.10/manual/Types/assertions.html ant-1.10.3/manual/Types/assertions.html --- ant-1.9.10/manual/Types/assertions.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/assertions.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,185 +24,165 @@ -

            Assertions

            +

            Assertions

            -The assertions type enables or disables the Java 1.4 assertions feature, -on a whole Java program, or components of a program. It can be used -in <java> and -<junit> to add extra validation to code. - -

            -Assertions are covered in the -Java SE documentation, -and the -Java Language Specification. - -

            -The key points to note are that a java.lang.AssertionError -is thrown when an assertion fails, and that the facility is only available -on Java 1.4 and later. To enable assertions one must set source="1.4" -(or later) in <javac> when the source is being compiled, and -that the code must contain assert statements to be tested. The -result of such an action is code that neither compiles or runs on earlier -versions of Java. For this reason Apache Ant itself currently contains no assertions. -

            - -When assertions are enabled (or disabled) in a task through nested -assertions elements, the class loader or command line is modified with the -appropriate options. This means that the JVM executed must be a Java 1.4 -or later JVM, even if there are no assertions in the code. Attempting to -enable assertions on earlier VMs will result in an "Unrecognized option" -error and the JVM will not start. +The assertions type enables or disables the Java 1.4 assertions feature, on a whole +Java program, or components of a program. It can be used +in <java> +and <junit> to add extra validation to code.

            -

            Attributes

            -

            +Assertions are covered in +the Java SE documentation, and +the Java Language Specification. +

            +The key points to note are that a java.lang.AssertionError is thrown when an assertion +fails, and that the facility is only available on Java 1.4 and later. To enable assertions one must +set source=1.4 (or later) in <javac> when the source is being +compiled, and that the code must contain assert statements to be tested. The result of +such an action is code that neither compiles or runs on earlier versions of Java. For this reason +Apache Ant itself currently contains no assertions. +

            +

            +When assertions are enabled (or disabled) in a task through nested assertions elements, the class +loader or command line is modified with the appropriate options. This means that the JVM executed +must be of version 1.4 or later, even if there are no assertions in the code. Attempting to enable +assertions on earlier JVMs will result in an "Unrecognized option" error and the JVM will not start.

            - + +

            Attributes

            +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            enableSystemAssertionsFlag to turn system assertions on or off.No; default is "unspecified"enableSystemAssertionsFlag to turn system assertions on or off.No; default is unspecified

            -When system assertions have been neither enabled nor disabled, then -the JVM is not given any assertion information - the default action of the - current JVMs is to disable system assertions. +When system assertions have been neither enabled nor disabled, then the JVM is not given any +assertion information—the default action of the current JVMs is to disable system assertions. +

            -Note also that there is no apparent documentation for what parts of the -JRE come with useful assertions. +Note also that there is no apparent documentation for what parts of the JRE come with useful +assertions. +

            Nested elements

            enable

            -Enable assertions in portions of code. -If neither a package nor class is specified, assertions are turned on in all (user) code. +Enable assertions in portions of code. If neither a package nor class is specified, assertions are +turned on in all (user) code.

            - +
            - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            classThe name of a class on which to enable assertions.NoclassThe name of a class on which to enable assertions.No
            package - The name of a package in which to enable assertions on all classes. (Includes subpackages.) - Use "..." for the anonymous package. - NopackageThe name of a package in which to enable assertions on all classes. (Includes subpackages.) + Use ... for the anonymous package.No

            disable

            Disable assertions in portions of code. -

            - +
            - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            classThe name of a class on which to disable assertions.NoclassThe name of a class on which to disable assertions.No
            package - The name of a package in which to disable assertions on all classes. (Includes subpackages.) - Use "..." for the anonymous package. - NopackageThe name of a package in which to disable assertions on all classes. (Includes subpackages.) + Use ... for the anonymous package.No

            - -Because assertions are disabled by default, it only makes sense to disable -assertions where they have been enabled in a parent package. - - +Because assertions are disabled by default, it only makes sense to disable assertions where they +have been enabled in a parent package. +

            Examples

            Example: enable assertions in all user classes
            -All classes not in the JRE (i.e. all non-system classes) will have assertions turned on. +

            All classes not in the JRE (i.e. all non-system classes) will have assertions turned on.

             <assertions>
               <enable/>
            -</assertions>
            -
            +</assertions>
            Example: enable a single class
            -Enable assertions in a class called Test +

            Enable assertions in a class called Test

             <assertions>
               <enable class="Test"/>
            -</assertions>
            -
            +</assertions>
            Example: enable a package
            -Enable assertions in the org.apache package -and all packages starting with the org.apache. prefix +

            Enable assertions in the org.apache package and all packages starting with +the org.apache. prefix

             <assertions>
               <enable package="org.apache"/>
            -</assertions>
            -
            +</assertions>
            Example: System assertions
            -Example: enable system assertions and assertions in all org.apache packages except -for Ant (but including org.apache.tools.ant.Main) +

            Enable system assertions and assertions in all org.apache packages except for Ant +(but including org.apache.tools.ant.Main)

             <assertions enableSystemAssertions="true">
               <enable package="org.apache"/>
               <disable package="org.apache.tools.ant"/>
               <enable class="org.apache.tools.ant.Main"/>
            -</assertions>
            -
            +</assertions>
            Example: disabled and anonymous package assertions
            -Disable system assertions; enable those in the anonymous package +

            Disable system assertions; enable those in the anonymous package

             <assertions enableSystemAssertions="false">
               <enable package="..."/>
            -</assertions>
            -
            - +</assertions>
            Example: referenced assertions
            -This type is a datatype, so you can declare assertions and use them later - +

            This type is a datatype, so you can declare assertions and use them later

             <assertions id="project.assertions">
               <enable package="org.apache.test"/>
             </assertions>
             
            -<assertions refid="project.assertions"/>
            -
            - +<assertions refid="project.assertions"/> diff -Nru ant-1.9.10/manual/Types/classfileset.html ant-1.10.3/manual/Types/classfileset.html --- ant-1.9.10/manual/Types/classfileset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/classfileset.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,98 +22,92 @@ -

            ClassFileSet

            -

            A classfileset is a specialized type of fileset which, given a set of -"root" classes, will include all of the class files upon which the -root classes depend. This is typically used to create a jar with all of the -required classes for a particular application. +

            ClassFileSet

            +

            A classfileset is a specialized type of fileset which, given a set of "root" +classes, will include all of the class files upon which the root classes depend. This is +typically used to create a jar with all of the required classes for a particular application.

            -classfilesets are typically used by reference. They are declared with an -"id" value and this is then used as a reference where a normal fileset -is expected. +classfilesets are typically used by reference. They are declared with an id value and +this is then used as a reference where a normal fileset is expected.

            -This type requires the BCEL library. +This type requires +the BCEL library.

            -

            Attributes

            -

            The class fileset support the following attributes in addition -to those supported by the -standard fileset: +

            +The class fileset support the following attributes in addition to those supported by +the standard fileset:

            - - + +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            rootclassA single root class nameNorootclassA single root class nameNo
            -

            Nested Elements

            +

            Nested elements

            Root

            When more than one root class is required, multiple nested <root> elements may be used

            - +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            classnameThe fully qualified name of the root classYesclassnameThe fully qualified name of the root classYes

            RootFileSet

            -A root fileset is used to add a set of root classes from a fileset. In this case the entries in -the fileset are expected to be Java class files. The name of the Java class is determined by the -relative location of the classfile in the fileset. So, the file -org/apache/tools/ant/Project.class corresponds to the Java class -org.apache.tools.ant.Project.

            +A root fileset is used to add a set of root classes from a fileset. In this case the entries in the +fileset are expected to be Java class files. The name of the Java class is determined by the +relative location of the classfile in the fileset. So, the +file org/apache/tools/ant/Project.class corresponds to the Java +class org.apache.tools.ant.Project.

            Examples

            -
            +
             <classfileset id="reqdClasses" dir="${classes.dir}">
               <root classname="org.apache.tools.ant.Project"/>
            -</classfileset>
            -
            - -

            This example creates a fileset containing all the class files upon which the -org.apache.tools.ant.Project class depends. This fileset could -then be used to create a jar. +</classfileset> +

            +This example creates a fileset containing all the class files upon which +the org.apache.tools.ant.Project class depends. This fileset could then be +used to create a jar.

            -
            +
             <jar destfile="minimal.jar">
               <fileset refid="reqdClasses"/>
            -</jar>
            -
            +</jar> -
            +
             <classfileset id="reqdClasses" dir="${classes.dir}">
               <rootfileset dir="${classes.dir}" includes="org/apache/tools/ant/Project*.class"/>
            -</classfileset>
            -
            - -

            This example constructs the classfileset using all the class with names starting with Project -in the org.apache.tools.ant package

            - - +</classfileset> +

            +This example constructs the classfileset using all the class with names starting +with Project in the org.apache.tools.ant +package. +

            - diff -Nru ant-1.9.10/manual/Types/custom-programming.html ant-1.10.3/manual/Types/custom-programming.html --- ant-1.9.10/manual/Types/custom-programming.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/custom-programming.html 2018-03-24 12:37:12.000000000 +0000 @@ -16,56 +16,51 @@ --> - - -Custom Components + + + Custom Components

            Custom Components

            Overview

            - Custom components are conditions, selectors, filters and other - objects that are defined outside Apache Ant core. + Custom components are conditions, selectors, filters and other objects that are defined + outside Apache Ant core.

            - In Ant 1.6 custom conditions, selectors and filters has - been overhauled. + In Ant 1.6 custom conditions, selectors and filters has been overhauled.

            - It is now possible to define custom conditions, selectors and filters - that behave like Ant Core components. - This is achieved by allowing datatypes defined in build scripts - to be used as custom components if the class of the datatype - is compatible, or has been adapted by an adapter class. + It is now possible to define custom conditions, selectors and filters that behave like Ant + Core components. This is achieved by allowing datatypes defined in build scripts to be used + as custom components if the class of the datatype is compatible, or has been adapted by an + adapter class.

            The old methods of defining custom components are still supported.

            -

            Definition and use

            +

            Definition and Use

            - A custom component is a normal Java class that implements a particular - interface or extends a particular class, or has been adapted to the - interface or class. + A custom component is a normal Java class that implements a particular interface or extends a + particular class, or has been adapted to the interface or class.

            - It is exactly like writing a - custom task. - One defines attributes and nested elements by writing setter - methods and add methods. + It is exactly like writing a custom task. One + defines attributes and nested elements by writing setter methods and add + methods.

            - After the class has been written, it is added to the ant system - by using <typedef>. + After the class has been written, it is added to the ant system by + using <typedef>.

            -

            Custom Conditions

            +

            Custom Conditions

            - Custom conditions are datatypes that implement - org.apache.tools.ant.taskdefs.condition.Condition. - For example a custom condition that returns true if a - string is all upper case could be written as: + Custom conditions are datatypes that + implement org.apache.tools.ant.taskdefs.condition.Condition. For + example a custom condition that returns true if a string is all upper case could be written + as:

            -
            -
            +    
             package com.mydomain;
             
             import org.apache.tools.ant.BuildException;
            @@ -85,120 +80,90 @@
                         throw new BuildException("value attribute is not set");
                     }
                     return value.toUpperCase().equals(value);
            -   }
            -}
            -      
            -
            - + } +}

            - Adding the condition to the system is achieved as follows: + Adding the condition to the system is achieved as follows:

            -
            -
            +    
             <typedef
                 name="alluppercase"
                 classname="com.mydomain.AllUpperCaseCondition"
            -    classpath="${mydomain.classes}"/>
            -      
            -
            + classpath="${mydomain.classes}"/>

            - This condition can now be used wherever a Core Ant condition - is used. + This condition can now be used wherever a Core Ant condition is used.

            -
            -
            +    
             <condition property="allupper">
            -   <alluppercase value="THIS IS ALL UPPER CASE"/>
            -</condition>
            -      
            -
            -

            Custom Selectors

            -

            - Custom selectors are datatypes that implement - org.apache.tools.ant.types.selectors.FileSelector. -

            -

            There is only one method required. - public boolean isSelected(File basedir, String filename, - File file). - It returns true - or false depending on whether the given file should be - selected or not. + <alluppercase value="THIS IS ALL UPPER CASE"/> +</condition> +

            Custom Selectors

            +

            + Custom selectors are datatypes that + implement org.apache.tools.ant.types.selectors.FileSelector. +

            +

            + There is only one method required, public boolean isSelected(File basedir, + String filename, File file). It returns true or false depending on whether the given + file should be selected or not.

            An example of a custom selection that selects filenames ending - in ".java" would be: + in .java would be:

            -
            -
            +    
             package com.mydomain;
             import java.io.File;
             import org.apache.tools.ant.types.selectors.FileSelector;
             public class JavaSelector implements FileSelector {
                 public boolean isSelected(File b, String filename, File f) {
            -       return filename.toLowerCase().endsWith(".java");
            +        return filename.toLowerCase().endsWith(".java");
                 }
            -}
            -      
            -
            +}

            Adding the selector to the system is achieved as follows:

            -
            -
            +    
             <typedef
                 name="javaselector"
                 classname="com.mydomain.JavaSelector"
            -    classpath="${mydomain.classes}"/>
            -      
            -
            -

            - This selector can now be used wherever a Core Ant selector - is used, for example: + classpath="${mydomain.classes}"/> +

            + This selector can now be used wherever a Core Ant selector is used, for example:

            -
            -
            +    
             <copy todir="to">
            -   <fileset dir="src">
            -      <javaselector/>
            -   </fileset>
            -</copy>
            -      
            -
            - -

            - One may use - org.apache.tools.ant.types.selectors.BaseSelector, - a convenience class that provides reasonable default - behaviour. - It has 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 - isSelected() method call validate() and - a BuildException will be thrown with the contents of your error - message. The validate() method also gives you a - last chance to check your settings for consistency because it - calls verifySettings(). Override this method and - call setError() within it if you detect any - problems in how your selector is set up. -

            -

            - To write custom selector containers one should extend - org.apache.tools.ant.types.selectors.BaseSelectorContainer. - Implement the - public boolean isSelected(File baseDir, String filename, File file) - method to do the right thing. Chances are you'll want to iterate - over the selectors under you, so use - selectorElements() to get an iterator that will do - that. -

            -

            - For example to create a selector container that will select files - if a certain number of contained selectors select, one could write - a selector as follows: + <fileset dir="src"> + <javaselector/> + </fileset> +</copy> +

            + One may use org.apache.tools.ant.types.selectors.BaseSelector, a + convenience class that provides reasonable default behaviour. It has 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 isSelected() method call validate() + and a BuildException will be thrown with the contents of your error + message. The validate() method also gives you a last chance to check + your settings for consistency because it + calls verifySettings(). Override this method and + call setError() within it if you detect any problems in how your + selector is set up. +

            +

            + To write custom selector containers one should + extend org.apache.tools.ant.types.selectors.BaseSelectorContainer. + Implement the public boolean isSelected(File baseDir, String filename, File + file) method to do the right thing. Chances are you'll want to iterate over the + selectors under you, so use selectorElements() to get an iterator + that will do that. +

            +

            + For example to create a selector container that will select files if a certain number of + contained selectors select, one could write a selector as follows:

            -
            -
            +    
             public class MatchNumberSelectors extends BaseSelectorContainer {
                 private int number = -1;
                 public void setNumber(int number) {
            @@ -220,196 +185,167 @@
                     }
                     return numberSelected == number;
                 }
            -}
            -      
            -
            +}

            To define and use this selector one could do:

            -
            -
            +    
             <typedef name="numberselected"
                      classname="com.mydomain.MatchNumberSelectors"/>
             ...
             <fileset dir="${src.path}">
            -   <numberselected number="2">
            -      <contains text="script" casesensitive="no"/>
            -      <size value="4" units="Ki" when="more"/>
            -      <javaselector/>
            -   </numberselected>
            -</fileset>
            -      
            -
            + <numberselected number="2"> + <contains text="script" casesensitive="no"/> + <size value="4" units="Ki" when="more"/> + <javaselector/> + </numberselected> +</fileset>

            - The custom selector + The custom selector

            - The custom selector was the pre ant 1.6 way of defining custom selectors. - This method is still supported for backward compatibility. + The custom selector was the pre Ant 1.6 way of defining custom selectors. This method is + still supported for backward compatibility.

            -

            You can write your own selectors and use them within the selector - containers by specifying them within the <custom> tag.

            - -

            To create a new Custom Selector, you have to create a class that - implements - org.apache.tools.ant.types.selectors.ExtendFileSelector. - The easiest way to do that is through the convenience base class - org.apache.tools.ant.types.selectors.BaseExtendSelector, - which provides all of the methods for supporting - <param> tags. First, override the - isSelected() method, and optionally the - verifySettings() method. If your custom - selector requires parameters to be set, you can also override - the setParameters() 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.

            - - -

            Once that is written, you include it in your build file by using +

            + You can write your own selectors and use them within the selector containers by specifying + them within the <custom> tag. +

            +

            + To create a new Custom Selector, you have to create a class that + implements org.apache.tools.ant.types.selectors.ExtendFileSelector. + The easiest way to do that is through the convenience base + class org.apache.tools.ant.types.selectors.BaseExtendSelector, which + provides all of the methods for supporting <param> tags. First, override + the isSelected() method, and optionally + the verifySettings() method. If your custom selector requires + parameters to be set, you can also override the setParameters() + 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. +

            +

            + Once that is written, you include it in your build file by using the <custom> tag.

            - +
            - - - + + + - - + - + - - + - + - - + - +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            classnameThe name of your class that implements - org.apache.tools.ant.types.selectors.FileSelector. + classname + The name of your class that + implements org.apache.tools.ant.types.selectors.FileSelector. YesYes
            classpathThe classpath to use in order to load the - custom selector class. If neither this classpath nor the - classpathref are specified, the class will be + classpath + The classpath to use in order to load the custom selector class. If + neither classpath nor classpathref are specified, the class will be loaded from the classpath that Ant uses. NoNo
            classpathrefA 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. + classpathref + A reference to a classpath previously defined. If neither classpathref + nor classpath above are specified, the class will be loaded from the classpath + that Ant uses. NoNo
            -

            Here is how you use <custom> to - use your class as a selector: +

            + Here is how you use <custom> to use your class as a selector:

            - -
            +    
             <fileset dir="${mydir}" includes="**/*">
                 <custom classname="com.mydomain.MySelector">
                     <param name="myattribute" value="myvalue"/>
                 </custom>
            -</fileset>
            -      
            - - -

            The core selectors that can also be used as custom selectors - are

            +</fileset> +

            The core selectors that can also be used as custom selectors are

            • Contains Selector with - classname org.apache.tools.ant.types.selectors.ContainsSelector -
            • + classname org.apache.tools.ant.types.selectors.ContainsSelector
            • Date Selector with - classname org.apache.tools.ant.types.selectors.DateSelector -
            • + classname org.apache.tools.ant.types.selectors.DateSelector
            • Depth Selector with - classname org.apache.tools.ant.types.selectors.DepthSelector -
            • + classname org.apache.tools.ant.types.selectors.DepthSelector
            • Filename Selector with - classname org.apache.tools.ant.types.selectors.FilenameSelector -
            • + classname org.apache.tools.ant.types.selectors.FilenameSelector
            • Size Selector with - classname org.apache.tools.ant.types.selectors.SizeSelector -
            • + classname org.apache.tools.ant.types.selectors.SizeSelector
            -

            Here is the example from the Depth Selector section rewritten - to use the selector through <custom>.

            - -
            +    

            + Here is the example from the Depth Selector section rewritten to use the selector + through <custom>. +

            +
             <fileset dir="${doc.path}" includes="**/*">
                 <custom classname="org.apache.tools.ant.types.selectors.DepthSelector">
                     <param name="max" value="1"/>
                 </custom>
            -</fileset>
            -      
            +</fileset> +

            Selects all files in the base directory and one directory below that.

            -

            Selects all files in the base directory and one directory below - that.

            - -

            Custom Filter Readers

            +

            Custom Filter Readers

            - Custom filter readers selectors are datatypes that implement - org.apache.tools.ant.types.filters.ChainableReader. + Custom filter readers selectors are datatypes that + implement org.apache.tools.ant.types.filters.ChainableReader.

            -

            There is only one method required. - Reader chain(Reader reader). - This returns a reader that filters input from the specified - reader. +

            + There is only one method required, Reader chain(Reader reader). + This returns a reader that filters input from the specified reader.

            - For example a filterreader that removes every second character - could be: + For example a filterreader that removes every second character could be:

            -
            -
            +    
             public class RemoveOddCharacters implements ChainableReader {
            -   public Reader chain(Reader reader) {
            -      return new BaseFilterReader(reader) {
            -          int count = 0;
            -          public int read() throws IOException {
            -              while (true) {
            -                int c = in.read();
            -                if (c == -1) {
            -                    return c;
            +    public Reader chain(Reader reader) {
            +        return new BaseFilterReader(reader) {
            +            int count = 0;
            +            public int read() throws IOException {
            +                while (true) {
            +                    int c = in.read();
            +                    if (c == -1) {
            +                        return c;
            +                    }
            +                    count++;
            +                    if ((count % 2) == 1) {
            +                        return c;
            +                    }
                             }
            -                count++;
            -                if ((count % 2) == 1) {
            -                    return c;
            -                }
            -              }
            -          }
            -      }
            -   }
            -}
            -      
            -
            -

            - For line oriented filters it may be easier to extend - ChainableFilterReader an inner class of - org.apache.tools.ant.filters.TokenFilter. + } + } + } +} +

            + For line oriented filters it may be easier to + extend ChainableFilterReader an inner class + of org.apache.tools.ant.filters.TokenFilter.

            For example a filter that appends the line number could be

            -
            -
            +    
             public class AddLineNumber extends ChainableReaderFilter {
            -   private void lineNumber = 0;
            -   public String filter(String string) {
            -      lineNumber++;
            -      return "" + lineNumber + "\t" + string;
            -   }
            -}
            -      
            -
            - + private void lineNumber = 0; + public String filter(String string) { + lineNumber++; + return "" + lineNumber + "\t" + string; + } +} -
            - diff -Nru ant-1.9.10/manual/Types/description.html ant-1.10.3/manual/Types/description.html --- ant-1.9.10/manual/Types/description.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/description.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,23 +24,20 @@ -

            Description

            +

            Description

            Description

            -

            Allows for a description of the project to be specified that -will be included in the output of the ant ‑projecthelp -command.

            +

            Allows for a description of the project to be specified that will be +included in the output of the ant -projecthelp command.

            Parameters

            (none)

            Examples

            -
              
            +
             <description>
            -This buildfile is used to build the Foo subproject within 
            +This buildfile is used to build the Foo subproject within
             the large, complex Bar project.
             </description>
             
            - - diff -Nru ant-1.9.10/manual/Types/dirset.html ant-1.10.3/manual/Types/dirset.html --- ant-1.9.10/manual/Types/dirset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/dirset.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,131 +24,111 @@ -

            DirSet

            -

            A DirSet is a group of directories. These directories can be found in a -directory tree starting in a base directory and are matched by -patterns taken from a number of PatternSets -and Selectors. -

            -

            PatternSets can be specified as nested -<patternset> elements. In addition, DirSet holds -an implicit PatternSet and supports the nested -<include>, <includesfile>, -<exclude> and <excludesfile> -elements of <patternset> directly, as well as -<patternset>'s attributes.

            -

            Selectors are available as nested elements within the DirSet. -If any of the selectors within the DirSet do not select the directory, it -is not considered part of the DirSet. This makes a DirSet -equivalent to an <and> selector container.

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

            DirSet

            +

            A DirSet is a group of directories. These directories can be found in a directory tree +starting in a base directory and are matched by patterns taken from a number +of PatternSets and Selectors.

            +

            PatternSets can be specified as nested <patternset> elements. In +addition, DirSet holds an implicit PatternSet and supports the +nested <include>, <includesfile>, <exclude> +and <excludesfile> elements of <patternset> directly, +as well as <patternset>'s attributes.

            +

            Selectors are available as nested elements within the DirSet. If any of the selectors +within the DirSet do not select the directory, it is not considered part of the DirSet. This +makes a DirSet equivalent to an <and> selector container.

            +
            AttributeDescriptionRequired
            dirThe root of the directory tree of this DirSet.Yes
            includesA comma- or space-separated list of patterns of directories that - must be included; all directories are included when omitted.No
            includesfileThe name of a file; each line of this file is - taken to be an include pattern. - Note: if the file is empty and there are no other - patterns defined for the fileset, all directories will be included. - No
            excludesA comma- or space-separated list of patterns of directories that - must be excluded; no directories are excluded when omitted.No
            excludesfileThe name of a file; each line of this file is - taken to be an exclude pattern.No
            casesensitiveSpecifies whether case-sensitivity should be applied - (true|yes|on or - false|no|off).No; defaults to true.
            followsymlinksShall symbolic links be followed? Defaults to - true. See fileset's documentation.No
            erroronmissingdir - Specify what happens if the base directory does not exist. - If true a build error will happen, if false, the dirset - will be ignored/empty. - Defaults to true. - Since Apache Ant 1.7.1 (default is true for backward compatibility - reasons.) - No
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            AttributeDescriptionRequired
            dirThe root of the directory tree of this DirSet.Yes
            includesComma- or space-separated list of patterns of directories that must be included.No; defaults to all directories
            includesfileName of a file; each line of this file is taken to be an include + pattern. Note: if the file is empty and there are no other patterns defined + for the fileset, all directories will be included.No
            excludesComma- or space-separated list of patterns of directories that must be excluded.No; defaults to none
            excludesfileName of a file; each line of this file is taken to be an exclude pattern.No
            casesensitiveSpecifies whether case-sensitivity should be applied (true, yes, on + or false, no, off).No; defaults to true
            followsymlinksShall symbolic links be followed? See fileset's + documentation.No; defaults to true
            erroronmissingdirSpecify what happens if the base directory does not exist. If true a build error + will happen, if false, the dirset will be ignored/empty. Since Apache Ant + 1.7.1No; defaults to true (for backward compatibility reasons)

            Examples

            -
            +
             <dirset dir="${build.dir}">
               <include name="apps/**/classes"/>
               <exclude name="apps/**/*Test*"/>
             </dirset>
            -
            -

            Groups all directories named classes found under the -apps subdirectory of ${build.dir}, except those -that have the text Test in their name.

            +
            +

            Groups all directories named classes found under the apps subdirectory +of ${build.dir}, except those that have the text Test in their name.

            -
            +
             <dirset dir="${build.dir}">
               <patternset id="non.test.classes">
                 <include name="apps/**/classes"/>
                 <exclude name="apps/**/*Test*"/>
               </patternset>
             </dirset>
            -
            -

            Groups the same directories as the above example, but also establishes -a PatternSet that can be referenced in other -<dirset> elements, rooted at a different directory.

            + +

            Groups the same directories as the above example, but also establishes a PatternSet that can be +referenced in other <dirset> elements, rooted at a different directory.

            -
            +
             <dirset dir="${debug_build.dir}">
               <patternset refid="non.test.classes"/>
             </dirset>
            -
            -

            Groups all directories in directory ${debug_build.dir}, -using the same patterns as the above example.

            + +

            Groups all directories in directory ${debug_build.dir}, using the same patterns as +the above example.

            -
            +
             <dirset id="dirset" dir="${workingdir}">
                <present targetdir="${workingdir}">
            -        <mapper type="glob" from="*" to="*/${markerfile}" />
            +        <mapper type="glob" from="*" to="*/${markerfile}"/>
                </present>
             </dirset>
            -
            -

            Selects all directories somewhere under ${workingdir} -which contain a ${markerfile}.

            - + +

            Selects all directories somewhere under ${workingdir} which contain +a ${markerfile}.

            - diff -Nru ant-1.9.10/manual/Types/extension.html ant-1.10.3/manual/Types/extension.html --- ant-1.9.10/manual/Types/extension.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/extension.html 2018-03-24 12:37:12.000000000 +0000 @@ -22,70 +22,67 @@ -

            Extension

            -

            Utility type that represents either an available "Optional Package" - (formerly known as "Standard Extension") as described in the manifest - of a JAR file, or the requirement for such an optional package.

            -

            Note that this type -works with extensions as defined by the "Optional Package" specification. - For more information about optional packages, see the document -Optional Package Versioning in the documentation bundle for your -Java2 Standard Edition package, in file -guide/extensions/versioning.html or the online - -Package Versioning documentation.

            +

            Extension

            +

            Utility type that represents either an available "Optional Package" (formerly known as "Standard +Extension") as described in the manifest of a JAR file, or the requirement for such an optional +package.

            +

            Note that this type works with extensions as defined by the "Optional Package" specification. +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Package Versioning documentation.

            Attributes

            -

            The extension type supports the following attributes: -

            +

            The extension type supports the following attributes:

            - +
            - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            extensionNameThe name of extensionyesextensionNameThe name of extensionyes
            specificationVersionThe version of extension specification (Must be in - dewey decimal aka dotted decimal notation. 3.2.4)nospecificationVersionThe version of extension specification (must be in dewey decimal aka dotted decimal + notation, eg 3.2.4)no
            specificationVendorThe specification vendornospecificationVendorThe specification vendorno
            implementationVersionThe version of extension implementation (Must be in - dewey decimal aka dotted decimal notation. 3.2.4)noimplementationVersionThe version of extension implementation (must be in dewey decimal aka dotted decimal + notation, eg 3.2.4)no
            implementationVendorThe implementation vendornoimplementationVendorThe implementation vendorno
            implementationVendorIdThe implementation vendor IDnoimplementationVendorIdThe implementation vendor IDno
            implementationURLThe url from which to retrieve extension.noimplementationURLThe url from which to retrieve extension.no

            Examples

            -
            +
             <extension id="e1"
                 extensionName="MyExtensions"
                 specificationVersion="1.0"
            @@ -94,21 +91,18 @@
                 implementationVendor="Apache"
                 implementationVersion="2.0"
                 implementationURL="http://somewhere.com/myExt.jar"/>
            -
            + -

            Fully specific extension object.

            +

            Fully specified extension object.

            -
            +
             <extension id="e1"
                 extensionName="MyExtensions"
                 specificationVersion="1.0"
                 specificationVendor="Peter Donald"/>
            -
            - -

            Extension object that just species the specification details.

            - + +

            Extension object that just specifies the specification details.

            - diff -Nru ant-1.9.10/manual/Types/extensionset.html ant-1.10.3/manual/Types/extensionset.html --- ant-1.9.10/manual/Types/extensionset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/extensionset.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,32 +24,28 @@

            ExtensionSet

            Utility type that represents a set of Extensions.

            -

            Note that this type -works with extensions as defined by the "Optional Package" specification. - For more information about optional packages, see the document -Optional Package Versioning in the documentation bundle for your -Java2 Standard Edition package, in file -guide/extensions/versioning.html or online at - -Package Versioning documentation.

            +

            Note that this type works with extensions as defined by the "Optional Package" specification. +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or online +at Package Versioning documentation.

            -

            Nested Elements

            +

            Nested elements

            extension

            Extension object to add to set.

            fileset

            -

            FileSets all files contained - contained within set that are jars and implement an extension are added - to extension set.

            - -

            LibFileSet

            -

            All files contained contained within set that are jars and implement - an extension are added to extension set. However the extension information - may be modified by attributes of libfileset

            +

            FileSets all files contained contained within set that are jars and +implement an extension are added to extension set.

            + +

            libfileset

            +

            All files contained contained within set that are jars and implement an extension are added to +extension set. However, the extension information may be modified by attributes of libfileset.

            Examples

            -
            +
             <extension id="e1"
                 extensionName="MyExtensions"
                 specificationVersion="1.0"
            @@ -73,11 +69,7 @@
               <libfileset refid="lfs"/>
               <extension refid="e1"/>
             </extensionSet>
            -
            -
            - - + - diff -Nru ant-1.9.10/manual/Types/filelist.html ant-1.10.3/manual/Types/filelist.html --- ant-1.9.10/manual/Types/filelist.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/filelist.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,97 +24,80 @@ -

            FileList

            +

            FileList

            -

            FileLists are explicitly named lists of files. Whereas FileSets -act as filters, returning only those files that exist in the file -system and match specified patterns, FileLists are useful for -specifying files that may or may not exist. Multiple files are -specified as a list of files, relative to the specified directory, -with no support for wildcard expansion (filenames with wildcards will be -included in the list unchanged). -FileLists can appear inside tasks that support this feature or as stand-alone -types. -

            - +

            FileLists are explicitly named lists of files. Whereas FileSets act as filters, returning +only those files that exist in the file system and match specified patterns, FileLists are +useful for specifying files that may or may not exist. Multiple files are specified as a list +of files, relative to the specified directory, with no support for wildcard expansion (filenames +with wildcards will be included in the list unchanged). FileLists can appear inside tasks that +support this feature or as stand-alone types.

            +
            - - - + + + - - - + + + - - - + + + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            dirThe base directory of this FileList.YesdirThe base directory of this FileList.Yes
            filesThe list of file names. This is a list of - file name separated by whitespace, or by commas. - Yes, unless there is a nested file elementfilesThe list of file names. This is a list of file name separated by whitespace, or by + commas.Yes, unless there is a nested file element
            +

            Nested element: file

            +

            Since Apache Ant 1.6.2

            +

            This represents a file name. The nested element allows filenames containing white space and +commas.

            + + + + + + + + + +
            AttributeDescriptionRequired
            nameThe name of the file.Yes
            -

            Nested Element: file

            -

            - This represents a file name. The nested element allows filenames containing - white space and commas. -

            -

            Since Apache Ant 1.6.2

            - - - - - - - - - - - -
            AttributeDescriptionRequired
            nameThe name of the file.Yes

            Examples

            -
            -<filelist 
            -    id="docfiles" 
            +
            +<filelist
            +    id="docfiles"
                 dir="${doc.src}"
            -    files="foo.xml,bar.xml"/> 
            -
            + files="foo.xml,bar.xml"/> -

            The files ${doc.src}/foo.xml and -${doc.src}/bar.xml. Note that these files may not (yet) -actually exist. -

            - -
            -<filelist 
            -    id="docfiles" 
            +

            The files ${doc.src}/foo.xml and ${doc.src}/bar.xml. Note that +these files may not (yet) actually exist.

            + +
            +<filelist
            +    id="docfiles"
                 dir="${doc.src}"
                 files="foo.xml
            -           bar.xml"/> 
            -
            + bar.xml"/>

            Same files as the example above.

            -
            -<filelist refid="docfiles"/> 
            -
            +
            <filelist refid="docfiles"/>

            Same files as the example above.

            -
            -<filelist 
            -    id="docfiles" 
            +
            +<filelist
            +    id="docfiles"
                 dir="${doc.src}">
                 <file name="foo.xml"/>
                 <file name="bar.xml"/>
            -</filelist>
            -
            +</filelist>

            Same files as the example above.

            - - - diff -Nru ant-1.9.10/manual/Types/fileset.html ant-1.10.3/manual/Types/fileset.html --- ant-1.9.10/manual/Types/fileset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/fileset.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,163 +24,140 @@ -

            FileSet

            -

            A FileSet is a group of files. These files can be found in a -directory tree starting in a base directory and are matched by -patterns taken from a number of PatternSets and -Selectors. -

            PatternSets can be specified as nested -<patternset> elements. In addition, FileSet holds -an implicit PatternSet and supports the nested -<include>, <includesfile>, -<exclude> and <excludesfile> -elements of PatternSet directly, as well as PatternSet's +

            FileSet

            +

            A FileSet is a group of files. These files can be found in a directory tree starting in a +base directory and are matched by patterns taken from a number +of PatternSets and Selectors.

            +

            PatternSets can be specified as nested <patternset> elements. In +addition, FileSet holds an implicit PatternSet and supports the +nested <include>, <includesfile>, <exclude> +and <excludesfile> elements of PatternSet directly, as well as PatternSet's attributes.

            -

            Selectors are available as nested elements within the FileSet. -If any of the selectors within the FileSet do not select the file, the -file is not considered part of the FileSet. This makes a FileSet -equivalent to an <and> selector container.

            - +

            Selectors are available as nested elements within the FileSet. If any of the selectors +within the FileSet do not select the file, the file is not considered part of the FileSet. This +makes a FileSet equivalent to an <and> selector container.

            +
            - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            dirthe root of the directory tree of this FileSet.Exactly one of dir or file must be specifieddirthe root of the directory tree of this FileSet.Exactly one of dir or file must be specified
            fileshortcut for specifying a single-file filesetfileshortcut for specifying a single-file fileset
            defaultexcludesindicates whether default excludes should be used or not - (yes | no); default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should + be used or not (yes|no).No; defaults to yes
            includescomma- or space-separated list of patterns of files that must be - included; all files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all files
            includesfilethe name of a file; each line of this file is - taken to be an include pattern.
            - Note: if the file is empty and there are no other - patterns defined for the fileset, all files will be included. +
            includesfilename of a file; each line of this file is taken to be an include pattern.
            + Note: if the file is empty and there are no other patterns defined for + the fileset, all files will be included.
            NoNo
            excludescomma- or space-separated list of patterns of files that must be - excluded; no files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
            excludesfilethe name of a file; each line of this file is - taken to be an exclude pattern.Noexcludesfilename of a file; each line of this file is taken to be an exclude pattern.No
            casesensitiveMust the include and exclude patterns be treated in a case sensitive way? - Defaults to true.NocasesensitiveMust the include and exclude patterns be treated in a case sensitive way?No; defaults to true
            followsymlinksShall symbolic links be followed? Defaults to - true. See the note below.NofollowsymlinksShall symbolic links be followed? See the note below.No; defaults to true
            erroronmissingdir - Specify what happens if the base directory does not exist. - If true a build error will happen, if false, the fileset - will be ignored/empty. - Defaults to true. - Since Apache Ant 1.7.1 (default is true for backward compatibility - reasons.) + erroronmissingdir + Specify what happens if the base directory does not exist. If true a build error + will happen, if false, the fileset will be ignored/empty. + Since Apache Ant 1.7.1 NoNo; defaults to true (for backward compatibility reasons)
            -

            Note: 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 link but it may lead to false results on other -platforms.

            +

            Examples

            -
            +
             <fileset dir="${server.src}" casesensitive="yes">
               <include name="**/*.java"/>
               <exclude name="**/*Test*"/>
             </fileset>
            -
            -

            Groups all files in directory ${server.src} that are Java -source files and don't have the text Test in their -name.

            + +

            Groups all files in directory ${server.src} that are Java source files and don't +have the text Test in their name.

            -
            +
             <fileset dir="${server.src}" casesensitive="yes">
               <patternset id="non.test.sources">
                 <include name="**/*.java"/>
                 <exclude name="**/*Test*"/>
               </patternset>
             </fileset>
            -
            -

            Groups the same files as the above example, but also establishes -a PatternSet that can be referenced in other -<fileset> elements, rooted at a different directory.

            + +

            Groups the same files as the above example, but also establishes a PatternSet that can be +referenced in other <fileset> elements, rooted at a different directory.

            -
            +
             <fileset dir="${client.src}" >
               <patternset refid="non.test.sources"/>
             </fileset>
            -
            -

            Groups all files in directory ${client.src}, using the -same patterns as the above example.

            + +

            Groups all files in directory ${client.src}, using the same patterns as the +above example.

            -
            +
             <fileset dir="${server.src}" casesensitive="yes">
               <filename name="**/*.java"/>
               <filename name="**/*Test*" negate="true"/>
             </fileset>
            -
            -

            Groups the same files as the top example, but using the -<filename> selector.

            + +

            Groups the same files as the top example, but using the <filename> +selector.

            -
            +
             <fileset dir="${server.src}" casesensitive="yes">
               <filename name="**/*.java"/>
               <not>
                 <filename name="**/*Test*"/>
               </not>
             </fileset>
            -
            -

            Groups the same files as the previous example using a combination of the -<filename> selector and the <not> -selector container.

            - -
            -<fileset dir="src" includes="main/" />
            -
            -

            Selects all files in src/main (e.g. src/main/Foo.java or -src/main/application/Bar.java).

            - - + +

            Groups the same files as the previous example using a combination of +the <filename> selector and the <not> selector +container.

            + +
            <fileset dir="src" includes="main/"/>
            +

            Selects all files in src/main (e.g. src/main/Foo.java +or src/main/application/Bar.java).

            - diff -Nru ant-1.9.10/manual/Types/filterchain.html ant-1.10.3/manual/Types/filterchain.html --- ant-1.9.10/manual/Types/filterchain.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/filterchain.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - - @@ -25,40 +23,30 @@

            FilterChains and FilterReaders

            -Consider the flexibility of Unix pipes. If you wanted, -for example, to copy just those lines that contained the -string blee from the first 10 lines of a text file 'foo' -(you wouldn't want to filter a binary file) -to a file 'bar', you would do something like:

            - -cat foo|head -n10|grep blee > bar -

            -Apache Ant was not flexible enough. There was no way for the -<copy> task to do something similar. If you wanted -the <copy> task to get the first 10 lines, you would have -had to create special attributes:

            - -<copy file="foo" tofile="bar" head="10" contains="blee"/> -

            -The obvious problem thus surfaced: Ant tasks would not be able -to accommodate such data transformation attributes as they would -be endless. The task would also not know in which order these -attributes were to be interpreted. That is, must the task execute the -contains attribute first and then the head attribute or vice-versa? -What Ant tasks needed was a mechanism to allow pluggable filter (data -transformer) chains. Ant would provide a few filters for which there -have been repeated requests. Users with special filtering needs -would be able to easily write their own and plug them in.

            - -The solution was to refactor data transformation oriented -tasks to support FilterChains. A FilterChain is a group of -ordered FilterReaders. Users can define their own FilterReaders -by just extending the java.io.FilterReader class. Such custom -FilterReaders can be easily plugged in as nested elements of -<filterchain> by using <filterreader> elements. -

            -Example: -

            +

            Consider the flexibility of Unix pipes. If you wanted, for example, to copy just those lines +that contained the string blee from the first 10 lines of a text file foo +(you wouldn't want to filter a binary file) to a file bar, you would do +something like:

            +
            cat foo|head -n10|grep blee > bar
            +

            Apache Ant was not flexible enough. There was no way for the <copy> task to +do something similar. If you wanted the <copy> task to get the first 10 lines, +you would have had to create special attributes:

            +
            <copy file="foo" tofile="bar" head="10" contains="blee"/>
            +

            The obvious problem thus surfaced: Ant tasks would not be able to accommodate such data +transformation attributes as they would be endless. The task would also not know in which order +these attributes were to be interpreted. That is, must the task execute the contains attribute +first and then the head attribute or vice-versa? What Ant tasks needed was a mechanism to allow +pluggable filter (data transformer) chains. Ant would provide a few filters for which there have +been repeated requests. Users with special filtering needs would be able to easily write their own +and plug them in.

            + +

            The solution was to refactor data transformation oriented tasks to support FilterChains. A +FilterChain is a group of ordered FilterReaders. Users can define their own FilterReaders by just +extending the java.io.FilterReader class. Such custom FilterReaders can +be easily plugged in as nested elements of <filterchain> by +using <filterreader> elements.

            +

            Example:

            +
             <copy file="${src.file}" tofile="${dest.file}">
               <filterchain>
                 <filterreader classname="your.extension.of.java.io.FilterReader">
            @@ -72,535 +60,465 @@
                   <param type="abra" value="cadabra"/>
                 </filterreader>
               </filterchain>
            -</copy>
            -
            +</copy> -Ant provides some built-in filter readers. These filter readers -can also be declared using a syntax similar to the above syntax. -However, they can be declared using some simpler syntax also.

            -Example: -

            +

            Ant provides some built-in filter readers. These filter readers can also be declared using a +syntax similar to the above syntax. However, they can be declared using some simpler syntax +also.

            +

            Example:

            +
             <loadfile srcfile="${src.file}" property="src.file.head">
               <filterchain>
                 <headfilter lines="15"/>
               </filterchain>
            -</loadfile>
            -
            -is equivalent to: -
            +</loadfile>
            +

            is equivalent to:

            +
             <loadfile srcfile="${src.file}" property="src.file.head">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
                   <param name="lines" value="15"/>
                 </filterreader>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -The following built-in tasks support nested <filterchain> elements.
            -Concat,
            -Copy,
            -LoadFile,
            -LoadProperties,
            -LoadResource,
            -Move

            - -A FilterChain is formed by defining zero or more of the following -nested elements.
            -FilterReader
            -ClassConstants
            -EscapeUnicode
            -ExpandProperties
            -HeadFilter
            -LineContains
            -LineContainsRegExp
            -PrefixLines
            -ReplaceTokens
            -StripJavaComments
            -StripLineBreaks
            -StripLineComments
            -SuffixLines
            -TabsToSpaces
            -TailFilter
            -DeleteCharacters
            -ConcatFilter
            -TokenFilter
            -FixCRLF
            -SortFilter
            - -

            FilterReader

            - -The filterreader element is the generic way to -define a filter. User defined filter elements are -defined in the build file using this. Please note that -built in filter readers can also be defined using this -syntax. - -A FilterReader element must be supplied with a class name as -an attribute value. The class resolved by this name must -extend java.io.FilterReader. If the custom filter reader -needs to be parameterized, it must implement -org.apache.tools.type.Parameterizable. - - - - - - - - - - - - -
            AttributeDescriptionRequired
            classnameThe class name of the filter reader.Yes
            - -

            -

            Nested Elements:

            -<filterreader> supports <classpath> and <param> -as nested elements. Each <param> element may take in the following -attributes - name, type and value. -

            -The following FilterReaders are supplied with the default -distribution. - -

            ClassConstants

            -

            - This filters basic constants defined in a Java Class, - and outputs them in lines composed of the format name=value. - This filter uses the bcel library to understand the Java Class file. - See Library Dependencies. -

            -

            - Important: - This filter is different from most of the other filters. - Most of the filters operate on a sequence of characters. - This filter operates on the sequence of bytes that makes up - a class. However the bytes arrive to the filter as a sequence - of characters. This means that one must be careful on the - choice of character encoding to use. Most encoding lose information - on conversion from an arbitrary sequence of bytes to characters - and back again to bytes. In particular the usual default - character encodings (CP152 and UTF-8) do. - For this reason, since Ant 1.7, the character - encoding ISO-8859-1 is used to convert from characters back to - bytes, so one has to use this encoding for reading the java - class file. -

            Example:

            +

            The following built-in tasks support nested <filterchain> elements.
            +Concat,
            +Copy,
            +LoadFile,
            +LoadProperties,
            +LoadResource,
            +Move

            + +

            A FilterChain is formed by defining zero or more of the following nested elements.
            +FilterReader
            +ClassConstants
            +EscapeUnicode
            +ExpandProperties
            +HeadFilter
            +LineContains
            +LineContainsRegExp
            +PrefixLines
            +ReplaceTokens
            +StripJavaComments
            +StripLineBreaks
            +StripLineComments
            +SuffixLines
            +TabsToSpaces
            +TailFilter
            +DeleteCharacters
            +ConcatFilter
            +SortFilter
            +TokenFilter
            +FixCRLF

            + +

            FilterReader

            + +

            The filterreader element is the generic way to define a filter. User defined filter +elements are defined in the build file using this. Please note that built in filter readers can +also be defined using this syntax.

            + +

            A FilterReader element must be supplied with a class name as an attribute value. The class +resolved by this name must extend java.io.FilterReader. If the custom +filter reader needs to be parameterized, it must +implement org.apache.tools.type.Parameterizable.

            + + + + + + + + + + + + +
            AttributeDescriptionRequired
            classnameThe class name of the filter reader.Yes
            + +

            Nested elements

            +

            <filterreader> supports <classpath> +and <param> as nested elements. Each <param> element may take +in the following attributes—name, type and value.

            +

            The following FilterReaders are supplied with the default distribution.

            + +

            ClassConstants

            +

            This filters basic constants defined in a Java Class, and outputs them in lines composed of the +format name=value. This filter uses the BCEL library to understand the Java Class +file. See Library Dependencies.

            +

            Important: This filter is different from most of the other filters. Most of the +filters operate on a sequence of characters. This filter operates on the sequence of bytes that +makes up a class. However the bytes arrive to the filter as a sequence of characters. This means +that one must be careful on the choice of character encoding to use. Most encodings lose information +on conversion from an arbitrary sequence of bytes to characters and back again to bytes. In +particular, the usual default character encodings (CP1252 and UTF-8) do. For this reason, since +Ant 1.7, the character encoding ISO-8859-1 is used to convert from characters +back to bytes, so one has to use this encoding for reading the Java class file.

            +

            Example

            -This loads the basic constants defined in a Java class as Ant properties. +

            This loads the basic constants defined in a Java class as Ant properties.

            -
            +
             <loadproperties srcfile="foo.class" encoding="ISO-8859-1">
               <filterchain>
                 <classconstants/>
               </filterchain>
            -</loadproperties>
            -
            +</loadproperties> -This loads the constants from a Java class file as Ant properties, -prepending the names with a prefix. +

            This loads the constants from a Java class file as Ant properties, prepending the names with +a prefix.

            -
            +
             <loadproperties srcfile="build/classes/org/acme/bar.class"
                             encoding="ISO-8859-1">
               <filterchain>
                 <classconstants/>
                 <prefixlines prefix="ini."/>
               </filterchain>
            -</loadproperties>
            -
            -

            EscapeUnicode

            -

            -This filter converts its input by changing all non US-ASCII characters -into their equivalent unicode escape backslash u plus 4 digits.

            +</loadproperties> +

            EscapeUnicode

            -

            since Ant 1.6

            +

            This filter converts its input by changing all non US-ASCII characters into their equivalent +Unicode escape backslash u plus 4 digits.

            -

            Example:

            +

            Since Ant 1.6

            -This loads the basic constants defined in a Java class as Ant properties. -
            +

            Example

            + +

            This loads the basic constants defined in a Java class as Ant properties.

            +
             <loadproperties srcfile="non_ascii_property.properties">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.EscapeUnicode"/>
               </filterchain>
            -</loadproperties>
            -
            +</loadproperties> -Convenience method: -
            +

            Convenience method:

            +
             <loadproperties srcfile="non_ascii_property.properties">
               <filterchain>
                 <escapeunicode/>
               </filterchain>
            -</loadproperties>
            -
            +</loadproperties> -

            ExpandProperties

            -

            -If the data contains data that represents Ant -properties (of the form ${...}), that is substituted -with the property's actual value. -

            -

            Example:

            - -This results in the property modifiedmessage holding the value -"All these moments will be lost in time, like teardrops in the rain" -
            -<echo
            -  message="All these moments will be lost in time, like teardrops in the ${weather}"
            -  file="loadfile1.tmp"
            -  />
            +

            ExpandProperties

            +

            If the data contains data that represents Ant properties (of the form ${...}), that +is substituted with the property's actual value.

            + +

            Example

            + +

            This results in the property modifiedmessage holding the value All these moments +will be lost in time, like teardrops in the rain

            +
            +<echo message="All these moments will be lost in time, like teardrops in the ${weather}"
            +      file="loadfile1.tmp"/>
             <property name="weather" value="rain"/>
             <loadfile property="modifiedmessage" srcFile="loadfile1.tmp">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.ExpandProperties"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            -<echo
            -  message="All these moments will be lost in time, like teardrops in the ${weather}"
            -  file="loadfile1.tmp"
            -  />
            +

            Convenience method:

            +
            +<echo message="All these moments will be lost in time, like teardrops in the ${weather}"
            +      file="loadfile1.tmp"/>
             <property name="weather" value="rain"/>
             <loadfile property="modifiedmessage" srcFile="loadfile1.tmp">
               <filterchain>
                 <expandproperties/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -

            As of Ant 1.8.3, a nested - PropertySet can be specified: +

            Since Ant 1.8.3, a nested PropertySet can be specified:

            -
            +
             <property name="weather" value="rain"/>
             <loadfile property="modifiedmessage" srcFile="loadfile1.tmp">
               <filterchain>
                 <expandproperties>
                   <propertyset>
            -        <propertyref name="weather" />
            +        <propertyref name="weather"/>
                   </propertyset>
                 </expandproperties>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -

            HeadFilter

            +

            HeadFilter

            -This filter reads the first few lines from the data supplied to it. +

            This filter reads the first few lines from the data supplied to it.

            - +
            - - - + + + - - - + + + - - - + + +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            linesNumber of lines to be read. - Defaults to "10"
            A negative value means that all lines are - passed (useful with skip)
            NolinesNumber of lines to be read.
            + A negative value means that all lines are passed (useful with skip).
            No; defaults to 10
            skipNumber of lines to be skipped (from the beginning). - Defaults to "0"NoskipNumber of lines to be skipped (from the beginning).No; defaults to 0
            -

            -

            Example:

            -This stores the first 15 lines of the supplied data in the property src.file.head -
            +

            Example

            +

            This stores the first 15 lines of the supplied data in the property src.file.head

            +
             <loadfile srcfile="${src.file}" property="src.file.head">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
                   <param name="lines" value="15"/>
                 </filterreader>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            +

            Convenience method:

            +
             <loadfile srcfile="${src.file}" property="src.file.head">
               <filterchain>
                 <headfilter lines="15"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -This stores the first 15 lines, skipping the first 2 lines, of the supplied data -in the property src.file.head. (Means: lines 3-17) -
            +

            This stores the first 15 lines, skipping the first 2 lines, of the supplied data in the +property src.file.head (means: lines 3-17).

            +
             <loadfile srcfile="${src.file}" property="src.file.head">
               <filterchain>
                 <headfilter lines="15" skip="2"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -See the testcases for more examples (src\etc\testcases\filters\head-tail.xml in the -source distribution). +

            See the testcases for more examples (src\etc\testcases\filters\head-tail.xml in +the source distribution).

            -

            LineContains

            +

            LineContains

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

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

            - +
            - - - + + + - - - + + + - - - + + +
            Parameter TypeParameter ValueRequiredParameter TypeParameter ValueRequired
            containsSubstring to be searched for.YescontainsSubstring to be searched for.Yes
            negateWhether to select - non-matching lines only. Since Ant 1.7NonegateWhether to select non-matching lines only. Since Ant 1.7No

            -

            Example:

            +

            Example

            -This will include only those lines that contain foo and -bar. -
            +

            This will include only those lines that contain foo and bar.

            +
             <filterreader classname="org.apache.tools.ant.filters.LineContains">
               <param type="contains" value="foo"/>
               <param type="contains" value="bar"/>
            -</filterreader>
            -
            +</filterreader> -Convenience method: -
            +

            Convenience method:

            +
             <linecontains>
               <contains value="foo"/>
               <contains value="bar"/>
            -</linecontains>
            -
            +</linecontains> -Negation: -
            +

            Negation:

            +
             <filterreader classname="org.apache.tools.ant.filters.LineContains">
               <param type="negate" value="true"/>
               <param type="contains" value="foo"/>
               <param type="contains" value="bar"/>
            -</filterreader>
            -
            -or -
            +</filterreader>
            +

            or

            +
             <linecontains negate="true">
               <contains value="foo"/>
               <contains value="bar"/>
            -</linecontains>
            -
            +</linecontains> -

            LineContainsRegExp

            +

            LineContainsRegExp

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

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

            - +
            - - - + + + - - + - + - - - + + + - - - + + +
            Parameter TypeParameter ValueRequiredParameter TypeParameter ValueRequired
            regexpRegular expression to be searched for.
            - Starting with 1.9.10 this also works as an attribute - on linecontainsregexp, in earlier versions of Ant - you must use a nested element when using the convenience - method. +
            regexpRegular expression to be searched for.
            Since Ant 1.10.2, this also works as an + attribute on linecontainsregexp. In earlier versions of Ant you must use a nested + element when using the convenience method.
            YesYes
            negateWhether to select - non-matching lines only. Since Ant 1.7NonegateWhether to select non-matching lines only. Since Ant 1.7No
            casesensitivePerform a case sensitive - match. Default is true. Since Ant 1.8.2NocasesensitivePerform a case sensitive match. Since Ant 1.8.2No; default is true
            -See Regexp Type for the description of the nested element regexp and of -the choice of regular expression implementation. -

            Example:

            +

            See Regexp Type for the description of the nested element regexp +and of the choice of regular expression implementation.

            + +

            Example

            -This will fetch all those lines that contain the pattern foo -
            +

            This will fetch all those lines that contain the pattern foo

            +
             <filterreader classname="org.apache.tools.ant.filters.LineContainsRegExp">
               <param type="regexp" value="foo*"/>
            -</filterreader>
            -
            +</filterreader> -Convenience method: -
            +

            Convenience method:

            +
             <linecontainsregexp>
               <regexp pattern="foo*"/>
            -</linecontainsregexp>
            -
            +</linecontainsregexp> -Negation: -
            +

            Negation:

            +
             <filterreader classname="org.apache.tools.ant.filters.LineContainsRegExp">
               <param type="negate" value="true"/>
               <param type="regexp" value="foo*"/>
            -</filterreader>
            -
            -or -
            +</filterreader>
            +

            or

            +
             <linecontainsregexp negate="true">
               <regexp pattern="foo*"/>
            -</linecontainsregexp>
            -
            +</linecontainsregexp> -

            PrefixLines

            +

            PrefixLines

            -Attaches a prefix to every line. +

            Attaches a prefix to every line.

            - +
            - - - + + + - - - + + +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            prefixPrefix to be attached to lines.YesprefixPrefix to be attached to lines.Yes
            -

            -

            Example:

            -This will attach the prefix Foo to all lines. -
            +

            Example

            + +

            This will attach the prefix Foo to all lines.

            +
             <filterreader classname="org.apache.tools.ant.filters.PrefixLines">
               <param name="prefix" value="Foo"/>
            -</filterreader>
            -
            +</filterreader> -Convenience method: -
            -<prefixlines prefix="Foo"/>
            -
            +

            Convenience method:

            +
            <prefixlines prefix="Foo"/>
            -

            SuffixLines

            +

            SuffixLines

            -Attaches a suffix to every line. +

            Since Ant 1.8.0

            -

            since Ant 1.8.0

            +

            Attaches a suffix to every line.

            - +
            - - - + + + - - - + + +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            suffixSuffix to be attached to lines.YessuffixSuffix to be attached to lines.Yes
            -

            -

            Example:

            -This will attach the suffix Foo to all lines. -
            +

            Example

            + +

            This will attach the suffix Foo to all lines.

            +
             <filterreader classname="org.apache.tools.ant.filters.SuffixLines">
               <param name="suffix" value="Foo"/>
            -</filterreader>
            -
            +</filterreader> -Convenience method: -
            -<suffixlines suffix="Foo"/>
            -
            +

            Convenience method:

            +
            <suffixlines suffix="Foo"/>
            -

            ReplaceTokens

            +

            ReplaceTokens

            -This filter reader replaces all strings that are -sandwiched between begintoken and endtoken with -user defined values. +

            This filter reader replaces all strings that are sandwiched between begintoken +and endtoken with user defined values.

            - +
            - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + - + - - - - - -
            Parameter TypeParameter NameParameter ValueRequiredParameter TypeParameter NameParameter ValueRequired
            tokencharbegintokenString marking the - beginning of a token. Defaults to @NotokencharbegintokenString marking the beginning of a token.No; defaults to @
            tokencharendtokenString marking the - end of a token. Defaults to @NotokencharendtokenString marking the end of a token.No; defaults to @
            User defined String.tokenUser defined search String.YestokenUser defined token stringReplacement value for the token.Yes
            Not applicable.propertiesfileProperties file to take tokens from.NopropertiesfileNot applicableProperties file to take tokens and replacement values from.No
            Not applicable.propertiesResourceProperties resource to take tokens from. + propertiesResourceProperties resource to take tokens from. Note this only works is you use the "convenience" <replacetokens> syntax. since Ant 1.8.0NoNo
            User defined String.valueReplace-value for the tokenNo
            -

            + -

            Example:

            +

            Example

            -This replaces occurrences of the string @DATE@ in the data -with today's date and stores it in the property ${src.file.replaced}. -
            +

            This replaces occurrences of the string @DATE@ in the data with today's date and +stores it in the property ${src.file.replaced}.

            +
             <tstamp/>
             <!-- just for explaining the use of the properties -->
             <property name="src.file" value="orders.csv"/>
            @@ -616,11 +534,10 @@
             </loadfile>
             
             <!-- just for explaining the use of the properties -->
            -<echo message="${orders.replaced}"/>
            -
            +<echo message="${orders.replaced}"/> -Convenience method: -
            +

            Convenience method:

            +
             <tstamp/>
             <loadfile srcfile="${src.file}" property="${src.file.replaced}">
               <filterchain>
            @@ -628,12 +545,11 @@
                   <token key="DATE" value="${TODAY}"/>
                 </replacetokens>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -This replaces occurrences of the string {{DATE}} in the data -with today's date and stores it in the property ${src.file.replaced}. -
            +

            This replaces occurrences of the string {{DATE}} in the data with today's date and +stores it in the property ${src.file.replaced}.

            +
             <loadfile srcfile="${src.file}" property="${src.file.replaced}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
            @@ -641,11 +557,10 @@
                   <param type="tokenchar" name="endtoken" value="}}"/>
                 </filterreader>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            +

            Convenience method:

            +
             <tstamp/>
             <loadfile srcfile="${src.file}" property="${src.file.replaced}">
               <filterchain>
            @@ -653,22 +568,20 @@
                   <token key="DATE" value="${TODAY}"/>
                 </replacetokens>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -This will treat each properties file entry in sample.properties as a token/key pair : -
            +

            This will treat each properties file entry in sample.properties as a token/key pair:

            +
             <loadfile srcfile="${src.file}" property="${src.file.replaced}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
                   <param type="propertiesfile" value="sample.properties"/>
                 </filterreader>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -This reads the properties from an Ant resource referenced by its id: -
            +

            This reads the properties from an Ant resource referenced by its id:

            +
             <string id="embedded-properties">
             foo=bar
             baz=xyzzy
            @@ -677,308 +590,270 @@
               <filterchain>
                 <replacetokens propertiesResource="${ant.refid:embedded-properties}"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -

            StripJavaComments

            +

            StripJavaComments

            -This filter reader strips away comments from the data, -using Java syntax guidelines. This filter does not -take in any parameters. -

            -

            Example:

            +

            This filter reader strips away comments from the data, using Java syntax guidelines. This +filter does not take in any parameters.

            + +

            Example

            -
            +
             <loadfile srcfile="${java.src.file}" property="${java.src.file.nocomments}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.StripJavaComments"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            +

            Convenience method:

            +
             <loadfile srcfile="${java.src.file}" property="${java.src.file.nocomments}">
               <filterchain>
                 <stripjavacomments/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -

            StripLineBreaks

            +

            StripLineBreaks

            -This filter reader strips away specific characters -from the data supplied to it. +

            This filter reader strips away specific characters from the data supplied to it.

            - +
            - - - + + + - - - + + +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            linebreaksCharacters that are to - be stripped out. Defaults to "\r\n"NolinebreaksCharacters that are to be stripped out.No; defaults to \r\n
            -

            -

            Examples:

            -This strips the '\r' and '\n' characters. -
            +

            Examples

            + +

            This strips the \r and \n characters.

            +
             <loadfile srcfile="${src.file}" property="${src.file.contents}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            +

            Convenience method:

            +
             <loadfile srcfile="${src.file}" property="${src.file.contents}">
               <filterchain>
                 <striplinebreaks/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -This treats the '(' and ')' characters as line break characters and -strips them. -
            +

            This treats the ( and ) characters as line break characters and strips +them.

            +
             <loadfile srcfile="${src.file}" property="${src.file.contents}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks">
                   <param name="linebreaks" value="()"/>
                 </filterreader>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -

            StripLineComments

            +

            StripLineComments

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

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

            - +
            - - - + + + - - - + + +
            Parameter TypeParameter ValueRequiredParameter TypeParameter ValueRequired
            commentStrings that identify a line as a comment - when they appear at the start of the line.YescommentStrings that identify a line as a comment when they appear at the start of the + line.Yes

            -

            Examples:

            +

            Examples

            -This removes all lines that begin with #, --, REM, rem and // -
            +

            This removes all lines that begin with #, --, REM, rem +and //

            +
             <filterreader classname="org.apache.tools.ant.filters.StripLineComments">
               <param type="comment" value="#"/>
               <param type="comment" value="--"/>
               <param type="comment" value="REM "/>
               <param type="comment" value="rem "/>
               <param type="comment" value="//"/>
            -</filterreader>
            -
            +</filterreader> -Convenience method: -
            +

            Convenience method:

            +
             <striplinecomments>
               <comment value="#"/>
               <comment value="--"/>
               <comment value="REM "/>
               <comment value="rem "/>
               <comment value="//"/>
            -</striplinecomments>
            -
            +</striplinecomments> -

            TabsToSpaces

            +

            TabsToSpaces

            -This filter replaces tabs with spaces +

            This filter replaces tabs with spaces

            - +
            - - - + + + - - - + + +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            tablengthDefaults to "8"NotablengthDefaults to 8No
            -

            -

            Examples:

            -This replaces tabs in ${src.file} with spaces. -
            +

            Examples

            + +

            This replaces tabs in ${src.file} with spaces.

            +
             <loadfile srcfile="${src.file}" property="${src.file.notab}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.TabsToSpaces"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            +

            Convenience method:

            +
             <loadfile srcfile="${src.file}" property="${src.file.notab}">
               <filterchain>
                 <tabstospaces/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -

            TailFilter

            +

            TailFilter

            -This filter reads the last few lines from the data supplied to it. +

            This filter reads the last few lines from the data supplied to it.

            - +
            - - - + + + - - - + + + - - - + + +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            linesNumber of lines to be read. - Defaults to "10"
            A negative value means that all lines are - passed (useful with skip)
            NolinesNumber of lines to be read.
            + A negative value means that all lines are passed + (useful with skip)
            No; defaults to 10
            skipNumber of lines to be skipped (from the end). - Defaults to "0" NoskipNumber of lines to be skipped (from the end).No; defaults to 0

            -

            Background:

            -With HeadFilter and TailFilter you can extract each part of a text file you want. -This graphic shows the dependencies: +

            Background

            +

            With HeadFilter and TailFilter you can extract each part of a text file you want. This graphic +shows the dependencies:

            - +
            - - - - - + + - - - - - + - + - - + + + - + - - + - + - + - - + - + - - + + + - +
            Content Filter ContentFilter
            Line 1     - - - - + - - - - - - - - - - - - - - - - - -
             
            <filterchain>
            + 
            Line 1 +
            <filterchain>
                 <headfilter lines="2"/>
             </filterchain>
             
            <filterchain>
            -    <tailfilter lines="-1" skip="2"/>
            -</filterchain>
             
            <filterchain>
            -    <headfilter lines="-1" skip="2"/>
            -</filterchain>
             
            <filterchain>
            -    <headfilter lines="-1" skip="2"/>
            + 
            +
            <filterchain>
                 <tailfilter lines="-1" skip="2"/>
            -</filterchain>
             
            <filterchain>
            -    <tailfilter lines="2"/>
            -</filterchain>
            +</filterchain>
             
            Line 2 Line 2
            Line 3  Line 3 +
            <filterchain>
            +    <headfilter lines="-1" skip="2"/>
            +</filterchain>
            +
            <filterchain>
            +    <headfilter lines="-1" skip="2"/>
            +    <tailfilter lines="-1" skip="2"/>
            +</filterchain>
            Line 4 Line 4
            Line 5  Line 5
            Lines ... Lines ...
            Line 95 Line 95
            Line 96  Line 96
            Line 97 Line 97
            Line 98  Line 98 +
            <filterchain>
            +    <tailfilter lines="2"/>
            +</filterchain>
             
            Line 99 Line 99
            +

            Examples

            - -

            Examples:

            - -This stores the last 15 lines of the supplied data in the property ${src.file.tail} -
            +

            This stores the last 15 lines of the supplied data in the +property ${src.file.tail}

            +
             <loadfile srcfile="${src.file}" property="${src.file.tail}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.TailFilter">
                   <param name="lines" value="15"/>
                 </filterreader>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            +

            Convenience method:

            +
             <loadfile srcfile="${src.file}" property="${src.file.tail}">
               <filterchain>
                 <tailfilter lines="15"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> - -This stores the last 5 lines of the first 15 lines of the supplied -data in the property ${src.file.mid} -
            +

            This stores the last 5 lines of the first 15 lines of the supplied data in the +property ${src.file.mid}

            +
             <loadfile srcfile="${src.file}" property="${src.file.mid}">
               <filterchain>
                 <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
            @@ -988,628 +863,668 @@
                   <param name="lines" value="5"/>
                 </filterreader>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> -Convenience method: -
            +

            Convenience method:

            +
             <loadfile srcfile="${src.file}" property="${src.file.mid}">
               <filterchain>
                 <headfilter lines="15"/>
                 <tailfilter lines="5"/>
               </filterchain>
            -</loadfile>
            -
            - +</loadfile> -This stores the last 10 lines, skipping the last 2 lines, of the supplied data -in the property src.file.head. (Means: if supplied data contains 60 lines, -lines 49-58 are extracted) -
            +

            This stores the last 10 lines, skipping the last 2 lines, of the supplied data in the +property src.file.head. (Means: if supplied data contains 60 lines, lines 49-58 are +extracted)

            +
             <loadfile srcfile="${src.file}" property="src.file.head">
               <filterchain>
                 <tailfilter lines="10" skip="2"/>
               </filterchain>
            -</loadfile>
            -
            +</loadfile> + +

            DeleteCharacters

            + +

            Since Ant 1.6

            -

            DeleteCharacters

            +

            This filter deletes specified characters.

            -

            This filter deletes specified characters.

            -

            since Ant 1.6

            -

            This filter is only available in the convenience form.

            +

            This filter is only available in the convenience form.

            - +
            - - - + + + - - + - +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            chars - The characters to delete. This attribute is - backslash enabled. + chars + The characters to delete. This attribute is backslash enabled. YesYes

            -

            Examples:

            +

            Examples

            -Delete tabs and returns from the data. -
            -<deletecharacters chars="\t\r"/>
            -
            +

            Delete tabs and returns from the data.

            +
            <deletecharacters chars="\t\r"/>
            -

            ConcatFilter

            -

            This filter prepends or appends the content file to the filtered files.

            -

            since Ant 1.6

            - +

            ConcatFilter

            +

            Since Ant 1.6

            +

            This filter prepends or appends the content file to the filtered files.

            +
            - - - + + + - - + - + - - + - +
            Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
            prepend + prepend The name of the file which content should be prepended to the file. NoNo
            append + append The name of the file which content should be appended to the file. NoNo

            -

            Examples:

            +

            Examples

            -Do nothing: -
            +

            Do nothing:

            +
             <filterchain>
                 <concatfilter/>
            -</filterchain>
            -
            +</filterchain> -Adds a license text before each java source: -
            +

            Adds a license text before each Java source file:

            +
             <filterchain>
                 <concatfilter prepend="apache-license-java.txt"/>
            -</filterchain>
            -
            +</filterchain> +

            SortFilter

            +

            Since Ant 1.8.0

            +

            The sort filter reads all lines and sorts them. The sort order can be reversed and it is +possible to specify a custom implementation of the java.util.Comparator +interface to get even more control.

            + + + + + + + + + + + + + + + + + +
            Parameter NameParameter ValueRequired
            reverseWhether to reverse the sort order.
            Note: this parameter is ignored + if the comparator parameter is present as well.
            No; defaults to false
            comparatorClass name of a class that implements java.util.Comparator for + Strings. This class will be used to determine the sort order of lines.No
            + +

            This filter is also available using the name sortfilter. +The reverse parameter becomes an attribute, comparator can be +specified by using a nested element.

            + +

            Examples

            + +
            +<copy todir="build">
            +    <fileset dir="input" includes="*.txt"/>
            +    <filterchain>
            +        <sortfilter/>
            +    </filterchain>
            +</copy>
            -

            TokenFilter

            -This filter tokenizes the inputstream into strings and passes these -strings to filters of strings. Unlike the other filterreaders, this does -not support params, only convenience methods are implemented. -The tokenizer and the string filters are defined by nested elements. -

            since Ant 1.6

            -Only one tokenizer element may be used, the LineTokenizer is the -default if none are specified. A tokenizer -splits the input into token strings and trailing delimiter strings. +Sort all files *.txt from src location into build +location. The lines of each file are sorted in ascendant order comparing the lines via the +String.compareTo(Object o) method. +

            + +
            +<copy todir="build">
            +    <fileset dir="input" includes="*.txt"/>
            +    <filterchain>
            +        <sortfilter reverse="true"/>
            +    </filterchain>
            +</copy>
            +

            -There may be zero or more string filters. A string filter processes -a token and either returns a string or a null. -It the string is not null it is passed to the next filter. This -proceeds until all the filters are called. -If a string is returned after all the filters, the string is -outputs with its associated token delimiter -(if one is present). -The trailing delimiter may be overridden by the delimOutput -attribute. +Sort all files *.txt from src location into reverse order and copy +them into build location. +

            + +
            +<copy todir="build">
            +    <fileset dir="input" includes="*.txt"/>
            +    <filterchain>
            +        <filterreader classname="org.apache.tools.ant.filters.SortFilter">
            +            <param name="comparator" value="org.apache.tools.ant.filters.EvenFirstCmp"/>
            +        </filterreader>
            +    </filterchain>
            +</copy>
            +

            -backslash interpretation -A number of attributes (including delimOutput) interpret -backslash escapes. The following are understood: \n, \r, \f, \t -and \\. +Sort all files *.txt from src location using as sorting +criterium EvenFirstCmp class, that sorts the file lines putting even lines +first then odd lines for example. The modified files are copied into build +location. The EvenFirstCmp has to an instanciable class +via Class.newInstance(), therefore in case of inner class has to +be static. It also has to implement java.util.Comparator +interface, for example: +

            +
            +package org.apache.tools.ant.filters;
            +... (omitted)
            +public final class EvenFirstCmp implements <b>Comparator</b> {
            +   public int compare(Object o1, Object o2) {
            +       ...(omitted)
            +   }
            +}
            + +

            The example above is equivalent to:

            + +
            +<componentdef name="evenfirst"
            +              classname="org.apache.tools.ant.filters.EvenFirstCmp"/>
            +<copy todir="build">
            +    <fileset dir="input" includes="*.txt"/>
            +    <filterchain>
            +        <sortfilter>
            +            <evenfirst/>
            +        </sortfilter>
            +    </filterchain>
            +</copy>
            - +

            TokenFilter

            +

            This filter tokenizes the InputStream into strings and passes these strings to filters of +strings. Unlike the other FilterReaders, this does not support params, only +convenience methods are implemented. The tokenizer and the string filters are defined by nested +elements.

            +

            Since Ant 1.6

            +

            +Only one tokenizer element may be used, the LineTokenizer is the default if none +are specified. A tokenizer splits the input into token strings and trailing delimiter strings. +

            +There may be zero or more string filters. A string filter processes a token and either returns a +string or a null. It the string is not null it is passed to the next filter. This proceeds +until all the filters are called. If a string is returned after all the filters, the string is +outputs with its associated token delimiter (if one is present). The trailing delimiter may be +overridden by the delimOutput attribute. +

            Backslash interpretation

            +

            +A number of attributes (including delimOutput) interpret backslash escapes. The +following are understood: \n, \r, \f, \t and \\. +

            + +
            - - - + + + - - + - + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            delimOutput - This overrides the tokendelimiter - returned by the tokenizer if it is not empty. This + delimOutput + This overrides the token delimiter returned by the tokenizer if it is not empty. This attribute is backslash enabled. -NoNo
            +

            The following tokenizers are provided by the default distribution.

            +

            + LineTokenizer
            + FileTokenizer
            + StringTokenizer +

            +

            The following string filters are provided by the default distribution.

            +

            + ReplaceString
            + ContainsString
            + ReplaceRegex
            + ContainsRegex
            + Trim
            + IgnoreBlank
            + DeleteCharacters
            + UniqFilter
            + Native2AsciiFilter +

            +

            The following string filters are provided by the optional distribution.

            + ScriptFilter +

            +

            + Custom tokenizers and string filters can be declared + using typedef task. +

            +

            +Some of the filters may be used directly within a filterchain. In this case +a tokenfilter is created implicitly. An extra attribute byline is added to +the filter to specify whether to use a linetokenizer (byline=true) or +a filetokenizer (byline=false). The default is true. +

            - The following tokenizers are provided by the default distribution. -

            - LineTokenizer
            - FileTokenizer
            - StringTokenizer
            -

            - - The following string filters are provided by the default distribution. -

            - ReplaceString
            - ContainsString
            - ReplaceRegex
            - ContainsRegex
            - Trim
            - IgnoreBlank
            - DeleteCharacters
            - UniqFilter
            - Native2AsciiFilter
            -

            - - The following string filters are provided by the optional distribution. -

            - ScriptFilter
            -

            - -Some of the filters may be used directly within a filter chain. In this -case a tokenfilter is created implicitly. An extra attribute "byline" -is added to the filter to specify whether to use a linetokenizer -(byline="true") or a filetokenizer (byline="false"). The default -is "true". -

            - -

            LineTokenizer

            -This tokenizer splits the input into lines. -The tokenizer delimits lines -by "\r", "\n" or "\r\n". -This is the default tokenizer. - - - - - +

            LineTokenizer

            +

            This tokenizer splits the input into lines. The tokenizer delimits lines by \r, \n +or \r\n. This is the default tokenizer.

            +
            AttributeDescriptionRequired
            + + + + - - + - +
            AttributeDescriptionRequired
            includeDelims + includeDelims Include the line endings in the token. - Default is false. NoNo; default is false
            -

            Examples:

            - -Convert input current line endings to unix style line endings. -
            -<tokenfilter delimoutput="\n"/>
            -
            +
            Examples
            +

            Convert input current line endings to Unix style line endings.

            +
            <tokenfilter delimoutput="\n"/>
            -Remove blank lines. -
            +

            Remove blank lines.

            +
             <tokenfilter>
                 <ignoreblank/>
            -</tokenfilter>
            -
            -
            +</tokenfilter> -

            FileTokenizer

            -This tokenizer treats all the input as a token. So be -careful not to use this on very large input. -

            Examples:

            +

            FileTokenizer

            +

            This tokenizer treats all the input as a token. So be careful not to use +this on very large input.

            +
            Examples
            -Replace the first occurrence of package with //package. -
            +

            Replace the first occurrence of package with //package.

            +
             <tokenfilter>
                   <filetokenizer/>
                   <replaceregex pattern="([\n\r]+[ \t]*|^[ \t]*)package"
                                 flags="s"
                                 replace="\1//package"/>
            -</tokenfilter>
            -
            +</tokenfilter> -

            StringTokenizer

            -This tokenizer is based on java.util.StringTokenizer. -It splits up the input into strings separated by white space, or -by a specified list of delimiting characters. -If the stream starts with delimiter characters, the first -token will be the empty string (unless the delimsaretokens -attribute is used). - - - - - - - - - - - +

            StringTokenizer

            +

            This tokenizer is based on java.util.StringTokenizer. It splits up the +input into strings separated by white space, or by a specified list of delimiting characters. If +the stream starts with delimiter characters, the first token will be the empty string (unless +the delimsaretokens attribute is used).

            + +
            AttributeDescriptionRequired
            delimsThe delimiter characters. White space - is used if this is not set. (White space is defined - in this case by java.lang.Character.isWhitespace()). - No
            + + + + - - + - + - - - + + + - - - + + + + + + + +
            AttributeDescriptionRequired
            delimsaretokensIf this is true, - each delimiter character is returned as a token. - Default is false. + delimsThe delimiter characters. NoNo; defaults to white space as defined + by java.lang.Character.isWhitespace()
            suppressdelims - If this is true, delimiters are not returned. - Default is false. - NodelimsaretokensIf this is true, each delimiter character is returned as a token.No; default is false
            includeDelims - Include the delimiters in the token. - Default is false. - NosuppressdelimsIf this is true, delimiters are not returned.No; default is false
            includeDelimsInclude the delimiters in the token.No; default is false
            -

            Examples:

            +
            Examples
            -Surround each non space token with a "[]". +

            Surround each non space token with a [].

            -
            +
             <tokenfilter>
                 <stringtokenizer/>
                 <replaceregex pattern="(.+)" replace="[\1]"/>
            -</tokenfilter>
            -
            -
            +</tokenfilter> -

            ReplaceString

            -This is a simple filter to replace strings. -This filter may be used directly within a filterchain. +

            ReplaceString

            +

            This is a simple filter to replace strings. This filter may be used directly within +a filterchain.

            - +
            - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            fromThe string that must be replaced.YesfromThe string that must be replaced.Yes
            toThe new value for the replaced string. When omitted - an empty string is used. - NotoThe new value for the replaced string.No; defaults to empty string
            -

            Examples:

            +
            Examples
            -Replace "sun" with "moon". +

            Replace sun with moon.

            -
            +
             <tokenfilter>
                 <replacestring from="sun" to="moon"/>
            -</tokenfilter>
            -
            +</tokenfilter> -

            ContainsString

            -This is a simple filter to filter tokens that contains -a specified string. +

            ContainsString

            +

            This is a simple filter to filter tokens that contains a specified string.

            - +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            containsThe string that the token must contain.YescontainsThe string that the token must contain.Yes
            -

            Examples:

            +
            Examples
            -Include only lines that contain "foo"; +

            Include only lines that contain foo

            -
            +
             <tokenfilter>
                 <containsstring contains="foo"/>
            -</tokenfilter>
            -
            -
            +</tokenfilter> -

            ReplaceRegex

            -This string filter replaces regular expressions. -This filter may be used directly within a filterchain. +

            ReplaceRegex

            +

            +This string filter replaces regular expressions. This filter may be used directly within +a filterchain. +

            - See Regexp Type -concerning the choice of the implementation. +See Regexp Type concerning the choice of the +implementation.

            - +
            - - - + + + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            patternThe regular expression pattern to match in - the token.YespatternThe regular expression pattern to match in the token.Yes
            replaceThe substitution pattern to replace the matched - regular expression. When omitted an empty string is used.NoreplaceThe substitution pattern to replace the matched regular expression.No; defaults to empty string
            flagsSee -ReplaceRegexp -for an explanation of regex flags.NoflagsSee ReplaceRegexp for an explanation of regex + flags.No
            -

            Examples:

            +
            Examples
            -Replace all occurrences of "hello" with "world", ignoring case. +

            Replace all occurrences of hello with world, ignoring case.

            -
            +
             <tokenfilter>
                 <replaceregex pattern="hello" replace="world" flags="gi"/>
            -</tokenfilter>
            -
            -
            +</tokenfilter> -

            ContainsRegex

            -This filters strings that match regular expressions. -The filter may optionally replace the matched regular expression. -This filter may be used directly within a filterchain. -

            -See -Regexp Type -concerning the choice of regular expression implementation. +

            ContainsRegex

            +

            +This filters strings that match regular expressions. The filter may optionally replace the +matched regular expression. This filter may be used directly within a filterchain.

            - +

            +See Regexp Type concerning the choice of regular +expression implementation. +

            +
            - - - + + + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            patternThe regular expression pattern to match in - the token.YespatternThe regular expression pattern to match in the token.Yes
            replaceThe substitution pattern to replace the matched - regular expression. When omitted the original token is returned. - NoreplaceThe substitution pattern to replace the matched regular expression.No; defaults to returning the original token
            flagsSee -ReplaceRegexp -for an explanation of regex flags.NoflagsSee ReplaceRegexp for an explanation of regex + flags.No
            -

            Examples:

            +
            Examples
            -Filter lines that contain "hello" or "world", ignoring case. +

            Filter lines that contain hello or world, ignoring case.

            -
            +
             <tokenfilter>
                 <containsregex pattern="(hello|world)" flags="i"/>
            -</tokenfilter>
            +</tokenfilter>
            -
            +

            This example replaces lines like SUITE(TestSuite, bits); with void +register_bits(); and removes other lines.

            -This example replaces lines like "SUITE(TestSuite, bits);" with -"void register_bits();" and removes other lines. - -
            +
             <tokenfilter>
                 <containsregex
                     pattern="^ *SUITE\(.*,\s*(.*)\s*\).*"
                     replace="void register_\1();"/>
            -</tokenfilter>
            -
            +</tokenfilter> + +

            Trim

            +

            This filter trims whitespace from the start and end of tokens. This filter may be used +directly within a filterchain.

            + +

            IgnoreBlank

            +

            This filter removes empty tokens. This filter may be used directly within +a filterchain.

            -

            Trim

            -This filter trims whitespace from the start and end of -tokens. -This filter may be used directly within a filterchain. -

            IgnoreBlank

            -This filter removes empty tokens. -This filter may be used directly within a filterchain. -

            DeleteCharacters

            -This filter deletes specified characters from tokens. +

            DeleteCharacters

            +

            This filter deletes specified characters from tokens.

            - +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            charsThe characters to delete. This attribute - is backslash enabled.YescharsThe characters to delete. This attribute is backslash enabled.Yes
            -

            Examples:

            +
            Examples
            -Delete tabs from lines, trim the lines and removes empty lines. +

            Delete tabs from lines, trim the lines and removes empty lines.

            -
            +
             <tokenfilter>
                 <deletecharacters chars="\t"/>
                 <trim/>
                 <ignoreblank/>
            -</tokenfilter>
            -
            -
            +</tokenfilter> -

            UniqFilter

            +

            UniqFilter

            -

            Suppresses all tokens that match their ancestor token. It is most - useful if combined with a sort filter.

            +

            Suppresses all tokens that match their ancestor token. It is most useful if combined with a +sort filter.

            -

            This filter may be used directly within a filterchain.

            +

            This filter may be used directly within a filterchain.

            -

            Example:

            +
            Example
            -This suppresses duplicate lines. -
            +

            This suppresses duplicate lines.

            +
             <tokenfilter>
               <uniqfilter/>
            -</tokenfilter>
            -
            +</tokenfilter> + +

            Native2AsciiFilter

            -

            Native2AsciiFilter

            +

            Since Ant 1.9.8

            Uses the "builtin" implementation of - the native2ascii task.

            +the native2ascii task.

            -

            Replaces non-ascii characters by their Unicode-escapes or - vice-versa. Since Ant 1.9.8.

            +

            Replaces non-ASCII characters by their Unicode-escapes or vice-versa.

            -

            This filter may be used directly within a filterchain.

            +

            This filter may be used directly within a filterchain.

            - +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            reverseReverse the sense of the conversion, - i.e. convert from ASCII to native.NoreverseReverse the sense of the conversion, i.e. convert from ASCII to native.No
            -

            Example:

            +
            Example

            This replaces all non-ASCII characters by their Unicode-escapes.

            -
            +
             <tokenfilter>
               <native2asciifilter/>
            -</tokenfilter>
            -
            +</tokenfilter> -

            ScriptFilter

            -This is an optional filter that executes a script in a -Apache BSF - or - JSR 223 -supported language.

            -See the Script task for -an explanation of scripts and dependencies. +

            ScriptFilter

            +

            +This is an optional filter that executes a script in a Apache BSF +or JSR 223 supported language.

            -The script is provided with an object self that has -getToken() and setToken(String) methods. -The getToken() method returns the current token. The setToken(String) -method replaces the current token. +See the Script task for an explanation of scripts and +dependencies.

            - -This filter may be used directly within a filterchain.

            - +

            +The script is provided with an object self that +has getToken() and setToken(String) methods. +The getToken() method returns the current +token. The setToken(String) method replaces the current token. +

            +

            +This filter may be used directly within a filterchain. +

            +
            - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + - - + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            language The programming language the script is written in. -Must be a supported Apache BSF or JSR 223 languageYeslanguageProgramming language the script is written in. Must be a supported Apache BSF or JSR 223 + languageYes
            manager - The script engine manager to use. - See the script task - for using this attribute. - No - default is "auto"managerScript engine manager to use. See the script task for + using this attribute.No; default is auto
            srcThe location of the script as a file, if not inline - NosrcLocation of the script as a file, if not inline.No
            setbeanswhether to have all properties, references and targets as - global variables in the script. since Ant 1.8.0No, default is "true".encodingEncoding of the script as a file. Since Ant 1.10.2No; defaults to default JVM character encoding
            classpath - The classpath to pass into the script. - NosetbeansWhether to have all properties, references and targets as global variables in the + script. Since Ant 1.8.0No; default is true
            classpathThe classpath to pass into the script.No
            classpathrefThe classpath to use, given as a - reference to a path defined elsewhere. - NoclasspathrefThe classpath to use, given as a reference to a path + defined elsewhere. + No
            -

            - This filter can take a nested <classpath> element. - See the script task - on how to use this element. -

            -

            Examples:

            - -Convert to uppercase: -
            +

            +This filter can take a nested <classpath> element. See +the script task on how to use this element. +

            +
            Examples
            +

            Convert to uppercase:

            +
             <tokenfilter>
                 <scriptfilter language="javascript">
                     self.setToken(self.getToken().toUpperCase());
                 </scriptfilter>
            -</tokenfilter>
            -
            +</tokenfilter> -Remove lines containing the string "bad" while -copying text files: -
            -
            +

            Remove lines containing the string bad while copying text files:

            +
             <copy todir="dist">
               <fileset dir="src" includes="**/*.txt"/>
               <filterchain>
            @@ -1619,19 +1534,17 @@
                     }
                 </scriptfilter>
               </filterchain>
            -</copy>
            -    
            -
            - -

            Custom tokenizers and string filters

            - -Custom string filters and tokenizers may be plugged in by -extending the interfaces org.apache.tools.ant.filters.TokenFilter.Filter -and org.apache.tools.ant.util.Tokenizer respectly. - -They are defined the build file using <typedef/>. For -example a string filter that capitalizes words may be declared as: -
            +</copy>
            + +

            Custom tokenizers and string filters

            + +

            Custom string filters and tokenizers may be plugged in by extending the +interfaces org.apache.tools.ant.filters.TokenFilter.Filter +and org.apache.tools.ant.util.Tokenizer respectly.

            + +

            They are defined in the build file using <typedef/>. For example, a string +filter that capitalizes words may be declared as:

            +
             package my.customant;
             import org.apache.tools.ant.filters.TokenFilter;
             
            @@ -1644,135 +1557,20 @@
                     return token.substring(0, 1).toUpperCase() +
                             token.substring(1);
                }
            -}
            -
            - -This may be used as follows: -
            -  <typedef name="capitalize" classname="my.customant.Capitalize"
            -           classpath="my.customant.path"/>
            -  <copy file="input" tofile="output">
            -    <filterchain>
            -      <tokenfilter>
            -        <stringtokenizer/>
            -        <capitalize/>
            -      </tokenfilter>
            -    </filterchain>
            -  </copy>
            -
            - - -

            SortFilter

            -

            since Ant 1.8.0

            - -

            The sort filter reads all lines and sorts them. The sort order can - be reversed and it is possible to specify a custom implementation of - the java.util.Comparator interface to get even more - control.

            - - - - - - - - - - - - - - - - - -
            Parameter NameParameter ValueRequired
            reversewhether to reverse the sort order, - defaults to false. Note: this parameter is ignored if - the comparator parameter is present as well.No
            comparatorClass name of a class that - implements java.util.Comparator for Strings. This - class will be used to determine the sort order of lines.No
            - -

            This filter is also available using the - name sortfilter. The reverse parameter - becomes an attribute, comparator can be specified by - using a nested element.

            - -

            Examples:

            - -
            -  <copy todir="build">
            -      <fileset dir="input" includes="*.txt"/>
            -      <filterchain>
            -          <sortfilter/>
            -      </filterchain>
            -  </copy>
            -
            - -

            -Sort all files *.txt from src location -into build location. The lines of each file are sorted in -ascendant order comparing the lines via the -String.compareTo(Object o) method. -

            - -
            -  <copy todir="build">
            -      <fileset dir="input" includes="*.txt"/>
            -      <filterchain>
            -          <sortfilter reverse="true"/>
            -      </filterchain>
            -  </copy>
            -
            - -

            -Sort all files *.txt from src location into reverse -order and copy them into build location. -

            - -
            -  <copy todir="build">
            -      <fileset dir="input" includes="*.txt"/>
            -      <filterchain>
            -          <filterreader classname="org.apache.tools.ant.filters.SortFilter">
            -            <param name="comparator" value="org.apache.tools.ant.filters.EvenFirstCmp"/>
            -          </filterreader>
            -      </filterchain>
            -  </copy>
            -
            - -

            -Sort all files *.txt from src location using as -sorting criterium EvenFirstCmp class, that sorts the file -lines putting even lines first then odd lines for example. The modified files -are copied into build location. The EvenFirstCmp, -has to an instanciable class via Class.newInstance(), -therefore in case of inner class has to be static. It also has to -implement java.util.Comparator interface, for example: -

            +} +

            This may be used as follows:

            -        package org.apache.tools.ant.filters;
            -        ...(omitted)
            -          public final class EvenFirstCmp implements <b>Comparator</b> {
            -            public int compare(Object o1, Object o2) {
            -            ...(omitted)
            -            }
            -          }
            -
            - -

            The example above is equivalent to:

            - -
            -  <componentdef name="evenfirst"
            -                classname="org.apache.tools.ant.filters.EvenFirstCmp"/>
            -  <copy todir="build">
            -      <fileset dir="input" includes="*.txt"/>
            -      <filterchain>
            -          <sortfilter>
            -              <evenfirst/>
            -          </sortfilter>
            -      </filterchain>
            -  </copy>
            -
            +<typedef name="capitalize" classname="my.customant.Capitalize" + classpath="my.customant.path"/> +<copy file="input" tofile="output"> + <filterchain> + <tokenfilter> + <stringtokenizer/> + <capitalize/> + </tokenfilter> + </filterchain> +</copy> - + + diff -Nru ant-1.9.10/manual/Types/filterset.html ant-1.10.3/manual/Types/filterset.html --- ant-1.9.10/manual/Types/filterset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/filterset.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - - @@ -23,147 +21,135 @@ -

            FilterSet

            +

            FilterSet

            + +

            FilterSets are groups of filters. Filters can be defined as token-value pairs or be read in +from a file. FilterSets can appear inside tasks that support this feature or at the same level +as <target>—i.e., as children of <project>.

            + +

            FilterSets support the id and refid attributes. You can define a +FilterSet with an id attribute and then refer to that definition from another +FilterSet with a refid attribute. It is also possible to nest filtersets into +filtersets to get a set union of the contained filters.

            + +

            In addition, FilterSets can specify begintoken and/or endtoken +attributes to define what to match.

            + +

            Filtersets are used for doing replacements in tasks such as <copy>, +etc.

            -

            FilterSets are groups of filters. Filters can be defined as token-value -pairs -or be read in from a file. FilterSets can appear inside tasks that support this -feature or at the same level as <target> - i.e., as -children of -<project>.

            - -

            FilterSets support the id and refid -attributes. You can define a FilterSet with an id -attribute and then refer to that definition from another FilterSet -with a refid attribute. It is also possible to nest -filtersets into filtersets to get a set union of the contained -filters.

            - -

            In addition, FilterSets can specify -begintoken and/or -endtoken attributes to define what to match.

            -

            Filtersets are used for doing -replacements in tasks such as <copy>, etc.

            - -

            Filters can also by specified by one or more nested propertysets, the - contents of which are applied when the filterset is created.

            - -

            If you specify multiple values for the same token, the last one - defined within a filterset will be used.

            - -

            -Note: When a filterset is used in an operation, the files are -processed in text mode and the filters applied line by line. This means that -the copy operations will typically corrupt binary files. When applying filters -you should ensure that the set of files being filtered are all text files. -

            - -

            Filterset

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

            Filters can also by specified by one or more nested propertysets, the contents of which are +applied when the filterset is created.

            + +

            If you specify multiple values for the same token, the last one defined within a filterset +will be used.

            + +

            Note: When a filterset is used in an operation, the files are processed in +text mode and the filters applied line by line. This means that the copy operations will +typically corrupt binary files. When applying filters you should ensure that the set of files +being filtered are all text files.

            + +

            Filterset

            + +
            AttributeDescriptionDefaultRequired
            begintokenThe string marking the beginning of a token (eg., - @DATE@).@No
            endtokenThe string marking the end of a token (eg., - @DATE@).@No
            filtersfileSpecify a single filtersfile.noneNo
            recurseIndicates whether the replacement text of tokens - should be searched for more tokens. Since Ant 1.6.3trueNo
            onmissingfiltersfileIndicate behavior when a nonexistent filtersfile - is specified. One of "fail", "warn", "ignore". Since Ant 1.7"fail"No
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            AttributeDescriptionDefaultRequired
            begintokenThe string marking the beginning of a token (eg., @DATE@).@No
            endtokenThe string marking the end of a token (eg., @DATE@).@No
            filtersfileSpecify a single filtersfile.noneNo
            recurseIndicates whether the replacement text of tokens should be searched for more + tokens. Since Ant 1.6.3trueNo
            onmissingfiltersfileIndicate behavior when a nonexistent filtersfile is specified. One + of fail, warn, ignore. Since Ant 1.7failNo
            -

            Filter

            - +

            Filter

            +
            - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            tokenThe token to replace (eg., @DATE@)YestokenThe token to replace (eg., @DATE@)Yes
            valueThe value to replace it with - (eg., Thursday, April 26, 2001).YesvalueThe value to replace it with (eg., Thursday, April 26, 2001).Yes
            -

            Filtersfile

            - +

            Filtersfile

            +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            fileA properties file of - name-value pairs from which to load the tokens.YesfileA properties file of name-value pairs from which to load the tokens.Yes

            Examples

            -

            You are copying the version.txt file to the dist -directory from the build directory -but wish to replace the token @DATE@ with today's date.

            -
            +

            You are copying the version.txt file to the dist directory from +the build directory but wish to replace the token @DATE@ with today's +date.

            +
             <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
               <filterset>
                 <filter token="DATE" value="${TODAY}"/>
               </filterset>
             </copy>
            -
            + -

            You are copying the version.txt file to the dist -directory from the build directory -but wish to replace the token %DATE* with today's date.

            -
            +

            You are copying the version.txt file to the dist directory from the +build directory but wish to replace the token %DATE* with today's date.

            +
             <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
               <filterset begintoken="%" endtoken="*">
                 <filter token="DATE" value="${TODAY}"/>
               </filterset>
             </copy>
            -
            +

            Copy all the docs but change all dates and appropriate notices as stored in a file.

            -
            +
             <copy toDir="${dist.dir}/docs">
               <fileset dir="${build.dir}/docs">
                 <include name="**/*.html">
            @@ -172,10 +158,10 @@
                 <filtersfile file="${user.dir}/dist.properties"/>
               </filterset>
             </copy>
            -
            +

            Define a FilterSet and reference it later.

            -
            +
             <filterset id="myFilterSet" begintoken="%" endtoken="*">
               <filter token="DATE" value="${TODAY}"/>
             </filterset>
            @@ -183,12 +169,12 @@
             <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
               <filterset refid="myFilterSet"/>
             </copy>
            -
            + -

            You are copying the version.txt file to the dist -directory from the build directory -but wish to replace the token @project.date@ with the property of the same name.

            -
            +

            You are copying the version.txt file to the dist directory from +the build directory but wish to replace the token @project.date@ with +the property of the same name.

            +
             <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
               <filterset>
                 <propertyset>
            @@ -196,5 +182,6 @@
                 </propertyset>
               </filterset>
             </copy>
            -
            - + + + diff -Nru ant-1.9.10/manual/Types/mapper.html ant-1.10.3/manual/Types/mapper.html --- ant-1.9.10/manual/Types/mapper.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/mapper.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,124 +24,113 @@ -

            Mapping File Names

            -

            Some tasks take source files and create target files. Depending on -the task, it may be quite obvious which name a target file will have -(using javac, you know there will be -.class files for your .java files) - in -other cases you may want to specify the target files, either to help -Apache Ant or to get an extra bit of functionality.

            -

            While source files are usually specified as filesets, you don't specify target files directly - -instead, you tell Ant how to find the target file(s) for one source file. An -instance of org.apache.tools.ant.util.FileNameMapper is -responsible for this. It constructs target file names based on rules -that can be parameterized with from and to -attributes - the exact meaning of which is implementation-dependent.

            -

            These instances are defined in <mapper> elements -with the following attributes:

            - - - - - - - - - - +

            Mapping File Names

            +

            Some tasks take source files and create target files. Depending on the task, it may be quite +obvious which name a target file will have (using javac, you know +there will be .class files for your .java files)—in other cases you +may want to specify the target files, either to help Apache Ant or to get an extra bit of +functionality.

            +

            While source files are usually specified as filesets, you don't +specify target files directly—instead, you tell Ant how to find the target file(s) for one +source file. An instance of org.apache.tools.ant.util.FileNameMapper is +responsible for this. It constructs target file names based on rules that can be parameterized +with from and to attributes—the exact meaning of which is +implementation-dependent.

            +

            These instances are defined in <mapper> elements with the following +attributes:

            +
            AttributeDescriptionRequired
            typespecifies one of the built-in implementations.Exactly one of these
            + + + + + + + + + - - + + - - + - + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequired
            typespecifies one of the built-in implementations.Exactly one of these
            classnamespecifies the implementation by class name.classnamespecifies the implementation by class name.
            classpaththe classpath to use when looking up + classpaththe classpath to use when looking up classname.NoNo
            classpathrefthe classpath to use, given as reference to a path defined elsewhere.Noclasspathrefthe classpath to use, given as reference to a + path defined elsewhere.No
            fromthe from attribute for the given - implementation.Depends on implementation.fromthe from attribute for the given implementation.Depends on implementation
            tothe to attribute for the given - implementation.Depends on implementation.tothe to attribute for the given implementation.Depends on implementation
            -

            Note that Ant will not automatically convert / or \ characters in -the to and from attributes to the correct -directory separator of your current platform. If you need to specify -this separator, use ${file.separator} instead. - For the regexpmapper, ${file.separator} will not work, -as on windows it is the '\' character, and this is an escape character -for regular expressions, one should use the handledirsep attribute -instead. +

            Note that Ant will not automatically convert / or \ characters in the to +and from attributes to the correct directory separator of your current platform. If you +need to specify this separator, use ${file.separator} instead. For the regexp +mapper, ${file.separator} will not work, as on Windows it is the \ character, +and this is an escape character for regular expressions, one should use +the handledirsep attribute instead.

            Parameters specified as nested elements

            -

            The classpath can be specified via a nested -<classpath>, as well - that is, -a path-like structure.

            -

            Since Ant 1.7.0, nested File Mappers can -be supplied via either <mapper> elements or -<typedef>'d -implementations of org.apache.tools.ant.util.FileNameMapper. -If nested File Mappers are specified by either means, the mapper will be -implicitly configured as a composite mapper. -

            -
            -

            The built-in mapper types are:

            +

            The classpath can be specified via a nested <classpath>, as well—that +is, a path-like structure.

            +

            Since Ant 1.7.0, nested File Mappers can be supplied via +either <mapper> elements +or <typedef>'d implementations +of org.apache.tools.ant.util.FileNameMapper. If nested File Mappers are +specified by either means, the mapper will be implicitly configured as +a composite mapper.

            +

            The built-in mapper types

            All built-in mappers are case-sensitive.

            -

            As of Ant 1.7.0, each of the built-in mapper implementation - types is directly accessible using a specific tagname. This makes it - possible for filename mappers to support attributes in addition to - the generally available to and from.
            - The <mapper type|classname="..."> usage - form remains valid for reasons of backward compatibility.

            +

            Since Ant 1.7.0, each of the built-in mapper implementation types is directly accessible +using a specific tagname. This makes it possible for filename mappers to support attributes in +addition to the generally available to and from.
            +The <mapper type|classname="..."> usage form +remains valid for reasons of backward compatibility.

            -

            identity

            -

            The target file name is identical to the source file name. Both -to and from will be ignored.

            -Examples: -
            +

            identity

            +

            The target file name is identical to the source file name. Both to and from +will be ignored.

            +
            Examples
            +
             <mapper type="identity"/>
            -<identitymapper/>
            -
            - +<identitymapper/> +
            - - + + - - + + - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            A.javaA.javaA.javaA.java
            foo/bar/B.javafoo/bar/B.javafoo/bar/B.javafoo/bar/B.java
            C.propertiesC.propertiesC.propertiesC.properties
            Classes/dir/dir2/A.propertiesClasses/dir/dir2/A.propertiesClasses/dir/dir2/A.propertiesClasses/dir/dir2/A.properties
            @@ -149,35 +138,33 @@ -

            flatten

            -

            The target file name is identical to the source file name, with all -leading directory information stripped off. Both to and -from will be ignored.

            -Examples: -
            +

            flatten

            +

            The target file name is identical to the source file name, with all leading directory information +stripped off. Both to and from will be ignored.

            +
            Examples
            +
             <mapper type="flatten"/>
            -<flattenmapper/>
            -
            - +<flattenmapper/> +
            - - + + - - + + - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            A.javaA.javaA.javaA.java
            foo/bar/B.javaB.javafoo/bar/B.javaB.java
            C.propertiesC.propertiesC.propertiesC.properties
            Classes/dir/dir2/A.propertiesA.propertiesClasses/dir/dir2/A.propertiesA.properties
            @@ -185,34 +172,33 @@ -

            merge

            -

            The target file name will always be the same, as defined by -to - from will be ignored.

            -
            Examples:
            -
            +

            merge

            +

            The target file name will always be the same, as defined by tofrom +will be ignored.

            +
            Examples
            +
             <mapper type="merge" to="archive.tar"/>
            -<mergemapper to="archive.tar"/>
            -
            - +<mergemapper to="archive.tar"/> +
            - - + + - - + + - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            A.javaarchive.tarA.javaarchive.tar
            foo/bar/B.javaarchive.tarfoo/bar/B.javaarchive.tar
            C.propertiesarchive.tarC.propertiesarchive.tar
            Classes/dir/dir2/A.propertiesarchive.tarClasses/dir/dir2/A.propertiesarchive.tar
            @@ -220,384 +206,332 @@ -

            glob

            -

            Both to and from are required and define patterns that may -contain at most one *. For each source file that matches -the from pattern, a target file name will be constructed -from the to pattern by substituting the * in -the to pattern with the text that matches the -* in the from pattern. Source file names -that don't match the from pattern will be ignored.

            -Examples: -
            +

            glob

            +

            Both to and from are required and define patterns that may contain at most +one *. For each source file that matches the from pattern, a target file name will +be constructed from the to pattern by substituting the * in the to +pattern with the text that matches the * in the from pattern. Source file names +that don't match the from pattern will be ignored.

            +
            Examples
            +
             <mapper type="glob" from="*.java" to="*.java.bak"/>
            -<globmapper from="*.java" to="*.java.bak"/>
            -
            - +<globmapper from="*.java" to="*.java.bak"/> +
            - - + + - - + + - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            A.javaA.java.bakA.javaA.java.bak
            foo/bar/B.javafoo/bar/B.java.bakfoo/bar/B.javafoo/bar/B.java.bak
            C.propertiesignoredC.propertiesignored
            Classes/dir/dir2/A.propertiesignoredClasses/dir/dir2/A.propertiesignored
            -
            +
             <mapper type="glob" from="C*ies" to="Q*y"/>
            -<globmapper from="C*ies" to="Q*y"/>
            -
            - - - - - - - - - - - - - - - - - - - - - -
            Source file nameTarget file name
            A.javaignored
            foo/bar/B.javaignored
            C.propertiesQ.property
            Classes/dir/dir2/A.propertiesQlasses/dir/dir2/A.property
            -

            - The globmapper mapper can take the following extra attributes. -

            - - - - - - - - - - - - - - - -
            AttributeDescriptionRequired
            casesensitive - If this is false, the mapper will ignore case when matching the glob pattern. - This attribute can be true or false, the default is true. - Since Ant 1.6.3. - No
            handledirsep - If this is specified, the mapper will ignore the difference between the normal - directory separator characters - \ and /. - This attribute can be true or false, the default is false. - This attribute is useful for cross-platform build files. - Since Ant 1.6.3. - No
            -

            - An example: -

            -
            -      <pathconvert property="x" targetos="unix">
            -        <path path="Aj.Java"/>
            -        <mapper>
            -        <chainedmapper>
            -          <flattenmapper/>
            -          <globmapper from="a*.java" to="*.java.bak" casesensitive="no"/>
            -        </chainedmapper>
            -        </mapper>
            -      </pathconvert>
            -      <echo>x is ${x}</echo>
            -    
            -

            - will output "x is j.java.bak". -

            -

            - and -

            -
            -      <pathconvert property="x" targetos="unix">
            -        <path path="d/e/f/j.java"/>
            -        <mapper>
            -          <globmapper from="${basedir}\d/e\*" to="*" handledirsep="yes"/>
            -        </mapper>
            -      </pathconvert>
            -      <echo>x is ${x}</echo>
            -    
            -

            - will output "x is f/j.java". -

            - +<globmapper from="C*ies" to="Q*y"/> + + + + + + + + + + + + + + + + + + + + + +
            Source file nameTarget file name
            A.javaignored
            foo/bar/B.javaignored
            C.propertiesQ.property
            Classes/dir/dir2/A.propertiesQlasses/dir/dir2/A.property
            +

            The globmapper mapper can take the following extra attributes.

            + + + + + + + + + + + + + + + +
            AttributeDescriptionRequired
            casesensitive + This attribute can be true or false. If this is false, the mapper will + ignore case when matching the glob pattern. Since Ant 1.6.3 + No; default is true
            handledirsep + This attribute can be true or false. If this is specified, the mapper will + ignore the difference between the normal directory separator characters—\ + and /. This attribute is useful for cross-platform build files. Since Ant + 1.6.3 + No; default is false
            +

            An example:

            +
            +<pathconvert property="x" targetos="unix">
            +  <path path="Aj.Java"/>
            +  <mapper>
            +  <chainedmapper>
            +    <flattenmapper/>
            +    <globmapper from="a*.java" to="*.java.bak" casesensitive="no"/>
            +  </chainedmapper>
            +  </mapper>
            +</pathconvert>
            +<echo>x is ${x}</echo>
            +

            will output x is j.java.bak, and

            +
            +<pathconvert property="x" targetos="unix">
            +  <path path="d/e/f/j.java"/>
            +  <mapper>
            +    <globmapper from="${basedir}\d/e\*" to="*" handledirsep="yes"/>
            +  </mapper>
            +</pathconvert>
            +<echo>x is ${x}</echo>
            +

            will output x is f/j.java.

            -

            regexp

            +

            regexp

            -

            Both to and from are required and define -regular expressions. If the source file name (as a whole or in part) -matches the from pattern, the target file name will be -constructed from the -to pattern, using \0 to \9 as -back-references for the full match (\0) or the matches of -the subexpressions in parentheses. The to pattern -determines the whole file name, so if you wanted to -replace the extension of a file you should not use from="\.old$" -to=".new" but rather from="(.*)\.old$" to="\1.new" -(or rather use a glob mapper in this case).

            +

            Both to and from are required and define regular expressions. If the source +file name (as a whole or in part) matches the from pattern, the target file name will be +constructed from the to pattern, using \0 to \9 as +back-references for the full match (\0) or the matches of the subexpressions in +parentheses. The to pattern determines the whole file name, so if you +wanted to replace the extension of a file you should not use from="\.old$" to=".new" +but rather from="(.*)\.old$" to="\1.new" (or rather use a glob mapper in this +case).

            -

            Source files not matching the from pattern will be -ignored.

            +

            Source files not matching the from pattern will be ignored.

            -

            Note that you need to escape a dollar-sign ($) with -another dollar-sign in Ant.

            +

            Note that you need to escape a dollar-sign ($) with another dollar-sign in Ant.

            The regexp mapper needs a supporting library and an implementation -of org.apache.tools.ant.util.regexp.RegexpMatcher that - hides the specifics of the library. Since Ant 1.8.0 Ant - requires Java 1.4 to run, so the implementation based on - the java.util.regex package will always be available. - You can still use the now retired Jakarta ORO or Jakarta Regex instead if your - provide the corresponding jar in your CLASSPATH.

            - -

            For information about using gnu.regexp or gnu.rex with Ant, see this -article.

            +of org.apache.tools.ant.util.regexp.RegexpMatcher that hides the specifics +of the library. Since Ant 1.8.0, Java 1.4 or later is required, so the implementation based +on the java.util.regex package is always be available. You can still use +the now retired Jakarta ORO or Jakarta Regex instead if your provide the corresponding jar in +your CLASSPATH.

            + +

            For information about using gnu.regexp or gnu.rex +with Ant, see this +article. Please keep in mind that your mileage may vary with different regexp engines.

            If you want to use one of the regular expression - libraries other than java.util.regex you need to also use - the corresponding ant-[apache-oro, apache-regexp].jar -from the Ant release you are using. -Make sure, both will be loaded from the same -classpath, that is either put them into your CLASSPATH, -ANT_HOME/lib directory or a nested -<classpath> element of the mapper - you cannot have -ant-[apache-oro, apache-regexp].jar in ANT_HOME/lib - and the library +libraries other than java.util.regex you need to also use the +corresponding ant-[apache-oro, apache-regexp].jar from the Ant release you are using. +Make sure that both will be loaded from the same classpath, that is either put them into +your CLASSPATH, ANT_HOME/lib directory or a +nested <classpath> element of the mapper—you cannot +have ant-[apache-oro, apache-regexp].jar in ANT_HOME/lib and the library in a nested <classpath>.

            -

            Ant will choose the regular-expression library based on the -following algorithm:

            +

            Ant will choose the regular expression library based on the following algorithm:

              -
            • If the system property -ant.regexp.matcherimpl has been set, it is taken as the -name of the class implementing -org.apache.tools.ant.util.regexp.RegexpMatcher that -should be used.
            • +
            • If the system property ant.regexp.matcherimpl has been set, it is taken as the name +of the class implementing org.apache.tools.ant.util.regexp.RegexpMatcher +that should be used.
            • If it has not been set, uses the JDK 1.4 classes.
            -Examples: -
            +
            Examples
            +
             <mapper type="regexp" from="^(.*)\.java$$" to="\1.java.bak"/>
            -<regexpmapper from="^(.*)\.java$$" to="\1.java.bak"/>
            -
            - +<regexpmapper from="^(.*)\.java$$" to="\1.java.bak"/> +
            - - + + - - + + - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            A.javaA.java.bakA.javaA.java.bak
            foo/bar/B.javafoo/bar/B.java.bakfoo/bar/B.javafoo/bar/B.java.bak
            C.propertiesignoredC.propertiesignored
            Classes/dir/dir2/A.propertiesignoredClasses/dir/dir2/A.propertiesignored
            -
            +
             <mapper type="regexp" from="^(.*)/([^/]+)/([^/]*)$$" to="\1/\2/\2-\3"/>
            -<regexpmapper from="^(.*)/([^/]+)/([^/]*)$$" to="\1/\2/\2-\3"/>
            -
            - +<regexpmapper from="^(.*)/([^/]+)/([^/]*)$$" to="\1/\2/\2-\3"/> +
            - - + + - - + + - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            A.javaignoredA.javaignored
            foo/bar/B.javafoo/bar/bar-B.javafoo/bar/B.javafoo/bar/bar-B.java
            C.propertiesignoredC.propertiesignored
            Classes/dir/dir2/A.propertiesClasses/dir/dir2/dir2-A.propertiesClasses/dir/dir2/A.propertiesClasses/dir/dir2/dir2-A.properties
            -
            +
             <mapper type="regexp" from="^(.*)\.(.*)$$" to="\2.\1"/>
            -<regexpmapper from="^(.*)\.(.*)$$" to="\2.\1"/>
            -
            - +<regexpmapper from="^(.*)\.(.*)$$" to="\2.\1"/> +
            - - + + - - + + - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            A.javajava.AA.javajava.A
            foo/bar/B.javajava.foo/bar/Bfoo/bar/B.javajava.foo/bar/B
            C.propertiesproperties.CC.propertiesproperties.C
            Classes/dir/dir2/A.propertiesproperties.Classes/dir/dir2/AClasses/dir/dir2/A.propertiesproperties.Classes/dir/dir2/A
            -
            +
             <mapper type="regexp" from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/>
            -<regexpmapper from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/>
            -
            - - - - - - - - - - - - - - - - - - - - - -
            Source file nameTarget file name
            ClassLoader.classClassLoader.java
            java/lang/ClassLoader.classjava/lang/ClassLoader.java
            java\lang\ClassLoader$1.classjava\lang\ClassLoader.java
            java/lang/ClassLoader$foo$1.classjava/lang/ClassLoader.java
            -

            - The regexpmapper mapper can take the following extra attributes. -

            - - - - - - - - - - - - - - - -
            AttributeDescriptionRequired
            casesensitive - If this is false, the mapper will ignore case when matching the pattern. - This attribute can be true or false, the default is true. - Since Ant 1.6.3. - No
            handledirsep - If this is specified, the mapper will treat a \ character in a filename - as a / for the purposes of matching. - This attribute can be true or false, the default is false. - This attribute is useful for cross-platform build files. - Since Ant 1.6.3. - No
            -

            - An example: -

            -
            -      <pathconvert property="x" targetos="unix">
            -        <path path="Aj.Java"/>
            -        <chainedmapper>
            -          <flattenmapper/>
            -          <regexpmapper from="a(.*)\.java" to="\1.java.bak" casesensitive="no"/>
            -        </chainedmapper>
            -      </pathconvert>
            -      <echo>x is ${x}</echo>
            -    
            -

            - will output "x is j.java.bak". -

            -

            - and -

            -
            -    <pathconvert property="hd.prop" targetos="windows">
            -      <path path="d\e/f\j.java"/>
            -      <chainedmapper>
            -        <regexpmapper from="${basedir}/d/e/(.*)" to="\1" handledirsep="yes"/>
            -      </chainedmapper>
            -    </pathconvert>
            -    
            -

            - will set hd.prop to "f\j.java". -

            +<regexpmapper from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/> + + + + + + + + + + + + + + + + + + + + + +
            Source file nameTarget file name
            ClassLoader.classClassLoader.java
            java/lang/ClassLoader.classjava/lang/ClassLoader.java
            java\lang\ClassLoader$1.classjava\lang\ClassLoader.java
            java/lang/ClassLoader$foo$1.classjava/lang/ClassLoader.java
            +

            The regexp mapper can take the following extra attributes.

            + + + + + + + + + + + + + + + +
            AttributeDescriptionRequired
            casesensitive + This attribute can be true or false. If this is false, the mapper will + ignore case when matching the pattern. + Since Ant 1.6.3 + No; default is true
            handledirsep + This attribute can be true or false. If this is specified, the mapper will + treat a \ character in a filename as a / for the purposes of matching. This + attribute is useful for cross-platform build files. + Since Ant 1.6.3 + No; default is false
            +

            An example:

            +
            +<pathconvert property="x" targetos="unix">
            +  <path path="Aj.Java"/>
            +  <chainedmapper>
            +    <flattenmapper/>
            +    <regexpmapper from="a(.*)\.java" to="\1.java.bak" casesensitive="no"/>
            +  </chainedmapper>
            +</pathconvert>
            +<echo>x is ${x}</echo>
            +

            will output x is j.java.bak, and

            +
            +<pathconvert property="hd.prop" targetos="windows">
            +  <path path="d\e/f\j.java"/>
            +  <chainedmapper>
            +    <regexpmapper from="${basedir}/d/e/(.*)" to="\1" handledirsep="yes"/>
            +  </chainedmapper>
            +</pathconvert>
            +

            will set hd.prop to f\j.java.

            -

            package

            -

            Sharing the same syntax as the glob mapper, -the package mapper replaces -directory separators found in the matched source pattern with dots in the target -pattern placeholder. This mapper is particularly useful in combination -with <uptodate> and <junit> output.

            -

            The to and from attributes are both required.

            -Example: -
            +

            package

            +

            Sharing the same syntax as the glob mapper, the package mapper +replaces directory separators found in the matched source pattern with dots in the target pattern +placeholder. This mapper is particularly useful in combination with <uptodate> +and <junit> output.

            +

            The to and from attributes are both required.

            +
            Example
            +
             <mapper type="package" from="*Test.java" to="TEST-*Test.xml"/>
            -<packagemapper from="*Test.java" to="TEST-*Test.xml"/>
            -
            - +<packagemapper from="*Test.java" to="TEST-*Test.xml"/> +
            - - + + - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            org/apache/tools/ant/util/PackageMapperTest.javaTEST-org.apache.tools.ant.util.PackageMapperTest.xmlorg/apache/tools/ant/util/PackageMapperTest.javaTEST-org.apache.tools.ant.util.PackageMapperTest.xml
            org/apache/tools/ant/util/Helper.javaignoredorg/apache/tools/ant/util/Helper.javaignored
            @@ -605,27 +539,25 @@ -

            unpackage (since Ant 1.6.0)

            -

            This mapper is the inverse of the package mapper. - It replaces the dots in a package name with directory separators. This - is useful for matching XML formatter results against their JUnit test - test cases. The mapper shares the sample syntax - as the glob mapper. -

            -

            The to and from attributes are both required.

            -Example: -
            +

            unpackage

            +

            Since Ant 1.6.0

            +

            This mapper is the inverse of the package mapper. It replaces the +dots in a package name with directory separators. This is useful for matching XML formatter results +against their JUnit test test cases. The mapper shares the sample syntax as +the glob mapper.

            +

            The to and from attributes are both required.

            +
            Example
            +
             <mapper type="unpackage" from="TEST-*Test.xml" to="${test.src.dir}/*Test.java">
            -<unpackagemapper from="TEST-*Test.xml" to="${test.src.dir}/*Test.java">
            -
            - +<unpackagemapper from="TEST-*Test.xml" to="${test.src.dir}/*Test.java"> +
            - - + + - - + +
            Source file nameTarget file nameSource file nameTarget file name
            TEST-org.acme.AcmeTest.xml${test.src.dir}/org/acme/AcmeTest.javaTEST-org.acme.AcmeTest.xml${test.src.dir}/org/acme/AcmeTest.java
            @@ -633,50 +565,47 @@ -

            composite (since Ant 1.7.0)

            -

            This mapper implementation can contain multiple nested mappers. - File mapping is performed by passing the source filename to each nested - <mapper> in turn, returning all results. - The to and from attributes are ignored.

            -

            Starting with Ant 1.8.0 the order of the mapped results is the - same as the order of the nested mappers; prior to Ant 1.8.0 the - order has been undefined.

            -Examples: -
            +

            composite

            +

            Since Ant 1.7.0

            +

            This mapper implementation can contain multiple nested mappers. File mapping is performed by +passing the source filename to each nested <mapper> in turn, returning all +results. The to and from attributes are ignored.

            +

            Since Ant 1.8.0, the order of the mapped results is the same as the order of the nested +mappers; prior to Ant 1.8.0 the order has been undefined.

            +
            Examples
            +
             <compositemapper>
               <identitymapper/>
               <packagemapper from="*.java" to="*"/>
            -</compositemapper>
            -
            - +</compositemapper> +
            - - + + - - + + - +
            Source file nameTarget file namesSource file nameTarget file names
            foo/bar/A.javafoo/bar/A.javafoo/bar/A.javafoo/bar/A.java
            foo.bar.Afoo.bar.A
            -

            The composite mapper has no corresponding - <mapper type> attribute. -

            +

            The composite mapper has no corresponding <mapper> type +attribute.

            -

            chained (since Ant 1.7.0)

            -

            This mapper implementation can contain multiple nested mappers. - File mapping is performed by passing the source filename to the first - nested mapper, its results to the second, and so on. The target filenames - generated by the last nested mapper comprise the ultimate results of the - mapping operation. The to and from attributes are ignored.

            -Examples: -
            +

            chained

            +

            Since Ant 1.7.0

            +

            This mapper implementation can contain multiple nested mappers. File mapping is performed by +passing the source filename to the first nested mapper, its results to the second, and so on. The +target filenames generated by the last nested mapper comprise the ultimate results of the mapping +operation. The to and from attributes are ignored.

            +
            Examples
            +
             <chainedmapper>
               <flattenmapper/>
               <globmapper from="*" to="new/path/*"/>
            @@ -684,289 +613,248 @@
                 <globmapper from="*" to="*1"/>
                 <globmapper from="*" to="*2"/>
               </mapper>
            -</chainedmapper>
            -
            - +</chainedmapper> +
            - - + + - - + + - + - - + + - +
            Source file nameTarget file namesSource file nameTarget file names
            foo/bar/A.javanew/path/A.java1foo/bar/A.javanew/path/A.java1
            new/path/A.java2new/path/A.java2
            boo/far/B.javanew/path/B.java1boo/far/B.javanew/path/B.java1
            new/path/B.java2new/path/B.java2
            -

            The chained mapper has no corresponding - <mapper type> attribute. -

            +

            The chained mapper has no corresponding <mapper> type +attribute.

            -

            filtermapper (since Ant 1.6.3)

            -

            - This mapper implementation applies a filterchain - to the source file name. -

            -Examples: -
            +

            filtermapper

            +

            Since Ant 1.6.3

            +

            This mapper implementation applies a filterchain to the source +file name.

            +
            Examples
            +
             <filtermapper>
               <replacestring from="\" to="/"/>
            -</filtermapper>
            -
            +</filtermapper> - +
            - - + + - - + +
            Source file nameTarget file namesSource file nameTarget file names
            foo\bar\A.javafoo/bar/A.javafoo\bar\A.javafoo/bar/A.java
            -
            +
             <filtermapper>
               <scriptfilter language="beanshell">
                 self.setToken(self.getToken().toUpperCase());
               </scriptfilter>
            -</filtermapper>
            -
            +</filtermapper> - +
            - - + + - - + +
            Source file nameTarget file namesSource file nameTarget file names
            foo\bar\A.javaFOO\BAR\A.JAVAfoo\bar\A.javaFOO\BAR\A.JAVA
            -

            The filtermapper has no corresponding - <mapper type> attribute. -

            +

            The filtermapper has no corresponding <mapper> type attribute.

            -

            scriptmapper (since Ant 1.7)

            -

            -This mapper executes a script written in Apache BSF -or - JSR 223 -supported language, once per file to map.

            -The script can be declared inline or in a specified file. -

            -

            -See the Script task for -an explanation of scripts and dependencies. -

            +

            scriptmapper

            +

            Since Ant 1.7

            +

            This mapper executes a script written in Apache BSF +or JSR 223 supported language, once per file to map.

            +

            The script can be declared inline or in a specified file.

            +

            See the Script task for an explanation of scripts and +dependencies.

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescriptionRequired
            language - Scripting language - Yes
            manager - The script engine manager to use. - See the script task - for using this attribute. - No - default is "auto"
            src - File containing the script - No
            setbeanswhether to have all properties, references and targets as - global variables in the script. since Ant 1.8.0No, default is "true".
            classpath - The classpath to pass into the script. - No
            classpathrefThe classpath to use, given as a - reference to a path defined elsewhere. - No
            -

            - This filename mapper can take a nested <classpath> element. - See the script task - on how to use this element. -

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            AttributeDescriptionRequired
            languageScripting languageYes
            managerThe script engine manager to use. See the script task + for using this attribute.No; default is auto
            srcFile containing the scriptNo
            encodingThe encoding of the script as a file. Since Ant 1.10.2No; defaults to default JVM character encoding
            setbeanswhether to have all properties, references and targets as global variables in the + script. Since Ant 1.8.0No; default is true
            classpathThe classpath to pass into the script.No
            classpathrefThe classpath to use, given as a reference to a + path defined elsewhere. + No
            +

            This filename mapper can take a nested <classpath> element. See +the script task on how to use this element.

            -

            - Example: -

            -
            +
            Example
            +
             <scriptmapper language="javascript">
               self.addMappedName(source.toUpperCase());
               self.addMappedName(source.toLowerCase());
            -</scriptmapper>
            -
            +</scriptmapper> - +
            + + + + - - + + - - - - - - -
            Source file nameTarget file names
            Source file nameTarget file namesfoo\bar\A.javaFOO\BAR\A.JAVA
            foo\bar\A.javaFOO\BAR\A.JAVA
            foo\bar\a.java
            - -

            -To use this mapper, the scripts need access to the source file, -and the ability to return multiple mappings. Here are the relevant beans and -their methods. The script is called once for every source file, with the -list of mapped names reset after every invocation. - - - - - - - - - - - - - - - - - - - - - - -
            Script beanDescription
            source: String - The file/path to map -
            self - the scriptmapper itself -
            self.addMappedName(String name) - Add a new mapping -
            self.clear() - Reset the list of files. -
            - -

            The scriptmapper has no corresponding - <mapper type> attribute. -

            - -

            firstmatchmapper (since Ant 1.8.0)

            -

            - This mapper supports an arbitrary number of nested mappers and - returns the results of the first mapper that matches. This is - different from composite mapper - which collects the results of all matching children.

            -Examples: -
            +    foo\bar\a.java
            +  
            +
            +
            +

            To use this mapper, the scripts need access to the source file, and the ability to return +multiple mappings. Here are the relevant beans and their methods. The script is called once for +every source file, with the list of mapped names reset after every invocation.

            + + + + + + + + + + + + + + + + + + + + + + +
            Script beanDescription
            source: StringThe file/path to map
            selfThe scriptmapper itself
            self.addMappedName(String name)Add a new mapping
            self.clear()Reset the list of files
            + +

            The scriptmapper has no corresponding <mapper> type attribute.

            + +

            firstmatchmapper

            +

            Since Ant 1.8.0

            +

            This mapper supports an arbitrary number of nested mappers and returns the results of the first +mapper that matches. This is different from composite mapper which +collects the results of all matching children.

            +
            Examples
            +
             <firstmatchmapper>
               <globmapper from="*.txt" to="*.bak"/>
               <globmapper from="*A.*" to="*B.*"/>
            -</firstmatchmapper>
            -
            +</firstmatchmapper> - +
            - - + + - - + + - - + +
            Source file nameTarget file namesSource file nameTarget file names
            foo/bar/A.txtfoo/bar/A.bakfoo/bar/A.txtfoo/bar/A.bak
            foo/bar/A.javafoo/bar/B.javafoo/bar/A.javafoo/bar/B.java
            -

            The firstmatchmapper has no corresponding - <mapper type> attribute. -

            - -

            cutdirsmapper (since Ant 1.8.2)

            +

            The firstmatchmapper has no corresponding <mapper> type +attribute.

            -

            This mapper strips a configured number of leading directories from - the source file name.

            +

            cutdirsmapper

            +

            Since Ant 1.8.2

            +

            This mapper strips a configured number of leading directories from the source file name.

            -Examples: -
            -<cutdirsmapper dirs="1"/>
            -
            +
            Examples
            +
            <cutdirsmapper dirs="1"/>
            - +
            - - + + - - + +
            Source file nameTarget file namesSource file nameTarget file names
            foo/bar/A.txtbar/A.txtfoo/bar/A.txtbar/A.txt
            -

            The cutdirsmapper has no -corresponding <mapper type> attribute.

            +

            The cutdirsmapper has no corresponding <mapper> type attribute.

            - - - - - - - - - - - -
            AttributeDescriptionRequired
            dirs - Number of directories to strip (must be a positive number). - Yes
            + + + + + + + + + + + +
            AttributeDescriptionRequired
            dirsNumber of directories to strip (must be a positive number).Yes
            diff -Nru ant-1.9.10/manual/Types/multirootfileset.html ant-1.10.3/manual/Types/multirootfileset.html --- ant-1.9.10/manual/Types/multirootfileset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/multirootfileset.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,150 +24,128 @@ -

            MultiRootFileSet

            +

            MultiRootFileSet

            Since Ant 1.9.4

            -

            A MultiRootFileSet is a group of files or directories. These files -or directories can be found in a directory forrest starting with a set -of base directories and are matched by patterns taken from a number of -PatternSets and Selectors.

            +

            A MultiRootFileSet is a group of files or directories. These files or directories can be +found in a directory forrest starting with a set of base directories and are matched by patterns +taken from a number of PatternSets +and Selectors.

            -

            MultiRootFileSet acts as a union of FileSets and DirSets -that share the same patterns and selectors.

            +

            MultiRootFileSet acts as a union of FileSets +and DirSets that share the same patterns and selectors.

            -

            MultiRootFileSet supports all attributes and nested elements of -FileSet and DirSet except for the "dir" attribute.

            +

            MultiRootFileSet supports all attributes and nested elements of FileSet and DirSet except for +the dir attribute.

            - +
            - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            basedirsComma separated list of directories that build - the roots of the MultiRootFileSet.NobasedirsComma separated list of directories that build the roots of the MultiRootFileSet.No
            cacheWhether to cache results; disabling - may seriously impact performanceNo, default truecacheWhether to cache results; disabling may seriously impact performanceNo; default is true
            typeThe type of file system entities which will be - included in this set. - Acceptable values are: + typeThe type of file system entities which will be included in this set. Acceptable values + are:
              -
            • file - regular files
            • -
            • dir - directories
            • -
            • both - regular files and directories
            • +
            • file—regular files
            • +
            • dir—directories
            • +
            • both—regular files and directories
            No, defaults to fileNo; defaults to file
            includesA comma- or space-separated list of patterns of directories that - must be included; all directories are included when omitted.NoincludesA comma- or space-separated list of patterns of directories that must be included.No; defaults to all directories
            includesfileThe name of a file; each line of this file is - taken to be an include pattern.NoincludesfileName of a file; each line of this file is taken to be an include pattern.No
            excludesA comma- or space-separated list of patterns of directories that - must be excluded; no directories are excluded when omitted.NoexcludesA comma- or space-separated list of patterns of directories that must be excluded.No; defaults to none
            excludesfileThe name of a file; each line of this file is - taken to be an exclude pattern.NoexcludesfileName of a file; each line of this file is taken to be an exclude pattern.No
            casesensitiveSpecifies whether case-sensitivity should be applied - (true|yes|on or - false|no|off).No; defaults to true.casesensitiveSpecifies whether case-sensitivity should be applied (true, yes, on + or false, no, off).No; defaults to true
            followsymlinksShall symbolic links be followed? Defaults to - true. See fileset's documentation.NofollowsymlinksShall symbolic links be followed? See fileset's + documentation.No; defaults to true
            erroronmissingdir - Specify what happens if one of the base directories does not exist. - If true a build error will happen, if false, the subtree - will be ignored/empty. - Defaults to true. - NoerroronmissingdirSpecify what happens if one of the base directories does not exist. If true a + build error will happen, if false, the subtree will be ignored/empty.No; defaults to true

            Parameters specified as nested elements

            -

            PatternSets can be specified as nested -<patternset> elements. In addition, MultiRootFileSet holds -an implicit PatternSet and supports the nested -<include>, <includesfile>, -<exclude> and <excludesfile> -elements of <patternset> directly, as well as -<patternset>'s attributes.

            - -

            Selectors are available as nested elements within the -MultiRootFileSet. If any of the selectors within the MultiRootFileSet -do not select the file or directory, it is not considered part of the -MultiRootFileSet. This makes a MultiRootFileSet equivalent to +

            PatternSets can be specified as nested <patternset> elements. In addition, +MultiRootFileSet holds an implicit PatternSet and supports the +nested <include>, <includesfile>, <exclude> +and <excludesfile> elements of <patternset> directly, as +well as <patternset>'s attributes.

            + +

            Selectors are available as nested elements within the MultiRootFileSet. If any of the +selectors within the MultiRootFileSet do not select the file or directory, it is not considered +part of the MultiRootFileSet. This makes a MultiRootFileSet equivalent to an <and> selector container.

            -

            In addition basedirs for the MultiRootFileSet can be specified as - nested basedir elements that have a - single file attribute.

            - +

            In addition basedirs for the MultiRootFileSet can be specified as nested basedir +elements that have a single file attribute.

            -

            Examples

            +

            Examples

            -
            +
             <multirootfileset basedirs="${build.dir},${other.project.dir}">
               <include name="apps/**/classes"/>
               <exclude name="apps/**/*Test*"/>
             </multirootfileset>
            -
            -

            Groups all files inside classes found under the -apps subdirectory of ${build.dir} or -${other.project.dir}, except those that have the text -Test in their name.

            + +

            Groups all files inside classes found under the apps subdirectory +of ${build.dir} or ${other.project.dir}, except those that have the +text Test in their name.

            -
            +
             <multirootfileset>
               <basedir file="${build.dir}"/>
               <basedir file="${other.project.dir}"
               <include name="apps/**/classes"/>
               <exclude name="apps/**/*Test*"/>
             </multirootfileset>
            -
            -

            Is equivalent to the first example but used - nested basedir elements. The nested elements and - the basedirs attribute can be used at the same time and - the will be merged.

            + +

            Is equivalent to the first example but used nested basedir elements. The nested +elements and the basedirs attribute can be used at the same time and the will be +merged.

            - diff -Nru ant-1.9.10/manual/Types/namespace.html ant-1.10.3/manual/Types/namespace.html --- ant-1.9.10/manual/Types/namespace.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/namespace.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,146 +14,142 @@ See the License for the specific language governing permissions and limitations under the License. --> - - -XmlNamespaceSupport + + + + XmlNamespaceSupport + -

            XML Namespace Support

            - Apache Ant 1.6 introduces support for XML namespaces. +

            XML Namespace Support

            + Apache Ant 1.6 introduces support for XML namespaces.

            History

            - +

            - All releases of Ant prior to Ant 1.6 do not support XML namespaces. - No support basically implies two things here: + All releases of Ant prior to Ant 1.6 do not support XML namespaces. No support basically + implies two things here:

              -
            • Element names correspond to the "qname" of the tags, which is - usually the same as the local name. But if the build file writer uses - colons in names of defined tasks/types, those become part of the - element name. Turning on namespace support gives colon-separated - prefixes in tag names a special meaning, and thus build files using +
            • Element names correspond to the "qname" of the tags, which is usually the same as the + local name. But if the build file writer uses colons in names of defined tasks/types, + those become part of the element name. Turning on namespace support gives + colon-separated prefixes in tag names a special meaning, and thus build files using colons in user-defined tasks and types will break.
            • -
            • Attributes with the names 'xmlns' and 'xmlns:<prefix>' - are not treated specially, which means that custom tasks and types have - actually been able to use such attributes as parameter names. Again, - such tasks/types are going to break when namespace support is enabled - on the parser. +
            • Attributes with the names xmlns and xmlns:prefix are not + treated specially, which means that custom tasks and types have actually been able to + use such attributes as parameter names. Again, such tasks/types are going to break when + namespace support is enabled on the parser.
            -

            Use of colons in element names has been discouraged in the past, - and using any attribute starting with "xml" is actually strongly - discouraged by the XML spec to reserve such names for future use. +

            Use of colons in element names has been discouraged in the past, and using any attribute + starting with xml is actually strongly discouraged by the XML spec to reserve such + names for future use.

            +

            Motivation

            +

            In build files using a lot of custom and third-party tasks, it is easy to get into name + conflicts. When individual types are defined, the build file writer can do some + namespacing manually (for example, using tomcat-deploy instead of + just deploy). But when defining whole libraries of types using + the <typedef> resource attribute, the build file writer has + no chance to override or even prefix the names supplied by the library.

            -

            In build files using a lot of custom and third-party tasks, it is - easy to get into name conflicts. When individual types are defined, the - build file writer can do some namespacing manually (for example, using - "tomcat-deploy" instead of just "deploy"). But when defining whole - libraries of types using the <typedef> 'resource' attribute, the - build file writer has no chance to override or even prefix the names - supplied by the library.

            Assigning Namespaces

            -

            - Adding a 'prefix' attribute to <typedef> might have been enough, - but XML already has a well-known method for namespacing. Thus, instead - of adding a 'prefix' attribute, the <typedef> and <taskdef> - tasks get a 'uri' attribute, which stores the URI of the XML namespace - with which the type should be associated: -

             <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            - <my:task xmlns:my="http://example.org/tasks">
            -    ...
            - </my:task>
            -
            -

            As the above example demonstrates, the namespace URI needs to be - specified at least twice: one time as the value of the 'uri' attribute, - and another time to actually map the namespace to occurrences of - elements from that namespace, by using the 'xmlns' attribute. This - mapping can happen at any level in the build file: -

             <project name="test" xmlns:my="http://example.org/tasks"> 
            -   <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            -   <my:task>
            -     ...
            -   </my:task>
            - </project>
            -
            -

            - Use of a namespace prefix is of course optional. Therefore - the example could also look like this: -

             <project name="test"> 
            -   <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            -   <task xmlns="http://example.org/tasks">
            -     ...
            -   </task>
            - </project>
            -
            + Adding a prefix attribute to <typedef> might have been + enough, but XML already has a well-known method for namespacing. Thus, instead of adding + a prefix attribute, the <typedef> + and <taskdef> tasks get a uri attribute, which stores the + URI of the XML namespace with which the type should be associated: +

            +
            +<typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            +<my:task xmlns:my="http://example.org/tasks">
            +    ...
            +</my:task>
            +

            As the above example demonstrates, the namespace URI needs to be specified at least + twice: one time as the value of the uri attribute, and another time to actually + map the namespace to occurrences of elements from that namespace, by using + the xmlns attribute. This mapping can happen at any level in the build file: +

            +
            +<project name="test" xmlns:my="http://example.org/tasks">
            +    <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            +    <my:task>
            +        ...
            +    </my:task>
            +</project>
            +

            + Use of a namespace prefix is of course optional. Therefore the example could also look + like this: +

            +
            +<project name="test">
            +    <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            +    <task xmlns="http://example.org/tasks">
            +        ...
            +    </task>
            +</project>

            Here, the namespace is set as the default namespace for the <task> element and all its descendants.

            -

            Default namespace

            + +

            Default Namespace

            - The default namespace used by Ant is "antlib:org.apache.tools.ant". + The default namespace used by Ant is antlib:org.apache.tools.ant.

             <typedef resource="org/example/tasks.properties" uri="antlib:org.apache.tools.ant"/>
             <task>
            -      ....
            -</task>
            -    
            - - + ... +</task>

            Namespaces and Nested Elements

            -

            - Almost always in Ant 1.6, elements nested inside a namespaced - element have the same namespace as their parent. So if 'task' in the - example above allowed a nested 'config' element, the build file snippet - would look like this: -

             <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            - <my:task xmlns:my="http://example.org/tasks">
            -   <my:config a="foo" b="bar"/>
            -   ...
            - </my:task>
            -
            -

            If the element allows or requires a lot of nested elements, the - prefix needs to be used for every nested element. Making the namespace - the default can reduce the verbosity of the script: -

             <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            -          <task xmlns="http://example.org/tasks">
            -          <config a="foo" b="bar"/>
            -   ...
            -          </task>
            -        
            -

            - From Ant 1.6.2, elements nested inside a namespaced element may also be - in Ant's default namespace. This means that the following is now allowed: -

            -

             <typedef resource="org/example/tasks.properties"
            -   uri="http://example.org/tasks"/>
            - <my:task xmlns:my="http://example.org/tasks">
            -   <config a="foo" b="bar"/>
            -   ...
            - </my:task>
            -
            - -

            Namespaces and Attributes

            + Almost always in Ant 1.6, elements nested inside a namespaced element have the same + namespace as their parent. So if task in the example above allowed a + nested config element, the build file snippet would look like this: +

            +
            +<typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            +<my:task xmlns:my="http://example.org/tasks">
            +    <my:config a="foo" b="bar"/>
            +    ...
            +</my:task>
            +

            If the element allows or requires a lot of nested elements, the prefix needs to be used + for every nested element. Making the namespace the default can reduce the verbosity of the + script: +

            +
            +<typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
            +<task xmlns="http://example.org/tasks">
            +    <config a="foo" b="bar"/>
            +    ...
            +</task>
            +

            + Since Ant 1.6.2, elements nested inside a namespaced element may also be in Ant's + default namespace. This means that the following is now allowed: +

            +
            +<typedef resource="org/example/tasks.properties"
            +    uri="http://example.org/tasks"/>
            +<my:task xmlns:my="http://example.org/tasks">
            +    <config a="foo" b="bar"/>
            +    ...
            +</my:task>
            +

            Namespaces and Attributes

            Attributes are only used to configure the element they belong to if:

              -
            • they have no namespace (note that the default namespace does *not* apply to attributes) -
            • -
            • they are in the same namespace as the element they belong to -
            • +
            • they have no namespace (note that the default namespace does not apply to attributes)
            • +
            • they are in the same namespace as the element they belong to

            - In Ant 1.9.1 two attribute namespaces ant:if and ant:unless were added - to allow you to insert elements conditionally. + Since Ant 1.9.1 two attribute namespaces ant:if + and ant:unless are available to allow you to insert elements conditionally.

            Other attributes are simply ignored. @@ -162,62 +158,65 @@ This means that both:

            -

             <my:task xmlns:my="http://example.org/tasks">
            -   <my:config a="foo" b="bar"/>
            -   ...
            - </my:task>
            -
            +

            +
            +<my:task xmlns:my="http://example.org/tasks">
            +    <my:config a="foo" b="bar"/>
            +    ...
            +</my:task>

            and

            -
             <my:task xmlns:my="http://example.org/tasks">
            -   <my:config my:a="foo" my:b="bar"/>
            -   ...
            - </my:task>
            -
            -

            - result in the parameters "a" and "b" being used as parameters to configure the nested "config" element. -

            -

            It also means that you can use attributes from other namespaces - to markup the build file with extra metadata, such as RDF and - XML-Schema (whether that's a good thing or not). The same is not true - for elements from unknown namespaces, which result in a error. +

            +<my:task xmlns:my="http://example.org/tasks">
            +    <my:config my:a="foo" my:b="bar"/>
            +    ...
            +</my:task>
            +

            + result in the parameters a and b being used as parameters to + configure the nested config element. +

            +

            + It also means that you can use attributes from other namespaces to markup the build file + with extra metadata, such as RDF and XML-Schema (whether that's a good thing or not). The + same is not true for elements from unknown namespaces, which result in a error.

            Mixing Elements from Different Namespaces

            -

            Now comes the difficult part: elements from different namespaces can - be woven together under certain circumstances. This has a lot to do - with the Ant 1.6 - add type introspection rules: - Ant types and tasks are now free to accept arbitrary named types as - nested elements, as long as the concrete type implements the interface - expected by the task/type. The most obvious example for this is the - <condition> task, which supports various nested conditions, all - of which extend the interface Condition. To integrate a - custom condition in Ant, you can now simply <typedef> the - condition, and then use it anywhere nested conditions are allowed - (assuming the containing element has a generic add(Condition) or addConfigured(Condition) method): -

             <typedef resource="org/example/conditions.properties" uri="http://example.org/conditions"/>
            - <condition property="prop" xmlns="http://example.org/conditions">
            -   <and>
            -     <available file="bla.txt"/>
            -     <my:condition a="foo"/>
            -   </and>
            - </condition>
            -
            -

            - In Ant 1.6, this feature cannot be used as much as we'd all like to: a - lot of code has not yet been adapted to the new introspection rules, - and elements like Ant's built-in conditions and selectors are not - really types in 1.6. This is expected to change in Ant 1.7. +

            + Now comes the difficult part: elements from different namespaces can be woven together under + certain circumstances. This has a lot to do with the Ant + 1.6 add type introspection rules: Ant types and tasks + are now free to accept arbitrary named types as nested elements, as long as the concrete type + implements the interface expected by the task/type. The most obvious example for this is + the <condition> task, which supports various nested conditions, all of + which extend the interface Condition. To integrate a custom + condition in Ant, you can now simply <typedef> the condition, and then use + it anywhere nested conditions are allowed (assuming the containing element has a + generic add(Condition) + or addConfigured(Condition) method): +

            +
            +<typedef resource="org/example/conditions.properties" uri="http://example.org/conditions"/>
            +<condition property="prop" xmlns="http://example.org/conditions">
            +    <and>
            +        <available file="bla.txt"/>
            +        <my:condition a="foo"/>
            +    </and>
            +</condition>
            +

            + In Ant 1.6, this feature cannot be used as much as we'd all like to: a lot of code has not + yet been adapted to the new introspection rules, and elements like Ant's built-in + conditions and selectors are not really types in 1.6. This is expected to change in Ant + 1.7.

            Namespaces and Antlib

            - The new AntLib - feature is also very much integrated with the namespace support in Ant - 1.6. Basically, you can "import" Antlibs simply by using a special - scheme for the namespace URI: the antlib scheme, which expects the package name in which a special antlib.xml file is located. + The new AntLib feature is also very much integrated with the + namespace support in Ant 1.6. Basically, you can "import" Antlibs simply by using a + special scheme for the namespace URI: the antlib scheme, which expects the + package name in which a special antlib.xml file is located.

            diff -Nru ant-1.9.10/manual/Types/patternset.html ant-1.10.3/manual/Types/patternset.html --- ant-1.9.10/manual/Types/patternset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/patternset.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,169 +24,161 @@ -

            PatternSet

            -

            Patterns can be grouped to -sets and later be referenced by their id attribute. They -are defined via a patternset element, which can appear -nested into a FileSet or a directory-based -task that constitutes an implicit FileSet. In addition, -patternsets can be defined as a stand alone element at -the same level as target — i.e., as children of -project as well as as children of -target.

            Patterns can be specified by nested -<include>, or <exclude> elements -or the following attributes.

            - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Error + Failure + Pass + + + + + + + + + + + + + + + + + + + Error + Failure + TableRowColor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + N/A + + + + + +

            + + + + + + + +
            + + + + + + + + + + + + + + + 32 + + + + + + + + + + + + +
            + + + +
            + + +
            + + + +
            + + + +
            +
            + + + + + + + + + + + diff -Nru ant-1.9.10/src/etc/junit-noframes-saxon.xsl ant-1.10.3/src/etc/junit-noframes-saxon.xsl --- ant-1.9.10/src/etc/junit-noframes-saxon.xsl 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/src/etc/junit-noframes-saxon.xsl 2018-03-24 12:37:12.000000000 +0000 @@ -0,0 +1,514 @@ + + + + + + +Unit Test Results. + + + + + + <xsl:value-of select="$TITLE"/> + + + + + + + + + + +
            + + + +
            + + + +
            + + + + + + +
            + + + + + + + + +

            Packages

            + Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers. +
            AttributeDescription
            includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.
            includesfilethe name of a file; each line of this file is - taken to be an include pattern. You can specify more than one - include file by using a nested includesfile elements. - Note: if the file is empty and there are no other +

            PatternSet

            +

            Patterns can be grouped to sets and later be +referenced by their id attribute. They are defined via a patternset +element, which can appear nested into a FileSet or a directory-based +task that constitutes an implicit FileSet. In addition, patternsets can be defined +as a stand alone element at the same level as target—i.e., as children of +project as well as as children of target.

            +

            Patterns can be specified by nested <include>, +or <exclude> elements or the following attributes.

            + + + + + + + + + + + + + + + - - + + + - - + + +
            AttributeDescriptionDefault
            includescomma- or space-separated list of patterns of files that must be included.All files are included.
            includesfilename of a file; each line of this file is taken to be an include pattern. You can + specify more than one include file by using a nested includesfile elements. + Note: if the file is empty and there are no other patterns defined for the fileset, all files will be included. See includes
            excludescomma- or space-separated list of patterns of files that must be - excluded; no files (except default excludes) are excluded when omitted.excludescomma- or space-separated list of patterns of files that must be excluded.No files except default excludes are excluded.
            excludesfilethe name of a file; each line of this file is - taken to be an exclude pattern. You can specify more than one - exclude file by using a nested excludesfile elements.excludesfilename of a file; each line of this file is taken to be an exclude pattern. You can + specify more than one exclude file by using a nested excludesfile + elements.See excludes

            Parameters specified as nested elements

            include and exclude

            -

            Each such element defines a single pattern for files to include or -exclude.

            - +

            Each such element defines a single pattern for files to include or exclude.

            +
            - - - + + + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            namethe pattern - to in/exclude.Yesnamethe pattern to in/exclude.Yes
            ifOnly use this pattern if the named property is set.NoifOnly use this pattern if the named property is + set.No
            unlessOnly use this pattern if the named property is - not set.NounlessOnly use this pattern if the named property + is not set.No

            includesfile and excludesfile

            -

            If you want to list the files to include or exclude external to -your build file, you should use the includesfile/excludesfile -attributes or elements. Using the attribute, you can only specify a -single file of each type, while the nested elements can be specified -more than once - the nested elements also support if/unless attributes -you can use to test the existence of a property.

            - - - - - - - - - - - - - - - - - - - - +

            If you want to list the files to include or exclude external to your build file, you should +use the includesfile/excludesfile attributes or elements. Using the +attribute, you can only specify a single file of each type, while the nested elements can be +specified more than once—the nested elements also support if/unless +attributes you can use to test the existence of a property.

            +
            AttributeDescriptionRequired
            namethe name of the file holding the patterns to - in/exclude.Yes
            ifOnly read this file if the named property is set.No
            unlessOnly read this file if the named property is - not set.No
            + + + + + + + + + + + + + + + + + + +
            AttributeDescriptionRequired
            namethe name of the file holding the patterns to in/exclude.Yes
            ifOnly read this file if the named property is + set.No
            unlessOnly read this file if the named property + is not set.No

            patternset

            -

            Patternsets may be nested within one another, adding the nested -patterns to the parent patternset.

            +

            Patternsets may be nested within one another, adding the nested patterns to the parent +patternset.

            invert

            -

            A nested patternset can be inverted using the <invert> -element. Since Apache Ant 1.7.1

            +

            Since Apache Ant 1.7.1

            +

            A nested patternset can be inverted using the <invert> element.

            Examples

            -
            +
             <patternset id="non.test.sources">
               <include name="**/*.java"/>
               <exclude name="**/*Test*"/>
             </patternset>
            -
            -

            Builds a set of patterns that matches all .java files -that do not contain the text Test in their name. This set -can be referred to via -<patternset refid="non.test.sources"/>, -by tasks that support this feature, or by FileSets.

            -

            Note that while the includes and -excludes attributes accept -multiple elements separated by commas or spaces, the nested -<include> and <exclude> elements expect their name -attribute to hold a single pattern.

            -

            The nested elements allow you to use if and unless arguments to -specify that the element should only be used if a property is set, or -that it should be used only if a property is not set.

            + +

            Builds a set of patterns that matches all .java files that do not contain the +text Test in their name. This set can +be referred to via <patternset +refid="non.test.sources"/>, by tasks that support this feature, or by +FileSets.

            +

            Note that while the includes and excludes attributes accept multiple +elements separated by commas or spaces, the nested <include> +and <exclude> elements expect their name attribute to hold a single +pattern.

            +

            The nested elements allow you to use if and unless attributes to +specify that the element should only be used if a property is set, or that it should be used +only if a property is not set.

            For example

            -
            +
             <patternset id="sources">
               <include name="std/**/*.java"/>
               <include name="prof/**/*.java" if="professional"/>
               <exclude name="**/*Test*"/>
             </patternset>
            -
            -

            will only include the files in the sub-directory prof if the property -professional is set to some value.

            + +

            will only include the files in the sub-directory prof if the +property professional is set to some value.

            The two sets

            -
            +
             <patternset includesfile="some-file"/>
            -
            +

            and

            -
            +
             <patternset>
            -  <includesfile name="some-file"/> 
            +  <includesfile name="some-file"/>
             <patternset/>
            -
            -

            are identical. The include patterns will be read from the file -some-file, one pattern per line.

            -
            +
            +

            are identical. The include patterns will be read from the file some-file, one +pattern per line.

            +
             <patternset>
            -  <includesfile name="some-file"/> 
            -  <includesfile name="${some-other-file}" 
            -                if="some-other-file"
            -  /> 
            +  <includesfile name="some-file"/>
            +  <includesfile name="${some-other-file}"
            +                if="some-other-file"/>
             <patternset/>
            -
            -

            will also read include patterns from the file the property -some-other-file points to, if a property of that name has -been defined.

            - + +

            will also read include patterns from the file the property some-other-file +points to, if a property of that name has been defined.

            - diff -Nru ant-1.9.10/manual/Types/permissions.html ant-1.10.3/manual/Types/permissions.html --- ant-1.9.10/manual/Types/permissions.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/permissions.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,97 +24,78 @@ -

            Permissions

            -

            -Permissions represents a set of security permissions granted or revoked to -a specific part code executed in the JVM where Apache Ant is running in. -The actual Permissions are specified via a set of nested permission items either -<grant>ed or <revoke>d.

            -

            -In the base situation a base set of permissions granted. -Extra permissions can be -granted. A granted permission can be overruled by revoking a permission. -The security manager installed by the permissions will throw an -SecurityException if -the code subject to these permissions try to use an permission that has not been -granted or that has been revoked.

            +

            Permissions

            +

            Permissions represents a set of security permissions granted or revoked to a specific part +code executed in the JVM where Apache Ant is running in. The actual Permissions are specified +via a set of nested permission items either <grant>ed +or <revoke>d.

            +

            In the base situation a base set of permissions granted. Extra +permissions can be granted. A granted permission can be overruled by revoking a permission. The +security manager installed by the permissions will throw an SecurityException if +the code subject to these permissions try to use an permission that has not been granted or that +has been revoked.

            Nested elements

            grant

            -

            -Indicates a specific permission is always granted. Its attributes indicate which -permissions are granted.

            - +

            Indicates a specific permission is always granted. Its attributes indicate which permissions +are granted.

            +
            - - - + + + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            classThe fully qualified name of the Permission class.YesclassThe fully qualified name of the Permission class.Yes
            nameThe name of the Permission. The actual contents depends on the - Permission class.NonameThe name of the Permission. The actual contents depends on the Permission class.No
            actionsThe actions allowed. The actual contents depend on the - Permission class and name.NoactionsThe actions allowed. The actual contents depend on the Permission class and name.No
            -

            -Implied permissions are granted. -

            -

            -Please note that some Permission classes may actually need a name and / or actions in order to function properly. The name and actions are parsed by the actual -Permission class. -

            +

            Implied permissions are granted.

            +

            Please note that some Permission classes may actually need a name and/or actions in order to +function properly. The name and actions are parsed by the actual Permission class.

            revoke

            -

            -Indicates a specific permission is revoked.

            - +

            Indicates a specific permission is revoked.

            +
            - - - + + + - - - + + + - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            classThe fully qualified name of the Permission class.YesclassThe fully qualified name of the Permission class.Yes
            nameThe name of the Permission. The actual contents depends on the - Permission class.NonameThe name of the Permission. The actual contents depends on the Permission class.No
            actionsThe actions allowed. The actual contents depend on the - Permission class and name.NoactionsThe actions allowed. The actual contents depend on the Permission class and name.No
            -

            -Implied permissions are not resolved and therefore also not revoked. -

            -

            -The name can handle the * wildcard at the end of the name, in which case all -permissions of the specified class of which the name starts with the specified name -(excluding the *) are revoked. Note that the - wildcard often supported by the -granted properties is not supported. -If the name is left empty all names match, and are revoked. -If the actions are left empty all actions match, and are revoked. -

            -

            Base set

            -A permissions set implicitly contains the following permissions: -
            +

            Implied permissions are not resolved and therefore also not revoked.

            +

            The name can handle the * wildcard at the end of the name, in which case +all permissions of the specified class of which the name starts with the specified name +(excluding the *) are revoked. Note that the - wildcard often supported by the +granted properties is not supported. If the name is left empty all names match, and +are revoked. If the actions are left empty all actions match, and are revoked.

            +

            Base set

            +

            A permissions set implicitly contains the following permissions:

            +
             <grant class="java.net.SocketPermission" name="localhost:1024-" actions="listen">
             <grant class="java.util.PropertyPermission" name="java.version" actions="read">
             <grant class="java.util.PropertyPermission" name="java.vendor" actions="read">
            @@ -136,29 +117,26 @@
             <grant class="java.util.PropertyPermission" name="java.vm.version" actions="read">
             <grant class="java.util.PropertyPermission" name="java.vm.vendor" actions="read">
             <grant class="java.util.PropertyPermission" name="java.vm.name" actions="read">
            -
            -These permissions can be revoked via <revoke> elements if necessary. + +

            These permissions can be revoked via <revoke> elements if necessary.

            Examples

            -
            +
             <permissions>
               <grant class="java.security.AllPermission"/>
               <revoke class="java.util.PropertyPermission"/>
             </permissions>
            -
            -

            -Grants all permissions to the code except for those handling Properties. -

            -
            +
            +

            Grants all permissions to the code except for those handling Properties.

            +
             <permissions>
               <grant class="java.net.SocketPermission" name="foo.bar.com" action="connect"/>
               <grant class="java.util.PropertyPermission" name="user.home" action="read,write"/>
             </permissions>
            -
            -

            -Grants the base set of permissions with the addition of a SocketPermission to connect -to foo.bar.com and the permission to read and write the user.home system property. -

            + +

            Grants the base set of permissions with the addition of +a SocketPermission to connect to foo.bar.com and the +permission to read and write the user.home system property.

            diff -Nru ant-1.9.10/manual/Types/propertyset.html ant-1.10.3/manual/Types/propertyset.html --- ant-1.9.10/manual/Types/propertyset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/propertyset.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,70 +24,62 @@ -

            PropertySet

            +

            PropertySet

            Since Apache Ant 1.6

            -

            Groups a set of properties to be used by reference in a task that -supports this.

            +

            Groups a set of properties to be used by reference in a task that supports this.

            - +
            - - - + + + - - - + + + - - + - +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            dynamicWhether to reevaluate the set every time the set - is used. Default is "true".NodynamicWhether to reevaluate the set every time the set is used.No; default is true
            negateWhether to negate results. If - "true", all properties not - selected by nested elements will be returned. Default is - "false". Since Ant 1.6.2 + negateWhether to negate results. If true, all properties not selected by + nested elements will be returned. Since Ant 1.6.2 NoNo; default is false

            Parameters specified as nested elements

            propertyref

            -

            Selects properties from the current project to be included in the -set.

            +

            Selects properties from the current project to be included in the set.

            - +
            - - - + + + - - - + + + - - + + - - + + - - + @@ -95,12 +87,12 @@

            propertyset

            -

            A propertyset can be used as the set union of more -propertysets.

            +

            A propertyset can be used as the set union of +more propertysets.

            For example:

            -
            +
             <propertyset id="properties-starting-with-foo">
               <propertyref prefix="foo"/>
             </propertyset>
            @@ -111,33 +103,28 @@
               <propertyset refid="properties-starting-with-foo"/>
               <propertyset refid="properties-starting-with-bar"/>
             </propertyset>
            -
            + -

            collects all properties whose name starts with either -"foo" or "bar" in the set named -"my-set".

            +

            collects all properties whose name starts with either foo or bar in the set +named my-set.

            mapper

            -

            A mapper - at maximum one mapper can be -specified. The mapper is used to change the names of the property -keys, for example: +

            A mapper—at maximum one mapper can be specified. The mapper +is used to change the names of the property keys, for example: -

            +
             <propertyset id="properties-starting-with-foo">
               <propertyref prefix="foo"/>
               <mapper type="glob" from="foo*" to="bar*"/>
             </propertyset>
            -
            - -

            collects all properties whose name starts with "foo", but -changes the names to start with "bar" instead.

            - -

            If supplied, the nested mapper will be applied -subsequent to any negation of matched properties.

            + +

            collects all properties whose name starts with foo, but changes the names to start +with bar instead.

            +

            If supplied, the nested mapper will be applied subsequent to any negation of matched +properties.

            - diff -Nru ant-1.9.10/manual/Types/redirector.html ant-1.10.3/manual/Types/redirector.html --- ant-1.9.10/manual/Types/redirector.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/redirector.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,170 +24,144 @@ -

            I/O redirection

            -

            For many tasks, input and output can be defined in a fairly -straightforward fashion. The exec -task, used to execute an external process, stands as a very -basic example. The executed process may accept input, produce -output, or do either or both depending upon various circumstances. -Output may be classified as "output" or as "error -output." The <redirector> type provides a concrete means -of redirecting input and output featuring the use of -File Mappers to specify -source (input) and destination (output/error) files. Since Apache Ant 1.6.2 +

            I/O redirection

            +

            Since Apache Ant 1.6.2

            +

            For many tasks, input and output can be defined in a fairly straightforward fashion. +The exec task, used to execute an external process, stands as a +very basic example. The executed process may accept input, produce output, or do either or both +depending upon various circumstances. Output may be classified as output or +as error output. The <redirector> type provides a concrete means of +redirecting input and output featuring the use of File Mappers to +specify source (input) and destination (output/error) files.

            The <redirector> element accepts the following attributes:

            -
            AttributeDescriptionRequiredAttributeDescriptionRequired
            nameSelect the property with the given name.Exactly one of these.nameSelect the property with the given name.Exactly one of these
            prefixSelect the properties whose name starts with the - given string.prefixSelect the properties whose name starts with the given string.
            regexSelect the properties that match the given - regular expression. Similar to regexp type mappers, this - requires a supported regular expression library.regexSelect the properties that match the given regular expression. Similar + to regexp type mappers, this requires a supported + regular expression library.
            builtinSelects a builtin set of properties. Valid - values for this attribute are all for all Ant - properties, system for the system properties and - commandline for all properties specified on the + builtinSelects a builtin set of properties. Valid values for this attribute + are all for all Ant properties, system for the system properties and + commandline for all properties specified on the command line when invoking Ant (plus a number of special internal Ant properties).
            +
            - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            outputName of a file to which output should be written. - If the error stream is not also redirected to a file or property, - it will appear in this output.NooutputName of a file to which output should be written. If the error stream is not also + redirected to a file or property, it will appear in this output.No
            errorThe file to which the standard error of the - command should be redirected.NoerrorThe file to which the standard error of the command should be redirected.No
            logErrorThis attribute is used when you wish to see - error output in Ant's log and you are redirecting output to - a file/property. The error output will not be included in - the output file/property. If you redirect error with the - error or errorProperty attributes, this will - have no effect.NologErrorThis attribute is used when you wish to see error output in Ant's log and you are + redirecting output to a file/property. The error output will not be included in the output + file/property.No; ignored if error or errorProperty + is set
            appendWhether output and error files should be - appended to rather than overwritten. Defaults to - false.NoappendWhether output and error files should be appended to rather than overwritten.No; defaults to false
            createemptyfilesWhether output and error files should be - created even when empty. Defaults to true.NocreateemptyfilesWhether output and error files should be created even when empty.No; defaults to true
            outputpropertyThe name of a property in which the output of the - command should be stored. Unless the error stream is redirected - to a separate file or stream, this property will include the + outputpropertyThe name of a property in which the output of the command should be stored. Unless the + error stream is redirected to a separate file or stream, this property will include the error output.NoNo
            errorpropertyThe name of a property in which the standard error - of the command should be stored.NoerrorpropertyThe name of a property in which the standard error of the command should be stored.No
            inputA file from which the executed command's standard input - is taken. This attribute is mutually exclusive with the - inputstring attribute.NoinputA file from which the executed command's standard input is taken. This attribute is + mutually exclusive with the inputstring attribute.No
            inputstringA string which serves as the input stream for the - executed command. This attribute is mutually exclusive with the - input attribute.NoinputstringA string which serves as the input stream for the executed command. This attribute is + mutually exclusive with the input attribute.No
            inputencodingThe input encoding.NoinputencodingThe input encoding.No
            outputencodingThe output encoding.NooutputencodingThe output encoding.No
            errorencodingThe error encoding.NoerrorencodingThe error encoding.No
            alwayslogAlways send to the log in addition to - any other destination. Since Ant 1.6.3. - No, default is falsealwayslogAlways send to the log in addition to any other destination. Since Ant 1.6.3No; default is false
            loginputstringControls the display of inputstring's value in - log messages. Set to false when sending sensitive data - (e.g. passwords) to external processes. Since Ant 1.6.3. - No, default is trueloginputstringControls the display of inputstring's value in log messages. Set + to false when sending sensitive data (e.g. passwords) to external + processes. Since Ant 1.6.3No; default is true
            binaryOutputWhen set to true Ant will not try to split the - output into lines - which it will usually do in order to separate - error from normal output. This setting will not prevent binary - output from getting corrupted if you also specify filter chains. - Since Ant 1.9.4. + binaryOutputWhen set to true Ant will not try to split the output into lines—which it + will usually do in order to separate error from normal output. This setting will not + prevent binary output from getting corrupted if you also specify filter chains. + Since Ant 1.9.4 No, default is falseNo; default is false

            Parameters specified as nested elements

            inputmapper

            -

            A single File Mapper used to redirect process -input. Multiple mapping results should concatenate all mapped files as input. -Mapping will ordinarily be performed on a task-specified sourcefile; -consult the documentation of the individual task for more details. -A nested <inputmapper> is not compatible with either of the -input or inputstring attributes.

            +

            A single File Mapper used to redirect process input. Multiple +mapping results should concatenate all mapped files as input. Mapping will ordinarily be +performed on a task-specified sourcefile; consult the documentation of the individual task for +more details. A nested <inputmapper> is not compatible with either of the +input or inputstring attributes.

            outputmapper

            -

            A single File Mapper used to redirect process -output. Mapping will ordinarily be performed on a task-specified sourcefile; -consult the documentation of the individual task for more details. -A nested <outputmapper> is not compatible with the -output attribute.

            +

            A single File Mapper used to redirect process output. Mapping +will ordinarily be performed on a task-specified sourcefile; consult the documentation of the +individual task for more details. A nested <outputmapper> is not compatible +with the output attribute.

            errormapper

            -

            A single File Mapper used to redirect error -output. Mapping will ordinarily be performed on a task-specified sourcefile; -consult the documentation of the individual task for more details. -A nested <errormapper> is not compatible with the -error attribute.

            +

            A single File Mapper used to redirect error output. Mapping will +ordinarily be performed on a task-specified sourcefile; consult the documentation of the +individual task for more details. A nested <errormapper> is not compatible +with the error attribute.

            inputfilterchain

            -

            A FilterChain can be -applied to the process input.

            +

            A FilterChain can be applied to the process input.

            outputfilterchain

            -

            A FilterChain can be -applied to the process output.

            +

            A FilterChain can be applied to the process output.

            errorfilterchain

            -

            A FilterChain can be -applied to the error output.

            +

            A FilterChain can be applied to the error output.

            Usage

            -Tasks known to support I/O redirection: +

            Tasks known to support I/O redirection:

            -

            The expected behavior of a <redirector> is to a great degree -dependent on the supporting task. Any possible points of confusion -should be noted at the task level.

            - +

            The expected behavior of a <redirector> is to a great degree dependent on +the supporting task. Any possible points of confusion should be noted at the task level.

            - diff -Nru ant-1.9.10/manual/Types/regexp.html ant-1.10.3/manual/Types/regexp.html --- ant-1.9.10/manual/Types/regexp.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/regexp.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,86 +24,68 @@ -

            Regexp

            +

            Regexp

            Regexp represents a regular expression.

            Parameters

            - +
            - - - + + + - - - + + +
            AttributeDescriptionRequiredAttributeDescriptionRequired
            patternregular expression patternYespatternregular expression patternYes

            Examples

            -
            -     <regexp id="myregexp" pattern="alpha(.+)beta"/>
            -
            -

            -Defines a regular expression for later use with id myregexp. -

            -
            -     <regexp refid="myregexp"/>
            -
            -

            -Use the regular expression with id myregexp. -

            -

            Choice of regular expression implementation

            -

            -Apache Ant comes with -wrappers for -the java.util.regex package, -jakarta-regexp -and jakarta-ORO, -See installation dependencies - concerning the supporting libraries.

            -

            -The property ant.regexp.regexpimpl governs which regular expression implementation will be chosen. -Possible values for this property are : +

            <regexp id="myregexp" pattern="alpha(.+)beta"/>
            +

            Defines a regular expression for later use with id myregexp.

            +
            <regexp refid="myregexp"/>
            +

            Use the regular expression with id myregexp.

            +

            Choice of regular expression implementation

            +

            Apache Ant comes with wrappers for +the java.util.regex +package, jakarta-regexp and jakarta-ORO, see installation +dependencies concerning the supporting libraries.

            +

            The property ant.regexp.regexpimpl governs which regular expression implementation +will be chosen. Possible values for this property are:

              -
            • -org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp -
            • -
            • -org.apache.tools.ant.util.regexp.JakartaOroRegexp -
            • -
            • -org.apache.tools.ant.util.regexp.JakartaRegexpRegexp -
            • +
            • org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
            • +
            • org.apache.tools.ant.util.regexp.JakartaOroRegexp
            • +
            • org.apache.tools.ant.util.regexp.JakartaRegexpRegexp
            -It can also be another implementation of the interface org.apache.tools.ant.util.regexp.Regexp. -If ant.regexp.regexpimpl is not defined, Ant uses Jdk14Regexp as this is always available.

            -

            -There are cross-platform issues for matches related to line terminator. -For example if you use $ to anchor your regular expression on the end of a line -the results might be very different depending on both your platform and the regular -expression library you use. It is 'highly recommended' that you test your pattern on -both Unix and Windows platforms before you rely on it. +

            It can also be another implementation of the +interface org.apache.tools.ant.util.regexp.Regexp. +If ant.regexp.regexpimpl is not defined, Ant uses Jdk14Regexp as this is always +available.

            +

            +There are cross-platform issues for matches related to line terminator. For example if you +use $ to anchor your regular expression on the end of a line the results might be very +different depending on both your platform and the regular expression library you use. It +is highly recommended that you test your pattern on both Unix and Windows platforms before +you rely on it.

              -
            • Jakarta Oro defines a line terminator as '\n' and is consistent with Perl.
            • -
            • Jakarta RegExp uses a system-dependent line terminator.
            • -
            • JDK 1.4 uses '\n', '\r\n', '\u0085', '\u2028', '\u2029' as a default - but is configured in the wrapper to use only '\n' (UNIX_LINE)
            • +
            • Jakarta Oro defines a line terminator as \n and is consistent with Perl.
            • +
            • Jakarta RegExp uses a system-dependent line terminator.
            • +
            • JDK 1.4 uses \n, \r\n, \u0085, \u2028, \u2029 as a + default but is configured in the wrapper to use only \n (UNIX_LINE)
            -We used to recommend that you use Jakarta ORO but since its - development has been retired Java's built-in regex package is likely - the best choice going forward. -

            -

            Usage

            -The following tasks and types use the Regexp type : +

            We used to recommend that you use Jakarta ORO but since its development has been retired +Java's built-in regex package is likely the best choice going forward.

            +

            Usage

            The following tasks and types use the Regexp type: -

            -These string filters also use the mechanism of regexp to choose a regular expression implementation : -

            +

            These string filters also use the mechanism of regexp to choose a regular expression +implementation:

            • ContainsRegex string filter
            • ReplaceRegex string filter
            • diff -Nru ant-1.9.10/manual/Types/resources.html ant-1.10.3/manual/Types/resources.html --- ant-1.9.10/manual/Types/resources.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/resources.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,341 +24,346 @@ -

              Resources

              +

              Resources

              -A file-like entity can be abstracted to the concept of a resource. -In addition to providing access to file-like attributes, a resource -implementation should, when possible, provide the means to read content -from and/or write content to the underlying entity. Although the resource -concept was introduced in Apache Ant 1.5.2, resources are available for -explicit use beginning in Ant 1.7. +A file-like entity can be abstracted to the concept of a resource. In addition to +providing access to file-like attributes, a resource implementation should, when possible, +provide the means to read content from and/or write content to the underlying entity. Although +the resource concept was introduced in Apache Ant 1.5.2, resources are available for explicit +use since Ant 1.7.

              -

              The built-in resource types are:

              - +

              Built-in resource types

              +The built-in resource types are: -

              resource

              +

              resource

              -

              A basic resource. Other resource types derive from this basic -type; as such all its attributes are available, though in most cases -irrelevant attributes will be ignored. This and all resource -implementations are also usable as single-element -Resource Collections. +

              +A basic resource. Other resource types derive from this basic type; as such all its attributes +are available, though in most cases irrelevant attributes will be ignored. This and all resource +implementations are also usable as single-element resource +collections.

              - +
              - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              nameThe name of this resourceNonameThe name of this resourceNo
              existsWhether this resource existsNo, default trueexistsWhether this resource existsNo; default true
              lastmodifiedThe last modification time of this resourceNolastmodifiedThe last modification time of this resourceNo
              directoryWhether this resource is directory-likeNo, default falsedirectoryWhether this resource is directory-likeNo; default false
              sizeThe size of this resourceNosizeThe size of this resourceNo
              -

              file

              +

              file

              Represents a file accessible via local filesystem conventions.

              - +
              - - - + + + - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              fileThe file represented by this resourceYesfileThe file represented by this resourceYes
              basedirThe base directory of this resource. When this - attribute is set, attempts to access the name of the resource - will yield a path relative to this location.NobasedirThe base directory of this resource. When this attribute is set, attempts to access the + name of the resource will yield a path relative to this location.No
              -

              javaresource

              +

              javaresource

              Represents a resource loadable via a Java classloader.

              - +
              - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              nameThe name of the resource.YesnameThe name of the resource.Yes
              classpaththe classpath to use when looking up a resource.Noclasspaththe classpath to use when looking up a resource.No
              classpathrefthe classpath to use when looking up a resource, - given as reference - to a <path> defined elsewhere..Noclasspathrefthe classpath to use when looking up a resource, given + as reference to a <path> defined + elsewhere.No
              loaderRefthe name of the loader that is - used to load the resource, constructed from the specified classpath.NoloaderRefthe name of the loader that is used to load the resource, constructed from the specified + classpath.No
              parentFirstWhether to consult the parent classloader first - - the parent classloader most likely is the system classloader - - when using a nested classpath. Defaults - to true.
              +
              parentFirstWhether to consult the parent classloader first—the parent classloader most likely + is the system classloader—when using a nested classpath.
              Since Ant 1.8.0
              NoNo; defaults to true

              The classpath can also be specified as nested classpath element, -where <classpath> is a path-like structure.

              - +where <classpath> is a path-like +structure.

              -

              javaconstant

              -

              Loads the value of a java constant. As a specialisation of -javaresource all of its attributes and nested elements are -supported. A constant must be specified as public static otherwise it could not be loaded.

              - - - - - - - - - - - +

              javaconstant

              +

              Loads the value of a Java constant. As a specialisation +of javaresource all of its attributes and nested elements are +supported. A constant must be specified as public static otherwise it could not be +loaded.

              + +
              AttributeDescriptionRequired
              nameThe name of the resource. Must be specified as full qualified - field name. - Yes
              + + + + + + + + +
              AttributeDescriptionRequired
              nameThe name of the resource. Must be specified as full qualified + field name.Yes
              Examples
              -This loads the value of the constant VERSION of the org.acme.Main class -into the version-property. The classpath for finding that class is provided via -nested classpath element. -
              <loadresource property="version">
              -   <javaconstant name="org.acme.Main.VERSION">
              -     <classpath>
              -       <pathelement location="${acme.lib.dir}"/>
              -     </classpath>
              -   </javaconstant>
              - </loadresource>
              -
              - -Create a new file c:/temp/org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME with the content -of that constant (build.xml). -
              <copy todir="c:/temp">
              -  <javaconstant name="org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME"/>
              -</copy>
              +

              This loads the value of the constant VERSION of the org.acme.Main +class into the version-property. The classpath for finding that class is provided via +nested classpath element.

              +
              +<loadresource property="version">
              +  <javaconstant name="org.acme.Main.VERSION">
              +    <classpath>
              +      <pathelement location="${acme.lib.dir}"/>
              +    </classpath>
              +  </javaconstant>
              +</loadresource>
              +

              Create a new file c:/temp/org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME with +the content of that constant (build.xml).

              +
              +<copy todir="c:/temp">
              +  <javaconstant name="org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME"/>
              +</copy>
              -

              zipentry

              +

              zipentry

              -

              Represents an entry in a ZIP archive. The archive can be specified -using the archive attribute or a nested single-element resource -collection. zipentry only supports file system resources -as nested elements.

              +

              Represents an entry in a ZIP archive. The archive can be specified using the archive +attribute or a nested single-element resource collection. zipentry only supports +file system resources as nested elements.

              - +
              - - - + + + - - - + + + - - - + + - - - + + + + + + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              zipfile or its alias name archiveThe zip file containing this resourceYes, unless a nested resource - collection has been specified.zipfileThe zip file containing this resourceYes, unless a nested resource collection has been + specified
              nameThe name of the archived resourceYesarchivealias of zipfile
              encodingThe encoding of the zipfileNo; - platform default used if unspecifiednameThe name of the archived resourceYes
              encodingThe encoding of the zipfileNo; defaults to default JVM character encoding
              -

              tarentry

              +

              tarentry

              -

              Represents an entry in a TAR archive. The archive can be specified -using the archive attribute or a nested single-element resource -collection.

              +

              Represents an entry in a TAR archive. The archive can be specified using the archive +attribute or a nested single-element resource collection.

              - +
              - - - + + + - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              archiveThe tar archive containing this resourceYes, unless a nested resource - collection has been specified.archiveThe tar archive containing this resourceYes, unless a nested resource + collection has been specified
              nameThe name of the archived resourceYesnameThe name of the archived resourceYes
              -

              gzipresource

              +

              gzipresource

              + +

              This is not a stand-alone resource, but a wrapper around another resource providing +compression of the resource's contents on the fly. A single element resource collection must be +specified as a nested element.

              + +

              bzip2resource

              -

              This is not a stand-alone resource, but a wrapper around another -resource providing compression of the resource's contents on the fly. -A single element resource collection must be specified as a nested -element.

              +

              This is not a stand-alone resource, but a wrapper around another resource providing +compression of the resource's contents on the fly. A single element resource collection must be +specified as a nested element.

              -

              bzip2resource

              +

              xzresource

              -

              This is not a stand-alone resource, but a wrapper around another -resource providing compression of the resource's contents on the fly. -A single element resource collection must be specified as a nested -element.

              +

              This is not a stand-alone resource, but a wrapper around another resource providing +compression of the resource's contents on the fly. A single element resource collection must be +specified as a nested element.

              -

              url

              +

              XZ compression support has been added since Apache Ant 1.10.1 and depends on +external libraries not included in the Ant +distribution. See Library Dependencies for +more information.

              + +

              url

              Represents a URL.

              - +
              - - - + + + - - - + + + - - + + - - + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              urlThe url to exposeExactly one of theseurlThe URL to exposeExactly one of these
              fileThe file to expose as a file: urlfileThe file to expose as a file: URL
              baseUrlThe base URL which must be combined with relativePathbaseUrlThe base URL which must be combined + with relativePath
              relativePathRelative path that defines the url combined with - baseUrlIf using baseUrlrelativePathRelative path that defines the URL when combined with + baseUrlIf using baseUrl
              -

              string

              +

              string

              -

              Represents a Java String. It can be written to, but only once, after which -it will be an error to write to again.

              +

              Represents a Java String. It can be written to, but only once, after which it will be an +error to write to again.

              - +
              - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              valueThe value of this resourceNovalueThe value of this resourceNo
              -

              The resource also supports nested text, which can only be supplied if the value attribute is unset: -

              +

              The resource also supports nested text, which can only be supplied if the value +attribute is unset:

              -  <string>
              -        self.log("Ant version =${ant.version}");
              -  </string>
              -
              - -

              +<string> + self.log("Ant version =${ant.version}"); +</string> -

              propertyresource

              +

              propertyresource

              Represents an Ant property.

              - +
              - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              nameThe property nameYesnameThe property nameYes
              -
              -

              Resource Collections

              +
              +

              Resource Collections

              -A Resource Collection is an abstraction of an entity that groups -together a number of resources. Several of -Ant's "legacy" datatypes have been modified to behave as Resource Collections: +A resource collection is an abstraction of an entity that groups together a number +of resources. Several of Ant's "legacy" datatypes have been modified to +behave as resource collections: +

              -

              -

              Strangely, some tasks can even legitimately behave as resource collections: +

              Strangely, some tasks can even legitimately behave as resource +collections:

                -
              • concat - exposes a concatenated resource, and adds e.g. - filtering +
              • concat exposes a concatenated + resource, and adds e.g. filtering to Ant's resource-related capabilities.
              -

              -

              The additional built-in resource collections are:

              +

              Additional built-in resource collections

              +The additional built-in resource collections are:
                -
              • resources - generic resource collection
              • -
              • files - collection of files similar to - fileset
              • -
              • restrict - restrict a resource collection - to include only resources meeting specified criteria
              • -
              • sort - sorted resource collection
              • -
              • first - first n resources from a +
              • resources—generic resource collection
              • +
              • files—collection of files similar + to fileset
              • +
              • restrict—restrict a resource collection to include only + resources meeting specified criteria
              • +
              • sort—sorted resource collection
              • +
              • first—first n resources from a nested collection
              • +
              • last—last n resources from a nested collection
              • +
              • allbutfirst—all except the first n resources + from a nested collection
              • +
              • allbutlast—all except the last n resources from a nested collection
              • -
              • last - last n resources from a +
              • tokensstring tokens gathered from a nested collection
              • -
              • allbutfirst - all except the - first n resources from a nested collection
              • -
              • allbutlast - all except the last n - resources from a nested collection
              • -
              • tokens - string tokens - gathered from a nested collection
              • -
              • union - set union of nested resource collections
              • -
              • intersect - set intersection - of nested resource collections
              • -
              • difference - set difference - of nested resource collections
              • -
              • mappedresources - generic - resource collection wrapper that maps the names of the nested - resources using a mapper.
              • -
              • archives - wraps around different - resource collections and treats the nested resources as ZIP or TAR - archives that will be extracted on the fly.
              • -
              • resourcelist - a collection of - resources whose names have been read from another resource.
              • +
              • union—set union of nested resource collections
              • +
              • intersect—set intersection of nested resource + collections
              • +
              • difference—set difference of nested resource + collections
              • +
              • mappedresources—generic resource collection wrapper + that maps the names of the nested resources using a mapper.
              • +
              • archives—wraps around different resource collections and + treats the nested resources as ZIP or TAR archives that will be extracted on the fly.
              • +
              • resourcelist—a collection of resources whose names have + been read from another resource.
              -

              resources

              -

              A generic resource collection, designed for use with - references. - For example, if a third-party Ant task generates a Resource Collection - of an unknown type, it can still be accessed via a - <resources> collection. The secondary use of this - collection type is as a container of other resource collections, - preserving the order of nested collections as well as - duplicate resources (contrast with union). + +

              resources

              +

              +A generic resource collection, designed for use +with references. For example, if a third-party Ant task +generates a resource collection of an unknown type, it can still be accessed via +a <resources> collection. The secondary use of this collection type is as a +container of other resource collections, preserving the order of nested collections as well as +duplicate resources (contrast with union).

              -
              - +
              - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              cacheWhether to cache results. since Ant 1.8.0No, default falsecacheWhether to cache results. since Ant 1.8.0No; default false
              -
              -

              files

              -

              A group of files. These files are matched by absolute patterns - taken from a number of PatternSets. - These can be specified as nested <patternset> - elements. In addition, <files> holds an implicit - PatternSet and supports the nested <include>, - <includesfile>, <exclude> - and <excludesfile> elements of PatternSet directly, - as well as PatternSet's attributes. +

              files

              +

              A group of files. These files are matched by absolute patterns taken from a +number of PatternSets. These can be specified as +nested <patternset> elements. In addition, <files> holds +an implicit PatternSet and supports the +nested <include>, <includesfile>, <exclude> +and <excludesfile> elements of PatternSet directly, as well as PatternSet's +attributes.

              -

              File Selectors are available as nested - elements. A file must be selected by all selectors in order to be included; - <files> is thus equivalent to an - <and> file selector container. +

              File Selectors are available as nested elements. A file must be +selected by all selectors in order to be included; <files> is thus equivalent +to an <and> file selector container.

              -

              More simply put, this type is equivalent to a - fileset with no base directory. - Please note that without a base directory, - filesystem scanning is based entirely on include and exclude patterns. - A filename (or any) - selector can only influence the scanning process after - the file has been included based on pattern-based selection. +

              More simply put, this type is equivalent +to fileset with no base directory. Please note that +without a base directory, filesystem scanning is based entirely on include and exclude patterns. +A filename (or any) selector can only +influence the scanning process after the file has been included based on pattern-based +selection.

              - +
              + + + + + + + + + + + + + + + + + + + - - - + + - - - + + + - - + + + + + + + + +
              AttributeDescriptionRequired
              includesComma- or space-separated list of patterns of files that must be includedAt least one of these
              includesfileName of a file; each line of this file is taken to be an include + pattern.
              excludesComma- or space-separated list of patterns of files that must be excludedNo; defaults to default excludes or none if defaultexcludes + is no
              AttributeDescriptionRequiredexcludesfileName of a file; each line of this file is taken to be an exclude + pattern.
              includescomma- or space-separated list of patterns - of files that must be includedAt least one of thesedefaultexcludesWhether default excludes should be + usedNo; default true
              includesfilethe name of a file; each line of this file is - taken to be an include pattern.casesensitiveWhether patterns are case-sensitiveNo; default true
              + + + +

              restrict

              +

              Restricts a nested resource collection using resource selectors:

              + + + + + + + + + + + +
              AttributeDescriptionRequired
              cacheWhether to cache results; disabling + may seriously impact performanceNo; default true
              +
              Parameters specified as nested elements
              +

              A single resource collection is required.

              +

              Nested resource selectors are used to "narrow down" the included resources, combined via a +logical AND. These are patterned after file selectors but +are, unsurprisingly, targeted to resources. Several built-in resource selectors are available +in the +internal antlib org.apache.tools.ant.types.resources.selectors:

              + +
                +
              • name—select resources by name.
              • +
              • exists—select existing resources.
              • +
              • date—select resources by date.
              • +
              • type—select resources by type.
              • +
              • size—select resources by size.
              • +
              • instanceof—select resources by class or Ant + datatype.
              • +
              • andand nested resource selectors.
              • +
              • oror nested resource selectors.
              • +
              • notnot a nested resource selector.
              • +
              • none—select resources selected by no nested resource + selectors.
              • +
              • majority—select resources selected by a majority of + nested resource selectors.
              • +
              • modified—select resources which content has + changed.
              • +
              • contains—select resources containing a + particular text string.
              • +
              • containsregexp—select resources whose + contents match a particular regular expression.
              • +
              • compare—select resources based on comparison to other + resources.
              • +
              • readable—select files (resources must be + files) if they are readable.
              • +
              • writable—select files (resources must be + files) if they are writable.
              • +
              + +
              name
              +

              Selects resources by name.

              + - - - + + + - - + + + - - - + + - - - + + + - - - + +
              excludescomma- or space-separated list of patterns - of files that must be excludedNo, default none - (except default excludes when true)AttributeDescriptionRequired
              excludesfilethe name of a file; each line of this file is - taken to be an exclude pattern.nameThe name pattern to test using standard Ant patterns.Exactly one of the two
              defaultexcludesWhether - default excludes - should be usedNo, default trueregexThe regular expression matching files to select.
              casesensitiveWhether patterns are case-sensitiveNo, default truecasesensitiveWhether name comparisons are case-sensitiveNo; default true
              followsymlinksWhether to follow symbolic links - (see note below)No, default truehandledirsep + If this is specified, the mapper will treat a \ character in a resource name or name + attribute as a / for the purposes of matching. This attribute can be true + or false. + Since Ant 1.8.0 + No; default false
              -

              Note: 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 link but it may lead to false results on other -platforms. -

              +
              exists
              +

              Selects existing resources.

              -

              restrict

              -

              Restricts a nested resource collection using resource selectors: -

              - - - - - - - - - - - -
              AttributeDescriptionRequired
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              -

              Parameters specified as nested elements

              -

              A single resource collection is required.

              -

              Nested resource selectors are used to "narrow down" the included - resources, combined via a logical AND. These are patterned - after file selectors but are, - unsurprisingly, targeted to resources. - Several built-in resource selectors are available in the internal - antlib - org.apache.tools.ant.types.resources.selectors: -

              - -
                -
              • name - select resources by name.
              • -
              • exists - select existing resources.
              • -
              • date - select resources by date.
              • -
              • type - select resources by type.
              • -
              • size - select resources by size.
              • -
              • instanceof - - select resources by class or Ant datatype.
              • -
              • and - "and" nested resource selectors.
              • -
              • or - "or" nested resource selectors.
              • -
              • not - "not" a nested resource selector.
              • -
              • none - - select resources selected by no nested resource selectors.
              • -
              • majority - select resources selected - by a majority of nested resource selectors.
              • -
              • modified - select resources which - content has changed.
              • -
              • contains - select resources - containing a particular text string.
              • -
              • containsregexp - select - resources whose contents match a particular regular expression.
              • -
              • compare - select resources - based on comparison to other resources.
              • -
              • readable - - Select files (resources must be files) if they are readable.
              • -
              • writable - - Select files (resources must be files) if they are writable.
              • -
              - -

              name

              -

              Selects resources by name.

              - - - - - - - - - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              nameThe name pattern to test using standard Ant - patterns.Exactly one of - the two
              regexThe regular expression matching files to select.
              casesensitiveWhether name comparisons are case-sensitiveNo, default true
              handledirsep - If this is specified, the mapper will treat a \ character in a - resource name or name attribute as a / for the purposes of - matching. This attribute can be true or false, the default is - false. - Since Ant 1.8.0. - No
              +
              date
              +

              Selects resources by date.

              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              millisThe comparison date/time in ms since January 1, 1970One of these
              datetimeThe formatted comparison date/time
              patternSimpleDateFormat-compatible pattern for use with the datetime attribute + using the current localeNo; default is MM/dd/yyyy hh:mm a using the US locale
              granularityThe number of milliseconds leeway to use when comparing file modification times. This is + needed because not every file system supports tracking the last modified time to the + millisecond level.No; default varies by platform: FAT filesystems = 2 sec; Unix = 1 sec; NTFS = 1 ms.
              whenOne of before, after, equalNo; default equal
              -

              exists

              -

              Selects existing resources.

              +
              type
              +

              Selects resources by type (file or directory).

              + + + + + + + + + + + +
              AttributeDescriptionRequired
              typeOne of file, dir, any (since Ant 1.8)Yes
              -

              date

              -

              Selects resources by date.

              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              millisThe comparison date/time in ms since January 1, 1970One of these
              datetimeThe formatted comparison date/time
              patternSimpleDateFormat-compatible pattern - for use with the datetime attribute using the - current locale - No, default is "MM/dd/yyyy hh:mm a" using the US locale
              granularityThe number of milliseconds leeway to use when - comparing file modification times. This is needed because not - every file system supports tracking the last modified time to - the millisecond level.No; default varies by platform: - FAT filesystems = 2 sec; Unix = 1 sec; NTFS = 1 ms.
              whenOne of "before", "after", "equal"No, default "equal"
              +
              size
              +

              Selects resources by size.

              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              sizeThe size to compareYes
              whenOne + of equal, eq, greater, gt, less, lt, ge + (greater or equal), ne (not equal), le (less or equal)No; default equal
              -

              type

              -

              Selects resources by type (file or directory).

              - - - - - - - - - - - -
              AttributeDescriptionRequired
              typeOne of "file", "dir", "any" (since Ant 1.8)Yes
              +
              instanceof
              +

              Selects resources by type.

              + + + + + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              classThe class of which the resource must be an instanceOne of these
              typeThe Ant type that must be assignable from the resource
              uriThe URI in which type must be definedNo
              -

              size

              -

              Selects resources by size.

              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              sizeThe size to compareYes
              whenOne of "equal", "eq", "greater", "gt", "less", "lt", - "ge" (greater or equal), "ne" (not equal), "le" (less or equal)No, default "equal"
              +
              and
              +

              Selects a resource if it is selected by all nested resource selectors.

              -

              instanceof

              -

              Selects resources by type.

              - - - - - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              classThe class of which the resource must be an instanceOne of these
              typeThe Ant type that must - be assignable from the resource
              uriThe uri in which type must be definedNo
              +
              or
              +

              Selects a resource if it is selected by at least one nested resource selector.

              -

              and

              -

              Selects a resource if it is selected by all nested resource selectors.

              +
              not
              +

              Negates the selection result of the single nested resource selector allowed.

              -

              or

              -

              Selects a resource if it is selected - by at least one nested resource selector.

              - -

              not

              -

              Negates the selection result of the single - nested resource selector allowed.

              - -

              none

              -

              Selects a resource if it is selected - by no nested resource selectors.

              - -

              majority

              -

              Selects a resource if it is selected - by the majority of nested resource selectors.

              - - - - - - - - - - - -
              AttributeDescriptionRequired
              allowtieWhether a tie (when there is an even number - of nested resource selectors) is considered a majorityNo, default true
              +
              none
              +

              Selects a resource if it is selected by no nested resource selectors.

              -

              compare

              -

              Selects a resource based on its comparison to one or more "control" - resources using nested resource comparators.

              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              whenComparison ("equal"/"eq", "greater"/"gt", "less"/"lt", - "le" (less or equal), "ge" (greater or equal), "ne" (not equal).No, default "equal"
              againstQuantifier ("all"/"each"/"every", "any"/"some", - (exactly) "one", "most"/"majority", "none".No, default "all"
              -

              Parameters specified as nested elements

              -

              The resources against which comparisons will be made must be specified - using the nested <control> element, which denotes a - resources collection.

              -

              Examples

              -

              Assuming the namespace settings -

                rsel="antlib:org.apache.tools.ant.types.resources.selectors"
              -  rcmp="antlib:org.apache.tools.ant.types.resources.comparators"
              -

              +
              majority
              +

              Selects a resource if it is selected by the majority of nested resource selectors.

              + + + + + + + + + + + +
              AttributeDescriptionRequired
              allowtieWhether a tie (when there is an even number of nested resource selectors) is considered + a majorityNo; default true
              + +
              compare
              +

              Selects a resource based on its comparison to one or more "control" resources using +nested resource comparators.

              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              whenComparison + (equal/eq, greater/gt, less/lt, le (less or + equal), ge (greater or equal), ne (not equal).No; default equal
              againstQuantifier (all/each/every, any/some, + (exactly) one, most/majority, none.No; default all
              +
              Parameters specified as nested elements
              +

              The resources against which comparisons will be made must be specified using the nested +<control> element, which denotes a resources collection.

              +
              Examples
              +

              Assuming the namespace settings

              +
              +rsel="antlib:org.apache.tools.ant.types.resources.selectors"
              +rcmp="antlib:org.apache.tools.ant.types.resources.comparators"
               <restrict>
              -  <fileset dir="src" includes="a,b,c,d,e,f,g" />
              +  <fileset dir="src" includes="a,b,c,d,e,f,g"/>
                 <rsel:compare when="le" against="all">
                   <control>
              -      <resource name="d" />
              +      <resource name="d"/>
                   </control>
              -    <rcmp:name />
              +    <rcmp:name/>
                 </rsel:compare>
              -</restrict>
              -  
              -

              Selects files a, b, c, and d.

              -
              -    <project rsel="antlib:org.apache.tools.ant.types.resources.selectors">
              -        <macrodef name="copyFromPath">
              -            <attribute name="todir"/>
              -            <attribute name="refid"/>
              -            <element name="nested-resource-selectors" optional="yes" implicit="true"/>
              -            <sequential>
              -                <mkdir dir="@{todir}" taskname="copyFromPath"/>
              -                <copy todir="@{todir}" taskname="copyFromPath">
              -                    <restrict>
              -                        <path refid="@{refid}"/>
              -                        <rsel:or>
              -                            <nested-resource-selectors/>
              -                        </rsel:or>
              -                    </restrict>
              -                    <flattenmapper/>
              -                </copy>
              -            </sequential>
              -        </macrodef>
              -        <copyFromPath refid="classpath" todir="todir">
              -            <rsel:name name="log4j.properties"/>
              -            <rsel:name name="default.properties"/>
              -        </copyFromPath>
              -     </project>
              -  
              -

              Creates the todir directory and copies (if present) the - files log4j.properties and default.properties - from the Classpath (already used while compiling). -

              +</restrict> +

              Selects files a, b, c, and d.

              +
              +<project rsel="antlib:org.apache.tools.ant.types.resources.selectors">
              +    <macrodef name="copyFromPath">
              +        <attribute name="todir"/>
              +        <attribute name="refid"/>
              +        <element name="nested-resource-selectors" optional="yes" implicit="true"/>
              +        <sequential>
              +            <mkdir dir="@{todir}" taskname="copyFromPath"/>
              +            <copy todir="@{todir}" taskname="copyFromPath">
              +                <restrict>
              +                    <path refid="@{refid}"/>
              +                    <rsel:or>
              +                        <nested-resource-selectors/>
              +                    </rsel:or>
              +                </restrict>
              +                <flattenmapper/>
              +            </copy>
              +        </sequential>
              +    </macrodef>
              +    <copyFromPath refid="classpath" todir="todir">
              +        <rsel:name name="log4j.properties"/>
              +        <rsel:name name="default.properties"/>
              +    </copyFromPath>
              +</project>
              +

              Creates the todir directory and copies (if present) the +files log4j.properties and default.properties from the classpath +(already used while compiling).

              -
              -  <project>
              -      <filelist id="allfiles" dir="${ant.home}/bin" files="ant.cmd,foo.txt,ant.bat,bar.txt,ant"/>
              -      <restrict id="missingfiles">
              -          <filelist refid="allfiles"/>
              -          <rsel:not xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors">
              -              <rsel:exists/>
              -          </rsel:not>
              -      </restrict>
              -      <echo>These files are missed: ${toString:missingfiles}</echo>
              -  </project>
              -  
              -

              The resource collection allfiles defines a list of files which are expected. The restrict - missingfiles uses the <not><exists> selector for getting all files - which are not present. Finally we use the toString: pathshortcut for - getting them in a readable form: [echo] These files are missed: ....foo.txt;....bar.txt

              - -
              - -

              sort

              - -

              Sorts a nested resource collection according to the resources' - natural order, or by one or more nested resource - comparators:

              -
              - - - - - - - - - - - -
              AttributeDescriptionRequired
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              -

              Parameters specified as nested elements

              -

              A single resource collection is required.

              -

              The sort can be controlled and customized by specifying one or more - resource comparators. Resources can be sorted according to multiple - criteria; the first specified is the "outermost", while the last - specified is the "innermost". Several built-in resource comparators - are available in the internal antlib - org.apache.tools.ant.types.resources.comparators: -

              -

              Resource Comparators:

              -
                -
              • name - sort resources by name
              • -
              • exists - sort resources by existence
              • -
              • date - sort resources by date
              • -
              • type - sort resources by type
              • -
              • size - sort resources by size
              • -
              • content - sort resources by content
              • -
              • reverse - reverse the natural sort order, - or that of a single nested resource comparator
              • -
              - -

              name

              -

              Sort resources by name.

              - -

              exists

              -

              Sort resources by existence. - Not existing is considered "less than" existing.

              - -

              date

              -

              Sort resources by date.

              - -

              type

              -

              Sort resources by type (file or directory). - Because directories contain files, they are considered "greater".

              - -

              size

              -

              Sort resources by size.

              - -

              content

              -

              Sort resources by content.

              - - - - - - - - - - - -
              AttributeDescriptionRequired
              binaryWhether content should be compared in binary mode. - If false, content will be compared without regard to - platform-specific line-ending conventions.No, default true
              +
              +<project>
              +    <filelist id="allfiles" dir="${ant.home}/bin" files="ant.cmd,foo.txt,ant.bat,bar.txt,ant"/>
              +    <restrict id="missingfiles">
              +        <filelist refid="allfiles"/>
              +        <rsel:not xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors">
              +            <rsel:exists/>
              +        </rsel:not>
              +    </restrict>
              +    <echo>These files are missed: ${toString:missingfiles}</echo>
              +</project>
              +

              The resource collection allfiles defines a list of files which are expected. The +restrict missingfiles uses the <not><exists> selector for +getting all files which are not present. Finally we use +the toString: pathshortcut for getting +them in a readable form: [echo] These files are missed: ....foo.txt;....bar.txt

              + +

              sort

              + +

              Sorts a nested resource collection according to the resources' natural order, or by one or +more nested resource comparators:

              + + + + + + + + + + + +
              AttributeDescriptionRequired
              cacheWhether to cache results; disabling may seriously impact performanceNo; default true
              +
              Parameters specified as nested elements
              +

              A single resource collection is required.

              +

              The sort can be controlled and customized by specifying one or more resource +comparators. Resources can be sorted according to multiple criteria; the first specified is the +"outermost", while the last specified is the "innermost". Several built-in resource comparators +are available in the +internal antlib org.apache.tools.ant.types.resources.comparators:

              +
              Resource Comparators
              +
                +
              • name—sort resources by name
              • +
              • exists—sort resources by existence
              • +
              • date—sort resources by date
              • +
              • type—sort resources by type
              • +
              • size—sort resources by size
              • +
              • content—sort resources by content
              • +
              • reverse—reverse the natural sort order, or that of a + single nested resource comparator
              • +
              -

              reverse

              -

              Reverse the natural sort order, or that of a single nested comparator.

              +
              name
              +

              Sort resources by name.

              -

              Examples

              -
              -    <property name="eol" value="${line.separator}" />
              -    <pathconvert property="sorted" pathsep="${eol}">
              -      <sort>
              -        <tokens>
              -          <string value="foo bar etc baz" />
              -          <stringtokenizer />
              -        </tokens>
              -      </sort>
              -    </pathconvert>
              -

              The resource of type string "foo bar etc baz" is split into four tokens by - the stringtokenizer. These tokens are sorted and there sorted gets the value - of "bar baz etc foo".

              - -
              -    <sort>
              -      <fileset dir="foo" />
              -      <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
              -        <date />
              -      </reverse>
              -    </sort>
              -

              This takes all files from foo - and sorts them by modification date in reverse order. - Because the resource comparators used (<reverse> - and <date>) are in an internal antlib - their namespace must be set explicitly. -

              - -
              - -

              first

              -

              Includes the first count resources from a nested resource collection. -This can be used in conjunction with the sort collection, -for example, to select the first few oldest, largest, etc. resources from a -larger collection.

              -
              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              countThe number of resources to includeNo, default 1
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              -

              Parameters specified as nested elements

              -

              A single resource collection is required.

              -
              - -

              last

              -

              Includes the last count resources from a nested resource collection. -This can be used in conjunction with the sort collection, -for example, to select the last few oldest, largest, etc. resources from a -larger collection. Since Ant 1.7.1.

              -
              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              countThe number of resources to includeNo, default 1
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              -

              Parameters specified as nested elements

              -

              A single resource collection is required.

              -
              - -

              allbutfirst

              -

              Includes all elements except for the first count resources -from a nested resource collection. This can be used in conjunction -with the sort collection, for example, to select -all but the first few oldest, largest, etc. resources from a larger -collection. Since Ant 1.9.5.

              -
              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              countThe number of resources to excludeNo, default 1
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              -

              Parameters specified as nested elements

              -

              A single resource collection is required.

              -
              - -

              allbutlast

              -

              Includes all elements except for the last count resources -from a nested resource collection. This can be used in conjunction -with the sort collection, for example, to select -all but the last few oldest, largest, etc. resources from a larger -collection. Since Ant 1.9.5.

              -
              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              countThe number of resources to excludeNo, default 1
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              -

              Parameters specified as nested elements

              -

              A single resource collection is required.

              -
              - -

              tokens

              -

              Includes the string tokens gathered from a nested - resource collection. Uses the same tokenizers supported by the -TokenFilter. Imaginative - use of this resource collection can implement equivalents for such Unix - functions as sort, grep -c, wc and - wc -l.

              -
              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              encodingThe encoding of the nested resourcesNo, default is platform default
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              -

              Parameters specified as nested elements

              -
                -
              • A single resource collection is required.
              • -
              • One nested tokenizer may be specified. If omitted, a - LineTokenizer will be used. -
              • -
              -

              Examples

              -
              <concat>
              +
              exists
              +

              Sort resources by existence. Not existing is considered "less than" existing.

              + +
              date
              +

              Sort resources by date.

              + +
              type
              +

              Sort resources by type (file or directory). Because directories contain files, they are +considered "greater".

              + +
              size
              +

              Sort resources by size.

              + +
              content
              +

              Sort resources by content.

              + + + + + + + + + + + +
              AttributeDescriptionRequired
              binaryWhether content should be compared in binary mode. If false, content will be + compared without regard to platform-specific line-ending conventions.No; default true
              + +
              reverse
              +

              Reverse the natural sort order, or that of a single nested comparator.

              + +
              Examples
              +
              +<property name="eol" value="${line.separator}"/>
              +<pathconvert property="sorted" pathsep="${eol}">
              +  <sort>
              +    <tokens>
              +      <string value="foo bar etc baz"/>
              +      <stringtokenizer/>
              +    </tokens>
              +  </sort>
              +</pathconvert>
              +

              The resource of type string foo bar etc baz is split into four tokens by +the stringtokenizer. These tokens are sorted and there sorted gets the +value of bar baz etc foo.

              + +
              +<sort>
              +  <fileset dir="foo"/>
              +  <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
              +    <date/>
              +  </reverse>
              +</sort>
              +

              This takes all files from foo and sorts them by modification date in reverse +order. Because the resource comparators used (<reverse> +and <date>) are in an internal antlib their namespace must be set explicitly. +

              + +

              first

              +

              Includes the first count resources from a nested resource collection. This can be +used in conjunction with the sort collection, for example, to select the +first few oldest, largest, etc. resources from a larger collection.

              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              countThe number of resources to includeNo; default 1
              cacheWhether to cache results; disabling may seriously impact performanceNo; default true
              +
              Parameters specified as nested elements
              +

              A single resource collection is required.

              + +

              last

              +

              Since Ant 1.7.1

              +

              Includes the last count resources from a nested resource collection. This can be +used in conjunction with the sort collection, for example, to select the +last few oldest, largest, etc. resources from a larger collection.

              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              countThe number of resources to includeNo; default 1
              cacheWhether to cache results; disabling may seriously impact performanceNo; default true
              +
              Parameters specified as nested elements
              +

              A single resource collection is required.

              + +

              allbutfirst

              +

              Since Ant 1.9.5

              +

              Includes all elements except for the first count resources from a nested resource +collection. This can be used in conjunction with the sort collection, for +example, to select all but the first few oldest, largest, etc. resources from a larger +collection.

              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              countThe number of resources to excludeNo; default 1
              cacheWhether to cache results; disabling may seriously impact performanceNo; default true
              +
              Parameters specified as nested elements
              +

              A single resource collection is required.

              + +

              allbutlast

              +

              Since Ant 1.9.5

              +

              Includes all elements except for the last count resources from a nested resource +collection. This can be used in conjunction with the sort collection, for +example, to select all but the last few oldest, largest, etc. resources from a larger +collection.

              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              countThe number of resources to excludeNo; default 1
              cacheWhether to cache results; disabling may seriously impact performanceNo; default true
              +
              Parameters specified as nested elements
              +

              A single resource collection is required.

              + +

              tokens

              +

              Includes the string tokens gathered from a nested resource collection. Uses +the same tokenizers supported by +the TokenFilter. Imaginative use of this resource +collection can implement equivalents for such Unix functions as sort, grep +-c, wc and wc -l.

              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              encodingThe encoding of the nested resourcesNo; default is default JVM character encoding
              cacheWhether to cache results; disabling may seriously impact performanceNo; default true
              +
              Parameters specified as nested elements
              +
                +
              • A single resource collection is required.
              • +
              • One nested tokenizer may be specified. If omitted, + a LineTokenizer will be used. +
              • +
              +
              Examples
              +
              +<concat>
                 <union>
                   <sort>
                     <tokens>
              -        <resources refid="input" />
              -        <linetokenizer includedelims="true" />
              +        <resources refid="input"/>
              +        <linetokenizer includedelims="true"/>
                     </tokens>
                   </sort>
                 </union>
              -</concat>
              -  
              -

              Implements Unix sort -u against resource collection input.

              -
              - -

              Set operations

              -
              -

              The following resource collections implement set operations:

              - - -

              union

              -

              Union of nested resource collections.

              - -

              intersect

              -

              Intersection of nested resource collections.

              - -

              difference

              -

              Difference of nested resource collections.

              - -

              The following attributes apply to all set-operation resource collections: -

              - - - - - - - - - - - -
              AttributeDescriptionRequired
              cacheWhether to cache results; disabling - may seriously impact performanceNo, default true
              - -

              Examples

              -
              -    <resources id="A">
              -        <string value="a"/>
              -        <string value="b"/>
              -    </resources>
              -    <resources id="B">
              -        <string value="b"/>
              -        <string value="c"/>
              -    </resources>
              -    <union id="union"><resources refid="A"/><resources refid="B"/></union>
              -    <intersect id="intersect"><resources refid="A"/><resources refid="B"/></intersect>
              -    <difference id="difference"><resources refid="A"/><resources refid="B"/></difference>
              -    <echo>
              -      A: ${toString:A}                    = a;b
              -      B: ${toString:B}                    = b;c
              -
              -      union     : ${toString:union}       = a;b;c
              -      intersect : ${toString:intersect}   = b
              -      difference: ${toString:difference}  = a;c
              -    </echo>
              -  
              -
              +</concat> +

              Implements Unix sort -u against resource collection input.

              + +

              Set operations

              +

              The following resource collections implement set operations:

              + + +

              union

              +

              Union of nested resource collections.

              + +

              intersect

              +

              Intersection of nested resource collections.

              + +

              difference

              +

              Difference of nested resource collections.

              + +

              The following attributes apply to all set-operation resource collections:

              + + + + + + + + + + + +
              AttributeDescriptionRequired
              cacheWhether to cache results; disabling may seriously impact performanceNo; default true
              + +
              Examples
              +
              +<resources id="A">
              +    <string value="a"/>
              +    <string value="b"/>
              +</resources>
              +<resources id="B">
              +    <string value="b"/>
              +    <string value="c"/>
              +</resources>
              +<union id="union"><resources refid="A"/><resources refid="B"/></union>
              +<intersect id="intersect"><resources refid="A"/><resources refid="B"/></intersect>
              +<difference id="difference"><resources refid="A"/><resources refid="B"/></difference>
              +<echo>
              +  A: ${toString:A}                    = a;b
              +  B: ${toString:B}                    = b;c
              +
              +  union     : ${toString:union}       = a;b;c
              +  intersect : ${toString:intersect}   = b
              +  difference: ${toString:difference}  = a;c
              +</echo>
              -

              mappedresources

              +

              mappedresources

              Since Ant 1.8.0

              -

              Wraps another resource collection and maps the names of the nested - resources using a mapper.

              +

              Wraps another resource collection and maps the names of the nested resources using +a mapper.

              -

              Even if mappedresources wraps a resource collection that - consists of file-system based resources, mappedresources - will not appear to be file-system based. This means you can't - use mappedresources with tasks that only allow file-system - based resources.

              +

              Even if mappedresources wraps a resource collection that consists of file-system +based resources, mappedresources will not appear to be file-system based. This means +you can't use mappedresources with tasks that only allow file-system based +resources.

              -
              -

              Parameters specified as attributes

              +
              Parameters specified as attributes
              - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              cacheWhether to cache results; enabling - may improve performance. Since Ant 1.8.1No, default false
              enablemultiplemappings - If true the the collection will use all the mappings for a - given source path. If false the it will only process the first - resource. - since Ant 1.8.1.No - defaults to false.
              + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              cacheWhether to cache results; enabling may improve performance. Since Ant + 1.8.1No; default false
              enablemultiplemappingsIf true the collection will use all the mappings for a given source + path. If false it will only process the first resource. + since Ant 1.8.1No; defaults to false
              -

              Parameters specified as nested elements

              -

              A single resource collection is required.

              -

              A single mapper can be used to map - names. If no mapper has been given (which doesn't make any sense, - honestly), an identity mapper will be used.

              - -

              Examples

              - -

              Copies all files from a given directory to a target directory - adding ".bak" as an extension. Note this could be done with a - mapper nested into copy directly as well.

              +
              Parameters specified as nested elements
              +

              A single resource collection is required.

              +

              A single mapper can be used to map names. If no mapper has been +given (which doesn't make any sense, honestly), an identity mapper will be used.

              -
              -    <copy todir="${target}">
              -      <mappedresources>
              -        <fileset dir="${src}"/>
              -        <globmapper from="*" to="*.bak"/>
              -      </mappedresources>
              -    </copy>
              -  
              - -

              Creates a WAR archive adding all CLASSPATH entries that are files - to the WEB-INF/lib directory without keeping their - files-system structure.

              +
              Examples
              -
              -    <war destfile="${output}">
              -      <mappedresources>
              -        <restrict>
              -          <path path="${java.class.path}"/>
              -          <type type="file"/>
              -        </restrict>
              -        <chainedmapper>
              -          <flattenmapper/>
              -          <globmapper from="*" to="WEB-INF/lib/*"/>
              -        </chainedmapper>
              -      </mappedresources>
              -    </war>
              -  
              -
              +

              Copies all files from a given directory to a target directory adding .bak as an +extension. Note this could be done with a mapper nested into copy +directly as well.

              + +
              +<copy todir="${target}">
              +  <mappedresources>
              +    <fileset dir="${src}"/>
              +    <globmapper from="*" to="*.bak"/>
              +  </mappedresources>
              +</copy>
              -

              archives

              +

              Creates a WAR archive adding all CLASSPATH entries that are files to +the WEB-INF/lib directory without keeping their files-system structure.

              + +
              +<war destfile="${output}">
              +  <mappedresources>
              +    <restrict>
              +      <path path="${java.class.path}"/>
              +      <type type="file"/>
              +    </restrict>
              +    <chainedmapper>
              +      <flattenmapper/>
              +      <globmapper from="*" to="WEB-INF/lib/*"/>
              +    </chainedmapper>
              +  </mappedresources>
              +</war>
              + +

              archives

              Since Ant 1.8.0

              -

              This resource collection accepts an arbitrary number of nested - resources and assumes that all those resources must be either ZIP or - TAR archives. The resources returned - by <archives> are the contents of the nested - archives.

              +

              This resource collection accepts an arbitrary number of nested resources and assumes that all +those resources must be either ZIP or TAR archives. The resources returned +by <archives> are the contents of the nested archives.

              This resource collection is a generalization - of zipgroupfileset - which is only supported by the zip family of tasks.

              +of zipgroupfileset which is only supported by +the zip family of tasks.

              -

              archives doesn't support any attributes.

              +

              archives doesn't support any attributes.

              -
              -

              Parameters specified as nested elements

              +
              Parameters specified as nested elements
              -

              <archives> has two nested - elements <zips> and - <tars> that are unions - themselves, i.e. they accept arbitrary many resource(collection)s - as nested elements.

              +

              <archives> has two nested elements <zips> +and <tars> that are unions themselves, i.e. they accept +arbitrary many resource(collection)s as nested elements.

              -

              The nested resources of <zips> are treated as ZIP archives, - the nested resources of <tars> as TAR archives.

              +

              The nested resources of <zips> are treated as ZIP archives, the nested +resources of <tars> as TAR archives.

              -

              Examples

              +
              Examples
              -

              Copies all files from all jars that are on the classpath - to ${target}.

              +

              Copies all files from all jars that are on the classpath to ${target}.

              -
              -    <copy todir="${target}">
              -      <archives>
              -        <zips>
              -          <restrict>
              -            <path path="${java.class.path}"/>
              -            <name name="*.jar"/>
              -          </restrict>
              -        </zips>
              -      </archives>
              -    </copy>
              -  
              -
              +
              +<copy todir="${target}">
              +  <archives>
              +    <zips>
              +      <restrict>
              +        <path path="${java.class.path}"/>
              +        <name name="*.jar"/>
              +      </restrict>
              +    </zips>
              +  </archives>
              +</copy>
              -

              resourcelist

              +

              resourcelist

              Since Ant 1.8.0

              -

              This resource collection accepts an arbitrary number of nested - resources, reads those resources and returns a resource for each - line read.

              - -

              If the line contains a colon, Ant will try to use it as an URL and - if that fails (or the line doesn't contain a colon) will return a - file resource with the line's content as its name.

              - -

              Properties will be expanded for each line. If the property - expansion yields a resource object rather than a string (for example - because of custom property helpers), the resources will be returned - directly.

              +

              This resource collection accepts an arbitrary number of nested resources, reads those +resources and returns a resource for each line read.

              + +

              If the line contains a colon, Ant will try to use it as an URL and if that fails (or the line +doesn't contain a colon) will return a file resource with the line's content as its name.

              + +

              Properties will be expanded for each line. If the property expansion yields a resource +object rather than a string (for example because of custom property helpers), the resources will +be returned directly.

              <resourcelist> is a generalization - of <filelist>.

              +of <filelist>.

              -
              - - - - - - - - - - - -
              AttributeDescriptionRequired
              encodingThe encoding of the nested resourcesNo, default is platform default
              -
              + + + + + + + + + + + +
              AttributeDescriptionRequired
              encodingThe encoding of the nested resourcesNo; default is default JVM character encoding
              -
              -

              Parameters specified as nested elements

              +
              Parameters specified as nested elements
              -

              <resourcelist> accepts arbitrary many - resource(collection)s as nested elements.

              +

              <resourcelist> accepts arbitrary many resource(collection)s as nested +elements.

              -

              In addition <resourcelist> supports - nested <filterchain> elements that can be used - to filter/modify the read resources before their lines get - expanded. Such a nested element corresponds to - a filterchain.

              +

              In addition <resourcelist> supports +nested <filterchain> elements that can be used to filter/modify the read +resources before their lines get expanded. Such a nested element corresponds to +a filterchain.

              -

              Examples

              +
              Examples
              -

              The following example copies a file from the first URL of - several alternatives that can actually be reached. It assumes - that the file mirrors.txt looks like

              +

              The following example copies a file from the first URL of several alternatives that can +actually be reached. It assumes that the file mirrors.txt looks like

              -
              +
                   mirrors.txt:
               http://best.mirror.example.org/
               http://second.best.mirror.example.org/mirror/of/best/
               https://yet.another.mirror/
              -http://the.original.site/
              -  
              - -
              -    <copy todir="${target}">
              -      <first>
              -        <restrict>
              -          <resourcelist>
              -            <file file="mirrors.txt"/>
              -          </resourcelist>
              -          <exists/>
              -        </restrict>
              -      </first>
              -    </copy>
              -  
              -
              +http://the.original.site/ + +
              +<copy todir="${target}">
              +  <first>
              +    <restrict>
              +      <resourcelist>
              +        <file file="mirrors.txt"/>
              +      </resourcelist>
              +      <exists/>
              +    </restrict>
              +  </first>
              +</copy>
              diff -Nru ant-1.9.10/manual/Types/selectors.html ant-1.10.3/manual/Types/selectors.html --- ant-1.9.10/manual/Types/selectors.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/selectors.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,1193 +24,1070 @@

              Selectors

              -

              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 <include> - and <exclude> tags.

              +

              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 <include> and <exclude> tags.

              How to use a Selector

              -

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

              - -

              Different selectors have different attributes. Some selectors can - contain other selectors, and these are called - Selector Containers. - There is also a category of selectors that allow - user-defined extensions, called - Custom Selectors. - The ones built in to Apache Ant are called - Core Selectors. -

              - -

              Core Selectors

              - -

              Core selectors are the ones that come standard - with Ant. They can be used within a fileset and can be contained - within Selector Containers.

              +

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

              + +

              Different selectors have different attributes. Some selectors can contain other selectors, + and these are called Selector Containers. There is also + a category of selectors that allow user-defined extensions, + called Custom Selectors. The ones built in to Apache Ant are + called Core Selectors.

              + +

              Core Selectors

              + +

              Core selectors are the ones that come standard with Ant. They can be used within a + fileset and can be contained within Selector Containers.

              The core selectors are:

                -
              • <contains> - Select - files that contain a particular text string
              • -
              • <date> - Select files - that have been modified either before or after a particular date - and time
              • -
              • <depend> - Select files - that have been modified more recently than equivalent files - elsewhere
              • -
              • <depth> - Select files - that appear so many directories down in a directory tree
              • -
              • <different> - Select files - that are different from those elsewhere
              • -
              • <filename> - Select - files whose name matches a particular pattern. Equivalent to - the include and exclude elements of a patternset.
              • -
              • <present> - Select - files that either do or do not exist in some other location
              • -
              • <containsregexp> - Select - files that match a regular expression
              • -
              • <size> - Select files - that are larger or smaller than a particular number of bytes.
              • -
              • <type> - Select files - that are either regular files or directories.
              • -
              • <modified> - Select files if - the return value of the configured algorithm is different from that - stored in a cache.
              • -
              • <signedselector> - Select files if - they are signed, and optionally if they have a signature of a certain name. -
              • -
              • <scriptselector> - - Use a BSF or JSR 223 scripting language to create - your own selector -
              • -
              • <readable> - - Select files if they are readable.
              • -
              • <writable> - - Select files if they are writable.
              • +
              • <contains>—Select files that + contain a particular text string
              • +
              • <date>—Select files that have been + modified either before or after a particular date and time
              • +
              • <depend>—Select files that have been + modified more recently than equivalent files elsewhere
              • +
              • <depth>—Select files that appear so + many directories down in a directory tree
              • +
              • <different>—Select files that are + different from those elsewhere
              • +
              • <filename>—Select files whose name + matches a particular pattern. Equivalent to the include and exclude elements of a + patternset.
              • +
              • <present>—Select files that either + do or do not exist in some other location
              • +
              • <containsregexp>—Select files that + match a regular expression
              • +
              • <size>—Select files that are larger or + smaller than a particular number of bytes.
              • +
              • <type>—Select files that are either + regular files or directories.
              • +
              • <modified>—Select files if the return + value of the configured algorithm is different from that stored in a cache.
              • +
              • <signedselector>—Select files if + they are signed, and optionally if they have a signature of a certain name.
              • +
              • <scriptselector>—Use a BSF or JSR + 223 scripting language to create your own selector
              • +
              • <readable>—Select files if they are + readable.
              • +
              • <writable>—Select files if they are + writable.
              • +
              • <executable>—Select files if they + are executable.
              • +
              • <symlink>—Select files if they are + symlinks.
              • +
              • <ownedBy>—Select files if they are owned + by a given user.
              -

              Contains Selector

              +

              Contains Selector

              -

              The <contains> tag in a FileSet limits - the files defined by that fileset to only those which contain the - string specified by the text attribute. - .

              -

              The <contains> selector can be used as a - ResourceSelector (see the - <restrict> - ResourceCollection).

              - - - - - - +

              The <contains> tag in a FileSet limits the files defined by that fileset + to only those which contain the string specified by the text attribute.

              +

              The <contains> selector can be used as a ResourceSelector (see + the <restrict> ResourceCollection).

              + +
              AttributeDescriptionRequired
              + + + + - - + - + - - - + + + + + + + + - - + - + - - - - -
              AttributeDescriptionRequired
              textSpecifies the text that every file must contain + textSpecifies the text that every file must contain YesYes
              casesensitiveWhether to pay attention to case when looking - for the string in the text attribute. Default is - true. - NocasesensitiveWhether to pay attention to case when looking for the string in the text + attribute.No; default is true
              ignorewhitespaceWhether to eliminate whitespace before checking for the string in the text + attribute.No; default is false
              ignorewhitespaceWhether to eliminate whitespace before checking - for the string in the text attribute. Default is - false. + encodingEncoding of the resources being selected. + Since Ant 1.9.0 NoNo; defaults to default JVM character encoding
              encodingEncoding of the resources being selected. - Required in practice if the encoding of the files being - selected is different from the default encoding of the JVM - where Ant is running. - Since Ant 1.9.0 - No

              Here is an example of how to use the Contains Selector:

              -
              +    
               <fileset dir="${doc.path}" includes="**/*.html">
                   <contains text="script" casesensitive="no"/>
              -</fileset>
              -
              +</fileset> -

              Selects all the HTML files that contain the string - script.

              +

              Selects all the HTML files that contain the string script.

              +

              Date Selector

              -

              Date Selector

              +

              The <date> 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.

              -

              The <date> 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.

              - - +
              - - - + + + - - - - - - - + + - - - - - - - - - - - + - - - - + + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              datetimeSpecifies the date and time to test for. - Should be in the format "MM/dd/yyyy hh:mm a" using the US - locale, or an alternative pattern specified via - the pattern attribute. - At least one of the two.
              millisThe number of milliseconds since 1970 that should - be tested for. It is usually much easier to use the datetime + datetimeSpecifies the date and time to test for. Should be in the format MM/dd/yyyy hh:mm + a using the US locale, or an alternative pattern specified via the pattern attribute. At least one of the two
              whenIndicates 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: -
                -
              • before - select files whose last modified date is before the indicated date -
              • after - select files whose last modified date is after the indicated date -
              • equal - select files whose last modified date is this exact date -
              - The default is equal. -
              No
              granularityThe number of milliseconds leeway to use when - comparing file modification times. This is needed because not every - file system supports tracking the last modified time to the - millisecond level. Default is 0 milliseconds, or 2 seconds on DOS systems. - No
              patternThe SimpleDateFormat-compatible pattern - to use when interpreting the datetime attribute using - the current locale. - Since Ant 1.6.2 + millisThe number of milliseconds since 1970 that should be tested for. It is + usually much easier to use the datetime attribute. No
              checkdirs - Indicates whether or not to check dates on directories. - No, defaults to falsewhenIndicates 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: +
                +
              • before—select files whose last modified date is before the indicated + date
              • +
              • after—select files whose last modified date is after the indicated + date
              • +
              • equal—select files whose last modified date is this exact date
              • +
              No; default is equal
              granularityThe number of milliseconds leeway to use when comparing file modification times. This is + needed because not every file system supports tracking the last modified time to the + millisecond level.No; default is 0 milliseconds, or 2 seconds on DOS systems
              patternThe SimpleDateFormat-compatible pattern to use when interpreting + the datetime attribute using the current locale. + Since Ant 1.6.2No
              checkdirsIndicates whether or not to check dates on directories.No; defaults to false

              Here is an example of how to use the Date Selector:

              -
              +    
               <fileset dir="${jar.path}" includes="**/*.jar">
                   <date datetime="01/01/2001 12:00 AM" when="before"/>
              -</fileset>
              -
              - -

              Selects all JAR files which were last modified before midnight - January 1, 2001.

              +</fileset> +

              Selects all JAR files which were last modified before midnight January 1, 2001.

              -

              Depend Selector

              +

              Depend Selector

              -

              The <depend> tag selects files - whose last modified date is later than another, equivalent file in - another location.

              +

              The <depend> tag selects files whose last modified date is later than + another, equivalent file in another location.

              The <depend> tag supports the use of a - contained <mapper> element - to define the location of the file to be compared against. If no - <mapper> element is specified, the - identity type mapper is used.

              + contained <mapper> element to define the location + of the file to be compared against. If no <mapper> element is specified, + the identity type mapper is used.

              The <depend> selector is case-sensitive.

              - +
              - - - + + + - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              targetdirThe base directory to look for the files to compare - against. The precise location depends on a combination of this - attribute and the <mapper> element, if any. - YestargetdirThe base directory to look for the files to compare against. The precise location + depends on a combination of this attribute and the <mapper> element, if + any.Yes
              granularityThe 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, or 2 seconds on DOS systems. - NogranularityThe 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.No; default is 0 milliseconds, or 2 seconds on DOS systems

              Here is an example of how to use the Depend Selector:

              -
              +    
               <fileset dir="${ant.1.5}/src/main" includes="**/*.java">
                   <depend targetdir="${ant.1.4.1}/src/main"/>
              -</fileset>
              -
              +</fileset> -

              Selects all the Java source files which were modified in the - 1.5 release. -

              +

              Selects all the Java source files which were modified in the 1.5 release.

              +

              Depth Selector

              -

              Depth Selector

              +

              The <depth> tag selects files based on how many directory levels deep they + are in relation to the base directory of the fileset.

              -

              The <depth> tag selects files based on - how many directory levels deep they are in relation to the base - directory of the fileset. -

              - - +
              - - - + + + - - - + + + - - + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              minThe minimum number of directory levels below - the base directory that a file must be in order to be selected. - Default is no limit. - At least one of the two.minThe minimum number of directory levels below the base directory that a file must be in + order to be selected.At least one of the two; default is no limit
              maxThe maximum number of directory levels below - the base directory that a file can be and still be selected. - Default is no limit. - maxThe maximum number of directory levels below the base directory that a file + can be and still be selected.

              Here is an example of how to use the Depth Selector:

              -
              +    
               <fileset dir="${doc.path}" includes="**/*">
                   <depth max="1"/>
              -</fileset>
              -
              +</fileset> -

              Selects all files in the base directory and one directory below - that.

              +

              Selects all files in the base directory and one directory below that.

              - -

              Different Selector

              +

              Different Selector

              -

              The <different> selector will select a file - if it is deemed to be 'different' from an equivalent file in - another location. The rules for determining difference between - the two files are as follows: +

              The <different> selector will select a file if it is deemed to be + 'different' from an equivalent file in another location. The rules for determining difference + between the two files are as follows:

                -
              1. If a file is only present in the resource collection you apply - the selector to but not in targetdir (or after applying the - mapper) the file is selected. -
              2. If a file is only present in targetdir (or after applying the - mapper) it is ignored. -
              3. Files with different lengths are different. -
              4. If ignoreFileTimes is turned off, then differing file - timestamps will cause files to be regarded as different. -
              5. Unless ignoreContents is set to true, - a byte-for-byte check is run against the two files. +
              6. If a file is only present in the resource collection you apply the selector to but not + in targetdir (or after applying the mapper) the file is selected.
              7. +
              8. If a file is only present in targetdir (or after applying the mapper) it is + ignored.
              9. +
              10. Files with different lengths are different.
              11. +
              12. If ignoreFileTimes is turned off, then differing file timestamps will + cause files to be regarded as different.
              13. +
              14. Unless ignoreContents is set to true, a byte-for-byte check is run against + the two files.
              +

              This is a useful selector to work with programs and tasks that don't handle dependency + checking properly; even if a predecessor task always creates its output files, followup tasks + can be driven off copies made with a different selector, so their dependencies are driven on the + absolute state of the files, not just a timestamp. For example: anything fetched from a web + site, or the output of some program. To reduce the amount of checking, when using this task + inside a <copy> task, set preservelastmodified to true to + propagate the timestamp from the source file to the destination file.

              - This is a useful selector to work with programs and tasks that don't handle - dependency checking properly; even if a predecessor task always creates its - output files, followup tasks can be driven off copies made with a different - selector, so their dependencies are driven on the absolute state of the - files, not just a timestamp. For example: anything fetched from a web site, - or the output of some program. To reduce the amount of checking, when using - this task inside a <copy> task, set - preservelastmodified to true to propagate the timestamp - from the source file to the destination file.

              - - The <different> selector supports the use of a - contained <mapper> element - to define the location of the file to be compared against. If no - <mapper> element is specified, the - identity type mapper is used.

              - - - - - - - - - - - +

              The <different> selector supports the use of a + contained <mapper> element to define the location + of the file to be compared against. If no <mapper> element is specified, + the identity type mapper is used.

              + +
              AttributeDescriptionRequired
              targetdirThe base directory to look for the files to compare - against. The precise location depends on a combination of this - attribute and the <mapper> element, if any. - Yes
              + + + + - - - + + + - - - + + + - - - + + + + + + + +
              AttributeDescriptionRequired
              ignoreFileTimesWhether to use file times in the comparison or not. - Default is true (time differences are ignored). - NotargetdirThe base directory to look for the files to compare against. The precise location + depends on a combination of this attribute and the <mapper> element, if + any.Yes
              ignoreContentsWhether to do a byte per byte compare. - Default is false (contents are compared). - Since Ant 1.6.3 - NoignoreFileTimesWhether to use file times in the comparison or not.No; default is true (time differences are ignored)
              granularityThe 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, or 2 seconds on DOS systems. - NoignoreContentsWhether to do a byte per byte compare. + Since Ant 1.6.3No; default is false (contents are compared)
              granularityThe 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.No; default is 0 milliseconds, or 2 seconds on DOS systems

              Here is an example of how to use the Different Selector:

              -
              +    
               <fileset dir="${ant.1.5}/src/main" includes="**/*.java">
                   <different targetdir="${ant.1.4.1}/src/main"
                       ignoreFileTimes="true"/>
              -</fileset>
              -
              +</fileset> -

              Compares all the Java source files between the 1.4.1 and the 1.5 release - and selects those who are different, disregarding file times. -

              +

              Compares all the Java source files between the 1.4.1 and the 1.5 release and selects those + who are different, disregarding file times.

              -

              Filename Selector

              +

              Filename Selector

              -

              The <filename> tag acts like the - <include> and <exclude> - tags within a fileset. By using a selector instead, however, - one can combine it with all the other selectors using whatever - selector container is desired. -

              +

              The <filename> tag acts like the <include> + and <exclude> tags within a fileset. By using a selector instead, however, + one can combine it with all the other selectors using + whatever selector container is desired.

              -

              The <filename> selector is - case-sensitive.

              +

              The <filename> selector is case-sensitive.

              - +
              - - - + + + - - - + + + - - + + - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              nameThe name of files to select. The name parameter - can contain the standard Ant wildcard characters. - Exactly one of - the twonameThe name of files to select. The name parameter can contain the standard Ant wildcard + characters.Exactly one of the two
              regexThe regular expression matching files to select.regexThe regular expression matching files to select.
              casesensitiveWhether to pay attention to case when looking - at file names. Default is "true". - NocasesensitiveWhether to pay attention to case when looking at file names.No; default is true
              negateWhether to reverse the effects of this filename - selection, therefore emulating an exclude rather than include - tag. Default is "false". - NonegateWhether to reverse the effects of this filename selection, therefore emulating + an exclude rather than include tag.No; default is false

              Here is an example of how to use the Filename Selector:

              -
              +    
               <fileset dir="${doc.path}" includes="**/*">
                   <filename name="**/*.css"/>
              -</fileset>
              -
              +</fileset>

              Selects all the cascading style sheet files.

              +

              Present Selector

              -

              Present Selector

              - -

              The <present> tag selects files - that have an equivalent file in another directory tree.

              +

              The <present> tag selects files that have an equivalent file in + another directory tree.

              The <present> tag supports the use of a - contained <mapper> element - to define the location of the file to be tested against. If no - <mapper> element is specified, the - identity type mapper is used.

              + contained <mapper> element to define the location + of the file to be tested against. If no <mapper> element is specified, + the identity type mapper is used.

              The <present> selector is case-sensitive.

              - +
              - - - + + + - - - + + + - - + - + Setting this attribute to srconly is equivalent to wrapping the selector in + the <not> selector container. +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              targetdirThe base directory to look for the files to compare - against. The precise location depends on a combination of this - attribute and the <mapper> element, if any. - YestargetdirThe base directory to look for the files to compare against. The precise location + depends on a combination of this attribute and the <mapper> element, if + any.Yes
              presentWhether 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: + presentWhether we are requiring that a file is present in the source directory tree only, or in + both the source and the target directory tree. Valid values are:
                -
              • srconly - select files only if they are in the src - directory tree but not in the target directory tree -
              • both - select files only if they are present both in the - src and target directory trees +
              • srconly—select files only if they are in the source directory tree but + not in the target directory tree
              • +
              • both-- select files only if they are present both in the source and target + directory trees
              - Default is both. Setting this attribute to "srconly" - is equivalent to wrapping the selector in the <not> - selector container. -
              NoNo; default is both

              Here is an example of how to use the Present Selector:

              -
              +    
               <fileset dir="${ant.1.5}/src/main" includes="**/*.java">
                   <present present="srconly" targetdir="${ant.1.4.1}/src/main"/>
              -</fileset>
              -
              +</fileset> -

              Selects all the Java source files which are new in the - 1.5 release. -

              +

              Selects all the Java source files which are new in the 1.5 release.

              -

              Regular Expression Selector

              +

              Regular Expression Selector

              -

              The <containsregexp> tag in a FileSet limits - the files defined by that fileset to only those which contents contain a - match to the regular expression specified by the expression attribute. -

              -

              The <containsregexp> selector can be used as a - ResourceSelector (see the - <restrict> - ResourceCollection).

              +

              The <containsregexp> tag in a FileSet limits the files defined by that + fileset to only those which contents contain a match to the regular expression specified by + the expression attribute.

              - +

              The <containsregexp> selector can be used as a ResourceSelector (see + the <restrict> ResourceCollection).

              + +
              - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              expressionSpecifies the regular expression that must - match true in every fileYesexpressionSpecifies the regular expression that must match true in every fileYes
              casesensitivePerform a case sensitive match. Default is - true. since Ant 1.8.2NocasesensitivePerform a case sensitive match. Since Ant 1.8.2No; default is true
              multiline - Perform a multi line match. - Default is false. since Ant 1.8.2NomultilinePerform a multi line match. Since Ant 1.8.2No; default is false
              singleline - This allows '.' to match new lines. - SingleLine is not to be confused with multiline, SingleLine is a perl - regex term, it corresponds to dotall in java regex. - Default is false. since Ant 1.8.2NosinglelineThis allows . to match new lines. SingleLine is not to be confused with + multiline, SingleLine is a perl regex term, it corresponds to dotall in Java regex. + Since Ant 1.8.2No; default is false

              Here is an example of how to use the regular expression Selector:

              -
              +    
               <fileset dir="${doc.path}" includes="*.txt">
                   <containsregexp expression="[4-6]\.[0-9]"/>
              -</fileset>
              -
              - -

              Selects all the text files that match the regular expression - (have a 4,5 or 6 followed by a period and a number from 0 to 9). +</fileset> +

              Selects all the text files that match the regular expression (have a 4, 5 or 6 followed by a + period and a number from 0 to 9). -

              Size Selector

              +

              Size Selector

              -

              The <size> 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 +

              The <size> 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.

              - +
              - - - + + + - - + - + - - - + + + - - + +
            • less—select files less than the indicated size
            • +
            • more—select files greater than the indicated size
            • +
            • equal—select files this exact size
            • + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              valueThe size of the file which should be tested for. + valueThe size of the file which should be tested for. YesYes
              unitsThe units that the value attribute - is expressed in. When using the standard single letter SI - designations, such as "k","M", or - "G", multiples of 1000 are used. If you want to use - power of 2 units, use the IEC standard: "Ki" for 1024, - "Mi" for 1048576, and so on. The default is no units, - which means the value attribute expresses the exact - number of bytes. - NounitsThe units that the value attribute is expressed in. When using the standard + single letter SI designations, such as k, M, or G, multiples of 1000 + are used. If you want to use power of 2 units, use the IEC standard: Ki for + 1024, Mi for 1048576, and so on. The default is no units, which means + the value attribute expresses the exact number of bytes.No
              whenIndicates 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: + whenIndicates 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:
                -
              • less - select files less than the indicated size -
              • more - select files greater than the indicated size -
              • equal - select files this exact size -
              - The default is equal. -
              NoNo; default is equal

              Here is an example of how to use the Size Selector:

              -
              +    
               <fileset dir="${jar.path}">
                 <patternset>
                   <include name="**/*.jar"/>
                 </patternset>
                 <size value="4" units="Ki" when="more"/>
              -</fileset>
              -
              +</fileset>

              Selects all JAR files that are larger than 4096 bytes.

              -

              Type Selector

              +

              Type Selector

              -

              The <type> tag selects files of a certain type: - directory or regular.

              +

              The <type> tag selects files of a certain type: directory or + regular.

              - +
              - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              typeThe type of file which should be tested for. - Acceptable values are: -
                -
              • file - regular files
              • -
              • dir - directories
              • -
              -
              YestypeThe type of file which should be tested for. Acceptable values are: +
                +
              • file—regular files
              • +
              • dir—directories
              • +
              Yes
              -

              Here is an example of how to use the Type Selector to select only - directories in ${src}

              +

              Here is an example of how to use the Type Selector to select only directories + in ${src}

              -
              +    
               <fileset dir="${src}">
                 <type type="dir"/>
              -</fileset>
              -
              +</fileset> -

              The Type Selector is often used in conjunction with other selectors. - For example, to select files that also exist in a template - directory, but avoid selecting empty directories, use: +

              The Type Selector is often used in conjunction with other selectors. For example, to select + files that also exist in a template directory, but avoid selecting empty + directories, use:

              -
              +    
               <fileset dir="${src}">
                   <and>
                       <present targetdir="template"/>
                       <type type="file"/>
                   </and>
              -</fileset>
              -
              +</fileset> +

              Modified Selector

              +

              The <modified> selector computes a value for a file, compares that to the + value stored in a cache and select the file, if these two values differ.

              +

              Because this selector is highly configurable the order in which the selection is done is:

              +
                +
              1. get the absolute path for the file
              2. +
              3. get the cached value from the configured cache (absolute path as key)
              4. +
              5. get the new value from the configured algorithm
              6. +
              7. compare these two values with the configured comparator
              8. +
              9. update the cache if needed and requested
              10. +
              11. do the selection according to the comparison result
              12. +
              +

              The comparison, computing of the hashvalue and the store is done by implementation of special + interfaces. Therefore they may provide additional parameters.

              + +

              The <modified> selector can be used as a ResourceSelector (see + the <restrict> ResourceCollection). In that case it + maps simple file resources to files and does its job. If the resource is from another type, + the <modified> selector tries to (attention!) copy the + content into a local file for computing the hashvalue.

              -

              Modified Selector

              -

              The <modified> selector computes a value for a file, compares that - to the value stored in a cache and select the file, if these two values - differ.

              -

              Because this selector is highly configurable the order in which the selection is done - is:

                -
              1. get the absolute path for the file
              2. -
              3. get the cached value from the configured cache (absolute path as key)
              4. -
              5. get the new value from the configured algorithm
              6. -
              7. compare these two values with the configured comparator
              8. -
              9. update the cache if needed and requested
              10. -
              11. do the selection according to the comparison result
              12. -
              -

              The comparison, computing of the hashvalue and the store is done by implementation - of special interfaces. Therefore they may provide additional parameters.

              - -

              The <modified> selector can be used as a - ResourceSelector (see the - <restrict> - ResourceCollection). - In that case it maps simple file resources to files and does its job. If the - resource is from another type, the <modified> selector tries - to (attention!) copy the content into a local file for computing the - hashvalue.

              - - - - - - - - - - + + + + + + + + + Unit Test Results: Summary + + + + + + open('allclasses-frame.html','classListFrame') + +

              Summary

              + + + + + + +
              AttributeDescriptionRequired
              algorithm The type of algorithm should be used. - Acceptable values are (further information see later): -
                -
              • hashvalue - HashvalueAlgorithm
              • -
              • digest - DigestAlgorithm
              • -
              • checksum - ChecksumAlgorithm
              • -
              + + + + + + + + + - + - - + - + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
              AttributeDescriptionRequired
              algorithmThe type of algorithm should be used. Acceptable values are (further information + see later): +
                +
              • hashvalue—HashvalueAlgorithm
              • +
              • digest—DigestAlgorithm
              • +
              • checksum—ChecksumAlgorithm
              • +
              No, defaults to digest No; defaults to digest
              cache The type of cache should be used. - Acceptable values are (further information see later): -
                -
              • propertyfile - PropertyfileCache
              • -
              +
              cacheThe type of cache should be used. Acceptable values are (further information see + later): +
                +
              • propertyfile—PropertyfileCache
              • +
              No, defaults to propertyfile No; defaults to propertyfile
              comparator The type of comparator should be used. - Acceptable values are (further information see later): -
                -
              • equal - EqualComparator
              • -
              • rule - java.text.RuleBasedCollator - - (see note for restrictions) -
              • -
              +
              comparatorThe type of comparator should be used. Acceptable values are: +
                +
              • equal—EqualComparator
              • +
              • rule—java.text.RuleBasedCollator + + (see note for restrictions)
              • +
              No, defaults to equal No; defaults to equal
              algorithmclass Classname of custom algorithm implementation. Lower - priority than algorithm. No algorithmclassClassname of custom algorithm implementation. Lower priority + than algorithm.No
              cacheclass Classname of custom cache implementation. Lower - priority than cache. No cacheclassClassname of custom cache implementation. Lower priority than cache.No
              comparatorclass Classname of custom comparator implementation. Lower - priority than comparator. No comparatorclassClassname of custom comparator implementation. Lower priority + than comparator.No
              update Should the cache be updated when values differ? (boolean) No, defaults to true updateShould the cache be updated when values differ? (boolean)No; defaults to true
              seldirs Should directories be selected? (boolean) No, defaults to true seldirsShould directories be selected? (boolean)No; defaults to true
              selres Should Resources without an InputStream, and - therefore without checking, be selected? (boolean) No, defaults to true. Only relevant - when used as ResourceSelector. selresShould Resources without an InputStream, and therefore without checking, be selected? + (boolean)No; defaults to true. Only relevant when used as ResourceSelector.
              delayupdate If set to true, the storage of the cache will be delayed until the - next finished BuildEvent; task finished, target finished or build finished, - whichever comes first. This is provided for increased performance. If set - to false, the storage of the cache will happen with each change. This - attribute depends upon the update attribute. (boolean) No, defaults to true delayupdateIf set to true, the storage of the cache will be delayed until the next finished + BuildEvent; task finished, target finished or build finished, whichever comes first. This + is provided for increased performance. If set to false, the storage of the cache + will happen with each change. This attribute depends upon the update + attribute. (boolean)No; defaults to true
              -

              These attributes can be set with nested <param/> tags. With <param/> - tags you can set other values too - as long as they are named according to - the following rules:

                -
              • algorithm : same as attribute algorithm
              • -
              • cache : same as attribute cache
              • -
              • comparator : same as attribute comparator
              • -
              • algorithmclass : same as attribute algorithmclass
              • -
              • cacheclass : same as attribute cacheclass
              • -
              • comparatorclass : same as attribute comparatorclass
              • -
              • update : same as attribute update
              • -
              • seldirs : same as attribute seldirs
              • -
              • algorithm.* : Value is transferred to the algorithm via its - setXX-methods
              • -
              • cache.* : Value is transferred to the cache via its - setXX-methods
              • -
              • comparator.* : Value is transferred to the comparator via its - setXX-methods
              • -
              +
              Parameters specified as nested elements
              - - - - - +

              The <modified> selector supports a nested <classpath> + element that represents a path-like structure for finding + custom interface implementations.

              + +

              All attributes of a <modified> selector an be set with + nested <param/> tags. Additional values can be set + with <param/> tags according to the rules below.

              + +
              algorithm
              +

              Same as algorithm attribute, with the following additional values:

              +
              Algorithm options
              NameDescription
              + + + - - + + - - + + + + + +
              NameDescription
              hashvalue Reads the content of a file into a java.lang.String - and use thats hashValue(). No additional configuration required. - hashvalueReads the content of a file into a java.lang.String and uses + that hashValue(). No additional configuration required.
              digest Uses java.security.MessageDigest. This Algorithm supports - the following attributes: + digestUses java.security.MessageDigest. This Algorithm supports the following + attributes:
                -
              • algorithm.algorithm (optional): Name of the Digest algorithm - (e.g. 'MD5' or 'SHA', default = MD5)
              • -
              • algorithm.provider (optional): Name of the Digest provider - (default = null)
              • +
              • algorithm.algorithm (optional): Name of the Digest algorithm + (e.g. MD5 or SHA); default is MD5
              • +
              • algorithm.provider (optional): Name of the Digest provider; default + is null
              checksumUses java.util.zip.Checksum. This Algorithm supports the following + attributes: +
                +
              • algorithm.algorithm (optional): Name of the algorithm (e.g. CRC + or ADLER); default is CRC)
              • +
              +
              +
              cache
              +

              Same as cache attribute, with the following additional values:

              + + + + + + + + + +
              NameDescription
              propertyfileUse the java.util.Properties class and its possibility to load and store to + file. This Cache implementation supports the following attributes: +
                +
              • cache.cachefile (optional): Name of the properties file; default + is cache.properties
              • +
              +
              +
              comparator
              +

              Same as comparator attribute.

              +
              algorithmclass
              +

              Same as algorithmclass attribute.

              +
              comparatorclass
              +

              Same as comparatorclass attribute.

              +
              cacheclass
              +

              Same as cacheclass attribute.

              +
              update
              +

              Same as update attribute.

              +
              seldirs
              +

              Same as comparatorclass attribute.

              + +
              Examples
              +

              Here are some examples of how to use the Modified Selector:

              + +
              +<copy todir="dest">
              +    <fileset dir="src">
              +        <modified/>
              +    </fileset>
              +</copy>
              + +

              This will copy all files from src to dest which content has + changed. Using an updating PropertyfileCache with cache.properties and + MD5-DigestAlgorithm.

              + +
              +<copy todir="dest">
              +    <fileset dir="src">
              +        <modified update="true"
              +                  seldirs="true"
              +                  cache="propertyfile"
              +                  algorithm="digest"
              +                  comparator="equal">
              +            <param name="cache.cachefile"     value="cache.properties"/>
              +            <param name="algorithm.algorithm" value="MD5"/>
              +        </modified>
              +    </fileset>
              +</copy>
              + +

              This is the same example rewritten as CoreSelector with setting the all the values (same as + defaults are).

              + +
              +<copy todir="dest">
              +    <fileset dir="src">
              +        <custom class="org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector">
              +            <param name="update"     value="true"/>
              +            <param name="seldirs"    value="true"/>
              +            <param name="cache"      value="propertyfile"/>
              +            <param name="algorithm"  value="digest"/>
              +            <param name="comparator" value="equal"/>
              +            <param name="cache.cachefile"     value="cache.properties"/>
              +            <param name="algorithm.algorithm" value="MD5"/>
              +        </custom>
              +    </fileset>
              +</copy>
              + +

              And this is the same rewritten as CustomSelector.

              + +
              +<target name="generate-and-upload-site">
              +    <echo> generate the site using forrest </echo>
              +    <antcall target="site"/>
              +
              +    <echo> upload the changed file </echo>
              +    <ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.pwd}">
              +        <fileset dir="htdocs/manual">
              +            <modified/>
              +        </fileset>
              +    </ftp>
              +</target>
              + +

              A useful scenario for this selector inside a build environment for homepage generation + (e.g. with Apache Forrest). Here + all changed files are uploaded to the server. The CacheSelector saves therefore + much upload time.

              + +
              +<modified cacheclassname="com.mycompany.MyCache">
              +    <classpath>
              +        <pathelement location="lib/mycompany-antutil.jar"/>
              +    </classpath>
              +</modified>
              + +

              Uses com.mycompany.MyCache from a jar outside of Ant's own classpath as + cache implementation

              + +

              Note on RuleBasedCollator

              +

              The RuleBasedCollator needs a format for its work, but its needed while instantiating. There + is a problem in the initialization algorithm for this case. Therefore you should not use this + (or tell me the workaround :-).

              + +

              Signed Selector

              + +

              The <signedselector> tag selects signed files and optionally signed with a + certain name.

              +

              Since Apache Ant 1.7

              + + + + + + + + + + + +
              AttributeDescriptionRequired
              nameThe signature name to check for.No
              + +

              Readable Selector

              + +

              The <readable> selector selects only files that are readable. Ant only + invokes java.io.File#canRead so if a file is unreadable but JVM cannot + detect this state, this selector will still select the file.

              + +

              Writable Selector

              + +

              The <writable> selector selects only files that are writable. Ant only + invokes java.io.File#canWrite so if a file is nonwritable but JVM + cannot detect this state, this selector will still select the file.

              + +

              Executable Selector

              + +

              The <executable> selector selects only files that are executable. Ant + only invokes java.nio.file.Files#isExecutable so if a file is not + executable but JVM cannot detect this state, this selector will still select the file.

              + +

              Since Ant 1.10.0

              + + + +

              The <symlink> selector selects only files that are symbolic links. Ant + only invokes java.nio.file.Files#isSymbolicLink so if a file is a + symbolic link but JVM cannot detect this state, this selector will not select the file.

              + +

              Since Ant 1.10.0

              + +

              OwnedBy Selector

              + +

              The <ownedBy> selector selects only files that are owned by the given + user. Ant only invokes java.nio.file.Files#getOwner so if a file + system doesn't support the operation this selector will not select the file.

              + +

              Since Ant 1.10.0

              + + - - + + + - - - + + + + +
              checksum Uses java.util.zip.Checksum. This Algorithm supports - the following attributes: -
                -
              • algorithm.algorithm (optional): Name of the algorithm - (e.g. 'CRC' or 'ADLER', default = CRC)
              • -
              -
              AttributeDescriptionRequired
              Cache options
              propertyfile Use the java.util.Properties class and its possibility - to load and store to file. - This Cache implementation supports the following attributes: -
                -
              • cache.cachefile (optional): Name of the properties-file - (default = cache.properties)
              • -
              -
              ownerUsername of the expected ownerYes
              + +

              Script Selector

              + +

              The <scriptselector> element enables you to write a complex selection + algorithm in any Apache BSF + or JSR 223 supported language. See the Script + task for an explanation of scripts and dependencies.

              +

              Since Apache Ant 1.7

              + + + + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
              AttributeDescriptionRequired
              Comparator options
              equal Very simple object comparison. languagelanguage of the script.Yes
              rule Uses java.text.RuleBasedCollator for Object - comparison. - - (see note for restrictions) - managerThe script engine manager to use. See the script + task for using this attribute.No; default is auto
              srcfilename of the scriptNo
              encodingThe encoding of the script as a file. since Ant 1.10.2No; defaults to default JVM character encoding
              setbeansWhether to have all properties, references and targets as global variables in the + script.No; default is true
              classpathThe classpath to pass into the script.No
              classpathrefThe classpath to use, given as a reference to + a path defined elsewhere. + No
              +

              This selector can take a nested <classpath> element. See + the script task on how to use this element.

              +

              If no src attribute is supplied, the script must be nested inside the selector + declaration.

              +

              The embedded script is invoked for every test, with the bean self + is bound to the selector. It has an attribute selected which can be set + using setSelected(boolean) to select a file.

              -

              The <modified> selector supports a nested - <classpath> element that represents a - PATH like structure for finding custom interface implementations.

              +

              The following beans are configured for every script, alongside the classic set of project, + properties, and targets.

              -

              Here are some examples of how to use the Modified Selector:

              + + + + + + + + + + + + + + + + + + + + + + + + + + +
              BeanDescriptionType
              selfselector instanceorg.apache.tools.ant.types.optional
              filenamefilename of the selectionString
              filefile of the selectionjava.io.File
              basedirFileset base directoryjava.io.File
              -
              -    <copy todir="dest">
              -        <fileset dir="src">
              -            <modified/>
              -        </fileset>
              -    </copy>
              -    
              -

              This will copy all files from src to dest which content has changed. - Using an updating PropertyfileCache with cache.properties and - MD5-DigestAlgorithm.

              +

              The self bean maps to the selector, which has the following attributes. Only + the selected flag is writable, the rest are read only via their getter methods.

              + + + + + + + + + + + + + + + + + + + + + + + + + + +
              AttributeDescriptionType
              selectedwriteable flag to select this fileboolean
              filenamefilename of the selectionString
              filefile of the selectionjava.io.File
              basedirFileset base directoryjava.io.File
              -
              -    <copy todir="dest">
              -        <fileset dir="src">
              -            <modified update="true"
              -                      seldirs="true"
              -                      cache="propertyfile"
              -                      algorithm="digest"
              -                      comparator="equal">
              -                <param name="cache.cachefile"     value="cache.properties"/>
              -                <param name="algorithm.algorithm" value="MD5"/>
              -            </modified>
              -        </fileset>
              -    </copy>
              -    
              -

              This is the same example rewritten as CoreSelector with setting the all the values - (same as defaults are).

              - -
              -    <copy todir="dest">
              -        <fileset dir="src">
              -            <custom class="org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector">
              -                <param name="update"     value="true"/>
              -                <param name="seldirs"    value="true"/>
              -                <param name="cache"      value="propertyfile"/>
              -                <param name="algorithm"  value="digest"/>
              -                <param name="comparator" value="equal"/>
              -                <param name="cache.cachefile"     value="cache.properties"/>
              -                <param name="algorithm.algorithm" value="MD5"/>
              -            </custom>
              -        </fileset>
              -    </copy>
              -    
              -

              And this is the same rewritten as CustomSelector.

              - -
              -  <target name="generate-and-upload-site">
              -      <echo> generate the site using forrest </echo>
              -      <antcall target="site"/>
              -
              -      <echo> upload the changed file </echo>
              -      <ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.pwd}">
              -          <fileset dir="htdocs/manual">
              -              <modified/>
              -          </fileset>
              -      </ftp>
              -  </target>
              -    
              -

              A useful scenario for this selector inside a build environment - for homepage generation (e.g. with - Apache Forrest). Here all changed files are uploaded to the server. The - CacheSelector saves therefore much upload time.

              - -
              -  <modified cacheclassname="com.mycompany.MyCache">
              -      <classpath>
              -          <pathelement location="lib/mycompany-antutil.jar"/>
              -      </classpath>
              -  </modified>
              -    
              -

              Uses com.mycompany.MyCache from a jar outside of Ants own classpath - as cache implementation

              - -

              Note on RuleBasedCollator

              -

              The RuleBasedCollator needs a format for its work, but its needed while - instantiation. There is a problem in the initialization algorithm for this - case. Therefore you should not use this (or tell me the workaround :-).

              - -

              Signed Selector

              - -

              - The <signedselector> tag selects signed files and optionally - signed with a certain name. -

              -

              - This selector has been added in Apache Ant 1.7. -

              - - - - - - - - - - - -
              AttributeDescriptionRequired
              name The signature name to check for.no
              - -

              Readable Selector

              - -

              The <readable> selector selects only files - that are readable. Ant only invokes - java.io.File#canRead so if a file is unreadable - but the Java VM cannot detect this state, this selector will - still select the file.

              - -

              Writable Selector

              - -

              The <writable> selector selects only files - that are writable. Ant only invokes - java.io.File#canWrite so if a file is unwritable - but the Java VM cannot detect this state, this selector will - still select the file.

              - -

              Script Selector

              - -

              - The <scriptselector> element enables you - to write a complex selection algorithm in any - Apache BSF - or - JSR 223 - supported language. - See the Script task for - an explanation of scripts and dependencies. -

              -

              - This selector was added in Apache Ant 1.7. -

              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              AttributeDescriptionRequired
              languagelanguage of the script.yes
              manager - The script engine manager to use. - See the script task - for using this attribute. - No - default is "auto"
              srcfilename of the scriptno
              setbeanswhether to have all properties, references and targets as - global variables in the script.No, default is "true".
              classpath - The classpath to pass into the script. - No
              classpathrefThe classpath to use, given as a - reference to a path defined elsewhere. - No
              -

              - This selector can take a nested <classpath> element. - See the script task - on how to use this element. -

              -

              - If no src attribute is supplied, the script must be nested - inside the selector declaration. -

              -

              The embedded script is invoked for every test, with - the bean self - is bound to the selector. It has an attribute selected - must can be set using setSelected(boolean) to select that - file. - -

              - - The following beans are configured for every script, alongside - the classic set of project, properties, and targets. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              BeanDescriptionType
              selfselector instanceorg.apache.tools.ant.types.optional
              filenamefilename of the selectionString
              filefile of the selectionjava.io.File
              basedirFileset base directoryjava.io.File
              -

              - The self bean maps to the selector, which has the following - attributes. Only the selected flag is writable, the rest - are read only via their getter methods. - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              AttributeDescriptionType
              selectedwriteable flag to select this fileboolean
              filenamefilename of the selectionString
              filefile of the selectionjava.io.File
              basedirFileset base directoryjava.io.File
              - -

              - Example -

              -
              -    <scriptselector language="javascript">
              -      self.setSelected(true);
              -    </scriptselector>
              -
              -

              - Selects every file. -

              - -
              -    <scriptselector language="javascript">
              -      self.setSelected((filename.length%2)==0);
              -    </scriptselector>
              -
              -Select files whose filename length is even. - -

              Selector Containers

              - -

              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.

              +

              Example

              +
              +<scriptselector language="javascript">
              +  self.setSelected(true);
              +</scriptselector>
              +

              Selects every file.

              + +
              +<scriptselector language="javascript">
              +  self.setSelected((filename.length%2)==0);
              +</scriptselector>
              +

              Select files whose filename length is even.

              + +

              Selector Containers

              + +

              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.

              The selector containers are:

                -
              • <and> - select a file only if all - the contained selectors select it. -
              • <majority> - select a file - if a majority of its selectors select it. -
              • <none> - select a file only if - none of the contained selectors select it. -
              • <not> - can contain only one - selector, and reverses what it selects and doesn't select. -
              • <or> - selects a file if any one - of the contained selectors selects it. -
              • <selector> - contains only one - selector and forwards all requests to it without alteration, provided - that any "if" or - "unless" conditions are met. This - is the selector to use if you want to define a reference. It is - usable as an element of <project>. It is also - the one to use if you want selection of files to be dependent on - Ant property settings. +
              • <and>—select a file only if all the + contained selectors select it.
              • +
              • <majority>—select a file if a + majority of its selectors select it.
              • +
              • <none>—select a file only if none + of the contained selectors select it.
              • +
              • <not>—can contain only one selector, and + reverses what it selects and doesn't select.
              • +
              • <or>—selects a file if any one of the + contained selectors selects it.
              • +
              • <selector>—contains only one + selector and forwards all requests to it without alteration, provided that + any "if" or "unless" conditions are met. This + is the selector to use if you want to define a reference. It is usable as an element + of <project>. It is also the one to use if you want selection of files to + be dependent on Ant property settings.
              -

              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:

              +

              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:

              • <and>
              • @@ -1229,83 +1106,69 @@
              • <size>
              -

              And Selector

              +

              And Selector

              -

              The <and> 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. -

              +

              The <and> 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.

              Here is an example of how to use the And Selector:

              -
              +    
               <fileset dir="${dist}" includes="**/*.jar">
                   <and>
                       <size value="4" units="Ki" when="more"/>
                       <date datetime="01/01/2001 12:00 AM" when="before"/>
                   </and>
              -</fileset>
              -
              +</fileset> -

              Selects all the JAR file larger than 4096 bytes which haven't been update - since the last millennium. -

              +

              Selects all the JAR file larger than 4096 bytes which haven't been update since the last + millennium.

              +

              Majority Selector

              -

              Majority Selector

              +

              The <majority> tag selects files provided that a majority of the contained + elements also select it. Ties are dealt with as specified by the allowtie + attribute.

              -

              The <majority> tag selects files provided - that a majority of the contained elements also select it. Ties are - dealt with as specified by the allowtie attribute. -

              - - +
              - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              allowtieWhether files should be selected if there - are an even number of selectors selecting them as are - not selecting them. Default is true. - NoallowtieWhether files should be selected if there are an even number of selectors selecting them + as are not selecting them.No; default is true
              -

              Here is an example of how to use the Majority Selector:

              -
              +    
               <fileset dir="${docs}" includes="**/*.html">
                   <majority>
                       <contains text="project" casesensitive="false"/>
                       <contains text="taskdef" casesensitive="false"/>
                       <contains text="IntrospectionHelper" casesensitive="true"/>
                   </majority>
              -</fileset>
              -
              +</fileset>

              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). -

              + phrases project, taskdef, and IntrospectionHelper (this last phrase must + match case exactly).

              +

              None Selector

              -

              None Selector

              - -

              The <none> 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. -

              +

              The <none> 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.

              Here is an example of how to use the None Selector:

              -
              +    
               <fileset dir="${src}" includes="**/*.java">
                   <none>
                       <present targetdir="${dest}"/>
              @@ -1313,46 +1176,36 @@
                           <mapper type="glob" from="*.java" to="*.class"/>
                       </present>
                   </none>
              -</fileset>
              -
              - -

              Selects only Java files which do not have equivalent java or - class files in the dest directory. -

              +</fileset> +

              Selects only .java files which do not have equivalent .java + or .class files in the dest directory.

              -

              Not Selector

              +

              Not Selector

              -

              The <not> tag reverses the meaning of the - single selector it contains. -

              +

              The <not> tag reverses the meaning of the single selector it contains.

              Here is an example of how to use the Not Selector:

              -
              +    
               <fileset dir="${src}" includes="**/*.java">
                   <not>
                       <contains text="test"/>
                   </not>
              -</fileset>
              -
              - -

              Selects all the files in the src directory that do not contain the - string "test". -

              +</fileset> +

              Selects all the files in the src directory that do not contain the + string test.

              -

              Or Selector

              +

              Or Selector

              -

              The <or> 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. -

              +

              The <or> 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.

              Here is an example of how to use the Or Selector:

              -
              +    
               <fileset dir="${basedir}">
                   <or>
                       <depth max="0"/>
              @@ -1360,57 +1213,48 @@
                       <filename name="*.gif"/>
                       <filename name="*.jpg"/>
                   </or>
              -</fileset>
              -
              +</fileset> -

              Selects all the files in the top directory along with all the - image files below it. -

              +

              Selects all the files in the top directory along with all the image files below it.

              +

              Selector Reference

              -

              Selector Reference

              +

              The <selector> tag is used to create selectors that can be reused through + references. It is the only selector which can be used outside of any target, as an element of + the <project> tag. It can contain only one other selector, but of course that + selector can be a container.

              -

              The <selector> tag is used to create selectors - that can be reused through references. It is the only selector which can - be used outside of - any target, as an element of the <project> tag. It - can contain only one other selector, but of course that selector can - be a container. -

              +

              The <selector> tag can also be used to select files conditionally based on + whether an Ant property exists or not. This functionality is realized using the if + and unless attributes in exactly the same way they are used on targets or on + the <include> and <exclude> tags within + a <patternset>.

              -

              The <selector> tag can also be used to select - files conditionally based on whether an Ant property exists or not. - This functionality is realized using the "if" and - "unless" attributes in exactly the same way they - are used on targets or on the <include> and - <exclude> tags within a - <patternset>.

              - - +
              - - - + + + - - + - + - - + - +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              ifAllow files to be selected only if the named + ifAllow files to be selected only if the named property is set. NoNo
              unlessAllow files to be selected only if the named - property is not set. + unlessAllow files to be selected only if the named + property is not set. NoNo

              Here is an example of how to use the Selector Reference:

              -
              +    
               <project default="all" basedir="./ant">
               
                   <selector id="completed">
              @@ -1432,17 +1276,14 @@
                       </zip>
                   </target>
               
              -</project>
              -
              +</project> -

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

              +

              Zips up all the java files which have an up-to-date equivalent class file and javadoc file + associated with them.

              -

              And an example of selecting files conditionally, based on whether - properties are set:

              +

              And an example of selecting files conditionally, based on whether properties are set:

              -
              +    
               <fileset dir="${working.copy}">
                   <or>
                       <selector if="include.tests">
              @@ -1459,109 +1300,93 @@
                           </and>
                       </selector>
                   </or>
              -</fileset>
              -
              +</fileset> + +

              A fileset that conditionally contains Java source files and Test source and class + files.

              -

              A fileset that conditionally contains Java source files and Test - source and class files.

              +

              Custom Selectors

              -

              Custom Selectors

              +

              You can write your own selectors and use them within the selector containers by specifying + them within the <custom> tag.

              -

              You can write your own selectors and use them within the selector - containers by specifying them within the <custom> tag.

              - -

              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 org.apache.tools.ant.types.selectors.FileSelector - interface, which contains a single method. See - Programming Selectors in Ant for - more information.

              +

              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 org.apache.tools.ant.types.selectors.FileSelector interface, which + contains a single method. See Programming Selectors in Ant + for more information.

              Once that is written, you include it in your build file by using - the <custom> tag. -

              + the <custom> tag.

              - +
              - - - + + + - - + - + - - - + + + - - - + + +
              AttributeDescriptionRequiredAttributeDescriptionRequired
              classnameThe name of your class that implements - org.apache.tools.ant.types.selectors.FileSelector. + classnameThe name of your class that + implements org.apache.tools.ant.types.selectors.FileSelector. YesYes
              classpathThe 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. - NoclasspathThe classpath to use in order to load the custom selector class. If + neither classpath nor classpathref are specified, the class will be + loaded from the classpath that Ant uses.No
              classpathrefA 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. - NoclasspathrefA reference to a classpath previously defined. If neither classpathref + nor classpath are specified, the class will be loaded from the classpath that Ant + uses.No
              -

              Here is how you use <custom> to - use your class as a selector: -

              +

              Here is how you use <custom> to use your class as a selector:

              -
              +    
               <fileset dir="${mydir}" includes="**/*">
                   <custom classname="com.mydomain.MySelector">
                       <param name="myattribute" value="myvalue"/>
                   </custom>
              -</fileset>
              -
              +</fileset> -

              A number of core selectors can also be used as custom selectors - by specifying their attributes using <param> elements. These - are

              +

              A number of core selectors can also be used as custom selectors by specifying their + attributes using <param> elements. These are

              • Contains Selector with - classname org.apache.tools.ant.types.selectors.ContainsSelector + classname org.apache.tools.ant.types.selectors.ContainsSelector
              • Date Selector with - classname org.apache.tools.ant.types.selectors.DateSelector + classname org.apache.tools.ant.types.selectors.DateSelector
              • Depth Selector with - classname org.apache.tools.ant.types.selectors.DepthSelector + classname org.apache.tools.ant.types.selectors.DepthSelector
              • Filename Selector with - classname org.apache.tools.ant.types.selectors.FilenameSelector + classname org.apache.tools.ant.types.selectors.FilenameSelector
              • Size Selector with - classname org.apache.tools.ant.types.selectors.SizeSelector + classname org.apache.tools.ant.types.selectors.SizeSelector
              -

              Here is the example from the Depth Selector section rewritten - to use the selector through <custom>.

              +

              Here is the example from the Depth Selector section rewritten to use the selector + through <custom>.

              -
              +    
               <fileset dir="${doc.path}" includes="**/*">
                   <custom classname="org.apache.tools.ant.types.selectors.DepthSelector">
                       <param name="max" value="1"/>
                   </custom>
              -</fileset>
              -
              +</fileset> -

              Selects all files in the base directory and one directory below - that.

              +

              Selects all files in the base directory and one directory below that.

              -

              For more details concerning writing your own selectors, consult - Programming Selectors in Ant.

              - - +

              For more details concerning writing your own selectors, + consult Programming Selectors in Ant.

              - diff -Nru ant-1.9.10/manual/Types/selectors-program.html ant-1.10.3/manual/Types/selectors-program.html --- ant-1.9.10/manual/Types/selectors-program.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/selectors-program.html 2018-03-24 12:37:12.000000000 +0000 @@ -28,138 +28,119 @@

              Want to define your own selectors? It's easy!

              -

              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.

              +

              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.

              1. Custom Selectors -

                This is the category that Apache Ant provides specifically for you to - define your own Selectors. Anywhere you want to use your selector - you use the <custom> element and specify - the class name of your selector within it. See the - Custom Selectors - section of the Selector page for details. The - <custom> element can be used anywhere - the core selectors can be used. It can be contained within - Selector Containers, - for example.

                +

                This is the category that Apache Ant provides specifically for you to define your own + Selectors. Anywhere you want to use your selector you use + the <custom> element and specify the class name of your selector + within it. See the Custom Selectors section of + the Selector page for details. The <custom> element can be used + anywhere the core selectors can be used. It can be contained + within Selector Containers, for + example.

                To create a new Custom Selector, you have to create a class that - implements - org.apache.tools.ant.types.selectors.ExtendFileSelector. - The easiest way to do that is through the convenience base class - org.apache.tools.ant.types.selectors.BaseExtendSelector, - which provides all of the methods for supporting - <param> tags. First, override the - isSelected() method, and optionally the - verifySettings() method. If your custom - selector requires parameters to be set, you can also override - the setParameters() 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.

                + implements org.apache.tools.ant.types.selectors.ExtendFileSelector. + The easiest way to do that is through the convenience base + class org.apache.tools.ant.types.selectors.BaseExtendSelector, + which provides all of the methods for supporting <param> tags. First, + override the isSelected() method, and optionally + the verifySettings() method. If your custom selector requires + parameters to be set, you can also override the setParameters() + 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.

              2. Core Selectors -

                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.

                +

                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.

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

                  - -

                  There is only one method required. - public boolean isSelected(File basedir, String filename, - File file) - 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.

                  - -

                  If you are using - org.apache.tools.ant.types.selectors.BaseSelector - 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 - isSelected() method call validate() and - a BuildException will be thrown with the contents of your error - message. The validate() method also gives you a - last chance to check your settings for consistency because it - calls verifySettings(). Override this method and - call setError() within it if you detect any - problems in how your selector is set up.

                  - -

                  You may also want to override toString().

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

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

                  + +

                  There is only one method required. public boolean isSelected(File + basedir, String filename, File file) 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.

                  + +

                  If you are + using org.apache.tools.ant.types.selectors.BaseSelector 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 isSelected() + method call validate() and a BuildException will + be thrown with the contents of your error + message. The validate() method also gives you a last chance to + check your settings for consistency because it + calls verifySettings(). Override this method and + call setError() within it if you detect any problems in how + your selector is set up.

                  + +

                  You may also want to override toString().

                • + +
                • Put an add() method for your selector + in org.apache.tools.ant.types.selectors.SelectorContainer. + This is an interface, so you will also have to add an implementation for the method in + the classes which implement it, + namely org.apache.tools.ant.types.AbstractFileSet, org.apache.tools.ant.taskdefs.MatchingTask + and org.apache.tools.ant.types.selectors.BaseSelectorContainer. + Once it is in there, it will be available everywhere that core selectors are + appropriate.
              3. Selector Containers -

                Got an idea for a new Selector Container? Creating a new one is - no problem:

                +

                Got an idea for a new Selector Container? Creating a new one is no problem:

                  -
                • Create a new class that implements - org.apache.tools.ant.types.selectors.SelectorContainer. - 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 - org.apache.tools.ant.types.selectors.BaseSelectorContainer. -

                  -
                • Implement the - public boolean isSelected(String filename, File file) - method to do the right thing. Chances are you'll want to iterate - over the selectors under you, so use - selectorElements() to get an iterator that will do - that.

                  -
                • Again, put an add method for your container in - org.apache.tools.ant.types.selectors.SelectorContainer - and its implementations - org.apache.tools.ant.types.AbstractFileSet and - org.apache.tools.ant.types.selectors.BaseSelectorContainer. -

                  +
                • Create a new class that + implements org.apache.tools.ant.types.selectors.SelectorContainer. + 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 org.apache.tools.ant.types.selectors.BaseSelectorContainer.
                • +
                • Implement the public boolean isSelected(String filename, File + file) method to do the right thing. Chances are you'll want to iterate over the + selectors under you, so use selectorElements() to get an + iterator that will do that.
                • +
                • Again, put an add() method for your container + in org.apache.tools.ant.types.selectors.SelectorContainer and + its implementations org.apache.tools.ant.types.AbstractFileSet + and org.apache.tools.ant.types.selectors.BaseSelectorContainer.

              Testing Selectors

              -

              For a robust component (and selectors are (Project)Components) tests are - necessary. For testing Tasks we use JUnit TestCases - more specific - org.apache.tools.ant.BuildFileRule extends org.junit.rules.ExternalResource. - Some of its features like configure the (test) project by reading its buildfile and - execute targets we need for selector tests also. Therefore we use that BuildFileRule. - But testing selectors requires some more work: having a set of files, instantiate - and configure the selector, check the selection work and more. Because we usually - extend BaseExtendSelector its features have to be tested also (e.g. setError()). -

              - -

              That's why we have a test rule for doing our selector tests: - org.apache.tools.ant.types.selectors.BaseSelectorRule.

              - -

              This class extends ExternalResource and therefore can included in the set of Ant's - unit tests. It holds an instance of preconfigured BuildFileRule. Configuration - is done by parsing the src/etc/testcases/types/selectors.xml. BaseSelectorRule - then gives us helper methods for handling multiple selections.

              - -

              Because the term "testcase" or "testenvironment" are so often used, this - special testenvironment got a new name: bed. The setup and cleanup of - the bed is all handled by the BaseSelectorRule so any test only has to handle - the actual test scenarios

              +

              For a robust component (and selectors are (Project)Components) tests are necessary. For + testing Tasks we use JUnit Tests and Rules—more + specific org.apache.tools.ant.BuildFileRule extends + org.junit.rules.ExternalResource. Some of its features like configure the (test) project + by reading its buildfile and execute targets we need for selector tests also. Therefore we use + that BuildFileRule. But testing selectors requires some more work: having a set of files, + instantiate and configure the selector, check the selection work and more. Because we usually + extend BaseExtendSelector its features have to be tested also + (e.g. setError()).

              + +

              That's why we have a test rule for doing our selector + tests: org.apache.tools.ant.types.selectors.BaseSelectorRule.

              + +

              This class extends ExternalResource and therefore can included in the set of Ant's unit + tests. It holds an instance of preconfigured BuildFileRule. Configuration is done by parsing + the src/etc/testcases/types/selectors.xml. BaseSelectorRule then gives us + helper methods for handling multiple selections.

              + +

              Because the term "testcase" or "testenvironment" are so often used, this special + testenvironment got a new name: bed. The setup and cleanup of the bed is all + handled by the BaseSelectorRule so any test only has to handle the actual test scenarios

              A usual test scenario is:

                @@ -169,9 +150,8 @@
              1. verify the work
              - - -

              An example test would be:

              +    

              An example test would be:

              +
               package org.apache.tools.ant.types.selectors;
               
               public class MySelectorTest {
              @@ -182,7 +162,6 @@
                   @Test
                   public void testCase1() {
               
              -
                       // Configure the selector
                       MySelector s = new MySelector();
                       s.addParam("key1", "value1");
              @@ -193,52 +172,44 @@
                       // do the tests
                       assertEquals("FTTTTTTTT", selectorRule.selectionString(s));
                   }
              -}
              -    
              - As an example of an error JUnit could log
              -    [junit]     FAILED
              -    [junit] Error for files: .;copy.filterset.filtered;tar/gz/asf-logo.gif.tar.gz
              -    [junit] expected:<FTTTFTTTF...> but was:<TTTTTTTTT...>
              -    [junit] junit.framework.ComparisonFailure: Error for files: .;copy.filterset.filtered;tar/gz/asf-logo.gif.tar.gz
              -    [junit] expected:<FTTTFTTTF...> but was:<TTTTTTTTT...>
              -    [junit]     at junit.framework.Assert.assertEquals(Assert.java:81)
              -    [junit]     at org.apache.tools.ant.types.selectors.BaseSelectorTest.performTest(BaseSelectorTest.java:194)
              -    

              - -

              Described above the test class should provide a getInstance() - method. But that isn't used here. The used getSelector() method is - implemented in the base class and gives an instance of an Ant Project to - the selector. This is usually done inside normal build file runs, but not - inside this special environment, so this method gives the selector the - ability to use its own Project object (getProject()), for example - for logging.

              - +}
              +

              As an example of an error JUnit could log

              +
              +[junit]     FAILED
              +[junit] Error for files: .;copy.filterset.filtered;tar/gz/asf-logo.gif.tar.gz
              +[junit] expected:<FTTTFTTTF...> but was:<TTTTTTTTT...>
              +[junit] junit.framework.ComparisonFailure: Error for files: .;copy.filterset.filtered;tar/gz/asf-logo.gif.tar.gz
              +[junit] expected:<FTTTFTTTF...> but was:<TTTTTTTTT...>
              +[junit]     at junit.framework.Assert.assertEquals(Assert.java:81)
              +[junit]     at org.apache.tools.ant.types.selectors.BaseSelectorTest.performTest(BaseSelectorTest.java:194)
              + +

              Described above the test class should provide a getInstance() + method. But that isn't used here. The used getSelector() method is + implemented in the base class and gives an instance of an Ant Project to the selector. This is + usually done inside normal build file runs, but not inside this special environment, so this + method gives the selector the ability to use its own Project object + (getProject()), for example for logging.

              Logging

              -

              During development and maybe later you sometimes need the output of information. - Therefore Logging is needed. Because the selector extends BaseExtendSelector or directly - BaseSelector it is an Ant DataType and therefore a ProjectComponent.
              - That means that you have access to the project object and its logging capability. - ProjectComponent itself provides log methods which will do the - access to the project instance. Logging is therefore done simply with: -

              -        log( "message" );
              -    
              - or -
              -        log( "message" , loglevel );
              -    
              - where the loglevel is one of the values
                -
              • org.apache.tools.ant.Project.MSG_ERR
              • -
              • org.apache.tools.ant.Project.MSG_WARN
              • -
              • org.apache.tools.ant.Project.MSG_INFO (= default)
              • -
              • org.apache.tools.ant.Project.MSG_VERBOSE
              • -
              • org.apache.tools.ant.Project.MSG_DEBUG
              • +

                During development and maybe later you sometimes need the output of information. Therefore + Logging is needed. Because the selector extends BaseExtendSelector or directly BaseSelector it + is an Ant DataType and therefore + a ProjectComponent.
                That means that you have access to the + project object and its logging capability. ProjectComponent itself + provides log() methods which will do the access to the project + instance. Logging is therefore done simply with:

                +
                log("message");
                +

                or

                +
                log("message", loglevel);
                +

                where the loglevel is one of the values

                +
                  +
                • org.apache.tools.ant.Project.MSG_ERR
                • +
                • org.apache.tools.ant.Project.MSG_WARN
                • +
                • org.apache.tools.ant.Project.MSG_INFO (default)
                • +
                • org.apache.tools.ant.Project.MSG_VERBOSE
                • +
                • org.apache.tools.ant.Project.MSG_DEBUG
                -

                - - diff -Nru ant-1.9.10/manual/Types/tarfileset.html ant-1.10.3/manual/Types/tarfileset.html --- ant-1.9.10/manual/Types/tarfileset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/tarfileset.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -22,161 +21,128 @@ TarFileSet Type -

                TarFileSet

                +

                TarFileSet

                -

                TarFileSet has been added as a stand-alone type in Apache Ant -1.7.

                +

                TarFileSet has been a stand-alone type since Apache Ant 1.7.

                -

                A <tarfileset> is a special form of a <fileset> which can behave in 2 -different ways :
                -

                +

                A <tarfileset> is a special form of +a <fileset> which can behave in 2 different ways:

                  -
                • When the src attribute - is used - or a nested resource collection has been specified, the - tarfileset is populated with tar entries found in the file src.
                  -
                • -
                • When the dir attribute -is used, the tarfileset is populated with filesystem files found under dir.
                  -
                • +
                • When the src attribute is used—or a nested resource collection has been + specified, the tarfileset is populated with tar entries found in the file src.
                • +
                • When the dir attribute is used, the tarfileset is populated with filesystem files + found under dir.
                -

                <tarfileset> supports all attributes of <fileset> - in addition to those listed below. Note that tar archives in general - don't contain entries with leading slashes so you shouldn't use - include/exclude patterns that start with slashes either. -

                -

                A tarfileset can be defined with the id attribute and referred to with the refid attribute. This is also true -for tarfileset which has been added in Ant 1.7.
                -

                +

                <tarfileset> supports all attributes +of <fileset> in addition to those listed below. Note +that tar archives in general don't contain entries with leading slashes so you shouldn't use +include/exclude patterns that start with slashes either.

                +

                Since Ant 1.7, a tarfileset can be defined with the id attribute and referred +to with the refid attribute.

                Parameters

                - +
                - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + +
                AttributeDescriptionRequiredAttributeDescriptionRequired
                prefixall files in the fileset are prefixed with that -path in the archive.Noprefixall files in the fileset are prefixed with that path in the archive.No
                fullpaththe file described by the fileset is placed at -that exact location in the archive.Nofullpaththe file described by the fileset is placed at that exact location in the archive.No
                srcmay be used in place of the dir attribute - to specify a tar file whose contents will be extracted and included -in the archive.Nosrcmay be used in place of the dir attribute to specify a tar file whose contents + will be extracted and included in the archive.No
                filemodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to -plain files. Default is 644.NofilemodeA 3 digit octal string, specify the user, group and other modes in the standard Unix + fashion. Only applies to plain files.No; default is 644
                dirmodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to -directories. Default is 755.NodirmodeA 3 digit octal string, specify the user, group and other modes in the standard Unix + fashion. Only applies to directories.No; default is 755
                usernameThe username for the tar entry. This is not the same as the UID. - NousernameThe username for the tar entry. This is not the same as the UID.No
                groupThe groupname for the tar entry. This is not the same as the GID. - NogroupThe groupname for the tar entry. This is not the same as the GID.No
                uidThe user identifier (UID) for the tar entry. This is an integer value - and is not the same as the username. - NouidThe user identifier (UID) for the tar entry. This is an integer value and is not the + same as the username.No
                gidThe group identifier (GID) for the tar entry. - NogidThe group identifier (GID) for the tar entry.No
                erroronmissingarchive - Specify what happens if the archive does not exist. - If true, a build error will happen; if false, the fileset - will be ignored/empty. - Defaults to true. - Since Ant 1.8.0 - NoerroronmissingarchiveSpecify what happens if the archive does not exist. If true, a build error will + happen; if false, the fileset will be ignored/empty. Since Ant 1.8.0No; defaults to true
                encodingThe character encoding to use for filenames - inside the zip file. For a list of possible values see the Supported Encodings. - Defaults to the platform's default character encoding. - Since Ant 1.9.5 - NoencodingThe character encoding to use for filenames inside the zip file. For a list of possible + values see + the Supported Encodings. Since Ant 1.9.5No; defaults to default JVM character encoding
                -

                The fullpath attribute can only be set for filesets that -represent a single file. The prefix and fullpath -attributes cannot both be set on the same fileset.

                -

                When using the src attribute, include and exclude patterns -may be used to specify a subset of the archive for inclusion in the -archive as with the dir attribute.

                - -

                Please note that currently only the tar task uses the permission and -ownership attributes.

                +

                The fullpath attribute can only be set for filesets that represent a single +file. The prefix and fullpath attributes cannot both be set on the same +fileset.

                +

                When using the src attribute, include and exclude patterns may +be used to specify a subset of the archive for inclusion in the archive as with the dir +attribute.

                + +

                Please note that currently only the tar task uses the permission +and ownership attributes.

                Parameters specified as nested elements

                -

                any resource or single element -resource collection

                +

                any resource or single element resource collection

                The specified resource will be used as src.

                Examples

                -
                -
                -  <copy todir="some-dir">
                -    <tarfileset includes="lib/**">
                -      <bzip2resource>
                -        <url url="http://example.org/dist/some-archive.tar.bz2"/>
                -      </bzip2resource>
                -    </tarfileset>
                -  </copy>
                -      
                - -

                downloads the archive some-archive.tar.bz2, uncompresses and -extracts it on the fly, copies the contents of the lib directory into -some-dir and discards the rest of the archive. File timestamps will -be compared between the archive's entries and files inside the target -directory, no files get overwritten unless they are out-of-date.

                +
                +<copy todir="some-dir">
                + <tarfileset includes="lib/**">
                +   <bzip2resource>
                +     <url url="http://example.org/dist/some-archive.tar.bz2"/>
                +   </bzip2resource>
                + </tarfileset>
                +</copy>
                + +

                downloads the archive some-archive.tar.bz2, uncompresses and extracts it on the fly, +copies the contents of the lib directory into some-dir and discards the +rest of the archive. File timestamps will be compared between the archive's entries and files +inside the target directory, no files get overwritten unless they are out-of-date.

                diff -Nru ant-1.9.10/manual/Types/xmlcatalog.html ant-1.10.3/manual/Types/xmlcatalog.html --- ant-1.9.10/manual/Types/xmlcatalog.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/xmlcatalog.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,283 +24,219 @@ -

                XMLCatalog

                +

                XMLCatalog

                -

                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 +

                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.

                -

                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. -

                -

                Note: This task uses, but does not depend on external -libraries not included in the Apache Ant distribution. See Library Dependencies for more -information.

                -

                This data type provides a catalog of resource locations based -on the -OASIS "Open Catalog" standard. The catalog entries are used -both for Entity resolution and URI resolution, in accordance with -the org.xml.sax.EntityResolver and -javax.xml.transform.URIResolver interfaces as defined -in the Java API for XML -Processing (JAXP) Specification.

                -

                For example, in a web.xml file, the DTD is referenced as: +

                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.

                +

                Note: This task uses, but does not depend on external libraries not +included in the Apache Ant distribution. See Library +Dependencies for more information.

                +

                This data type provides a catalog of resource locations based on +the OASIS XML Catalog standard. The catalog entries are used both for Entity +resolution and URI resolution, in accordance with +the org.xml.sax.EntityResolver +and javax.xml.transform.URIResolver interfaces as defined in +the Java API for XML Processing (JAXP) Specification.

                +

                For example, in a web.xml file, the DTD is referenced as:

                 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
                -  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
                -
                -The XML processor, without XMLCatalog support, would need to retrieve the -DTD from -the URL specified whenever validation of the document was required. -

                -

                This can be very time consuming during the build process, -especially where network throughput is limited. Alternatively, you -can do the following: + "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> +

                The XML processor, without XMLCatalog support, would need to retrieve the DTD from the URL +specified whenever validation of the document was required.

                +

                This can be very time consuming during the build process, especially where network throughput +is limited. Alternatively, you can do the following:

                  -
                1. Copy web-app_2_2.dtd onto your local disk somewhere (either in the -filesystem or even embedded inside a jar or zip file on the classpath).
                2. -
                3. Create an <xmlcatalog> with a <dtd> -element whose location attribute points to the file.
                4. -
                5. Success! The XML processor will now use the local copy instead of calling out -to the internet.
                6. +
                7. Copy web-app_2_2.dtd onto your local disk somewhere (either in the filesystem +or even embedded inside a jar or zip file on the classpath).
                8. +
                9. Create an <xmlcatalog> with a <dtd> element +whose location attribute points to the file.
                10. +
                11. Success! The XML processor will now use the local copy instead of calling out to the +internet.
                -

                -

                XMLCatalogs can appear inside tasks -that support this feature or at the same level as target -- i.e., as children of project for reuse across different -tasks, -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.

                -

                XMLCatalogs are specified as either a reference to another -XMLCatalog, defined previously in a build file, or as a list of -dtd or entity locations. In addition, -external catalog files may be specified in a nested catalogpath , -but they will be ignored unless the resolver library from -xml-commons is available in the system classpath. Due to backwards -incompatible changes in the resolver code after the release of -resolver 1.0, Ant will not support resolver.jar in version 1.0 - we -expect a resolver release 1.1 to happen before Ant 1.6 gets -released. A separate classpath for entity resolution may be -specified inline via nested classpath elements; otherwise +

                XMLCatalogs can appear inside tasks that support this feature or at the same level +as target—i.e., as children of project for reuse across +different tasks, 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.

                +

                XMLCatalogs are specified as either a reference to another XMLCatalog, defined previously in +a build file, or as a list of dtd or entity locations. In addition, +external catalog files may be specified in a nested catalogpath, but they will be +ignored unless the resolver library from xml-commons is available in the system +classpath. Due to backwards incompatible changes in the resolver code after the release +of resolver 1.0, Ant supports only resolver 1.1 or later. A separate classpath for +entity resolution may be specified inline via nested classpath elements; otherwise the system classpath is used for this as well.

                -

                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.

                -

                Resource locations can be specified either in-line or in -external catalog file(s), or both. In order to use an external -catalog file, the xml-commons resolver library ("resolver.jar") -must be in your path. External catalog files may be either -plain text format or -XML format. If the xml-commons resolver library is not found in the -classpath, external catalog files, specified in catalogpath, -will be ignored and a warning -will be logged. In this case, however, processing of inline entries will -proceed normally.

                -

                Currently, only <dtd> and -<entity> elements may be specified inline; these -roughly correspond to OASIS catalog entry types PUBLIC and -URI respectively. By contrast, external catalog files -may use any of the entry types defined in the - -+OASIS specification.

                -

                Entity/DTD/URI Resolution Algorithm

                - -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 publicId 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: +

                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.

                +

                Resource locations can be specified either in-line or in external catalog file(s), or both. In +order to use an external catalog file, the xml-commons resolver library (resolver.jar) +must be in your path. External catalog files may be +either plain +text format or XML format. If the xml-commons resolver library is not found in the classpath, +external catalog files, specified in catalogpath, will be ignored and a warning will be +logged. In this case, however, processing of inline entries will proceed normally.

                +

                Currently, only <dtd> and <entity> elements may be +specified inline; these roughly correspond to OASIS catalog entry types PUBLIC +and URI respectively. By contrast, external catalog files may use any of the entry +types defined in +the OASIS specification.

                +

                Entity/DTD/URI resolution algorithm

                +

                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 publicId 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:

                1. Filesystem lookup

                -

                The location is first looked up in the filesystem. If -the location is a relative path, the ant project basedir -attribute is used as the base directory. If the location -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.

                +

                The location is first looked up in the filesystem. If the location is a +relative path, the Ant project basedir attribute is used as the base directory. If +the location 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.

                2. Classpath lookup

                -

                The location is next looked up in the classpath. -Recall that jar files are merely fancy zip files. For classpath -lookup, the location 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 foo/bar/blat.dtd it will resolve an entity whose -location is foo/bar/blat.dtd. Of course, it -will not resolve an entity whose location is -blat.dtd. - +

                The location is next looked up in the classpath. Recall that jar files are merely +fancy zip files. For classpath lookup, the location 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 foo/bar/blat.dtd it will +resolve an entity whose location is foo/bar/blat.dtd. Of course, it +will not resolve an entity whose location is blat.dtd.

                3a. Apache xml-commons resolver lookup

                -

                What happens next depends on whether the resolver library from -xml-commons is available on the classpath. If so, we defer all -further attempts at resolving to it. The resolver library supports -extremely sophisticated functionality like URL rewriting and so on, -which can be accessed by making the appropriate entries in external -catalog files (XMLCatalog does not yet provide inline support for all -of the entries defined in the OASIS -standard).

                +

                What happens next depends on whether the resolver library from xml-commons is available on the +classpath. If so, we defer all further attempts at resolving to it. The resolver library supports +extremely sophisticated functionality like URL rewriting and so on, which can be accessed by making +the appropriate entries in external catalog files (XMLCatalog does not yet provide inline support +for all of the entries defined in +the OASIS standard).

                3. URL-space lookup

                -

                Finally, we attempt to make a URL out of the location. -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.

                +

                Finally, we attempt to make a URL out of the location. 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.

                XMLCatalog attributes

                - +
                - - - + + + - - - + + + - - - + + +
                AttributeDescriptionRequiredAttributeDescriptionRequired
                ida unique name for an XMLCatalog, used for referencing -the - XMLCatalog's contents from another XMLCatalogNoida unique name for an XMLCatalog, used for referencing the XMLCatalog's contents from + another XMLCatalogNo
                refidthe id of another XMLCatalog whose -contents - you would like to be used for this XMLCatalogNorefidthe id of another XMLCatalog whose contents you would like to be used for + this XMLCatalogNo

                XMLCatalog nested elements

                dtd/entity

                -

                The dtd and entity elements used to specify -XMLCatalogs are identical in their structure

                - - - - - - - - - - - - - - - +

                The dtd and entity elements used to specify XMLCatalogs are +identical in their structure

                +
                AttributeDescriptionRequired
                publicIdThe public identifier used when defining a dtd or -entity, - e.g. "-//Sun Microsystems, Inc.//DTD Web Application -2.2//EN" - Yes
                locationThe 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. Relative paths will -be resolved according to the base, which by default is the Ant project -basedir. - Yes
                + + + + + + + + + + + + + +
                AttributeDescriptionRequired
                publicIdThe public identifier used when defining a dtd or entity, e.g. + "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"Yes
                locationThe 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. Relative paths + will be resolved according to the base, which by default is the Ant + project basedir.Yes

                classpath

                -

                The classpath to use for entity -resolution. The nested <classpath> is a -path-like structure.

                +

                The classpath to use for entity resolution. The +nested <classpath> is a path-like structure.

                catalogpath

                -

                -The nested catalogpath element is a path-like structure listing catalog files to -search. All files in this path are assumed to be OASIS catalog files, in -either - -plain text format or -XML format. Entries specifying nonexistent files will be ignored. If the -resolver library from xml-commons is not available in the classpath, all -catalogpaths will be ignored and a warning will be logged. -

                +

                The nested catalogpath element is a path-like +structure listing catalog files to search. All files in this path are assumed to be OASIS catalog +files, in either plain text format +or XML +format. Entries specifying nonexistent files will be ignored. If the resolver library from +xml-commons is not available in the classpath, all catalogpaths will be ignored and a +warning will be logged.

                Examples

                -

                Set up an XMLCatalog with a single dtd referenced locally in a user's -home -directory:

                -
                -    <xmlcatalog>
                -        <dtd 
                -            publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
                -            location="/home/dion/downloads/docbook/docbookx.dtd"/>
                -    </xmlcatalog>
                -
                -

                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: +

                Set up an XMLCatalog with a single DTD referenced locally in a user's home directory:

                +
                +<xmlcatalog>
                +    <dtd publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
                +         location="/home/dion/downloads/docbook/docbookx.dtd"/>
                +</xmlcatalog>
                +

                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:

                -
                -    <xmlcatalog id="commonDTDs">
                -        <dtd 
                -            publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
                -            location="docbook/docbookx.dtd"/>
                -        <dtd 
                -            publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
                -            location="web-app_2_2.dtd"/>
                -    </xmlcatalog>
                -
                +
                +<xmlcatalog id="commonDTDs">
                +    <dtd publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
                +         location="docbook/docbookx.dtd"/>
                +    <dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
                +         location="web-app_2_2.dtd"/>
                +</xmlcatalog>
                + +

                Set up an XMLCatalog with a combination of DTDs and entities as well as a nested XMLCatalog +and external catalog files in both formats:

                -

                Set up an XMLCatalog with a combination of DTDs and entities as -well as a nested XMLCatalog and external catalog files in both -formats:

                - -
                -    <xmlcatalog id="allcatalogs">
                -        <dtd 
                -            publicId="-//ArielPartners//DTD XML Article V1.0//EN"
                -            location="com/arielpartners/knowledgebase/dtd/article.dtd"/>
                -        <entity 
                -            publicId="LargeLogo"
                +
                +<xmlcatalog id="allcatalogs">
                +    <dtd publicId="-//ArielPartners//DTD XML Article V1.0//EN"
                +         location="com/arielpartners/knowledgebase/dtd/article.dtd"/>
                +    <entity publicId="LargeLogo"
                             location="com/arielpartners/images/ariel-logo-large.gif"/>
                -        <xmlcatalog refid="commonDTDs"/>
                -            <catalogpath>
                -                <pathelement location="/etc/sgml/catalog"/>
                -                <fileset 
                -                    dir="/anetwork/drive"
                -                    includes="**/catalog"/>
                -                <fileset 
                -                    dir="/my/catalogs"
                -                    includes="**/catalog.xml"/>
                -            </catalogpath>
                -        </xmlcatalog>
                +    <xmlcatalog refid="commonDTDs"/>
                +        <catalogpath>
                +            <pathelement location="/etc/sgml/catalog"/>
                +            <fileset dir="/anetwork/drive"
                +                     includes="**/catalog"/>
                +            <fileset dir="/my/catalogs"
                +                     includes="**/catalog.xml"/>
                +        </catalogpath>
                     </xmlcatalog>
                -
                +</xmlcatalog>

                To reference the above XMLCatalog in an xslt task:

                -

                -    <xslt basedir="${source.doc}"
                -           destdir="${dest.xdocs}"
                -           extension=".xml"
                -           style="${source.xsl.converter.docbook}"
                -           includes="**/*.xml"
                -           force="true">
                -        <xmlcatalog refid="allcatalogs"/>
                -    </xslt>
                -
                - - +
                +<xslt basedir="${source.doc}"
                +      destdir="${dest.xdocs}"
                +      extension=".xml"
                +      style="${source.xsl.converter.docbook}"
                +      includes="**/*.xml"
                +      force="true">
                +    <xmlcatalog refid="allcatalogs"/>
                +</xslt>
                diff -Nru ant-1.9.10/manual/Types/zipfileset.html ant-1.10.3/manual/Types/zipfileset.html --- ant-1.9.10/manual/Types/zipfileset.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/Types/zipfileset.html 2018-03-24 12:37:12.000000000 +0000 @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -22,127 +21,109 @@ ZipFileSet Type -

                ZipFileSet

                +

                ZipFileSet

                -

                A <zipfileset> is a special form of a <fileset> which can behave in 2 -different ways :
                -

                +

                A <zipfileset> is a special form of +a <fileset> which can behave in 2 different ways:

                  -
                • When the src attribute - is used - or a nested resource collection has been specified - (since Apache Ant 1.7), the zipfileset is populated with - zip entries found in the file src.
                  -
                • -
                • When the dir attribute -is used, the zipfileset is populated with filesystem files found under dir.
                  -
                • +
                • When the src attribute is used—or a nested resource collection has been + specified (since Apache Ant 1.7), the zipfileset is populated with zip entries found in + the file src.
                • +
                • When the dir attribute is used, the zipfileset is populated with filesystem files + found under dir.
                -

                <zipfileset> supports all attributes of <fileset> - in addition to those listed below. Note that zip archives in general - don't contain entries with leading slashes so you shouldn't use - include/exclude patterns that start with slashes either.

                - -

                Since Ant 1.6, a zipfileset can be defined with the id attribute and referred to with -the refid attribute.
                -

                +

                <zipfileset> supports all attributes +of <fileset> in addition to those listed below. Note +that zip archives in general don't contain entries with leading slashes so you shouldn't +use includes/excludes patterns that start with slashes either.

                + +

                Since Ant 1.6, a zipfileset can be defined with the id attribute and referred +to with the refid attribute.

                +

                Parameters

                - +
                - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + +
                AttributeDescriptionRequiredAttributeDescriptionRequired
                prefixall files in the fileset are prefixed with that -path in the archive.Noprefixall files in the fileset are prefixed with that path in the archive.No
                fullpaththe file described by the fileset is placed at -that exact location in the archive.Nofullpaththe file described by the fileset is placed at that exact location in the archive.No
                srcmay be used in place of the dir attribute - to specify a zip file whose contents will be extracted and included -in the archive.Nosrcmay be used in place of the dir attribute to specify a zip file whose contents + will be extracted and included in the archive.No
                filemodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to -plain files. Default is 644. since Ant 1.5.2.NofilemodeA 3 digit octal string, specify the user, group and other modes in the standard Unix + fashion. Only applies to plain files. Since Ant 1.5.2No; default is 644
                dirmodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to -directories. Default is 755. since Ant 1.5.2.NodirmodeA 3 digit octal string, specify the user, group and other modes in the standard Unix + fashion. Only applies to directories. Since Ant 1.5.2No; default is 755
                encodingThe character encoding to use for filenames - inside the zip file. For a list of possible values see the Supported Encodings. - Defaults to the platform's default character encoding. - NoencodingThe character encoding to use for filenames inside the zip file. For a list of possible + values see + the Supported Encodings. + No; defaults to default JVM character encoding
                erroronmissingarchive - Specify what happens if the archive does not exist. - If true, a build error will happen; if false, the fileset - will be ignored/empty. - Defaults to true. - Since Ant 1.8.0 - NoerroronmissingarchiveSpecify what happens if the archive does not exist. If true, a build error will + happen; if false, the fileset will be ignored/empty. Since Ant 1.8.0No; defaults to true
                -

                The fullpath attribute can only be set for filesets that -represent a single file. The prefix and fullpath -attributes cannot both be set on the same fileset.

                -

                When using the src attribute, include and exclude patterns -may be used to specify a subset of the archive for inclusion in the -archive as with the dir attribute.

                - -

                Please note that currently only the tar and zip tasks use the permission.

                +

                The fullpath attribute can only be set for filesets that represent a single +file. The prefix and fullpath attributes cannot both be set on the same +fileset.

                +

                When using the src attribute, includes and excludes patterns +may be used to specify a subset of the archive for inclusion in the archive as with +the dir attribute.

                + +

                Please note that currently only the tar +and zip tasks use the permission.

                Parameters specified as nested elements

                -

                any file system based resource or -single element resource collection

                +

                any file system based resource or single element resource +collection

                -

                The specified resource will be used as src.

                +

                The specified resource will be used as src.

                Examples

                -
                -
                  <zip destfile="${dist}/manual.zip">
                <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
                <zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/>
                <zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/>
                </zip>
                -

                zips all files in the htdocs/manual directory into -the docs/user-guide directory in the archive, adds the -file ChangeLog27.txt in the current directory as docs/ChangeLog.txt, -and includes all the html files in examples.zip under docs/examples. +

                +<zip destfile="${dist}/manual.zip">
                +  <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
                +  <zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/>
                +  <zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/>
                +</zip>
                +

                zips all files in the htdocs/manual directory into +the docs/user-guide directory in the archive, adds the +file ChangeLog27.txt in the current directory as docs/ChangeLog.txt, +and includes all the html files in examples.zip under docs/examples. The archive might end up containing the files:

                - docs/user-guide/html/index.html
                -docs/ChangeLog.txt
                -docs/examples/index.html
                -
                - +
                docs/user-guide/html/index.html
                +docs/ChangeLog.txt
                +docs/examples/index.html
                diff -Nru ant-1.9.10/manual/using.html ant-1.10.3/manual/using.html --- ant-1.9.10/manual/using.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/using.html 2018-03-24 12:37:12.000000000 +0000 @@ -24,146 +24,116 @@

                Using Apache Ant

                -

                Writing a Simple Buildfile

                -

                Apache Ant's buildfiles are written in XML. Each buildfile contains one project -and at least one (default) target. Targets contain task elements. -Each task element of the buildfile can have an id attribute and -can later be referred to by the value supplied to this. The value has -to be unique. (For additional information, see the - Tasks section below.)

                -

                Projects

                -

                A project has three attributes:

                - - - - - - - - - - - - - - - + + + + + + + + + + All Unit Test Packages + + + + + +

                Home

                +

                Packages

                +
                AttributeDescriptionRequired
                namethe name of the project.No
                defaultthe default target to use when no target is supplied.No; however, since Ant 1.6.0, - every project includes an implicit target that contains any and - all top-level tasks and/or types. This target will always be - executed as part of the project's initialization, even when Ant is - run with the -projecthelp option. +

                Writing a Simple Buildfile

                +

                Apache Ant's buildfiles are written in XML. Each buildfile contains one project and at least one (default) +target. Targets contain task elements. Each task element of the buildfile can have an id attribute and can +later be referred to by the value supplied to this. The value has to be unique. (For additional information, see +the Tasks section below.)

                + +

                Projects

                +

                A project has three attributes:

                + + + + + + + + + + + + + + + - - + - +
                AttributeDescriptionRequired
                namethe name of the project.No
                defaultthe default target to use when no target is supplied.No; however, since Ant 1.6.0, every project includes an implicit target that contains any and all + top-level tasks and/or types. This target will always be executed as part of the project's initialization, even + when Ant is run with the -projecthelp option.
                basedirthe base directory from which all path calculations are - done. This attribute might be overridden by setting - the "basedir" - property beforehand. When this is done, it must be omitted in the - project tag. If neither the attribute nor the property have - been set, the parent directory of the buildfile will be used.
                - A relative path is resolved relative to the directory containing - the build file. +
                basedirthe base directory from which all path calculations are done. A relative path is resolved relative to the + directory containing the buildfile. NoNo; defaults to the parent directory of the buildfile, unless overridden by the project's basedir or + the basedir property
                -

                Optionally, a description for the project can be provided as a -top-level <description> element (see the description type).

                - -

                Each project defines one or more targets. -A target is a set of tasks you want -to be executed. When starting Ant, you can select which target(s) you -want to have executed. When no target is given, -the project's default is used.

                - -

                Targets

                -

                A target can depend on other targets. You might have a target for compiling, -for example, and a target for creating a distributable. You can only build a -distributable when you have compiled first, so the distribute target -depends on the compile target. Ant resolves these dependencies.

                -

                It should be noted, however, that Ant's depends attribute -only specifies the order in which targets should be executed - it -does not affect whether the target that specifies the dependency(s) gets -executed if the dependent target(s) did not (need to) run. -

                +

                Optionally, a description for the project can be provided as a top-level <description> element +(see the description type).

                -

                More information can be found in the - dedicated manual page.

                +

                Each project defines one or more targets. A target is a set of tasks you want to be executed. When +starting Ant, you can select which target(s) you want to have executed. When no target is given, the +project's default is used.

                + +

                Targets

                +

                A target can depend on other targets. You might have a target for compiling, for example, and a target for creating a +distributable. You can only build a distributable when you have compiled first, so the distribute +target depends on the compile target. Ant resolves these dependencies.

                +

                It should be noted, however, that Ant's depends attribute only specifies the order in which +targets should be executed—it does not affect whether the target that specifies the dependency(s) gets executed if +the dependent target(s) did not (need to) run.

                -

                Tasks

                +

                More information can be found in the dedicated manual page.

                + +

                Tasks

                A task is a piece of code that can be executed.

                -

                A task can have multiple attributes (or arguments, if you prefer). The value -of an attribute might contain references to a property. These references will be -resolved before the task is executed.

                +

                A task can have multiple attributes (or arguments, if you prefer). The value of an attribute might contain references +to a property. These references will be resolved before the task is executed.

                Tasks have a common structure:

                -
                -
                <name attribute1="value1" attribute2="value2" ... />
                -
                -

                where name is the name of the task, -attributeN is the attribute name, and -valueN is the value for this attribute.

                -

                There is a set of built-in tasks, but it is also very -easy to write your own.

                -

                All tasks share a task name attribute. The value of -this attribute will be used in the logging messages generated by -Ant.

                -Tasks can be assigned an id attribute: -
                -
                <taskname id="taskID" ... />
                -
                -where taskname is the name of the task, and taskID is -a unique identifier for this task. -You can refer to the -corresponding task object in scripts or other tasks via this name. -For example, in scripts you could do: -
                + +
                <name attribute1="value1" attribute2="value2" ... />
                + +

                where name is the name of the task, attributeN is the attribute name, +and valueN is the value for this attribute.

                +

                There is a set of built-in tasks, but it is also very easy +to write your own.

                +

                All tasks can have a name attribute. The value of this attribute will be used in the logging messages +generated by Ant.

                +

                Tasks can be assigned an id attribute:

                + +
                <taskname id="taskID" ... />
                + +

                where taskname is the name of the task, and taskID is a unique identifier for +this task. You can refer to the corresponding task object in scripts or other tasks via this name. For example, in +scripts you could do:

                +
                 <script ... >
                   task1.setFoo("bar");
                -</script>
                -
                -
                -to set the foo attribute of this particular task instance. -In another task (written in Java), you can access the instance via -project.getReference("task1"). -

                -Note1: If "task1" has not been run yet, then -it has not been configured (ie., no attributes have been set), and if it is -going to be configured later, anything you've done to the instance may -be overwritten. -

                -

                -Note2: Future versions of Ant will most likely not -be backward-compatible with this behaviour, since there will likely be no -task instances at all, only proxies. -

                +</script> +

                to set the foo attribute of this particular task instance. In another task (written in Java), you can +access the instance via project.getReference("task1").

                +

                Note 1: If task1 has not been run yet, then it has not been configured (ie., no attributes have been set), and +if it is going to be configured later, anything you've done to the instance may be overwritten.

                +

                Note 2: Future versions of Ant will most likely not be backward-compatible with this behaviour, since there +will likely be no task instances at all, only proxies.

                -

                Properties

                +

                Properties

                Properties are an important way to customize a build process or to just provide shortcuts for strings that are used repeatedly - inside a build file.

                + inside a buildfile.

                -

                In its most simple form properties are defined in the build file +

                In its most simple form properties are defined in the buildfile (for example by the property task) or might be set outside Ant. A property has a name and a value; the name is case-sensitive. Properties may be used in the value of task attributes or in the nested text of tasks that support them. This is done by placing the property name between - "${" and "}" in the - attribute value. For example, if there is a "builddir" - property with the value "build", then this could be used - in an attribute like this: ${builddir}/classes. This - is resolved at run-time as build/classes.

                + ${ and } in the + attribute value. For example, if there is a builddir + property with the value build, then this could be used + in an attribute like this: ${builddir}/classes. This + is resolved at run-time as build/classes.

                -

                With Ant 1.8.0 property expansion has become much more powerful +

                Since Ant 1.8.0, property expansion has become much more powerful than simple key value pairs, more details can be found in the concepts section of this manual.

                -

                Example Buildfile

                +

                Example Buildfile

                 <project name="MyProject" default="dist" basedir=".">
                   <description>
                @@ -183,7 +153,7 @@
                 
                   <target name="compile" depends="init"
                         description="compile the source">
                -    <!-- Compile the java code from ${src} into ${build} -->
                +    <!-- Compile the Java code from ${src} into ${build} -->
                     <javac srcdir="${src}" destdir="${build}"/>
                   </target>
                 
                @@ -202,268 +172,199 @@
                     <delete dir="${build}"/>
                     <delete dir="${dist}"/>
                   </target>
                -</project>
                -
                +</project> -

                Notice that we are declaring properties outside any target. As of -Ant 1.6 all tasks can be declared outside targets (earlier version -only allowed <property>,<typedef> and -<taskdef>). When you do this they are evaluated before -any targets are executed. Some tasks will generate build failures if -they are used outside of targets as they may cause infinite loops -otherwise (<antcall> for example).

                - -

                -We have given some targets descriptions; this causes the projecthelp -invocation option to list them as public targets with the descriptions; the -other target is internal and not listed. -

                -Finally, for this target to work the source in the src subdirectory -should be stored in a directory tree which matches the package names. Check the -<javac> task for details. - -

                Token Filters

                -

                A project can have a set of tokens that might be automatically expanded if -found when a file is copied, when the filtering-copy behavior is selected in the -tasks that support this. These might be set in the buildfile -by the filter task.

                -

                Since this can potentially be a very harmful behavior, -the tokens in the files must -be of the form @token@, where -token is the token name that is set -in the <filter> task. This token syntax matches the syntax of other build systems -that perform such filtering and remains sufficiently orthogonal to most -programming and scripting languages, as well as with documentation systems.

                -

                Note: If a token with the format @token@ -is found in a file, but no -filter is associated with that token, no changes take place; -therefore, no escaping -method is available - but as long as you choose appropriate names for your -tokens, this should not cause problems.

                -

                Warning: If you copy binary files with filtering turned on, you can corrupt the -files. This feature should be used with text files only.

                - -

                Path-like Structures

                -

                You can specify PATH- and CLASSPATH-type -references using both -":" and ";" as separator -characters. Ant will -convert the separator to the correct character of the current operating -system.

                -

                Wherever path-like values need to be specified, a nested element can -be used. This takes the general form of:

                +

                Notice that we are declaring properties outside any target. Since Ant 1.6, all tasks can be declared outside +targets (earlier version only allowed <property>, <typedef> +and <taskdef>). When you do this they are evaluated before any targets are executed. Some tasks +will generate build failures if they are used outside of targets as they may cause infinite loops otherwise +(<antcall> for example).

                + +

                We have given some targets descriptions; this causes the -projecthelp invocation option to list them as +public targets with the descriptions; the other target is internal and not listed.

                +

                Finally, for this target to work the source in the src subdirectory should be stored in a directory tree +which matches the package names. Check the <javac> task for details.

                + +

                Token Filters

                +

                A project can have a set of tokens that might be automatically expanded if found when a file is copied, when the +filtering-copy behavior is selected in the tasks that support this. These might be set in the buildfile by +the filter task.

                +

                Since this can potentially be a very harmful behavior, the tokens in the files must be of the +form @token@, where token is the token name that is set in +the <filter> task. This token syntax matches the syntax of other build systems that perform such +filtering and remains sufficiently orthogonal to most programming and scripting languages, as well as with documentation +systems.

                +

                Note: If a token with the format @token@ is found in a file, but no filter +is associated with that token, no changes take place; therefore, no escaping method is available—but as long as +you choose appropriate names for your tokens, this should not cause problems.

                +

                Warning: If you copy binary files with filtering turned on, you can corrupt the files. This feature +should be used with text files only.

                + +

                Path-like Structures

                +

                You can specify PATH- and CLASSPATH-type references using both : and ; as +separator characters. Ant will convert the separator to the correct character of the current operating system.

                +

                Wherever path-like values need to be specified, a nested element can be used. This takes the general form of:

                -    <classpath>
                -      <pathelement path="${classpath}"/>
                -      <pathelement location="lib/helper.jar"/>
                -    </classpath>
                -
                -

                The location attribute specifies a single file or -directory relative to the project's base directory (or an absolute -filename), while the path attribute accepts colon- -or semicolon-separated lists of locations. The path -attribute is intended to be used with predefined paths - in any other -case, multiple elements with location attributes should be -preferred.

                -

                Since Ant 1.8.2 the location attribute can also contain a - wildcard in its last path component (i.e. it can end in a - "*") in order to support wildcard CLASSPATHs introduced - with Java6. Ant will not expand or evaluate the wildcards and the - resulting path may not work as anything else but a CLASSPATH - or - even as a CLASSPATH for a Java VM prior to Java6.

                +<classpath> + <pathelement path="${classpath}"/> + <pathelement location="lib/helper.jar"/> +</classpath> +

                The location attribute specifies a single file or directory relative to the project's base directory (or +an absolute filename), while the path attribute accepts colon- or semicolon-separated lists of +locations. The path attribute is intended to be used with predefined paths—in any other case, multiple +elements with location attributes should be preferred.

                +

                Since Ant 1.8.2 the location attribute can also contain a wildcard in its last path component +(i.e. it can end in a *) in order to support wildcard CLASSPATHs introduced with Java 6. Ant will +not expand or evaluate the wildcards and the resulting path may not work as anything else but +a CLASSPATH—or even as a CLASSPATH for JVM prior to Java 6.

                As a shortcut, the <classpath> tag -supports path and -location attributes of its own, so:

                +supports path and +location attributes of its own, so:

                -    <classpath>
                -      <pathelement path="${classpath}"/>
                -    </classpath>
                +<classpath>
                +  <pathelement path="${classpath}"/>
                +</classpath>
                 

                can be abbreviated to:

                +
                <classpath path="${classpath}"/>
                +

                In addition, one or more resource collections can be specified as +nested elements (these must consist of file-type resources only). Additionally, +it should be noted that although resource collections are processed in the order encountered, certain resource +collection types such as fileset, dirset +and files are undefined in terms of order.

                -    <classpath path="${classpath}"/>
                -
                -

                In addition, one or more -Resource Collections -can be specified as nested elements (these must consist of -file-type resources only). -Additionally, it should be noted that although resource collections are -processed in the order encountered, certain resource collection types -such as fileset, -dirset and -files -are undefined in terms of order.

                -
                -    <classpath>
                -      <pathelement path="${classpath}"/>
                -      <fileset dir="lib">
                -        <include name="**/*.jar"/>
                -      </fileset>
                -      <pathelement location="classes"/>
                -      <dirset dir="${build.dir}">
                -        <include name="apps/**/classes"/>
                -        <exclude name="apps/**/*Test*"/>
                -      </dirset>
                -      <filelist refid="third-party_jars"/>
                -    </classpath>
                -
                -

                This builds a path that holds the value of ${classpath}, -followed by all jar files in the lib directory, -the classes directory, all directories named -classes under the apps subdirectory of -${build.dir}, except those -that have the text Test in their name, and -the files specified in the referenced FileList.

                -

                If you want to use the same path-like structure for several tasks, -you can define them with a <path> element at the -same level as targets, and reference them via their -id attribute--see References for an +<classpath> + <pathelement path="${classpath}"/> + <fileset dir="lib"> + <include name="**/*.jar"/> + </fileset> + <pathelement location="classes"/> + <dirset dir="${build.dir}"> + <include name="apps/**/classes"/> + <exclude name="apps/**/*Test*"/> + </dirset> + <filelist refid="third-party_jars"/> +</classpath> +

                This builds a path that holds the value of ${classpath}, followed by all jar files in +the lib directory, the classes directory, all directories named classes under +the apps subdirectory of ${build.dir}, except those that have the text Test in +their name, and the files specified in the referenced FileList.

                +

                If you want to use the same path-like structure for several tasks, you can define them with +a <path> element at the same level as <target>s, and reference them via their +id attribute—see References for an example.

                -

                By default a path like structure will re-evaluate all nested - resource collections whenever it is used, which may lead to - unnecessary re-scanning of the filesystem. Since Ant 1.8.0 path has - an optional cache attribute, if it is set to true, the path - instance will only scan its nested resource collections once and - assume it doesn't change during the build anymore (the default - for cache still is false). Even if you are using the - path only in a single task it may improve overall performance to set - cache to true if you are using complex nested - constructs.

                - -

                A path-like structure can include a reference to another path-like -structure (a path being itself a resource collection) -via nested <path> elements:

                -
                -    <path id="base.path">
                -      <pathelement path="${classpath}"/>
                -      <fileset dir="lib">
                -        <include name="**/*.jar"/>
                -      </fileset>
                -      <pathelement location="classes"/>
                -    </path>
                -
                -    <path id="tests.path" cache="true">
                -      <path refid="base.path"/>
                -      <pathelement location="testclasses"/>
                -    </path>
                -
                - The shortcuts previously mentioned for <classpath> are also valid for <path>.For example: +

                By default a path-like structure will re-evaluate all nested resource collections whenever it is used, which may lead +to unnecessary re-scanning of the filesystem. Since Ant 1.8.0, path has an optional cache +attribute, if it is set to true, the path instance will only scan its nested resource collections once and assume +it doesn't change during the build anymore (the default for cache still is false). Even if you are +using the path only in a single task it may improve overall performance to set cache to true if you +are using complex nested constructs.

                + +

                A path-like structure can include a reference to another path-like structure (a path being itself a resource +collection) via nested <path> elements:

                -    <path id="base.path">
                -      <pathelement path="${classpath}"/>
                -    </path>
                -
                -can be written as: +<path id="base.path"> + <pathelement path="${classpath}"/> + <fileset dir="lib"> + <include name="**/*.jar"/> + </fileset> + <pathelement location="classes"/> +</path> + +<path id="tests.path" cache="true"> + <path refid="base.path"/> + <pathelement location="testclasses"/> +</path> +

                The shortcuts previously mentioned for <classpath> are also valid +for <path>. For example:

                -    <path id="base.path" path="${classpath}"/>
                -
                - -

                Path Shortcut

                -

                - In Ant 1.6 a shortcut for converting paths to OS specific strings - in properties has been added. One can use the expression - ${toString:pathreference} to convert a path element - reference to a string that can be used for a path argument. - For example: -

                +<path id="base.path"> + <pathelement path="${classpath}"/> +</path> +

                can be written as:

                +
                <path id="base.path" path="${classpath}"/>
                +

                Path Shortcut

                +

                Since Ant 1.6, there is a shortcut for converting paths to OS specific strings in properties. One can use +the expression ${toString:pathreference} to convert a path element reference to a string that can +be used for a path argument. For example:

                -  <path id="lib.path.ref">
                -    <fileset dir="lib" includes="*.jar"/>
                -  </path>
                -  <javac srcdir="src" destdir="classes">
                -    <compilerarg arg="-Xbootclasspath/p:${toString:lib.path.ref}"/>
                -  </javac>
                -
                - - -

                Command-line Arguments

                -

                Several tasks take arguments that will be passed to another -process on the command line. To make it easier to specify arguments -that contain space characters, nested arg elements can be used.

                - +<path id="lib.path.ref"> + <fileset dir="lib" includes="*.jar"/> +</path> +<javac srcdir="src" destdir="classes"> + <compilerarg arg="-Xbootclasspath/p:${toString:lib.path.ref}"/> +</javac> + +

                Command-line Arguments

                +

                Several tasks take arguments that will be passed to another process on the command line. To make it easier to specify +arguments that contain space characters, nested arg elements can be used.

                +
                - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - - + - +
                AttributeDescriptionRequiredAttributeDescriptionRequired
                valuea single command-line argument; can contain space - characters.Exactly one of these.valuea single command-line argument; can contain space characters.Exactly one of these.
                fileThe name of a file as a single command-line - argument; will be replaced with the absolute filename of the file.fileThe name of a file as a single command-line argument; will be replaced with the absolute filename + of the file.
                pathA string that will be treated as a path-like - string as a single command-line argument; you can use ; - or : as - path separators and Ant will convert it to the platform's local - conventions.pathA string that will be treated as a path-like string as a single command-line argument; you can + use ; or : as path separators and Ant will convert it to the platform's local conventions.
                pathrefReference to a path - defined elsewhere. Ant will convert it to the platform's local - conventions.pathrefReference to a path defined elsewhere. Ant will convert it to the + platform's local conventions.
                linea space-delimited list of command-line arguments.linea space-delimited list of command-line arguments.
                prefixA fixed string to be placed in front of the - argument. In the case of a line broken into parts, it will be - placed in front of every part. Since Ant 1.8.NoprefixA fixed string to be placed in front of the argument. In the case of a line broken into parts, it will be placed + in front of every part. Since Ant 1.8.No
                suffixA fixed string to be placed immediately after the - argument. In the case of a line broken into parts, it will be + suffixA fixed string to be placed immediately after the argument. In the case of a line broken into parts, it will be placed after every part. Since Ant 1.8.NoNo
                -

                It is highly recommended to avoid the line version -when possible. Ant will try to split the command line in a way -similar to what a (Unix) shell would do, but may create something that -is very different from what you expect under some circumstances.

                +

                It is highly recommended to avoid the line version when possible. Ant will try to split the command line +in a way similar to what a (Unix) shell would do, but may create something that is very different from what you expect +under some circumstances.

                Examples

                -
                -  <arg value="-l -a"/>
                -
                -

                is a single command-line argument containing a space character, -not separate commands "-l" and "-a".

                -
                -  <arg line="-l -a"/>
                -
                -

                This is a command line with two separate arguments, "-l" and "-a".

                -
                -  <arg path="/dir;/dir2:\dir3"/>
                -
                -

                is a single command-line argument with the value -\dir;\dir2;\dir3 on DOS-based systems and -/dir:/dir2:/dir3 on Unix-like systems.

                - -

                References

                - -

                Any project element can be assigned an identifier using its -id attribute. In most cases the element can subsequently -be referenced by specifying the refid attribute on an -element of the same type. This can be useful if you are going to -replicate the same snippet of XML over and over again--using a -<classpath> structure more than once, for example.

                +
                <arg value="-l -a"/>
                +

                is a single command-line argument containing a space character, not separate options -l +and -a.

                +
                <arg line="-l -a"/>
                +

                This is a command line with two separate options, -l and -a.

                +
                <arg path="/dir;/dir2:\dir3"/>
                +

                is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems +and /dir:/dir2:/dir3 on Unix(-like) systems.

                + +

                References

                + +

                Any project element can be assigned an identifier using its id attribute. In most cases the element can +subsequently be referenced by specifying the refid attribute on an element of the same type. This can be +useful if you are going to replicate the same snippet of XML over and over again—using +a <classpath> structure more than once, for example.

                The following example:

                -
                +
                 <project ... >
                   <target ... >
                     <rmic ...>
                @@ -484,10 +385,9 @@
                       </classpath>
                     </javac>
                   </target>
                -</project>
                -
                +</project>

                could be rewritten as:

                -
                +
                 <project ... >
                   <path id="project.class.path">
                     <pathelement location="lib/"/>
                @@ -506,73 +406,59 @@
                       <classpath refid="project.class.path"/>
                     </javac>
                   </target>
                -</project>
                -
                -

                All tasks that use nested elements for -PatternSets, -FileSets, -ZipFileSets or -path-like structures accept references to these structures -as shown in the examples. Using refid on a task will ordinarily -have the same effect (referencing a task already declared), but the user -should be aware that the interpretation of this attribute is dependent on the -implementation of the element upon which it is specified. Some tasks (the -property task is a handy example) -deliberately assign a different meaning to refid.

                - - -

                Use of external tasks

                -Ant supports a plugin mechanism for using third party tasks. For using them you -have to do two steps: +</project> +

                All tasks that use nested elements +for PatternSets, FileSets, ZipFileSets +or path-like structures accept references to these structures as shown in the +examples. Using refid on a task will ordinarily have the same effect (referencing a task already declared), +but the user should be aware that the interpretation of this attribute is dependent on the implementation of the element +upon which it is specified. Some tasks (the property task is a handy example) +deliberately assign a different meaning to refid.

                + +

                Use of external tasks

                +

                Ant supports a plugin mechanism for using third party tasks. For using them you have to do two steps:

                  -
                1. place their implementation somewhere where Ant can find them
                2. +
                3. place their implementation somewhere where Ant can find them.
                4. declare them.
                5. -
                -Don't add anything to the CLASSPATH environment variable - this is often the -reason for very obscure errors. Use Ant's own mechanisms -for adding libraries: + +

                Don't add anything to the CLASSPATH environment variable—this is often the reason for very obscure +errors. Use Ant's own mechanisms for adding libraries:

                  -
                • via command line argument -lib
                • +
                • via command line argument -lib
                • adding to ${user.home}/.ant/lib
                • adding to ${ant.home}/lib
                -For the declaration there are several ways: +

                For the declaration there are several ways:

                  -
                • declare a single task per using instruction using - <taskdef name="taskname" - classname="ImplementationClass"/> -
                  - <taskdef name="for" classname="net.sf.antcontrib.logic.For" /> - <for ... /> +
                • declare a single task per using instruction using + <taskdef name="taskname" + classname="ImplementationClass"/>
                  + <taskdef name="for" classname="net.sf.antcontrib.logic.For"/> <for + ... />
                • -
                • declare a bundle of tasks using a properties-file holding these - taskname-ImplementationClass-pairs and <taskdef> -
                  - <taskdef resource="net/sf/antcontrib/antcontrib.properties" /> - <for ... /> +
                • declare a bundle of tasks using a properties file holding these taskname–ImplementationClass + pairs and <taskdef>
                  + <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> <for + ... />
                • -
                • declare a bundle of tasks using a xml-file holding these - taskname-ImplementationClass-pairs and <taskdef> -
                  - <taskdef resource="net/sf/antcontrib/antlib.xml" /> - <for ... /> +
                • declare a bundle of tasks using an xml file holding these + taskname-ImplementationClass-pairs and <taskdef>
                  + <taskdef resource="net/sf/antcontrib/antlib.xml"/> <for ... />
                • -
                • declare a bundle of tasks using a xml-file named antlib.xml, XML-namespace and - antlib: protocol handler -
                  - <project xmlns:ac="antlib:net.sf.antcontrib"/> - <ac:for ... /> +
                • declare a bundle of tasks using an xml file named antlib.xml, XML namespace + and antlib: protocol handler
                  + <project xmlns:ac="antlib:net.sf.antcontrib"/> <ac:for ... />
                If you need a special function, you should
                1. have a look at this manual, because Ant provides lot of tasks
                2. -
                3. have a look at the external task page online
                4. -
                5. have a look at the external task wiki - page
                6. -
                7. ask on the Ant user list
                8. -
                9. implement (and share) your own
                10. +
                11. have a look at the external task page online
                12. +
                13. have a look at the external task wiki + page
                14. +
                15. ask on the Ant user list
                16. +
                17. implement (and share) your own
                diff -Nru ant-1.9.10/manual/usinglist.html ant-1.10.3/manual/usinglist.html --- ant-1.9.10/manual/usinglist.html 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/manual/usinglist.html 2018-03-24 12:37:12.000000000 +0000 @@ -29,22 +29,19 @@

                Using Apache Ant

                - diff -Nru ant-1.9.10/README ant-1.10.3/README --- ant-1.9.10/README 2018-02-03 16:12:26.000000000 +0000 +++ ant-1.10.3/README 2018-03-24 12:37:12.000000000 +0000 @@ -1,5 +1,5 @@ - A N T + Apache Ant What is it? @@ -52,10 +52,13 @@ Documentation ------------- - Documentation is available in HTML format, in the docs/ directory. + Documentation is available in HTML format, in the manual/ directory. For information about building and installing Ant, see - docs/manual/index.html - + manual/install.html + The manual for the latest release of Ant is available online at + . + The latest version of the manual is available online at + . Licensing --------- diff -Nru ant-1.9.10/src/etc/ant-bin.wxs ant-1.10.3/src/etc/ant-bin.wxs --- ant-1.9.10/src/etc/ant-bin.wxs 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/ant-bin.wxs 2018-03-24 12:37:12.000000000 +0000 @@ -436,16 +436,18 @@ - - - - + + + + + + - - - + + + diff -Nru ant-1.9.10/src/etc/junit-frames-saxon.xsl ant-1.10.3/src/etc/junit-frames-saxon.xsl --- ant-1.9.10/src/etc/junit-frames-saxon.xsl 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/src/etc/junit-frames-saxon.xsl 2018-03-24 12:37:12.000000000 +0000 @@ -0,0 +1,971 @@ + + + + + + + + + Unit Test Results. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + Standard Output from <xsl:value-of select="@name"/> + + +
                + + +
                +
                + + + + + Standard Error from <xsl:value-of select="@name"/> + + +
                + + +
                +
                + + + + + + + + + + + + + + + + + + + + + +
                +
                + + + + + <xsl:value-of select="$TITLE"/> + + + + + + + + + <h2>Frame Alert</h2> + <p> + This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. + </p> + + + + + + + + body { + font:normal 68% verdana,arial,helvetica; + color:#000000; + } + table tr td, table tr th { + font-size: 68%; + } + table.details tr th{ + font-weight: bold; + text-align:left; + background:#a6caf0; + } + table.details tr td{ + background:#eeeee0; + } + + p { + line-height:1.5em; + margin-top:0.5em; margin-bottom:1.0em; + } + h1 { + margin: 0px 0px 5px; font: 165% verdana,arial,helvetica + } + h2 { + margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica + } + h3 { + margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica + } + h4 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica + } + h5 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica + } + h6 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica + } + .Error { + font-weight:bold; color:red; + } + .Failure { + font-weight:bold; color:purple; + } + .Properties { + text-align:right; + } + + + + + + + + + + All Failures + + + All Errors + + + All Skipped + + + All Tests + + + + + Unit Test Results: <xsl:value-of select="$title"/> + + + + + + open('allclasses-frame.html','classListFrame') + +

                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                + +
                + + +
                + + + + + + + . + + + Unit Test Results: <xsl:value-of select="$class.name"/> + + + + + + + + +

                Class

                + + + + + +
                + + + +

                Failures

                +
                + +

                Errors

                +
                + +

                Skipped

                +
                + +

                Tests

                +
                +
                + + + + + + + + + + + + + + + + + + + + + + +
                + + + + + + + + + +
                + + + + cur = TestCases['.'] = new Array(); + + + cur[''] = ''; + + + + + + + + + + + Unit Test Classes: <xsl:value-of select="$name"/> + + + + + + + + + +
                +

                + + <none> +

                +
                + +

                Classes

                + + + + + + + +
                + +
                + + +
                + + + + + + + All Unit Test Classes + + + + + +

                Classes

                + + + + +
                + + +
                + + + +
                + + + + / + _.html + + + +
                + + + +
                + + + + + +
              + + + <none> + +
              + + + + + + + + + + + + Error + Failure + Pass + + + + + + + + + +
              TestsFailuresErrorsSkippedSuccess rateTime
              + + + + + + + +
              + + + + +
              + Note: failures are anticipated and checked for with assertions while errors are unanticipated. +
              + +

              Packages

              + + + + + + + + + + + Error + Failure + Pass + + + + + + + + + + + + +
              + + <none> + + + + +
              + + + + + + + + + + + + + + + open('package-frame.html','classListFrame') + +

              Package

              + + + + + +

              Classes

              +

              + + + + + +
              +

              +
              + + +
              + + + + + + + ../ + + + + + + ../ + + + + + + + + stylesheet.css + + + + + +

              + + + + + +
              Designed for use with JUnit and Ant.
              +
              +
              + + + +
            NameTestsErrorsFailuresSkippedTime(s)Time StampHost
            ClassNameStatusTypeTime(s)
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            + + + + + + + + + + FailureErrorSkippedSuccess + + + +
            + + + + + + + + + + + + + + + + + Failure + Error + + + + + + + + + + + + +
            + + + +
            + + + + + + + + + + + + + +

            Package

            + + + + + + +
            + Back to top +

            +

            + + + + + + + + +

            TestCase

            + + + + + + + + + + +
            + +

            + + Back to top + + + + +

            Summary

            + + + + + + + + + + + + + + + + + + + Failure + Error + + + + + + + + + + +
            TestsFailuresErrorsSkippedSuccess rateTime
            + + + + + + + +
            + + + + +
            + Note: failures are anticipated and checked for with assertions while errors are unanticipated. +
            +
            + + + + cur = TestCases['.'] = new Array(); + + + cur[''] = ''; + + + + + +

            + + + + + +
            Designed for use with JUnit and Ant.
            +
            +
            + + + + Name + Tests + Errors + Failures + Skipped + Time(s) + + + + + + + Name + Tests + Errors + Failures + Skipped + Time(s) + Time Stamp + Host + + + + + + + Name + Status + Type + Time(s) + + + + + + + + + + + Failure + Error + + + + + + + + + + + + + + + + + + + + + + + + Error + + + + + + Failure + + + + Error + + + + Skipped + + + + Success + + + + + + + + + + + + + + + + + + + + + + + + + + + + N/A + + + + + + +

            + + + +
            + + +
            + + + + + + + + + + + + + + + 32 + + + + + + + + + + + + +
            + + + +
            + + +
            + + + +
            + + + +
            +
            + + + + + + + + + + + + diff -Nru ant-1.9.10/src/etc/manifest ant-1.10.3/src/etc/manifest --- ant-1.9.10/src/etc/manifest 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/manifest 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: org.apache.tools.ant.Main - - diff -Nru ant-1.9.10/src/etc/poms/ant/pom.xml ant-1.10.3/src/etc/poms/ant/pom.xml --- ant-1.9.10/src/etc/poms/ant/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,19 +27,19 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant - 1.9.10 + 1.10.3 Apache Ant Core org.apache.ant ant-launcher - 1.9.10 + 1.10.3 compile @@ -114,46 +114,50 @@ org/apache/tools/ant/filters/util/JavaClassHelper* - org/apache/tools/ant/types/resolver/** - org/apache/tools/ant/listener/Log4jListener* + org/apache/tools/ant/filters/util/JavaClassHelper* + org/apache/tools/ant/launch/** org/apache/tools/ant/listener/CommonsLoggingListener* - org/apache/tools/ant/util/regexp/JakartaRegexp* - org/apache/tools/ant/util/regexp/JakartaOro* + org/apache/tools/ant/listener/Log4jListener* org/apache/tools/ant/taskdefs/email/MimeMailer* - org/apache/tools/ant/launch/** + org/apache/tools/ant/taskdefs/optional/NetRexxC* + org/apache/tools/ant/taskdefs/optional/Script* + org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport* + org/apache/tools/ant/taskdefs/optional/image/* + org/apache/tools/ant/taskdefs/optional/jdepend/* + org/apache/tools/ant/taskdefs/optional/junit/* + org/apache/tools/ant/taskdefs/optional/junitlauncher/* org/apache/tools/ant/taskdefs/optional/net/FTP* org/apache/tools/ant/taskdefs/optional/net/RExec* org/apache/tools/ant/taskdefs/optional/net/TelnetTask* - org/apache/tools/ant/taskdefs/optional/junit/* - org/apache/tools/ant/taskdefs/optional/ssh/* - org/apache/tools/ant/taskdefs/optional/image/* - org/apache/tools/ant/types/optional/image/* - org/apache/tools/ant/taskdefs/optional/Script* org/apache/tools/ant/taskdefs/optional/script/** + org/apache/tools/ant/taskdefs/optional/ssh/* + org/apache/tools/ant/taskdefs/optional/xz/* org/apache/tools/ant/types/optional/*Script* + org/apache/tools/ant/types/optional/image/* + org/apache/tools/ant/types/optional/xz/* + org/apache/tools/ant/types/resolver/** org/apache/tools/ant/util/ScriptRunner.java - org/apache/tools/ant/util/optional/ScriptRunner.java - org/apache/tools/ant/filters/util/JavaClassHelper* org/apache/tools/ant/util/depend/bcel/* - org/apache/tools/ant/taskdefs/optional/NetRexxC* - org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport* - org/apache/tools/ant/taskdefs/optional/jdepend/* + org/apache/tools/ant/util/optional/ScriptRunner.java + org/apache/tools/ant/util/regexp/JakartaOro* + org/apache/tools/ant/util/regexp/JakartaRegexp* org/apache/tools/ant/filters/util/JavaClassHelper* - org/apache/tools/ant/types/resolver/** - org/apache/tools/ant/util/Script* - org/apache/tools/ant/listener/Log4jListener* - org/apache/tools/ant/listener/CommonsLoggingListener* - org/apache/tools/ant/util/regexp/JakartaRegexp* - org/apache/tools/ant/util/regexp/JakartaOro* - org/apache/tools/ant/util/regexp/Jdk14Regexp* - org/apache/tools/ant/taskdefs/email/MimeMailer* org/apache/tools/ant/launch/** + org/apache/tools/ant/listener/CommonsLoggingListener* + org/apache/tools/ant/listener/Log4jListener* org/apache/tools/ant/taskdefs/StyleTest* + org/apache/tools/ant/taskdefs/email/MimeMailer* org/apache/tools/ant/taskdefs/optional/junit/ + org/apache/tools/ant/taskdefs/optional/junitlauncher/ org/apache/tools/ant/taskdefs/optional/net/FTP* org/apache/tools/ant/taskdefs/optional/ssh/* + org/apache/tools/ant/types/resolver/** + org/apache/tools/ant/util/Script* + org/apache/tools/ant/util/regexp/JakartaOro* + org/apache/tools/ant/util/regexp/JakartaRegexp* + org/apache/tools/ant/util/regexp/Jdk14Regexp* diff -Nru ant-1.9.10/src/etc/poms/ant-antlr/pom.xml ant-1.10.3/src/etc/poms/ant-antlr/pom.xml --- ant-1.9.10/src/etc/poms/ant-antlr/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-antlr/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,13 +27,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-antlr - 1.9.10 + 1.10.3 Apache Ant + ANTLR antlr specific task. The implementation forks a java process, therefore the antlr jar file is only needed at runtime @@ -41,7 +41,7 @@ org.apache.ant ant - 1.9.10 + 1.10.3 true compile diff -Nru ant-1.9.10/src/etc/poms/ant-apache-bcel/pom.xml ant-1.10.3/src/etc/poms/ant-apache-bcel/pom.xml --- ant-1.9.10/src/etc/poms/ant-apache-bcel/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-apache-bcel/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,25 +27,25 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-apache-bcel - 1.9.10 + 1.10.3 Apache Ant + BCEL org.apache.ant ant - 1.9.10 + 1.10.3 compile - bcel + org.apache.bcel bcel - 5.1 + 6.2 compile diff -Nru ant-1.9.10/src/etc/poms/ant-apache-bsf/pom.xml ant-1.10.3/src/etc/poms/ant-apache-bsf/pom.xml --- ant-1.9.10/src/etc/poms/ant-apache-bsf/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-apache-bsf/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,19 +27,19 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-apache-bsf - 1.9.10 + 1.10.3 Apache Ant + BSF org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-apache-log4j/pom.xml ant-1.10.3/src/etc/poms/ant-apache-log4j/pom.xml --- ant-1.9.10/src/etc/poms/ant-apache-log4j/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-apache-log4j/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,19 +26,19 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-apache-log4j - 1.9.10 + 1.10.3 Apache Ant + Log4J org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-apache-oro/pom.xml ant-1.10.3/src/etc/poms/ant-apache-oro/pom.xml --- ant-1.9.10/src/etc/poms/ant-apache-oro/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-apache-oro/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,19 +27,19 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-apache-oro - 1.9.10 + 1.10.3 Apache Ant + Apache Oro org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-apache-regexp/pom.xml ant-1.10.3/src/etc/poms/ant-apache-regexp/pom.xml --- ant-1.9.10/src/etc/poms/ant-apache-regexp/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-apache-regexp/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,19 +26,19 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-apache-regexp - 1.9.10 + 1.10.3 Apache Ant + Apache Regexp org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-apache-resolver/pom.xml ant-1.10.3/src/etc/poms/ant-apache-resolver/pom.xml --- ant-1.9.10/src/etc/poms/ant-apache-resolver/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-apache-resolver/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,19 +26,19 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-apache-resolver - 1.9.10 + 1.10.3 Apache Ant + Apache Resolver org.apache.ant ant - 1.9.10 + 1.10.3 compile @@ -55,7 +55,7 @@ maven-compiler-plugin - org/apache/tools/ant/types/resolver/** + org/apache/tools/ant/types/resolver/*.java diff -Nru ant-1.9.10/src/etc/poms/ant-apache-xalan2/pom.xml ant-1.10.3/src/etc/poms/ant-apache-xalan2/pom.xml --- ant-1.9.10/src/etc/poms/ant-apache-xalan2/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-apache-xalan2/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,20 +26,20 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-apache-xalan2 - 1.9.10 + 1.10.3 Apache Ant + Xalan 2 contains Xalan2-specific features org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-commons-logging/pom.xml ant-1.10.3/src/etc/poms/ant-commons-logging/pom.xml --- ant-1.9.10/src/etc/poms/ant-commons-logging/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-commons-logging/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,20 +26,20 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-commons-logging - 1.9.10 + 1.10.3 Apache Ant + Commons Logging Ant Listener based on commons-logging org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-commons-net/pom.xml ant-1.10.3/src/etc/poms/ant-commons-net/pom.xml --- ant-1.9.10/src/etc/poms/ant-commons-net/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-commons-net/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,26 +26,26 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-commons-net - 1.9.10 + 1.10.3 Apache Ant + Commons Net ftp, rexec and telnet tasks org.apache.ant ant - 1.9.10 + 1.10.3 compile commons-net commons-net - 2.2 + 3.6 compile diff -Nru ant-1.9.10/src/etc/poms/ant-jai/pom.xml ant-1.10.3/src/etc/poms/ant-jai/pom.xml --- ant-1.9.10/src/etc/poms/ant-jai/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-jai/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,13 +27,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-jai - 1.9.10 + 1.10.3 Apache Ant + JAI image task and corresponding types. @@ -41,7 +41,7 @@ org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-javamail/pom.xml ant-1.10.3/src/etc/poms/ant-javamail/pom.xml --- ant-1.9.10/src/etc/poms/ant-javamail/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-javamail/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,13 +26,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-javamail - 1.9.10 + 1.10.3 Apache Ant + JavaMail implementation of the mail task based on javamail. Required to send emails to SMTP servers using user/password combinations @@ -41,19 +41,13 @@ org.apache.ant ant - 1.9.10 + 1.10.3 compile javax.mail javax.mail-api - 1.5.6 - compile - - - javax.activation - activation - 1.1.1 + 1.6.0 compile diff -Nru ant-1.9.10/src/etc/poms/ant-jdepend/pom.xml ant-1.10.3/src/etc/poms/ant-jdepend/pom.xml --- ant-1.9.10/src/etc/poms/ant-jdepend/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-jdepend/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,13 +27,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-jdepend - 1.9.10 + 1.10.3 Apache Ant + JDepend task jdepend invoking the jdepend parser. There is also a version 2.9.1 of the jdepend parser available on the maven repository @@ -41,7 +41,7 @@ org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-jmf/pom.xml ant-1.10.3/src/etc/poms/ant-jmf/pom.xml --- ant-1.9.10/src/etc/poms/ant-jmf/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-jmf/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,13 +26,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-jmf - 1.9.10 + 1.10.3 Apache Ant + JMF contains the sound task and a soundplayer listener download the dependency from http://java.sun.com/products/java-media/jmf/ @@ -40,7 +40,7 @@ org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-jsch/pom.xml ant-1.10.3/src/etc/poms/ant-jsch/pom.xml --- ant-1.9.10/src/etc/poms/ant-jsch/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-jsch/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,13 +26,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-jsch - 1.9.10 + 1.10.3 Apache Ant + JSch contains the sshexec and scp tasks @@ -40,7 +40,7 @@ org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-junit/pom.xml ant-1.10.3/src/etc/poms/ant-junit/pom.xml --- ant-1.9.10/src/etc/poms/ant-junit/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-junit/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,20 +26,20 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-junit - 1.9.10 + 1.10.3 Apache Ant + JUnit contains the junit and junirreport tasks org.apache.ant ant - 1.9.10 + 1.10.3 compile @@ -67,6 +67,8 @@ + + diff -Nru ant-1.9.10/src/etc/poms/ant-junit4/pom.xml ant-1.10.3/src/etc/poms/ant-junit4/pom.xml --- ant-1.9.10/src/etc/poms/ant-junit4/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-junit4/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,20 +26,20 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-junit4 - 1.9.10 + 1.10.3 Apache Ant + JUnit 4 contains JUnit 4.x support org.apache.ant ant - 1.9.10 + 1.10.3 compile diff -Nru ant-1.9.10/src/etc/poms/ant-junitlauncher/pom.xml ant-1.10.3/src/etc/poms/ant-junitlauncher/pom.xml --- ant-1.9.10/src/etc/poms/ant-junitlauncher/pom.xml 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-junitlauncher/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -0,0 +1,85 @@ + + + + + + org.apache.ant + ant-parent + ../pom.xml + 1.10.3 + + 4.0.0 + http://ant.apache.org/ + org.apache.ant + ant-junitlauncher + 1.10.3 + Apache Ant + JUnit 5 + contains JUnit 5.x support + + + org.apache.ant + ant + 1.10.3 + compile + + + org.junit.platform + junit-platform-launcher + 1.1.0 + compile + + + org.junit.jupiter + junit-jupiter-engine + 5.1.0 + test + + + org.junit.vintage + junit-vintage-engine + 5.1.0 + test + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org/apache/tools/ant/taskdefs/optional/junitlauncher/* + + + org/apache/tools/ant/taskdefs/optional/junitlauncher/* + + + + + ../../../../src/main + ../../../../src/tests/junit + ../../../../target/${project.artifactId}/classes + ../../../../target/${project.artifactId}/testcases + ../../../../target/${project.artifactId} + + diff -Nru ant-1.9.10/src/etc/poms/ant-launcher/pom.xml ant-1.10.3/src/etc/poms/ant-launcher/pom.xml --- ant-1.9.10/src/etc/poms/ant-launcher/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-launcher/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -27,13 +27,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-launcher - 1.9.10 + 1.10.3 Apache Ant Launcher @@ -44,7 +44,6 @@ org/apache/tools/ant/launch/*.java - diff -Nru ant-1.9.10/src/etc/poms/ant-netrexx/pom.xml ant-1.10.3/src/etc/poms/ant-netrexx/pom.xml --- ant-1.9.10/src/etc/poms/ant-netrexx/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/ant-netrexx/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,13 +26,13 @@ org.apache.ant ant-parent ../pom.xml - 1.9.10 + 1.10.3 4.0.0 http://ant.apache.org/ org.apache.ant ant-netrexx - 1.9.10 + 1.10.3 Apache Ant + NetRexx NetRexxC task dependency can be downloaded from http://www.ibm.com/software/awdtools/netrexx/download.html @@ -40,7 +40,7 @@ org.apache.ant ant - 1.9.10 + 1.10.3 compile + + + + org.apache.ant + ant-parent + ../pom.xml + 1.10.3 + + 4.0.0 + http://ant.apache.org/ + org.apache.ant + ant-xz + 1.10.3 + Apache Ant + XZ for Java + contains the xz compression support + + + org.apache.ant + ant + 1.10.3 + compile + + + org.tukaani + xz + 1.6 + compile + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org/apache/tools/ant/taskdefs/optional/xz/* + org/apache/tools/ant/types/optional/xz/* + + + + + ../../../../src/main + ../../../../src/testcases + ../../../../target/${project.artifactId}/classes + ../../../../target/${project.artifactId}/testcases + ../../../../target/${project.artifactId} + + diff -Nru ant-1.9.10/src/etc/poms/pom.xml ant-1.10.3/src/etc/poms/pom.xml --- ant-1.9.10/src/etc/poms/pom.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/poms/pom.xml 2018-03-24 12:37:12.000000000 +0000 @@ -26,7 +26,7 @@ 4.0.0 org.apache.ant ant-parent - 1.9.10 + 1.10.3 pom master POM @@ -99,16 +99,18 @@ ant-jsch ant-junit ant-junit4 + ant-junitlauncher ant-launcher ant-netrexx ant-swing ant-testutil + ant-xz junit junit - 3.8.2 + 4.12 test @@ -122,26 +124,26 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.7.0 - 1.5 - 1.5 + 1.8 + 1.8 org.apache.maven.plugins maven-jar-plugin - 2.4 + 3.0.2 org.apache.maven.plugins maven-surefire-plugin - 2.12 + 2.20.1 org.apache.maven.plugins maven-surefire-report-plugin - 2.12 + 2.20.1 diff -Nru ant-1.9.10/src/etc/testcases/core/antclassloader.xml ant-1.10.3/src/etc/testcases/core/antclassloader.xml --- ant-1.9.10/src/etc/testcases/core/antclassloader.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/core/antclassloader.xml 2018-03-24 12:37:12.000000000 +0000 @@ -56,11 +56,7 @@ package org.example; public class Foo {} ]]> - - - - - + diff -Nru ant-1.9.10/src/etc/testcases/taskdefs/conditions/antversion.xml ant-1.10.3/src/etc/testcases/taskdefs/conditions/antversion.xml --- ant-1.9.10/src/etc/testcases/taskdefs/conditions/antversion.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/taskdefs/conditions/antversion.xml 2018-03-24 12:37:12.000000000 +0000 @@ -32,11 +32,10 @@ - + - Should be exactly 1.9.10 - + Should be exactly 1.10.3 @@ -45,10 +44,10 @@ - + - Should be at least 1.9.10 + Should be at least 1.9.8 @@ -57,10 +56,10 @@ - + - Should be exactly 1.9.10 + Should be exactly 1.9.8 Binary files /tmp/tmpDllyiZ/t0wfU1fK58/ant-1.9.10/src/etc/testcases/taskdefs/expected/asf-logo.gif.xz and /tmp/tmpDllyiZ/0Qq0x7CRmM/ant-1.10.3/src/etc/testcases/taskdefs/expected/asf-logo.gif.xz differ diff -Nru ant-1.9.10/src/etc/testcases/taskdefs/get.xml ant-1.10.3/src/etc/testcases/taskdefs/get.xml --- ant-1.9.10/src/etc/testcases/taskdefs/get.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/taskdefs/get.xml 2018-03-24 12:37:12.000000000 +0000 @@ -98,6 +98,34 @@ + + +
            +
            + + + + + +
            +
            + + + + + +
            +
            +
            + + + + + +
            + + + diff -Nru ant-1.9.10/src/etc/testcases/taskdefs/optional/junitlauncher.xml ant-1.10.3/src/etc/testcases/taskdefs/optional/junitlauncher.xml --- ant-1.9.10/src/etc/testcases/taskdefs/optional/junitlauncher.xml 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/taskdefs/optional/junitlauncher.xml 2018-03-24 12:37:12.000000000 +0000 @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru ant-1.9.10/src/etc/testcases/taskdefs/optional/junit.xml ant-1.10.3/src/etc/testcases/taskdefs/optional/junit.xml --- ant-1.9.10/src/etc/testcases/taskdefs/optional/junit.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/taskdefs/optional/junit.xml 2018-03-24 12:37:12.000000000 +0000 @@ -339,11 +339,7 @@ public void bad() { throw new RuntimeException("failed");} } - - - - - + diff -Nru ant-1.9.10/src/etc/testcases/taskdefs/optional/script/heavy-script.js ant-1.10.3/src/etc/testcases/taskdefs/optional/script/heavy-script.js --- ant-1.9.10/src/etc/testcases/taskdefs/optional/script/heavy-script.js 1970-01-01 00:00:00.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/taskdefs/optional/script/heavy-script.js 2018-03-24 12:37:12.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var functions = [ +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; },function (value) { return value; }, +]; + +var v = 'a'; +for (var i in functions) { + v = functions[i](v); +} + +var echo = project.createTask("echo"); +echo.setMessage("heavy-script done"); +echo.perform(); diff -Nru ant-1.9.10/src/etc/testcases/taskdefs/optional/script/scriptdef.xml ant-1.10.3/src/etc/testcases/taskdefs/optional/script/scriptdef.xml --- ant-1.9.10/src/etc/testcases/taskdefs/optional/script/scriptdef.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/taskdefs/optional/script/scriptdef.xml 2018-03-24 12:37:12.000000000 +0000 @@ -17,6 +17,10 @@ --> + + + + This build-file is intended to be run from the test cases @@ -141,5 +145,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru ant-1.9.10/src/etc/testcases/taskdefs/optional/script.xml ant-1.10.3/src/etc/testcases/taskdefs/optional/script.xml --- ant-1.9.10/src/etc/testcases/taskdefs/optional/script.xml 2018-02-03 16:12:25.000000000 +0000 +++ ant-1.10.3/src/etc/testcases/taskdefs/optional/script.xml 2018-03-24 12:37:12.000000000 +0000 @@ -17,6 +17,10 @@ --> + + + + This build-file is intended to be run from the test cases @@ -43,4 +47,22 @@ ]]> + + + + + + + + + +