summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagesh Umasankar <umagesh@apache.org>2002-07-09 21:06:15 +0000
committerMagesh Umasankar <umagesh@apache.org>2002-07-09 21:06:15 +0000
commitda5a13f8e4e0e4475f942b5ae5670271b711d423 (patch)
tree79ca25a0d8a359b1ecbac91821fdc30da982b202
parente5235423ccd494cb7516a1df6e3e13a74a22b767 (diff)
downloadant-da5a13f8e4e0e4475f942b5ae5670271b711d423.tar.gz
Merge differences between the ANT_15_FINAL branch and the trunk into the trunk.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273081 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--LICENSE.dom71
-rw-r--r--LICENSE.sax20
-rw-r--r--README2
-rw-r--r--WHATSNEW330
-rw-r--r--build.xml33
-rw-r--r--docs/ant_task_guidelines.html77
-rw-r--r--docs/manual/CoreTasks/concat.html2
-rw-r--r--docs/manual/CoreTasks/conditions.html15
-rw-r--r--docs/manual/CoreTasks/jar.html17
-rw-r--r--docs/manual/CoreTasks/pathconvert.html5
-rw-r--r--docs/manual/CoreTasks/style.html91
-rw-r--r--docs/manual/Integration/VAJAntTool.html33
-rw-r--r--docs/manual/OptionalTasks/ejb.html27
-rw-r--r--docs/manual/OptionalTasks/jpcoverage.html149
-rw-r--r--docs/manual/OptionalTasks/jspc.html4
-rw-r--r--docs/manual/OptionalTasks/perforce.html4
-rw-r--r--docs/manual/OptionalTasks/pvcstask.html36
-rw-r--r--docs/manual/OptionalTasks/replaceregexp.html8
-rw-r--r--docs/manual/OptionalTasks/rpm.html10
-rw-r--r--docs/manual/OptionalTasks/script.html2
-rw-r--r--docs/manual/OptionalTasks/serverdeploy.html4
-rw-r--r--docs/manual/OptionalTasks/sos.html10
-rw-r--r--docs/manual/OptionalTasks/splash.html37
-rw-r--r--docs/manual/OptionalTasks/starteam.html48
-rw-r--r--docs/manual/OptionalTasks/stylebook.html7
-rw-r--r--docs/manual/OptionalTasks/vss.html25
-rw-r--r--docs/manual/OptionalTasks/xmlvalidate.html18
-rw-r--r--docs/manual/coretasklist.html3
-rw-r--r--docs/manual/dirtasks.html2
-rw-r--r--docs/manual/install.html25
-rw-r--r--docs/manual/optionaltasklist.html11
-rw-r--r--docs/manual/tasksoverview.html67
-rw-r--r--docs/manual/using.html2
-rw-r--r--lib/README13
-rw-r--r--lib/xercesImpl.jarbin1728861 -> 933730 bytes
-rw-r--r--src/etc/testcases/core/include/included_file_parse_error/build.xml17
-rw-r--r--src/etc/testcases/core/include/included_file_parse_error/included_file.xml4
-rw-r--r--src/etc/testcases/core/include/included_file_task_error/build.xml17
-rw-r--r--src/etc/testcases/core/include/included_file_task_error/included_file.xml4
-rw-r--r--src/etc/testcases/core/include/including_file_parse_error/build.xml19
-rw-r--r--src/etc/testcases/core/include/including_file_parse_error/included_file.xml3
-rw-r--r--src/etc/testcases/core/include/including_file_task_error/build.xml18
-rw-r--r--src/etc/testcases/core/include/including_file_task_error/included_file.xml3
-rw-r--r--src/etc/testcases/taskdefs/optional/xml/test.xml8
-rw-r--r--src/etc/testcases/taskdefs/optional/xml/test.xsl8
-rw-r--r--src/etc/testcases/taskdefs/optional/xslt.xml11
-rw-r--r--src/etc/testcases/taskdefs/zip.xml17
-rw-r--r--src/etc/testcases/types/selectors.xml25
-rw-r--r--src/main/org/apache/tools/ant/Diagnostics.java307
-rw-r--r--src/main/org/apache/tools/ant/DirectoryScanner.java4
-rw-r--r--src/main/org/apache/tools/ant/Main.java9
-rw-r--r--src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java8
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Ant.java9
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Basename.java4
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/BuildNumber.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/CVSPass.java4
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/CallTarget.java1
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Chmod.java17
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Copy.java36
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/DependSet.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Dirname.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Echo.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/ExecTask.java25
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java4
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Exit.java10
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Filter.java18
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/FixCRLF.java8
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Get.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/JDBCTask.java33
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Jar.java14
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Java.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Javac.java35
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Javadoc.java1
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Manifest.java140
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/ManifestTask.java226
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/MatchingTask.java39
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/PathConvert.java38
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Property.java5
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Recorder.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/SQLExec.java160
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Sleep.java27
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Transform.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Tstamp.java6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/UpToDate.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/War.java22
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java9
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java124
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/XmlProperty.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Zip.java79
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java4
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/defaults.properties5
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java49
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/IContract.java45
-rwxr-xr-xsrc/main/org/apache/tools/ant/taskdefs/optional/Javah.java45
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java8
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java62
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java9
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java50
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java33
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/Script.java6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/StyleBook.java31
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/Test.java23
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java42
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java28
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java5
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java9
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java36
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java5
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java7
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java5
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java21
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java15
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java152
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java28
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java99
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java90
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java4
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java24
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java24
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java16
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java8
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java1
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java12
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java5
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java18
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java13
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java13
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java11
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java18
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java46
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java73
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java25
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java4
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java105
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java59
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java13
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java43
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java75
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java8
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java15
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java25
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java44
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java17
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java24
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java13
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java33
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java10
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java14
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Have.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java19
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java7
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java10
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java7
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java11
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java86
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java9
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java2
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java17
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java47
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java85
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java32
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Socket.java11
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java26
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java43
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java3
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java4
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java14
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java41
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckin.java13
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java19
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamLabel.java14
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamList.java8
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamTask.java21
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java28
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java18
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java11
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java13
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java39
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java7
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java11
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java34
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java31
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java19
-rw-r--r--src/main/org/apache/tools/ant/types/AbstractFileSet.java1
-rw-r--r--src/main/org/apache/tools/ant/types/XMLCatalog.java2
-rw-r--r--src/main/org/apache/tools/ant/types/selectors/DependSelector.java25
-rw-r--r--src/main/org/apache/tools/ant/types/selectors/PresentSelector.java23
-rw-r--r--src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java10
-rw-r--r--src/main/org/apache/tools/ant/util/CollectionUtils.java43
-rw-r--r--src/main/org/apache/tools/ant/util/JavaEnvUtils.java86
-rw-r--r--src/script/ant36
-rw-r--r--src/testcases/org/apache/tools/ant/BuildFileTest.java2
-rw-r--r--src/testcases/org/apache/tools/ant/DirectoryScannerTest.java36
-rw-r--r--src/testcases/org/apache/tools/ant/IncludeTest.java56
-rw-r--r--src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java9
-rw-r--r--src/testcases/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java18
-rw-r--r--src/testcases/org/apache/tools/ant/taskdefs/optional/XsltTest.java4
-rw-r--r--src/testcases/org/apache/tools/ant/types/selectors/BaseSelectorTest.java71
-rw-r--r--src/testcases/org/apache/tools/ant/types/selectors/DateSelectorTest.java111
-rw-r--r--src/testcases/org/apache/tools/ant/types/selectors/DependSelectorTest.java80
-rw-r--r--src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java37
-rw-r--r--src/testcases/org/apache/tools/ant/util/CollectionUtilsTest.java139
-rw-r--r--welcome.html124
216 files changed, 4574 insertions, 1684 deletions
diff --git a/LICENSE.dom b/LICENSE.dom
new file mode 100644
index 000000000..05013f198
--- /dev/null
+++ b/LICENSE.dom
@@ -0,0 +1,71 @@
+This license came from:
+http://www.w3.org/Consortium/Legal/copyright-software-19980720
+
+
+W3C® SOFTWARE NOTICE AND LICENSE
+Copyright © 1994-2001 World
+Wide Web Consortium, <a href="http://www.w3.org/">World
+Wide Web Consortium</a>, (<a href=
+"http://www.lcs.mit.edu/">Massachusetts Institute of
+Technology</a>, <a href="http://www.inria.fr/">Institut National de
+Recherche en Informatique et en Automatique</a>, <a href=
+"http://www.keio.ac.jp/">Keio University</a>). All Rights Reserved.
+http://www.w3.org/Consortium/Legal/
+
+This W3C work (including software, documents, or other related
+items) is being provided by the copyright holders under the
+following license. By obtaining, using and/or copying this work,
+you (the licensee) agree that you have read, understood, and will
+comply with the following terms and conditions:
+Permission to use, copy, modify, and distribute this software
+and its documentation, with or without modification,  for any
+purpose and without fee or royalty is hereby granted, provided that
+you include the following on ALL copies of the software and
+documentation or portions thereof, including modifications, that
+you make:
+
+The full text of this NOTICE in a location viewable to users of
+the redistributed or derivative work.
+
+Any pre-existing intellectual property disclaimers, notices, or
+terms and conditions. If none exist, a short notice of the
+following form (hypertext is preferred, text is permitted) should
+be used within the body of any redistributed or derivative code:
+"Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of
+Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
+http://www.w3.org/Consortium/Legal/"
+
+Notice of any changes or modifications to the W3C files,
+including the date changes were made. (We recommend you provide
+URIs to the location from which the code is derived.)
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND
+COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
+USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
+PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
+SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
+SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in
+advertising or publicity pertaining to the software without
+specific, written prior permission. Title to copyright in this
+software and any associated documentation will at all times remain
+with copyright holders.
+____________________________________
+This formulation of W3C's notice and license became active on
+August 14 1998 so as to improve compatibility with GPL. This
+version ensures that W3C software licensing terms are no more
+restrictive than GPL and consequently W3C software may be
+distributed in GPL packages. See the older formulation for the
+policy prior to this date. Please see our Copyright FAQ for common
+questions about using materials from
+our site, including specific terms and conditions for packages like
+libwww, Amaya, and Jigsaw.
+Other questions about this notice can be
+directed to site-policy@w3.org.
+
+webmaster
diff --git a/LICENSE.sax b/LICENSE.sax
new file mode 100644
index 000000000..006c924b2
--- /dev/null
+++ b/LICENSE.sax
@@ -0,0 +1,20 @@
+This license came from: http://www.megginson.com/SAX/copying.html
+ However please note future versions of SAX may be covered
+ under http://saxproject.org/?selected=pd
+
+
+This page is now out of date -- see the new SAX site at
+http://www.saxproject.org/ for more up-to-date
+releases and other information. Please change your bookmarks.
+
+
+SAX2 is Free!
+
+I hereby abandon any property rights to SAX 2.0 (the Simple API for
+XML), and release all of the SAX 2.0 source code, compiled code, and
+documentation contained in this distribution into the Public Domain.
+SAX comes with NO WARRANTY or guarantee of fitness for any
+purpose.
+
+David Megginson, david@megginson.com
+2000-05-05 \ No newline at end of file
diff --git a/README b/README
index 3ffeff84a..792e19e50 100644
--- a/README
+++ b/README
@@ -54,7 +54,7 @@
Documentation is available in HTML format, in the docs/ directory.
For information about building and installing Ant, see
- docs/manual/index.html
+ docs/manual/index.html
Licensing
diff --git a/WHATSNEW b/WHATSNEW
index 2b5f20c92..96c812145 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -13,8 +13,297 @@ properties files and output them instead of Ant's properties.
* <input> has a new attribute that allows you to specify a default value.
-Changes from Ant 1.4.1 to Ant 1.5
-=================================
+Changes from Ant 1.5beta3 to Ant 1.5
+====================================
+
+Changes that could break older environments:
+--------------------------------------------
+
+* The filesetmanifest attribute added to <jar> after the 1.4.1
+ release has been removed for now. This change may affect only
+ the 1.5Beta/1.6Alpha users. An attempt will be made to add this
+ feature back into Ant 1.6.
+
+Fixed bugs:
+-----------
+
+* <zip> and friends would always update existing archive if you set
+ the update attribute to true.
+
+* To support backward compatibility with older versions, <pathconvert>
+ will once again set the property, even if the result is the empty
+ string, unless the new 'setonempty' attribute is set to false|no|off
+ (default is "true").
+
+* The manifest task would crash XmlLogger
+
+Other changes:
+--------------
+
+* added **/.svn and **/.svn/** to the default excludes
+
+Changes from Ant 1.5beta2 to Ant 1.5beta3
+=========================================
+
+Changes that could break older environments:
+--------------------------------------------
+
+* Project.getBuildListeners now returns a clone of the listener
+ list. Changes to the returned list will not affect the listeners
+ currently attached to the Project. It also means that it is safe to
+ iterate over the returned list if listeners are added or removed
+ during the traversal.
+
+* <pvcs> default filenameformat has been different from Ant 1.4.1.
+ Now it is different from 1.5beta1 and 1.5beta2.
+
+* Some messages that are printed during startup will not be
+ written to the logfile specified via -logfile as they might destroy
+ the format of the file for special BuildLoggers (like XmlLogger).
+
+* <pathconvert> won't set the property if the result is the empty string.
+
+Fixed bugs:
+-----------
+
+* <available> could fail to find files or directories that happen to
+ start with the name of the project's basedir but are not children of
+ the basedir.
+
+* Nested <property>'s inside <ant> can now be overriden by subsequent
+ <ant> and <antcall> tasks.
+
+* <xslt>'s outputtype attribute wouldn't do anything.
+
+* <linecontains> filterreader could swallow lines.
+
+* <sequential> used to configure the tasks (set their attributes)
+ before the first task has been executed. This means that properties
+ that have been set by nested task seemed to be unset for the other
+ tasks in the same <sequential> element.
+
+* <javac>'s sourcepath setting has been ignored by some compiler
+ implementations.
+
+* <javadoc>'s packagelist attribute didn't work.
+
+* the plain mailer would always use port 25 in <mail>.
+
+* Ant's default logger could swallow empty lines.
+
+* ejbjar's iPlanet nested element now can process multiple descriptors.
+
+* IPlanetEjbc was looking in the wrong place for four iiop files.
+
+* <javac> would pass the -source switch to JDK 1.3's javac, even
+ though it doesn't support it.
+
+Other changes:
+--------------
+
+* <checksum> now uses a buffer (of configurable size).
+
+* The "Trying to override task definition" warning has been degraded
+ to verbose level if the two task definitions only differ in the class
+ loader instance that has loaded the definition.
+
+* Add a jvmargs to the ejbjar's weblogic element to allow additional
+ arguments to be provided to the VM runnign ejbc. Document the
+ jvmdebuglevel attribute which can be used to avoid warnings about
+ interface classess being found on the classpath. Document the new
+ <sysproperty> element which allows JVM properties to be defined.
+ Added an outputdir attribute to allow the destination to be a
+ directory into which the exploded jar is written.
+
+* ejbjar now supports Borland Enterprise Server 5 and Jonas 2.5
+
+Changes from Ant 1.5beta1 to Ant 1.5beta2
+=========================================
+
+Changes that could break older environments:
+--------------------------------------------
+
+* Properties will now be expanded in mail message bodies. This means
+that one $ sign will be stripped if your mail message contains the text
+$$.
+
+* org.apache.tools.ant.taskdefs.Expand no longer extends MatchingTask.
+
+* Available#setFile now again uses a File argument as it did in 1.4,
+this may break environments that have been adapted to the String
+argument version present in 1.5beta1.
+
+Fixed bugs:
+-----------
+* When <move> attempts a rename, it deletes the destination file, if it
+ exists, before renaming the source file. However, <move> was not
+ checking if the destination file was actually a directory before
+ trying to delete it.
+
+* Make CVS Tasks to work under Cygwin.
+
+* Fix LineContains to handle huge files elegantly without causing
+Stack Overflows.
+
+* if you ask for the "classic" compiler on Java1.4, you get upgraded to
+"modern" because there is no classic compiler any more.
+
+* the <http> condition was viewing 404 'not found' exceptions as success. Now
+it defaults to viewing any response >=400 as an error, and has an errorsBeginAt
+attribute you can use if you want a higher or lower value.
+
+* <get> throws a build exception on an http authorization error, unless you
+have set ignoreerrors to true.
+
+* <wsdltodotnet> was spelt in Wintel case: <WsdlToDotnet>. It is now lower
+case, though the old spelling is retained for anyone who used it.
+
+* Merging of Manifests in jar now works as documented.
+
+* paths that have been separated by colons would be incorrectly parsed
+on NetWare.
+
+* runant.pl now supports NetWare.
+
+* <tempfile> and <setproxy> tasks were in beta1, but not defined by
+default; They now are. <tempfile> fills a property with the name of a
+temporary file; <setproxy> lets you set the JVM's http, ftp and socks proxy
+settings.
+
+* <available classname="foo" ignoresystemclasses="true"> failed for
+JDK 1.1 and 1.2, even if the class could be found on the
+user-specified classpath.
+
+* <property environment=... /> now works on z/OS.
+
+* forked <javac> failed for the wrong reason on JDK 1.1 - Ant would
+use a temporary file to hold the names of the files to compile under
+some conditons, but 1.1 doesn't support this feature. Ant will no
+longer try this, but you may run into problems with the length of the
+command line now.
+
+* the refid attribute for <property>s nested into <ant> or <param>s
+nested into <antcall> didn't work.
+
+* <replaceregexp> didn't work for nested <fileset>s.
+
+* <javadoc> dropped sourcepath entries if no "interesting" .java
+source files could be found below them. This has been backwards
+incompatible and caused problems with custom doclets like xdoclet.
+
+* Using the doclet, docletpath or docletpathref attributes of
+<javadoc> may have caused NullPointerExceptions.
+
+* nested <filesets> of <javadoc> would include too much.
+
+* <dependset> will no longer choke on <targetfileset>s that point to
+non-existing directories.
+
+* <patch> didn't work at all.
+
+* <replace> and <replaceregexp> now fail if the file they are working
+on is locked.
+
+* <javadoc> would pick up the wrong executable in the combination JDK
+1.2 and AIX.
+
+Other changes:
+--------------
+
+* z/OS now gets detected by the os condition.
+
+* <fileset> and <dirset> now have an optional followsymlink attribute
+that can prevent Ant from following symbolic links on some platforms.
+
+* BeanShell is now supported in the <script> task.
+
+* <ejbjar> under Weblogic attempts to use the ejbc20 compiler for 2.0 beans
+ based on the deployment descriptor's DTD reference. Under weblogic 7.00 Beta
+ this ejbc class has been deprecated. To avoid the deprecation warning use
+ ejbcclass="weblogic.ejbc".
+
+* <ejbjar> will add a manifest to the generated jar based on the naming
+ convention in use. This overrides the manifest specified in the
+ <ejbjar> attribute
+
+
+Changes from Ant 1.4.1 to 1.5beta1
+==================================
+
+Changes that could break older environments:
+--------------------------------------------
+
+* Important: Single $ signs are no longer silently stripped!
+=======
+* Project.getBuildListeners now returns a clone of the listener
+ list. Changes to the returned list will not affect the listeners
+ currently attached to the Project. It also means that it is safe to
+ iterate over the returned list if listeners are added or removed
+ during the traversal.
+
+* <pvcs> default filenameformat has been different from Ant 1.4.1.
+ Now it is different from 1.5beta1 and 1.5beta2.
+
+* Some messages that are printed during startup will not be
+ written to the logfile specified via -logfile as they might destroy
+ the format of the file for special BuildLoggers (like XmlLogger).
+
+Fixed bugs:
+-----------
+
+* <available> could fail to find files or directories that happen to
+ start with the name of the project's basedir but are not children of
+ the basedir.
+
+* Nested <property>'s inside <ant> can now be overriden by subsequent
+ <ant> and <antcall> tasks.
+
+* <xslt>'s outputtype attribute wouldn't do anything.
+
+* <linecontains> filterreader could swallow lines.
+
+* <sequential> used to configure the tasks (set their attributes)
+ before the first task has been executed. This means that properties
+ that have been set by nested task seemed to be unset for the other
+ tasks in the same <sequential> element.
+
+* <javac>'s sourcepath setting has been ignored by some compiler
+ implementations.
+
+* <javadoc>'s packagelist attribute didn't work.
+
+* the plain mailer would always use port 25 in <mail>.
+
+* Ant's default logger could swallow empty lines.
+
+* ejbjar's iPlanet nested element now can process multiple descriptors.
+
+* IPlanetEjbc was looking in the wrong place for four iiop files.
+
+* <javac> would pass the -source switch to JDK 1.3's javac, even
+ though it doesn't support it.
+
+Other changes:
+--------------
+
+* <checksum> now uses a buffer (of configurable size).
+
+* The "Trying to override task definition" warning has been degraded
+ to verbose level if the two task definitions only differ in the class
+ loader instance that has loaded the definition.
+
+* Add a jvmargs to the ejbjar's weblogic element to allow additional
+ arguments to be provided to the VM runnign ejbc. Document the
+ jvmdebuglevel attribute which can be used to avoid warnings about
+ interface classess being found on the classpath. Document the new
+ <sysproperty> element which allows JVM properties to be defined.
+ Added an outputdir attribute to allow the destination to be a
+ directory into which the exploded jar is written.
+
+* ejbjar now supports Borland Enterprise Server 5 and Jonas 2.5
+
+Changes from Ant 1.5beta1 to Ant 1.5beta2
+=========================================
Changes that could break older environments:
--------------------------------------------
@@ -129,8 +418,38 @@ Changes from Ant 1.4.1 to 1.5beta1
Changes that could break older environments:
--------------------------------------------
+<<<<<<< WHATSNEW
* Important: Single $ signs are no longer silently stripped!
=======
+* The filesetmanifest attribute added to <jar> after the 1.4.1
+ release has been removed for now. This change may affect only
+ the 1.5Beta/1.6Alpha users. An attempt will be made to add this
+ feature back into Ant 1.6.
+
+Fixed bugs:
+-----------
+
+* <zip> and friends would always update existing archive if you set
+ the update attribute to true.
+
+* To support backward compatibility with older versions, <pathconvert>
+ will once again set the property, even if the result is the empty
+ string, unless the new 'setonempty' attribute is set to false|no|off
+ (default is "true").
+
+* The manifest task would crash XmlLogger
+
+Other changes:
+--------------
+
+* added **/.svn and **/.svn/** to the default excludes
+
+Changes from Ant 1.5beta2 to Ant 1.5beta3
+=========================================
+
+Changes that could break older environments:
+--------------------------------------------
+
* Project.getBuildListeners now returns a clone of the listener
list. Changes to the returned list will not affect the listeners
currently attached to the Project. It also means that it is safe to
@@ -144,6 +463,8 @@ Changes that could break older environments:
written to the logfile specified via -logfile as they might destroy
the format of the file for special BuildLoggers (like XmlLogger).
+* <pathconvert> won't set the property if the result is the empty string.
+
Fixed bugs:
-----------
@@ -431,7 +752,7 @@ Other changes:
* <ejbjar> now allows control over which additional classes and interfaces
are added to the generated EJB jars. A new attribute "dependency" can be
- defines which classes are added. The addition of classes now uses
+ defined which controls what classes are added. The addition of classes now uses
the Jakarta-BCEL library rather than reflection, meaning bean classes are
no longer loaded into Ant's JVM. The default dependency analyzer is known as
the ancestor analyzer. It provides the same behaviour as the 1.4.1 version of
@@ -465,7 +786,8 @@ Other changes:
* New tasks <replaceregexp>, <checksum>, <translate>, <waitfor>,
<manifest>, <vsscp>, <vssadd>, <vsscreate>, <splash>, <basename>, <dirname>,
- <concat>.
+ <concat>, <sourceoffsite>, <jarlib-available>, <jarlib-display>,
+ <jarlib-manifest>, <jarlib-resolve>.
* A new combined <mail> task, which replaces the old <mail> and
<mimemail> tasks, has been added. The <mimemail> task, and
diff --git a/build.xml b/build.xml
index 31260f678..9ba2a952e 100644
--- a/build.xml
+++ b/build.xml
@@ -27,6 +27,7 @@
<property name="chmod.fail" value="true" />
<property name="deprecation" value="false" />
<property name="optimize" value="true" />
+ <property name="javac.target" value="1.1" />
<property name="junit.fork" value="false" />
<property name="junit.filtertrace" value="off"/>
<property name="junit.summary" value="no"/>
@@ -135,6 +136,10 @@
unless="jdk1.2+" />
<exclude name="${optional.package}/ejb/IPlanet*.java"
unless="jdk1.2+" />
+ <exclude name="${optional.package}/ejb/Borland*.java"
+ unless="jdk1.2+" />
+ <exclude name="${optional.package}/j2ee/*.java"
+ unless="jdk1.2+" />
<!-- uses the context classloader -->
<exclude name="${optional.package}/junit/JUnitClassLoaderTest.java"
unless="jdk1.2+" />
@@ -320,6 +325,20 @@
<include name="${optional.package}/AbstractXSLTLiaisonTest*" />
<include name="${ant.package}/types/AbstractFileSetTest*" />
</patternset>
+
+ <!--
+ ===================================================================
+ Set up a patternsets that matches the parts of our JUnit testsuite
+ that may be useful for task developers.
+ ===================================================================
+ -->
+ <patternset id="useful.tests">
+ <include name="${ant.package}/BuildFileTest*" />
+ <include name="${regexp.package}/RegexpMatcherTest*" />
+ <include name="${regexp.package}/RegexpTest*" />
+ <include name="${optional.package}/AbstractXSLTLiaisonTest*" />
+ <include name="${ant.package}/types/AbstractFileSetTest*" />
+ </patternset>
<!--
===================================================================
@@ -559,6 +578,7 @@
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
+ target="${javac.target}"
optimize="${optimize}" >
<classpath refid="classpath" />
@@ -635,6 +655,8 @@
<fileset dir=".">
<include name="LICENSE" />
<include name="LICENSE.xerces" />
+ <include name="LICENSE.dom" />
+ <include name="LICENSE.sax" />
</fileset>
<mapper type="glob" from="*" to="*.txt" />
</copy>
@@ -656,7 +678,7 @@
<metainf dir="${build.dir}" includes="LICENSE.txt"/>
<manifest>
- <section name="${ant.package}">
+ <section name="${ant.package}/">
<attribute name="Extension-name"
value="org.apache.tools.ant" />
<attribute name="Specification-Title"
@@ -696,7 +718,7 @@
<metainf dir="${build.dir}" includes="LICENSE.txt"/>
<manifest>
- <section name="${optional.package}">
+ <section name="${optional.package}/">
<attribute name="Extension-name"
value="org.apache.tools.ant.taskdefs.optional" />
<attribute name="Specification-Title"
@@ -817,9 +839,12 @@
<include name="README"/>
<include name="LICENSE"/>
<include name="LICENSE.xerces"/>
+ <include name="LICENSE.dom"/>
+ <include name="LICENSE.sax"/>
<include name="TODO"/>
<include name="WHATSNEW"/>
<include name="KEYS"/>
+ <include name="welcome.html"/>
</fileset>
</copy>
@@ -901,6 +926,8 @@
<include name="README"/>
<include name="LICENSE"/>
<include name="LICENSE.xerces"/>
+ <include name="LICENSE.dom"/>
+ <include name="LICENSE.sax"/>
<include name="TODO"/>
<include name="WHATSNEW"/>
<include name="KEYS"/>
@@ -909,6 +936,7 @@
<include name="bootstrap.bat"/>
<include name="bootstrap.sh"/>
<include name="build.xml"/>
+ <include name="welcome.html"/>
</fileset>
</copy>
@@ -1147,6 +1175,7 @@
<javac srcdir="${tests.dir}"
destdir="${build.tests}"
debug="${debug}"
+ target="${javac.target}"
deprecation="${deprecation}" >
<classpath refid="tests-classpath" />
diff --git a/docs/ant_task_guidelines.html b/docs/ant_task_guidelines.html
index a9523f25b..6614f9d97 100644
--- a/docs/ant_task_guidelines.html
+++ b/docs/ant_task_guidelines.html
@@ -35,13 +35,13 @@ development, maintenance and code size reasons.
Execute will spawn off separate programs under all the platforms which
ant supports, dealing with Java version issues as well as platform
-issues. Always use this task to invoke other programs.
+issues. Always use this task to invoke other programs.
<h4>Java, ExecuteJava</h4>
These classes can be used to spawn Java programs in a separate VM (they
-use execute) or in the same VM -with or without a different classloader.
-When deriving tasks from this, it often benefits users to permit the
+use execute) or in the same VM -with or without a different classloader.
+When deriving tasks from this, it often benefits users to permit the
classpath to be specified, and for forking to be an optional attribute.
@@ -84,17 +84,16 @@ editors and platforms. Some IDEs (JEdit) can highlight tabs, to stop you
accidentally inserting them
<h2>Attributes and elements</h2>
-
Use the Ant introspection based mapping of attributes into Java datatypes,
rather than implementing all your attributes as setFoo(String) and doing
the mapping to Int, bool or file yourself. This saves work on your part,
-lets Java callers use you in a typesafe manner, and will let the Xdocs
-documentation generator work out what the parameters are.
-
+lets Java callers use you in a typesafe manner, and will let the Xdocs
+documentation generator work out what the parameters are.
+
<p>
The ant1.x tasks are very inconsistent regarding naming of attributes
--some tasks use <tt>source<tt>, others <tt>src</tt>tt>.
-Here is a list of preferred attribute names.
+-some tasks use <tt>source</tt>, others <tt>src</tt>.
+Here is a list of preferred attribute names.
<table>
<tr>
@@ -102,7 +101,7 @@ Here is a list of preferred attribute names.
failonerror
</td>
<td>
- boolean to control whether failure to execute should throw a
+ boolean to control whether failure to execute should throw a
<tt>BuildException</tt> or just print an error.
Parameter validation failures should always throw an error, regardless
of this flag
@@ -156,32 +155,32 @@ to their ant system configuration.
Keep member variables private. If read access by subclasses is required.
add accessor methods rather than change the accessiblity of the member.
This enables subclasses to access the contents, yet
-still be decoupled from the actual implementation.
+still be decoupled from the actual implementation.
<p>
The other common re-use mechanism in ant is for one task to create and
-configure another. This is fairly simple.
+configure another. This is fairly simple.
<h2>Do your own Dependency Checking</h2>
Make has the edge over Ant in its integrated dependency checking: the
command line apps make invokes dont need to do their own work. Ant tasks
-do have to do their own dependency work, but if this can be done then
+do have to do their own dependency work, but if this can be done then
it can be done well. A good dependency aware task can work out the dependencies
-without explicit dependency information in the build file, and be smart
+without explicit dependency information in the build file, and be smart
enough to work out the real dependencies, perhaps through a bit of file parsing.
The <tt>depends</tt> task is the best example of this. Some of the zip/jar
tasks are pretty good too, as they can update the archive when needed.
-Most tasks just compare source and destination timestamps and work from there.
+Most tasks just compare source and destination timestamps and work from there.
Tasks which don't do any dependency checking do not help users as much as
they can, because their needless work can trickle through the entire build, test
-and deploy process.
+and deploy process.
<h2>Support Java 1.1 through Java 1.4</h2>
Ant is designed to support Java1.1: to build on it, to run on it. Sometimes
functionality of tasks have to degrade in that environment -&lt;touch&gt;
-is a case in point- this is usually due to library limitations;
+is a case in point- this is usually due to library limitations;
such behaviour change must always be noted in the documentation.
<p>
What is problematic is code which is dependent on Java1.2 features
@@ -189,20 +188,20 @@ What is problematic is code which is dependent on Java1.2 features
These can not be used directly by any code and still be able to compile
and run on a Java 1.1 system. So please stick to the older collection
classes, and the older IO classes. If a new method in an existing class
-is to be used, it must be used via reflection and the
-<tt>NoSuchMethodException</tt> handled somehow.
+is to be used, it must be used via reflection and the
+<tt>NoSuchMethodException</tt> handled somehow.
<p>
-What if code simply does not work on Java1.1? It can happen. It will
-probably be OK to have the task as an optional task, with compilation
-restricted to Java1.2 or later through build.xml modifications.
+What if code simply does not work on Java1.1? It can happen. It will
+probably be OK to have the task as an optional task, with compilation
+restricted to Java1.2 or later through build.xml modifications.
Better still, use reflection to link to the classes at run time.
<p>
-Java 1.4 adds a new optional change to the language itself, the
+Java 1.4 adds a new optional change to the language itself, the
<tt>assert</tt> keyword, which is only enabled if the compiler is told
to compile 1.4 version source. Clearly with the 1.1 compatibility requirement,
Ant tasks can not use this keyword. They also need to move away from
using the JUnit <tt>assert()</tt> method and call <tt>assertTrue()</tt>
-instead.
+instead.
@@ -233,7 +232,7 @@ your task -feel free to do so!
<p>
A well written set of test cases will break the Ant task while it is in
-development, until the code is actually complete. And every bug which
+development, until the code is actually complete. And every bug which
surfaces later should have a test case added to demonstrate the problem,
and to fix it.
@@ -253,7 +252,7 @@ and patches do what they say. If you've got test cases it increases your
credibility significantly. To be precise, we hate submissions without
test cases, as it means we have to write them ourselves. This is
something that only gets done if we need the task or it is perceived as
-utterly essential to many users.
+utterly essential to many users.
<p>
@@ -323,7 +322,7 @@ Tasks calling such code can use the 'exec' or 'java' tasks to run the
programs, as you are just executing them at this point, not linking to
them.
<p>
-Even if we cannot include your task into the Apache codebase, we can
+Even if we cannot include your task into the Apache codebase, we can
still point to where you host it -just submit a diff to
xdocs/external.html pointing to your task.
@@ -337,14 +336,14 @@ was already implemented in a small corner of another task, or it has
been submitted by someone else and not committed. You can avoid this
by being aware of what is in the latest CVS tree -keep getting the daily
source updates, look at manual changes and subscribe to the ant-dev
-mailing list.
+mailing list.
<p>
If you are thinking of writing a task, posting a note on your thoughts
to the list can be informative -you well get other peoples insight and
maybe some half written task to do the basics, all without writing a
-line of code.
+line of code.
<h2>Submitting to Ant</h2>
@@ -357,7 +356,7 @@ It helps to be on this list, as you will see other submissions, and
any debate about your own submission.
<p>
-Patches to existing files should be generated with
+Patches to existing files should be generated with
<code>cvs diff -u filename</code>
and save the output to a file. If you want to get
the changes made to multiple files in a directory , just use <code>cvs
@@ -376,22 +375,22 @@ made.
New submissions should be proceeded with [SUBMIT]. The mailer-daemon
will reject any messages over 100KB, so any large update should be
zipped up. If your submission is bigger than that, why not break it up
-into separate tasks.
+into separate tasks.
<p>
-We also like submissions to be added to
+We also like submissions to be added to
<a href="http://nagoya.apache.org/bugzilla/">bugzilla</a>, so that they
dont get lost. Please submit them by first filing the report with a
meaningful name, then adding files as attachments. Use CVS diff files
please!
<p>
-If you hear nothing after a couple of weeks, remind the mailing list.
+If you hear nothing after a couple of weeks, remind the mailing list.
Sometimes really good submissions get lost in the noise of other issues.
-This is particularly the case just prior to a new point release of
+This is particularly the case just prior to a new point release of
the product. At that time anything other than bug fixes will tend
to be neglected.
-
+
<h2>Checklists</h2>
These are the things you should verify before submitting patches and new
@@ -401,14 +400,14 @@ can be addressed in the process. But by the time the code is committed,
everything including the documentation and some test cases will have
been done, so by getting them out the way up front can save time.
The committers look more favourably on patches and submissions with test
-cases, while documentation helps sell the reason for a task.
+cases, while documentation helps sell the reason for a task.
<h3>Checklist before submitting a patch</h3>
<ul>
<li>Added code complies with style guidelines
<li>Code compiles and runs on Java1.1
<li>New member variables are private, and provide public accessor methods
- if access is actually needed.
+ if access is actually needed.
<li>Existing test cases succeed.
<li>New test cases written and succeed.
<li>Documentation page extended as appropriate.
@@ -417,7 +416,7 @@ cases, while documentation helps sell the reason for a task.
<li>Message to ant-dev contains [PATCH], task name and patch reason in
subject.
<li>Message body contains a rationale for the patch.
-<li>Message attachment contains the patch file(s).
+<li>Message attachment contains the patch file(s).
</ul>
<h3>Checklist before submitting a new task</h3>
@@ -427,7 +426,7 @@ subject.
<li>Source code complies with style guidelines
<li>Code compiles and runs on Java1.1
<li>Member variables are private, and provide public accessor methods
- if access is actually needed.
+ if access is actually needed.
<li><i>Maybe</i> Task has failonerror attribute to control failure behaviour
<li>New test cases written and succeed
<li>Documentation page written
diff --git a/docs/manual/CoreTasks/concat.html b/docs/manual/CoreTasks/concat.html
index ce395c29d..2da8c2a64 100644
--- a/docs/manual/CoreTasks/concat.html
+++ b/docs/manual/CoreTasks/concat.html
@@ -51,7 +51,7 @@
<td valign="top">append</td>
<td valign="top">
Specifies whether or not the file specified by 'destfile'
- should be overwritten. Defaults to &quot;yes&quot;.
+ should be overwritten. Defaults to &quot;no&quot;.
</td>
<td valign="top" align="center">No</td>
</tr>
diff --git a/docs/manual/CoreTasks/conditions.html b/docs/manual/CoreTasks/conditions.html
index 40fa052c6..bade380f5 100644
--- a/docs/manual/CoreTasks/conditions.html
+++ b/docs/manual/CoreTasks/conditions.html
@@ -170,6 +170,13 @@ of 400 or greater are viewed as invalid.</p>
are detected</td>
<td align="center">No</td>
</tr>
+ <tr>
+ <td valign="top">errorsBeginAt</td>
+ <td valign="top">The lowest HTTP response code that signals an error;
+ by default '400'; server errors, not-authorized, not-found and the like
+ are detected</td>
+ <td align="center">No</td>
+ </tr>
</table>
<h4>socket</h4>
@@ -263,8 +270,8 @@ that is "true","yes", or "on"</p>
<pre>
&lt;istrue value=&quot;${someproperty}&quot; /&gt;
&lt;istrue value=&quot;false&quot; /&gt;
-</pre>
-
+</pre>
+
<h4>isfalse</h4>
<p>Tests whether a string is not true, the negation of &lt;istrue&gt;
</p>
@@ -283,8 +290,8 @@ that is "true","yes", or "on"</p>
<pre>
&lt;isfalse value=&quot;${someproperty}&quot; /&gt;
&lt;isfalse value=&quot;false&quot; /&gt;
-</pre>
-
+</pre>
+
<hr>
<p align="center">Copyright &copy; 2001-2002 Apache Software
Foundation. All rights Reserved.</p>
diff --git a/docs/manual/CoreTasks/jar.html b/docs/manual/CoreTasks/jar.html
index 927d61561..cb95053c6 100644
--- a/docs/manual/CoreTasks/jar.html
+++ b/docs/manual/CoreTasks/jar.html
@@ -31,9 +31,7 @@ multiple ones to merge together different trees of files into one JAR.
The extended fileset and groupfileset attributes from the zip task are
also available in the jar task.
See the <a href="zip.html">Zip</a> task for more details and examples.</p>
-<p>If the manifest is omitted, a simple one will be supplied by Ant.
-If there is a manifest or manifests in your set of files, these manifests can
-be used if <i>filesetmanifests</i> is set to <i>merge</i> or <i>mergewithoutmain</i>.</p>
+<p>If the manifest is omitted, a simple one will be supplied by Ant.</p>
<p>The <code>update</code> parameter controls what happens if the
JAR file already exists. When set to <code>yes</code>, the JAR file is
updated with the files specified. When set to <code>no</code> (the
@@ -122,19 +120,6 @@ being wrapped and continued on the next line.
<td valign="top" align="center">No</td>
</tr>
<tr>
- <td valign="top">filesetmanifest</td>
- <td valign="top">behavior when a Manifest is found in a zipfileset or
- zipgroupfileset file is found. Valid values are &quot;skip&quot;,
- &quot;merge&quot;, and &quot;mergewithoutmain&quot;. &quot;merge&quot;
- will merge all of manifests together, and merge this into any other
- specified manifests. &quot;mergewithoutmain&quot; merges everything
- but the Main section of the manifests. Default value is &quot;skip&quot;.
- <b>Note:</b> if this attribute's value is not &quot;skip&quot;, the
- created jar will not be readable by using java.util.jar.JarInputStream
- </td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
<td valign="top">update</td>
<td valign="top">indicates whether to update or overwrite
the destination file if it already exists.</td>
diff --git a/docs/manual/CoreTasks/pathconvert.html b/docs/manual/CoreTasks/pathconvert.html
index fa64e0639..e49e2fe53 100644
--- a/docs/manual/CoreTasks/pathconvert.html
+++ b/docs/manual/CoreTasks/pathconvert.html
@@ -72,6 +72,11 @@ drive letters to Unix paths, and vice-versa.</p>
<td valign="top" align="center">No; if omitted, a nested
<code>&lt;path&gt;</code> element must be supplied.</td>
</tr>
+ <td valign="top">setonempty</td>
+ <td valign="top">Should the property be set, even if the result
+ is the empty string?
+ <td valign="top" align="center">No; default is &quot;true&quot;.
+ </tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>map</h4>
diff --git a/docs/manual/CoreTasks/style.html b/docs/manual/CoreTasks/style.html
index 6f979ca3a..2bf74927a 100644
--- a/docs/manual/CoreTasks/style.html
+++ b/docs/manual/CoreTasks/style.html
@@ -23,13 +23,13 @@ finally with the <i>defaultexcludes</i> attribute, you can specify whether you
want to use default exclusions or not. See the section on <a
href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
inclusion/exclusion of files works, and how to write patterns.</p>
-<p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and supports all
- attributes of <code>&lt;fileset&gt;</code> (<code>dir</code> becomes <code>basedir</code>)
- as well as the nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>
+<p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and supports all
+ attributes of <code>&lt;fileset&gt;</code> (<code>dir</code> becomes <code>basedir</code>)
+ as well as the nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>
and <code>&lt;patternset&gt;</code> elements.</p>
-<p>This task supports the use of a nested &lt;param&gt; element which is used to pass values
+<p>This task supports the use of a nested &lt;param&gt; element which is used to pass values
to an &lt;xsl:param&gt; declaration.</p>
-<p>This task supports the use of a nested <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
+<p>This task supports the use of a nested <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
element which is used to perform Entity and URI resolution</p>
<p><i>&lt;style&gt; and &lt;xslt&gt; refer to the same Ant task and can be used interchangeably.</i></p>
<p>If you want to use Xalan-J 1 or XSL:P, you also need Ant's optional.jar</p>
@@ -54,7 +54,7 @@ element which is used to perform Entity and URI resolution</p>
</tr>
<tr>
<td valign="top">extension</td>
- <td valign="top">desired file extension to be used for the targets. If not
+ <td valign="top">desired file extension to be used for the targets. If not
specified, the default is &quot;.html&quot;.</td>
<td align="center" valign="top">No</td>
</tr>
@@ -68,7 +68,7 @@ element which is used to perform Entity and URI resolution</p>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
- <td valign="top">classpath</td>
+ <td valign="top">classpath</td>
<td valign="top">the classpath to use when looking up the XSLT
processor.</td>
<td align="center" valign="top">No</td>
@@ -89,39 +89,40 @@ element which is used to perform Entity and URI resolution</p>
<td valign="top">processor</td>
<td valign="top">name of the XSLT processor to use. Permissible values are
- &quot;trax&quot; for a TraX compliant processor,
+ &quot;trax&quot; for a TraX compliant processor (ie JAXP interface
+ implementation such as Xalan 2 or Saxon),
&quot;xslp&quot; for the XSL:P processor, &quot;xalan&quot; for
the Apache XML Xalan (version 1) processor the name of an
arbitrary XSLTLiaison class. Defaults to trax, followed by xalan
and then xslp (in that order). The first one found in your class
path is the one that is used.
- <em><strong>DEPRECATED</strong> - XSL:P is deprecated and will
- be removed in the next version. Use trax or xalan instead.</em>.
+ <em><strong>DEPRECATED</strong> - XSL:P and xalan are deprecated and no
+ more supported.</em>.
</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be included.
+ <td valign="top">comma- or space-separated list of patterns of files that must be included.
All files are included when omitted.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is taken to be
+ <td valign="top">the name of a file. Each line of this file is taken to be
an include pattern</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be excluded.
+ <td valign="top">comma- or space-separated list of patterns of files that must be excluded.
No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is taken to be
+ <td valign="top">the name of a file. Each line of this file is taken to be
an exclude pattern</td>
<td valign="top" align="center">No</td>
</tr>
@@ -133,24 +134,17 @@ element which is used to perform Entity and URI resolution</p>
</tr>
<tr>
<td valign="top">in</td>
- <td valign="top">specifies a single XML document to be styled. Should be used
+ <td valign="top">specifies a single XML document to be styled. Should be used
with the out attribute.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">out</td>
- <td valign="top">specifies the output name for the styled result from the
+ <td valign="top">specifies the output name for the styled result from the
in attribute.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
- <td valign="top">outputtype</td>
- <td valign="top">specifies the output method to be used. Only "xml" is
- guaranteed to be supported by all translators. Xalan2 supports "xml",
- "html", and "text"</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
<td valign="top">scanincludeddirectories</td>
<td valign="top">If any directories are matched by the
includes/excludes patterns, try to transform all files in these
@@ -161,32 +155,58 @@ element which is used to perform Entity and URI resolution</p>
<h3>Parameters specified as nested elements</h3>
<h4>classpath</h4>
<p>The classpath to load the processor from can be specified via a
-nested <code>&lt;classpath&gt;</code>, as well - that is, a
+nested <code>&lt;classpath&gt;</code>, as well - that is, a
<a href="../using.html#path">path</a>-like structure.</p>
+
<h4>xmlcatalog</h4>
-<p>The <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
+<p>The <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
element is used to perform Entity and URI resolution.</p>
+
<h4>param</h4>
<p>Param is used to pass a parameter to the XSL stylesheet.</p>
<h4>Parameters</h4>
<table width="60%" border="1" cellpadding="2" cellspacing="0">
- <tr>
+ <tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
- <tr>
+ <tr>
<td valign="top">name</td>
<td valign="top">Name of the XSL parameter</td>
<td align="center" valign="top">Yes</td>
</tr>
- <tr>
+ <tr>
<td valign="top">expression</td>
- <td valign="top">XSL expression to be placed into the param. To pass a text
+ <td valign="top">XSL expression to be placed into the param. To pass a text
value into the style sheet it needs to be escaped using single quotes.</td>
<td align="center" valign="top">Yes</td>
</tr>
</table>
+
+<h4>outputproperty ('trax' processors only)</h4>
+<p>Used to specify how you wish the result tree to be output
+as specified in the <a href="http://www.w3.org/TR/xslt#output">
+XSLT specifications</a>.
+<h4>Parameters</h4>
+<table width="60%" border="1" cellpadding="2" cellspacing="0">
+ <tr>
+ <td valign="top"><b>Attribute</b></td>
+ <td valign="top"><b>Description</b></td>
+ <td align="center" valign="top"><b>Required</b></td>
+ </tr>
+ <tr>
+ <td valign="top">name</td>
+ <td valign="top">Name of the property</td>
+ <td align="center" valign="top">Yes</td>
+ </tr>
+ <tr>
+ <td valign="top">value</td>
+ <td valign="top">value of the property.</td>
+ <td align="center" valign="top">Yes</td>
+ </tr>
+</table>
+
<h3>Examples</h3>
<blockquote>
<pre>
@@ -201,7 +221,7 @@ element is used to perform Entity and URI resolution.</p>
&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt;
&lt;xmlcatalog&gt;
- &lt;dtd
+ &lt;dtd
publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot;
location=&quot;com/arielpartners/knowledgebase/dtd/article.dtd&quot;/&gt;
&lt;/xmlcatalog&gt;
@@ -216,6 +236,17 @@ element is used to perform Entity and URI resolution.</p>
element &lt;xsl:param name=&quot;date&quot;/&gt;, the variable
<code>$date</code> will subsequently have the value 07-01-2000.
</p>
+
+ <h4>Using output properties</h4>
+<pre>&lt;xslt in=&quot;doc.xml&quot; out=&quot;build/doc/output.xml&quot;
+ style=&quot;style/apache.xsl&quot;&gt;
+ &lt;outputproperty name=&quot;method&quot; value=&quot;xml&quot;;/&gt;
+ &lt;outputproperty name=&quot;standalone&quot; value=&quot;yes&quot;/&gt;
+ &lt;outputproperty name=&quot;encoding&quot; value=&quot;iso8859_1&quot;/&gt;
+ &lt;outputproperty name=&quot;indent&quot; value=&quot;yes&quot;/&gt;
+&lt;/xslt&gt;</pre>
+
+
</blockquote>
<hr>
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
diff --git a/docs/manual/Integration/VAJAntTool.html b/docs/manual/Integration/VAJAntTool.html
index edbab0f21..0a9915ee9 100644
--- a/docs/manual/Integration/VAJAntTool.html
+++ b/docs/manual/Integration/VAJAntTool.html
@@ -57,8 +57,8 @@ support VAJ has not (out of the box).</P>
To Tool API'. Therefore builds containing VAJ tasks can also be executed
from the command line (Kudos to Glenn McAllister for describing the
concept and providing source code at
- <A href="http://www7.software.ibm.com/vad.nsf/Data/Document4366">
- http://www7.software.ibm.com/vad.nsf/Data/Document4366</A>.&nbsp;
+ <A href="http://www7.software.ibm.com/vad.nsf/Data/Document4366">
+ http://www7.software.ibm.com/vad.nsf/Data/Document4366</A>.&nbsp;
<LI>It is possible to cancel a running&nbsp;build
executed from the plugin
@@ -125,14 +125,7 @@ workspace.</P>
<td valign="top">version</TD>
<td valign="top">name of the requested version</TD>
<td valign="top" align="middle">yes</TD></TR>
- <tr>
- <td valign="top">remote</TD>
- <td valign="top">
- <P>name and port of a remote tool server. (format:
- &lt;servername&gt;:&lt;port no&gt;).<BR>If this
- attribute is set, the tasks will&nbsp;be executed on the specified tool
- server.&nbsp;</P></TD>
- <td valign="top" align="middle">no</TD></TR></TABLE>
+ </TABLE>
<h3>Example</H3>
<pre>&lt;vajload remote="localhost:32767"&gt;
@@ -246,11 +239,11 @@ This example exports all packages in the VAJ project 'MyProject', except
packages starting with 'test'.
<h3>Default Excludes</H3>
The default excludes are:<br>
-<pre> IBM*/**
- Java class libraries/**
- Sun class libraries*/**
- JSP Page Compile Generated Code/**
- VisualAge*/**
+<pre> IBM*/**
+ Java class libraries/**
+ Sun class libraries*/**
+ JSP Page Compile Generated Code/**
+ VisualAge*/**
</PRE>
<hr>
<h2><a name="vajimport"></A>VAJImport</H2>
@@ -273,17 +266,17 @@ from the file system into VAJ. These imports can be specified with a fileset.
<td valign="top" align="middle">yes</TD></TR>
<tr>
<td valign="top">importSources</TD>
- <td valign="top">export source files (default:
+ <td valign="top">import source files (default:
"yes")</TD>
<td valign="top" align="middle">no</TD></TR>
<tr valign="top">
<td valign="top">importResources</TD>
- <td valign="top">export resource files (default:
+ <td valign="top">import resource files (default:
"yes")</TD>
<td valign="top" align="middle">no</TD></TR>
<tr valign="top">
<td valign="top">importClasses</TD>
- <td valign="top">export class files (default: "no")</TD>
+ <td valign="top">import class files (default: "no")</TD>
<td valign="top" align="middle">no</TD></TR>
<tr>
<td valign="top">remote</TD>
@@ -369,8 +362,8 @@ install directory. If You have installed it elsewhere, adapt the pathes below.
For
a good introduction into the VAJ Remote Tool Access see the
great introduction from Glenn McAllister at
- <A href="http://www7.software.ibm.com/vad.nsf/Data/Document4366">
- http://www7.software.ibm.com/vad.nsf/Data/Document4366</A>.&nbsp;It
+ <A href="http://www7.software.ibm.com/vad.nsf/Data/Document4366">
+ http://www7.software.ibm.com/vad.nsf/Data/Document4366</A>.&nbsp;It
is highly recommended to read this article before doing the installation (to
understand what you do :-) ).
<LI>insert the following lines into
diff --git a/docs/manual/OptionalTasks/ejb.html b/docs/manual/OptionalTasks/ejb.html
index 5675fbd63..bfd65bacb 100644
--- a/docs/manual/OptionalTasks/ejb.html
+++ b/docs/manual/OptionalTasks/ejb.html
@@ -169,6 +169,13 @@ or are out of date, the ejbc tool is run to generate new versions.</p>
processed.</td>
<td valign="top" align="center">No</td>
</tr>
+ <tr>
+ <td valign="top">keepgenerated</td>
+ <td>Controls whether ejbc will keep the
+ intermediate Java files used to build the class files. This can be
+ useful when debugging.</td>
+ <td>No, defaults to false.</td>
+ </tr>
</table>
<h3>Examples</h3>
<pre>&lt;ejbc descriptors=&quot;${gen.classes}&quot;
@@ -323,7 +330,7 @@ and hence ant, will not complete until the weblogic instance is stopped.</p>
</tr>
<tr>
<td valign="top">BEA Home</td>
- <td valign="top">The location of the BEA Home qwhere the server's config is defined.
+ <td valign="top">The 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.0</td>
<td valign="top" align="center">N/A</td>
@@ -407,8 +414,8 @@ and hence ant, will not complete until the weblogic instance is stopped.</p>
<td valign="top" align="center">No</td>
</tr>
<tr>
- <td valign="top">args</td>
- <td valign="top">Additional argument string passed to the Weblogic instance.</td>
+ <td valign="top">weblogicMainClass</td>
+ <td valign="top">name of the main class for weblogic</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No</td>
</tr>
@@ -473,7 +480,7 @@ specify the BEA Home to have this task work correctly under 6.0</p>
<tr>
<td valign="top">classpath</td>
<td valign="top">The classpath to be used with the Java Virtual Machine that runs the Weblogic
- Shutdown comment.</td>
+ Shutdown command.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
@@ -502,7 +509,7 @@ specify the BEA Home to have this task work correctly under 6.0</p>
<h3>Nested Element</h3>
-<p>The classpath of the welstop task can be set by a &lt;classpath&gt; nested element.</p>
+<p>The classpath of the wlstop task can be set by a &lt;classpath&gt; nested element.</p>
<h3>Examples</h3>
@@ -1002,8 +1009,8 @@ define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.</p>
the weblogic class hierarchy. This should not be necessary if you
have weblogic in your classpath. If you do not, you should use a
nested &lt;dtd&gt; element, described above. If you do choose
- to use an attribute, you should use the ejbdtd attribute in
- preference to this one, anyway.
+ to use an attribute, you should use a
+ nested &lt;dtd&gt; element.
</td>
<td valign="top" align="center">No.</td>
</tr>
@@ -1071,7 +1078,7 @@ define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.</p>
<tr>
<td valign="top">outputdir</td>
<td valign="top">If set ejbc will be given this directory as the output
- desitination rather than a jar file. This allows for the
+ destination rather than a jar file. This allows for the
generation of &quot;exploded&quot; jars.
</td>
<td valign="top" align="center">No.</td>
@@ -1286,7 +1293,7 @@ the classpath of the ejbdeploy tool (look at the examples below).
<td valign="top" align="center">No, defaults to false</td>
</tr>
<tr>
- <td valign="top">alwaysrebuild</td>
+ <td valign="top">rebuild</td>
<td valign="top">This controls whether ejbdeploy is called although no changes
have occurred.</td>
<td valign="top" align="center">No, defaults to false</td>
@@ -1308,6 +1315,7 @@ the classpath of the ejbdeploy tool (look at the examples below).
<li>SQL92</li> <li>SQL99</li> <li>DB2UDBWIN_V71</li>
<li>DB2UDBOS390_V6</li> <li>DB2UDBAS400_V4R5</li> <li>ORACLE_V8</li>
<li>INFORMIX_V92</li> <li>SYBASE_V1192</li> <li>MYSQL_V323</li>
+ <li>MSSQLSERVER_V7</li>
</ul>
This is also used to determine the name of the Map.mapxmi and
Schema.dbxmi files, for example Account-DB2UDBWIN_V71-Map.mapxmi
@@ -1623,6 +1631,7 @@ documentation for more details.</p>
<tr>
<td valign="Top">verbose</td>
<td valign="Top">Indicates whether or not to use -verbose switch. If
+
omitted, it defaults to <code>false</code>.</td>
<td align="Center" valign="Top">No</td>
</tr>
diff --git a/docs/manual/OptionalTasks/jpcoverage.html b/docs/manual/OptionalTasks/jpcoverage.html
index d1def891e..51c3ec5f8 100644
--- a/docs/manual/OptionalTasks/jpcoverage.html
+++ b/docs/manual/OptionalTasks/jpcoverage.html
@@ -54,65 +54,57 @@ Perform code covering functions by comparing source code line execution to the p
</tr>
<tr>
<td valign="top">home</td>
- <td valign="top">The directory where is intalled JProbe.</td>
+ <td valign="top">The directory where JProbe is intalled.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">vm</td>
<td valign="top">
- Indicates which virtual machine to run.
- Must be one of "jdk117", "jdk118" or "java2".If "java2" is specified, the user is
- also required to specify a path via <tt>javahome</tt>, otherwise it will check if
- the current executing VM is 1.2+ and use its java.home property to determine its
- location.
- in the registry for the default 1.2.x (Java 2) VM.</td>
+ Indicates which virtual machine to run.
+ Must be one of "jdk117", "jdk118" or "java2".If "java2" is specified, the user is
+ also required to specify a path via <tt>javaexe</tt>, otherwise it will check if
+ the current executing VM is 1.2+ and use its java.home property to determine its
+ location.</td>
<td align="center" valign="top">No, default to embedded VM if 1.2+</td>
</tr>
<tr>
- <td valign="top">javahome</td>
- <td valign="top">For Java 2 only, specifies the path of the jdk1.2.x virtual
- machine to be used. This is only valid when specifying the <tt>vm="java2"</tt>.</td>
- <td align="center" valign="top">No, use only for java2</td>
- </tr>
- <tr>
<td valign="top">javaexe</td>
- <td valign="top">Similar to <tt>javahome</tt>, except this is the path to
- the java executable.</td>
- <td align="center" valign="top">No, use only for java2</td>
+ <td valign="top">The path to the java executable.</td>
+ <td align="center" valign="top">No, use only for java2 vm.</td>
</tr>
<tr>
<td valign="top">applet</td>
<td valign="top">Run an applet. The default is false, unless the file under
- analysis ends with htm or html.</td>
+ analysis ends with htm or html.</td>
<td align="center" valign="top">No, default is "false".</td>
</tr>
<tr>
<td valign="top">seedname</td>
<td valign="top">Seed name for the temporary snapshot files (files will be named
- seed.jpc, seed1.jpc, seed2.jpc, ...)</td>
+ seed.jpc, seed1.jpc, seed2.jpc, ...)</td>
<td align="center" valign="top">No, default to &quot;snapshot&quot;</td>
</tr>
<tr>
<td valign="top">exitprompt</td>
<td valign="top">Toggles display of the console prompt: &quot;Press Enter to close
- this window.&quot; &quot;always&quot;: Always displays the prompt. &quot;never&quot;: Never displays the
- prompt. &quot;error&quot;: Only displays prompt after an error.</td>
+ this window.&quot; &quot;always&quot;: Always displays the prompt. &quot;never&quot;: Never displays the
+ prompt. &quot;error&quot;: Only displays prompt after an error.</td>
<td align="center" valign="top">No, default is "never"</td>
</tr>
<tr>
<td valign="top">finalsnapshot</td>
<td valign="top">Type of snapshot to send at program termination. Must be one
- of &quot;none&quot;,&quot;coverage&quot;,&quot;all&quot;</td>
+ of &quot;none&quot;,&quot;coverage&quot;,&quot;all&quot;</td>
<td align="center" valign="top">No, default to &quot;coverage&quot;</td>
</tr>
<tr>
<td valign="top">recordfromstart</td>
<td valign="top">Must be one of "coverage", "all", "none". If you want
- Coverage to start analyzing as soon as the program begins to run, use "all".
- If not, select "none".</td>
+ Coverage to start analyzing as soon as the program begins to run, use "all".
+ If not, select "none".</td>
<td align="center" valign="top">No, default to "coverage"</td>
</tr>
<tr>
@@ -123,8 +115,8 @@ Perform code covering functions by comparing source code line execution to the p
<tr>
<td valign="top">snapshotdir</td>
<td valign="top">The path to the directory where snapshot files are stored.
- Choose a directory that is reachable by both the remote and local computers,
- and enter the same path on the command line and in the viewer.</td>
+ Choose a directory that is reachable by both the remote and local computers,
+ and enter the same path on the command line and in the viewer.</td>
<td align="center" valign="top">No, default to current directory</td>
</tr>
<tr>
@@ -135,7 +127,7 @@ Perform code covering functions by comparing source code line execution to the p
<tr>
<td valign="top">tracknatives</td>
<td valign="top">Test native methods. Note that testing native methods with
- Java 2 disables the JIT</td>
+ Java 2 disables the JIT</td>
<td align="center" valign="top">No, default to &quot;false&quot;.</td>
</tr>
<tr>
@@ -214,14 +206,14 @@ The syntax is filters is similar to a <a href="../CoreTypes/fileset.html">filese
</tr>
<tr>
<td valign="top">defaultexclude</td>
- <td valign="top">As a default, the coverage exclude all classes and methods.
+ <td valign="top">As a default, the coverage excludes all classes and methods.
Default filters are equivalent to
<pre>
&lt;filters&gt;
&lt;exclude class=&quot;*&quot; method=&quot;*&quot;/&gt;
&lt;/filters&gt;
-</pre>
- </td>
+</pre>
+ </td>
<td align="center">No, default to "true"</td>
</tr>
</table>
@@ -239,12 +231,17 @@ with a <tt>name</tt> attribute.
<tr>
<td valign="top">class</td>
<td valign="top">The class mask as a simple regular expression</td>
- <td align="center">No, default to *</td>
+ <td align="center">No, defaults to "*"</td>
</tr>
<tr>
<td valign="top">method</td>
<td valign="top">The method mask as a simple regular expression</td>
- <td align="center">No, default to *</td>
+ <td align="center">No, defaults to "*"</td>
+ </tr>
+ <tr>
+ <td valign="top">enabled</td>
+ <td valign="top">is the filter enabled?</td>
+ <td align="center">No, defaults to true</td>
</tr>
</table>
</blockquote>
@@ -280,21 +277,21 @@ on method) and it has the following attributes:
<tr>
<td valign="top">name</td>
<td valign="top">The name of the method(s) as a regular expression. The name
- is the fully qualified name on the form <tt>package.classname.method</tt></td>
+ is the fully qualified name on the form <tt>package.classname.method</tt></td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">event</td>
<td valign="top">the event on the method that will trigger the action. Must be
- &quot;enter&quot; or &quot;exit&quot;.</td>
+ &quot;enter&quot; or &quot;exit&quot;.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">action</td>
<td valign="top">the action to execute. Must be one of &quot;clear&quot;,
- &quot;pause&quot;, &quot;resume&quot;, &quot;snapshot&quot;, &quot;suspend&quot;,
- or &quot;exit&quot;. They respectively clear recording, pause recording,
- resume recording, take a snapshot, suspend the recording and exit the program.
+ &quot;pause&quot;, &quot;resume&quot;, &quot;snapshot&quot;, &quot;suspend&quot;,
+ or &quot;exit&quot;. They respectively clear recording, pause recording,
+ resume recording, take a snapshot, suspend the recording and exit the program.
</td>
<td align="center" valign="top">Yes</td>
</tr>
@@ -323,26 +320,26 @@ same class.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
- <td width="12%" valign="top"><b>Attribute</b></td>
- <td width="78%" valign="top"><b>Description</b></td>
- <td width="10%" valign="top"><b>Required</b></td>
+ <td width="12%" valign="top"><b>Attribute</b></td>
+ <td width="78%" valign="top"><b>Description</b></td>
+ <td width="10%" valign="top"><b>Required</b></td>
</tr>
<tr>
- <td valign="top">home</td>
- <td valign="top">The directory where is installed JProbe.</td>
+ <td valign="top">home</td>
+ <td valign="top">The directory where JProbe is installed.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
- <td valign="top">tofile</td>
- <td valign="top">the output filename that will be the result
- of the name.</td>
- <td align="center" valign="top">Yes</td>
+ <td valign="top">tofile</td>
+ <td valign="top">the output filename that will be the result
+ of the name.</td>
+ <td align="center" valign="top">Yes</td>
</tr>
<tr>
- <td valign="top">verbose</td>
- <td valign="top">Perform the merge in verbose mode giving
- details about the snapshot processing.</td>
- <td align="center" valign="top">No. Default to false</td>
+ <td valign="top">verbose</td>
+ <td valign="top">Perform the merge in verbose mode giving
+ details about the snapshot processing.</td>
+ <td align="center" valign="top">No. Default to false</td>
</tr>
</table>
@@ -377,47 +374,47 @@ Oro</a> in Ant classpath, to run the <tt>reference</tt> feature.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
- <td width="12%" valign="top"><b>Attribute</b></td>
- <td width="78%" valign="top"><b>Description</b></td>
- <td width="10%" valign="top"><b>Required</b></td>
+ <td width="12%" valign="top"><b>Attribute</b></td>
+ <td width="78%" valign="top"><b>Description</b></td>
+ <td width="10%" valign="top"><b>Required</b></td>
</tr>
<tr>
- <td valign="top">home</td>
- <td valign="top">The directory where is intalled JProbe.</td>
+ <td valign="top">home</td>
+ <td valign="top">The directory where JProbe is intalled.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
- <td valign="top">format</td>
- <td valign="top">The format of the generated report. Must be &quot;xml&quot;, &quot;html&quot; or &quot;text&quot;</td>
- <td align="center" valign="top">No, default to &quot;html&quot;</td>
+ <td valign="top">format</td>
+ <td valign="top">The format of the generated report. Must be &quot;xml&quot;, &quot;html&quot; or &quot;text&quot;</td>
+ <td align="center" valign="top">No, default to &quot;html&quot;</td>
</tr>
<tr>
- <td valign="top">type</td>
- <td valign="top">The type of report to be generated. Must be &quot;executive&quot;,
- &quot;summary&quot;, &quot;detailed&quot; or &quot;verydetailed&quot;</td>
- <td align="center" valign="top">No. Default to &quot;detailed&quot;</td>
+ <td valign="top">type</td>
+ <td valign="top">The type of report to be generated. Must be &quot;executive&quot;,
+ &quot;summary&quot;, &quot;detailed&quot; or &quot;verydetailed&quot;</td>
+ <td align="center" valign="top">No. Default to &quot;detailed&quot;</td>
</tr>
<tr>
- <td valign="top">percent</td>
- <td valign="top">A numeric value for the threshold for printing methods. Must
- be between 0 and 100.</td>
- <td align="center" valign="top">No, default to 100</td>
+ <td valign="top">percent</td>
+ <td valign="top">A numeric value for the threshold for printing methods. Must
+ be between 0 and 100.</td>
+ <td align="center" valign="top">No, default to 100</td>
</tr>
<tr>
- <td valign="top">snapshot</td>
- <td valign="top">The name of the snapshot file that is the source to the report.</td>
- <td align="center" valign="top">Yes</td>
+ <td valign="top">snapshot</td>
+ <td valign="top">The name of the snapshot file that is the source to the report.</td>
+ <td align="center" valign="top">Yes</td>
</tr>
<tr>
- <td valign="top">tofile</td>
- <td valign="top">The name of the generated output file</td>
- <td align="center" valign="top">Yes</td>
+ <td valign="top">tofile</td>
+ <td valign="top">The name of the generated output file</td>
+ <td align="center" valign="top">Yes</td>
</tr>
<tr>
- <td valign="top">includesource</td>
- <td valign="top">Include text of the source code lines. Only applies to
+ <td valign="top">includesource</td>
+ <td valign="top">Include text of the source code lines. Only applies to
format=&quot;xml&quot; and type=&quot;verydetailed&quot;</td>
- <td align="center" valign="top">No. Defaults to &quot;yes&quot;</td>
+ <td align="center" valign="top">No. Defaults to &quot;yes&quot;</td>
</tr>
</table>
@@ -526,7 +523,7 @@ one for JUnit. It needs either Xalan 1.2.2 or Xalan 2.x.</p>
</p>
<pre>&lt;style processor=&quot;xalan&quot; in=&quot;./reports/xml/results.xml&quot; out=&quot;./reports/html/dummy.file&quot;
style=&quot;${ant.home}/etc/coverage-frames.xsl&quot;&gt;
- &lt;param name=&quot;output.dir&quot; expression=&quot;'${basedir}/reports/html'&quot;/&gt;
+ &lt;param name=&quot;output.dir&quot; expression=&quot;'${basedir}/reports/html'&quot;/&gt;
&lt;/style&gt;</pre>
<p>Xalan 2.x (note the parameter without single quote)</p>
<pre>&lt;style processor=&quot;trax&quot; in=&quot;./reports/xml/results.xml&quot; out=&quot;./reports/html/dummy.file&quot;
@@ -535,7 +532,7 @@ one for JUnit. It needs either Xalan 1.2.2 or Xalan 2.x.</p>
&lt;/style&gt;</pre>
<hr>
-<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
+<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p>
</body>
</html>
diff --git a/docs/manual/OptionalTasks/jspc.html b/docs/manual/OptionalTasks/jspc.html
index 51170e317..635448fa2 100644
--- a/docs/manual/OptionalTasks/jspc.html
+++ b/docs/manual/OptionalTasks/jspc.html
@@ -174,10 +174,6 @@ classpath.
<h4>classpathref</h4>
a reference to an existing classpath
-<h4>compilerclasspath</h4>
-
-The classpath used to locate an optional compiler adapter specified by
-<code>compiler</code>
<h4>webapp</h4>
Instructions to jasper to build an entire web application.
The base directory must have a WEB-INF subdirectory beneath it.
diff --git a/docs/manual/OptionalTasks/perforce.html b/docs/manual/OptionalTasks/perforce.html
index d9cd1a8f8..af8c11df7 100644
--- a/docs/manual/OptionalTasks/perforce.html
+++ b/docs/manual/OptionalTasks/perforce.html
@@ -279,8 +279,8 @@ although P4Edit can open files to the default change, P4Submit cannot yet submi
<h3>Examples</h3>
<pre>
&lt;p4edit
- view=&quot;//depot/projects/projectfoo/main/src/Blah.java...&quot;
- change=&quot;${p4.change}&quot; /&gt;
+ view=&quot;//depot/projects/projectfoo/main/src/Blah.java...&quot;
+ change=&quot;${p4.change}&quot; /&gt;
</pre>
<hr>
diff --git a/docs/manual/OptionalTasks/pvcstask.html b/docs/manual/OptionalTasks/pvcstask.html
index 719ffdd11..d6c98ab17 100644
--- a/docs/manual/OptionalTasks/pvcstask.html
+++ b/docs/manual/OptionalTasks/pvcstask.html
@@ -16,7 +16,7 @@ by
<li>Don Jeffery (<a href="mailto:donj@apogeenet.com">donj@apogeenet.com</a>)</li>
</ul>
Version 1.1 - 2001/06/27<br>
-<p>Problems with UNC pathnames and the use of () in paths are fixed and an updateonly
+<p>Problems with UNC pathnames and the use of () in paths are fixed and an updateonly
argument introduced.</p>
Version 1.0 - 2001/01/31<br>
<p>Initial release.</p>
@@ -34,7 +34,7 @@ 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 <a href="http://www.merant.com/products/pvcs">Merant</a>.
<br>
-Before using this tag, the user running ant must have access to the commands
+Before using this tag, 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.
<br>
@@ -88,8 +88,8 @@ specified)</td>
<tr>
<td VALIGN=TOP WIDTH="12%">promotiongroup</td>
-<td VALIGN=TOP WIDTH="78%">Only files within this promotion group are extracted. Using
-both the <i>label</i> and the <i>promotiongroup</i> tag will cause the files in the
+<td VALIGN=TOP WIDTH="78%">Only files within this promotion group are extracted. Using
+both the <i>label</i> and the <i>promotiongroup</i> tag will cause the files in the
promotion group and with that label to be extracted.
</td>
@@ -125,34 +125,34 @@ tag expects the executables to be found using the PATH environment variable.</td
<td VALIGN=TOP WIDTH="10%">No</td>
</tr>
- <tr>
+ <tr>
<td VALIGN=TOP WIDTH="12%">ignorereturncode</td>
- <td VALIGN=TOP WIDTH="78%">If set to <i>true</i> the return value from executing
+ <td VALIGN=TOP WIDTH="78%">If set to <i>true</i> the return value from executing
the pvcs commands are ignored.</td>
<td VALIGN=TOP WIDTH="10%">No</td>
</tr>
- <tr>
+ <tr>
<td VALIGN=TOP WIDTH="12%">updateonly</td>
- <td VALIGN=TOP WIDTH="78%">If set to <i>true</i> files are gotten only if
+ <td VALIGN=TOP WIDTH="78%">If set to <i>true</i> files are gotten only if
newer than existing local files.</td>
<td VALIGN=TOP WIDTH="10%">No</td>
</tr>
- <tr>
+ <tr>
<td valign="TOP">filenameformat</td>
<td valign="TOP">The format of your folder names in a
format suitable for <code>java.text.MessageFormat</code>.
- Index 1 of the format will be used as the file name.
- Defaults to <code>{0}-arc({1})</code>.</td>
+ Defaults to <code>{0}-arc({1})</code>. Repositories where
+ the archive extension is not <code>-arc</code> should set
+ this.</td>
<td valign="TOP">No</td>
</tr>
- <tr>
+ <tr>
<td valign="TOP">linestart</td>
- <td valign="TOP">What a valid return value from PVCS looks like
- when it describes a file. Defaults to <code>&quot;P:</code>.
- If you are not using an UNC name for your repository and the
- drive letter <code>P</code> is incorrect for your setup, you may
- need to change this value, UNC names will always be
- accepted.</td>
+ <td valign="TOP">Used to parse the output of the pcli
+ command. It defaults to <code>&quot;P:</code>. 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.</td>
<td valign="TOP">No</td>
</tr>
</table>
diff --git a/docs/manual/OptionalTasks/replaceregexp.html b/docs/manual/OptionalTasks/replaceregexp.html
index 19c6d3e53..1a120a777 100644
--- a/docs/manual/OptionalTasks/replaceregexp.html
+++ b/docs/manual/OptionalTasks/replaceregexp.html
@@ -66,10 +66,10 @@ We <b>strongly</b> recommend that you use Jakarta Oro.
<td valign="top">flags</td>
<td valign="top">The flags to use when matching the regular expression. For more
information, consult the Perl5 syntax<br />
- g --> Global replacement. Replace all occurences found<br />
- i --> Case Insensitive. Do not consider case in the match<br />
- 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.<br />
- 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.<br />
+ g : Global replacement. Replace all occurences found<br />
+ i : Case Insensitive. Do not consider case in the match<br />
+ 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.<br />
+ 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.<br />
<td valign="top" align="center">No</td>
</tr>
<tr>
diff --git a/docs/manual/OptionalTasks/rpm.html b/docs/manual/OptionalTasks/rpm.html
index a1fc9457c..c8470b495 100644
--- a/docs/manual/OptionalTasks/rpm.html
+++ b/docs/manual/OptionalTasks/rpm.html
@@ -37,7 +37,7 @@
</tr>
<tr>
<td valign="top">cleanBuildDir</td>
- <td valign="top">his will remove the generated files in the BUILD
+ <td valign="top">This will remove the generated files in the BUILD
directory.</td>
<td align="center" valign="top">No</td>
</tr>
@@ -47,6 +47,12 @@ directory.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
+ <td valign="top">removeSource</td>
+ <td valign="top"> Flag (optional, default=false)
+ to remove the sources after the build.
+ See the the <tt>--rmsource</tt> option of rpmbuild.</td>
+ <td align="center" valign="top">No</td>
+ </tr> <tr>
<td valign="top">command</td>
<td valign="top">very similar idea to the cvs task. the default is "-bb"</td>
<td align="center" valign="top">No</td>
@@ -59,7 +65,7 @@ directory.</td>
</table>
<hr>
-<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
+<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p>
</body>
diff --git a/docs/manual/OptionalTasks/script.html b/docs/manual/OptionalTasks/script.html
index 267894097..6f42ff161 100644
--- a/docs/manual/OptionalTasks/script.html
+++ b/docs/manual/OptionalTasks/script.html
@@ -35,7 +35,7 @@ still required.
<td valign="top">language</td>
<td valign="top">The programming language the script is written in.
Must be a supported BSF language</td>
- <td valign="top" align="center">No</td>
+ <td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">src</td>
diff --git a/docs/manual/OptionalTasks/serverdeploy.html b/docs/manual/OptionalTasks/serverdeploy.html
index 39f9c6ac1..b78643f6b 100644
--- a/docs/manual/OptionalTasks/serverdeploy.html
+++ b/docs/manual/OptionalTasks/serverdeploy.html
@@ -190,7 +190,7 @@ required for all actions.
It is in the form <code>&lt;component&gt;:&lt;target1&gt;,&lt;target2&gt;...</code>
Where component is the archive name (minus the .jar, .ear, .war
extension). Targets are the servers where the components will be deployed</td>
- <td>Yes</td>
+ <td>no</td>
</tr>
<tr>
<td valign="top">debug</td>
@@ -222,7 +222,7 @@ WebLogic server:</p>
<pre>
&lt;serverdeploy action=&quot;delete&quot; source=&quot;${lib.dir}/ejb_myApp.jar&quot;/&gt
- &lt;weblogic application=&quot;myapp&quot
+ &lt;weblogic application=&quot;myapp&quot;
server=&quot;t3://myserver:7001&quot;
classpath=&quot;${weblogic.home}/lib/weblogic.jar&quot;
username=&quot;${user.name}&quot;
diff --git a/docs/manual/OptionalTasks/sos.html b/docs/manual/OptionalTasks/sos.html
index 6e74151bb..79abbc8fd 100644
--- a/docs/manual/OptionalTasks/sos.html
+++ b/docs/manual/OptionalTasks/sos.html
@@ -23,7 +23,7 @@ Version 1.1 2002/01/23
<h2>Contents</h2>
<ul>
- <li><a href="#intro">Introduction</a></li>
+ <li><a href="#intro">Introduction</a></li>
<li><a href="#tasks">The Tasks</a></li>
</ul>
@@ -55,17 +55,17 @@ have been tested with Linux, Solaris &amp; Windows2000.</p>
<td>Retrieves a read-only copy of the specified project or file.</td>
</tr>
<tr>
- <td><a href="#SOSLabel"> soslabel</a></td>
+ <td><a href="#SOSLabel">soslabel</a></td>
<td>Assigns a label to the specified project.</td>
</tr>
<tr>
- <td><a href="#SOSCheckIn"> soscheckin</a></td>
+ <td><a href="#SOSCheckIn">soscheckin</a></td>
<td>Updates VSS with changes made to a checked out file or project,
and unlocks the VSS master copy.</td>
</tr>
<tr>
- <td><a href="#SOSCheckOut"> soscheckout</a></td>
- <td>Retrieves a read-write copy of&nbsp;the specified project
+ <td><a href="#SOSCheckOut">soscheckout</a></td>
+ <td>Retrieves a read-write copy of the specified project
or file, locking the&nbsp;VSS master copy</td>
</tr>
diff --git a/docs/manual/OptionalTasks/splash.html b/docs/manual/OptionalTasks/splash.html
index 18c18b9c5..5f53919e1 100644
--- a/docs/manual/OptionalTasks/splash.html
+++ b/docs/manual/OptionalTasks/splash.html
@@ -28,6 +28,26 @@ whilst waiting for your builds to complete...</p>
<td valign="top" align="center">No</td>
<td valign="top" align="center">antlogo.gif from the classpath</td>
</tr>
+
+ <tr>
+ <td valign="top">showduration</td>
+ <td valign="top">Initial period to pause the build to show the
+ splash in milliseconds.</td>
+ <td valign="top" align="center">No</td>
+ <td valign="top" align="center">5000 ms</td>
+ </tr>
+</table>
+<h3>Deprecated properties</h3>
+
+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 mostly deprecated in
+preference to the &lt;setproxy&gt; task, that makes it clear to readers of
+the build exactly what is going on. We say mostly as this task's support
+includes proxy authentication, so you may still need to use its
+proxy attributes.
+
+<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top">useproxy</td>
<td valign="top">Use a proxy to access imgurl. Note: Only tested
@@ -60,13 +80,7 @@ whilst waiting for your builds to complete...</p>
<td valign="top" align="center">No</td>
<td valign="top" align="center">None</td>
</tr>
- <tr>
- <td valign="top">showduration</td>
- <td valign="top">Initial period to pause the build to show the
- splash in milliseconds.</td>
- <td valign="top" align="center">No</td>
- <td valign="top" align="center">5000 ms</td>
- </tr>
+
</table>
<h3>Examples</h3>
<blockquote><pre>
@@ -76,15 +90,10 @@ whilst waiting for your builds to complete...</p>
<blockquote><pre>
&lt;splash imageurl=&quot;http://jakarta.apache.org/images/jakarta-logo.gif&quot;
useproxy=&quot;true&quot;
- showduration=&quot;5000&quot;
- proxy=&quot;proxy.mydomain.com&quot;
- port=&quot;8080&quot;
- user=&quot;BuildEng&quot;
- password=&quot;LetMePass&quot;/>
+ showduration=&quot;5000&quot;/>
</pre></blockquote>
-<p>Splashes the jakarta logo, via a connection through the proxy at
-proxy.mydomain.com on port 8080 (as user BuildEng/LetMePass) for
+<p>Splashes the jakarta logo, for
an initial period of 5 seconds.</p>
<hr>
<p align="center">Copyright &copy; 2002 Apache Software Foundation. All rights
diff --git a/docs/manual/OptionalTasks/starteam.html b/docs/manual/OptionalTasks/starteam.html
index 5bde97758..a285e8862 100644
--- a/docs/manual/OptionalTasks/starteam.html
+++ b/docs/manual/OptionalTasks/starteam.html
@@ -170,7 +170,7 @@ If false (default) has no effect.
username="auser"
password="secret"
rootlocalfolder="C:\dev\buildtest\co"
- force="true"
+ force="true"
/&gt;
</pre>
@@ -184,7 +184,7 @@ created for them and any non-StarTeam files found in the tree will be deleted.
username="auser"
password="secret"
rootlocalfolder="C:\dev\buildtest\co"
- forced="true"
+ forced="true"
/&gt;
</pre>
And this is a simpler way of accomplishing the same thing as the previous example, using the URL attribute.
@@ -197,7 +197,7 @@ And this is a simpler way of accomplishing the same thing as the previous exampl
rootstarteamfolder="\Dev"
excludes="*.bak *.old"
label="v2.6.001"
- forced="true"
+ forced="true"
/&gt;
</pre>
@@ -211,7 +211,7 @@ end in <i>.bak</i> or <i>.old</i> with the label <i>v2.6.001</i>.
rootlocalfolder="C:\dev\buildtest\co"
includes="*.htm,*.html"
excludes="index.*"
- forced="true"
+ forced="true"
/&gt;
</pre>
@@ -227,8 +227,8 @@ not be checked out by this command.
rootlocalfolder="C:\dev\buildtest\co"
includes="*.htm,*.html"
excludes="index.*"
- forced="true"
- recursive="false"
+ forced="true"
+ recursive="false"
/&gt;
</pre>
This example is like the previous one, but will only check out files in
@@ -240,7 +240,7 @@ C:\dev\buildtest\co, because of the turning off of the recursive attribute.
password="secret"
rootstarteamfolder="src/java"
rootlocalfolder="C:\dev\buildtest\co"
- forced="true"
+ forced="true"
/&gt;
</pre>
<br></br>
@@ -258,7 +258,7 @@ C:\dev\buildtest\co, because of the turning off of the recursive attribute.
password="secret"
rootstarteamfolder="src/java"
rootlocalfolder="C:\dev\buildtest\co\src\java"
- forced="true"
+ forced="true"
/&gt;
</pre>
@@ -351,7 +351,7 @@ change it. If false (default) lock status will not change.
username="auser"
password="secret"
rootlocalfolder="C:\dev\buildtest\co"
- forced="true"
+ forced="true"
/&gt;
</pre>
@@ -365,7 +365,7 @@ For files and folders in the local tree but not in starteam, nothing will be don
username="auser"
password="secret"
rootlocalfolder="C:\dev\buildtest\co"
- forced="true"
+ forced="true"
/&gt;
</pre>
And this is a simpler way of giving the same commands as the command above using the URL shortcut.
@@ -377,7 +377,7 @@ And this is a simpler way of giving the same commands as the command above using
rootlocalfolder="C:\dev\buildtest\co"
rootstarteamfolder="\Dev"
excludes="*.bak *.old"
- forced="true"
+ forced="true"
/&gt;
</pre>
@@ -391,7 +391,7 @@ end in <i>.bak</i> or <i>.old</i> from the tree rooted at"C:\dev\buildtest\co" .
rootlocalfolder="C:\dev\buildtest\co"
includes="*.htm,*.html"
excludes="index.*"
- forced="true"
+ forced="true"
/&gt;
</pre>
@@ -408,8 +408,8 @@ not be checked in by this command.
rootstarteamfolder="src/java"
includes="*.htm,*.html"
excludes="index.*"
- forced="true"
- recursive="false"
+ forced="true"
+ recursive="false"
/&gt;
</pre>
This example is like the previous one, but will only check in files from
@@ -422,8 +422,8 @@ C:\dev\buildtest\co, because of the turning off of the recursive attribute.
rootlocalfolder="C:\dev\buildtest\co"
rootstarteamfolder="src/java"
includes="version.txt"
- forced="true"
- recursive="false"
+ forced="true"
+ recursive="false"
/&gt;
</pre>
This example is like the previous one, but will only check only in one file, C:\dev\buildtest\co\version.txt to the StarTeam folder src/java.
@@ -435,10 +435,10 @@ This example is like the previous one, but will only check only in one file, C:\
rootlocalfolder="C:\dev\buildtest\co"
rootstarteamfolder="src/java"
includes="version.java"
- forced="true"
- recursive="false"
- addUncontrolled="true"
- comment="Fix Bug #667"
+ forced="true"
+ recursive="false"
+ addUncontrolled="true"
+ comment="Fix Bug #667"
/&gt;
</pre>
This example is like the previous one, but will only check only in one file, C:\dev\buildtest\co\version.java to the StarTeam folder src/java. Because the <i>addUncontrolled</i> attribute has been set, if StarTeam does not already control this file in this location, it will be added to the repository. Also, it will write a comment to the repository for this version of the file.
@@ -449,7 +449,7 @@ This example is like the previous one, but will only check only in one file, C:\
password="secret"
rootstarteamfolder="src/java"
rootlocalfolder="C:\dev\buildtest\co"
- forced="true"
+ forced="true"
/&gt;
</pre>
<br></br>
@@ -467,7 +467,7 @@ This example is like the previous one, but will only check only in one file, C:\
password="secret"
rootstarteamfolder="src/java"
rootlocalfolder="C:\dev\buildtest\co\src\java"
- forced="true"
+ forced="true"
/&gt;
</pre>
@@ -606,8 +606,8 @@ while adding a <i>rootlocalfolder</i> and an <i>excludes</i> param ...
&lt;stlist url="WASHINGTON:49201/build"
username="auser"
password="secret"
- rootlocalfolder="srcdir2"
- excludes="*.properties"
+ rootlocalfolder="srcdir2"
+ excludes="*.properties"
/&gt;
</pre>
diff --git a/docs/manual/OptionalTasks/stylebook.html b/docs/manual/OptionalTasks/stylebook.html
index 220f48dd7..92e6d59ea 100644
--- a/docs/manual/OptionalTasks/stylebook.html
+++ b/docs/manual/OptionalTasks/stylebook.html
@@ -14,6 +14,11 @@ Unlike the commandline version of this tool, all three arguments
are required to run stylebook.</p>
<p><b>Note:</b> This task depends on external libraries not included in the Ant distribution.
See <a href="../install.html#librarydependencies">Library Dependencies</a> for more information.</p>
+<p>
+ Being extended from &lt;Java&gt;, all the parent's attributes
+ and options are available. Do not set any apart from the <tt>classpath</tt>
+ as they are not guaranteed to be there in future.
+ </p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
@@ -57,7 +62,7 @@ The above will generate documentation in build/docs starting from the book
src/xdocs/book.xml and using the skin located in directory src/skins/myskin.
<hr>
-<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
+<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
Reserved.</p>
</body>
diff --git a/docs/manual/OptionalTasks/vss.html b/docs/manual/OptionalTasks/vss.html
index 5c3c63600..2e499e8a9 100644
--- a/docs/manual/OptionalTasks/vss.html
+++ b/docs/manual/OptionalTasks/vss.html
@@ -31,7 +31,11 @@ The <code>org.apache.tools.ant.taskdefs.optional.vss</code> package consists of
vss functionality as well as some Ant tasks encapsulating frequently used vss commands.
Although it is possible to use these commands on the desktop,
they were primarily intended to be used by automated build systems.</p>
-
+<p>
+If you get a CreateProcesss 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 <tt>ssdir</tt>
+property.
<h2><a name="tasks">The Tasks</a></h2>
<table border="0" cellspacing="0" cellpadding="3">
@@ -64,9 +68,9 @@ they were primarily intended to be used by automated build systems.</p>
<td>Change the current project being used in VSS</td>
</tr>
<tr>
- <td><a href="#vsscreate">vsscreate</a></td>
- <td>Creates a project in VSS.</td>
- </tr>
+ <td><a href="#vsscreate">vsscreate</a></td>
+ <td>Creates a project in VSS.</td>
+ </tr>
</table>
<hr>
@@ -114,17 +118,17 @@ label only one will be used in the order version, date, label.</p>
</tr>
<tr>
<td>serverPath</td>
- <td>directory where <code>srssafe.ini</code> resides.</td>
+ <td>directory where <code>ss.ini</code> resides.</td>
<td>No</td>
</tr>
<tr>
<td>writable</td>
- <td>true or false</td>
+ <td>true or false<; default false/td>
<td>No</td>
</tr>
<tr>
<td>recursive</td>
- <td>true or false</td>
+ <td>true or false; default false</td>
<td>No</td>
</tr>
<tr>
@@ -303,7 +307,7 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.
</tr>
<tr>
<td>toDate</td>
- <td>Start date for comparison</td>
+ <td>End date for comparison</td>
<td>See below</td>
</tr>
<tr>
@@ -343,6 +347,11 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.
<td>brief, codediff, default or nofile. The default is default.</td>
<td>No</td>
</tr>
+ <tr>
+ <td>user</td>
+ <td>Name the user whose changes we would like to see</td>
+ <td>No</td>
+ </tr>
</table>
<h4>Specifying the time-frame</h4>
diff --git a/docs/manual/OptionalTasks/xmlvalidate.html b/docs/manual/OptionalTasks/xmlvalidate.html
index edbb30175..65551f3b5 100644
--- a/docs/manual/OptionalTasks/xmlvalidate.html
+++ b/docs/manual/OptionalTasks/xmlvalidate.html
@@ -15,8 +15,8 @@ task uses the SAX2 parser implementation provided by JAXP by default
SAX1/2 parser if needed.</p>
<p>This task supports the use of nested <a
-href="../CoreTypes/xmlcatalog.html">xmlcatalog</a> elements and/or nested
-&lt;dtd&gt; elements which are used to resolve DTDs and entities.</p>
+href="../CoreTypes/xmlcatalog.html">xmlcatalog</a> elements and/or nested
+<tt>&lt;dtd&gt;</tt> elements which are used to resolve DTDs and entities.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
@@ -34,7 +34,7 @@ href="../CoreTypes/xmlcatalog.html">xmlcatalog</a> elements and/or nested
<td valign="top">lenient</td>
<td valign="top">
if true, only check the xml document is well formed
- (ignored if the specified parser is as SAX1 parser)
+ (ignored if the specified parser is as SAX1 parser)
</td>
<td valign="top" align="center">No</td>
</tr>
@@ -70,19 +70,19 @@ href="../CoreTypes/xmlcatalog.html">xmlcatalog</a> elements and/or nested
<td width="10%" valign="top"><b>Required</b></td>
</tr>
<tr>
- <td valign="top">publicId</td>
+ <td valign="top">publicId</td>
<td valign="top">Public ID of the DTD to resolve</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
- <td valign="top">location</td>
+ <td valign="top">location</td>
<td valign="top">Location of the DTD to use, which can be a file,
a resource, or a URL</td>
<td align="center" valign="top">Yes</td>
</tr>
</table>
<h4>xmlcatalog</h4>
-<p>The <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
+<p>The <a href="../CoreTypes/xmlcatalog.html">xmlcatalog</a>
element is used to perform Entity resolution.</p>
@@ -93,9 +93,9 @@ element is used to perform Entity resolution.</p>
&lt;xmlvalidate failonerror="no" lenient="yes" warn="yes"
classname="org.apache.xerces.parsers.SAXParser" &gt;
classpath="lib/xerces.jar"&gt;
- &lt;fileset dir="src" includes="style/*.xsl"/&gt;
+ &lt;fileset dir="src" includes="style/*.xsl"/&gt;
&lt;/xmlvalidate&gt;
-
+
&lt;xmlvalidate file="struts-config.xml" warn="false"&gt;
&lt;dtd publicId="-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
location="struts-config_1_0.dtd"/&gt;
@@ -109,7 +109,7 @@ element is used to perform Entity resolution.</p>
&lt;xmlvalidate failonerror="no"&gt;
&lt;fileset dir="${project.dir}" includes="**/*.xml"/&gt;
&lt;xmlcatalog&gt;
- &lt;dtd
+ &lt;dtd
publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot;
location=&quot;com/arielpartners/knowledgebase/dtd/article.dtd&quot;/&gt;
&lt;/xmlcatalog&gt;
diff --git a/docs/manual/coretasklist.html b/docs/manual/coretasklist.html
index 636ece833..50948bf36 100644
--- a/docs/manual/coretasklist.html
+++ b/docs/manual/coretasklist.html
@@ -11,6 +11,8 @@
<h2><a href="toc.html" target="navFrame">Table of Contents</a></h2>
<a href="optionaltasklist.html" target="navFrame">Optional Tasks</a><br>
+<a href="tasksoverview.html" target="mainFrame">Overview of Ant Tasks</a><br>
+<a href="conceptstypeslist.html" target="navFrame">Concepts and Types</a><br>
<h3>Core Tasks</h3>
<a href="CoreTasks/ant.html">Ant</a><br>
@@ -74,6 +76,7 @@
<a href="CoreTasks/style.html">Style</a><br>
<a href="CoreTasks/tar.html">Tar</a><br>
<a href="CoreTasks/taskdef.html">Taskdef</a><br>
+<a href="CoreTasks/tempfile.html">Tempfile</a><br>
<a href="CoreTasks/touch.html">Touch</a><br>
<a href="CoreTasks/tstamp.html">TStamp</a><br>
<a href="CoreTasks/typedef.html">Typedef</a><br>
diff --git a/docs/manual/dirtasks.html b/docs/manual/dirtasks.html
index e19807d2b..ee4e71908 100644
--- a/docs/manual/dirtasks.html
+++ b/docs/manual/dirtasks.html
@@ -161,6 +161,8 @@ They are:</p>
**/SCCS
**/SCCS/**
**/vssver.scc
+ **/.svn
+ **/.svn/**
</pre>
<p>If you do not want these default excludes applied, you may disable them with the
<code>defaultexcludes=&quot;no&quot;</code> attribute.</p>
diff --git a/docs/manual/install.html b/docs/manual/install.html
index 5f8130fb1..bc0efd121 100644
--- a/docs/manual/install.html
+++ b/docs/manual/install.html
@@ -67,10 +67,25 @@ compiler is supported.
</p>
<hr>
<h2><a name="installing">Installing Ant</a></h2>
-<p>The binary distribution of Ant consists of three directories:
-<code>bin</code>,
-<code>docs</code> and
-<code>lib</code>
+<p>The binary distribution of Ant consists of the following directory layout:
+<pre>
+ ant
+ +--- bin // contains launcher scripts
+ |
+ +--- lib // contains Ant jars plus necessary dependencies
+ |
+ +--- docs // contains documentation
+ | +--- ant2 // a brief description of ant2 requirements
+ | |
+ | +--- images // various logos for html documentation
+ | |
+ | +--- 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 ;-)
+</pre>
Only the <code>bin</code> and <code>lib</code> directories are
required to run Ant.
@@ -193,7 +208,7 @@ for examples on how to do this for your operating system. </p>
<p>Make sure you have downloaded any auxiliary jars required to
build tasks you are interested in. These should either be available
-on the CLASSPATH or added to the <code>lib/optional</code>
+on the CLASSPATH or added to the <code>lib</code>
directory.
See <a href="#librarydependencies">Library Dependencies</a>
for a list of jar requirements for various features.
diff --git a/docs/manual/optionaltasklist.html b/docs/manual/optionaltasklist.html
index 54c58e6c6..c984f73d9 100644
--- a/docs/manual/optionaltasklist.html
+++ b/docs/manual/optionaltasklist.html
@@ -11,6 +11,8 @@
<h2><a href="toc.html" target="navFrame">Table of Contents</a></h2>
<a href="coretasklist.html" target="navFrame">Core Tasks</a><br>
+<a href="tasksoverview.html" target="mainFrame">Overview of Ant Tasks</a><br>
+<a href="conceptstypeslist.html" target="navFrame">Concepts and Types</a><br>
<h3>Optional Tasks</h3>
<a href="OptionalTasks/dotnet.html">.NET Tasks</a><br>
@@ -23,10 +25,10 @@
<a href="OptionalTasks/echoproperties.html">Echoproperties</a><br>
<a href="OptionalTasks/ftp.html">FTP</a><br>
<a href="OptionalTasks/icontract.html">IContract</a><br>
-<a href="OptionalTasks/jarlib-available.html">jarlib-available</a><br>
-<a href="OptionalTasks/jarlib-display.html">jarlib-display</a><br>
-<a href="OptionalTasks/jarlib-manifest.html">jarlib-manifest</a><br>
-<a href="OptionalTasks/jarlib-resolve.html">jarlib-resolve</a><br>
+<a href="OptionalTasks/jarlib-available.html">Jarlib-available</a><br>
+<a href="OptionalTasks/jarlib-display.html">Jarlib-display</a><br>
+<a href="OptionalTasks/jarlib-manifest.html">Jarlib-manifest</a><br>
+<a href="OptionalTasks/jarlib-resolve.html">Jarlib-resolve</a><br>
<a href="OptionalTasks/javacc.html">JavaCC</a><br>
<a href="OptionalTasks/javah.html">Javah</a><br>
<a href="OptionalTasks/jspc.html">JspC</a><br>
@@ -49,6 +51,7 @@
<a href="OptionalTasks/replaceregexp.html">ReplaceRegExp</a><br>
<a href="OptionalTasks/rpm.html">Rpm</a><br>
<a href="OptionalTasks/serverdeploy.html">ServerDeploy</a><br>
+<a href="OptionalTasks/setproxy.html">Setproxy</a><br>
<a href="OptionalTasks/script.html">Script</a><br>
<a href="OptionalTasks/sound.html">Sound</a><br>
<a href="OptionalTasks/sos.html">SourceOffSite</a><br>
diff --git a/docs/manual/tasksoverview.html b/docs/manual/tasksoverview.html
index 9145e8de6..185631b72 100644
--- a/docs/manual/tasksoverview.html
+++ b/docs/manual/tasksoverview.html
@@ -21,6 +21,7 @@ documentation.</p>
<a href="#ejb">EJB Tasks</a><br>
<a href="#exec">Execution Tasks</a><br>
<a href="#file">File Tasks</a><br>
+<a href="#extensions">Java2 Extensions Tasks</a><br>
<a href="#log">Logging Tasks</a><br>
<a href="#mail">Mail Tasks</a><br>
<a href="#misc">Miscellaneous Tasks</a><br>
@@ -562,6 +563,12 @@ documentation.</p>
</tr>
<tr valign="top">
+ <td nowrap><a href="CoreTasks/tempfile.html">Tempfile</a></td>
+ <td><p>Generates a name for a new temporary file and sets the specified
+ property to that name.</p></td>
+ </tr>
+
+ <tr valign="top">
<td nowrap><a href="CoreTasks/touch.html">Touch</a></td>
<td><p>Changes the modification time of a file and possibly creates it at
the same time.</p></td>
@@ -572,6 +579,60 @@ documentation.</p>
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<th align="left">
<font size="+0" face="arial,helvetica,sanserif">
+<a name="extensions">Java2 Extensions Tasks</a></th>
+</font>
+<font size="-1" face="arial,helvetica,sanserif">
+<th align="right"><a href="#top">[Back to top]</a></th>
+</font>
+</table>
+<table width="100%" border="1" cellpadding="4" cellspacing="0">
+ <tr valign="top">
+ <th nowrap>Task Name</th>
+ <th>Description</th>
+ </tr>
+
+ <tr valign="top">
+ <td nowrap>
+ <a href="OptionalTasks/jarlib-available.html">Jarlib-available</a></td>
+ <td><p>Check whether an extension is present in a FileSet or an
+ ExtensionSet. If the extension is present, the specified property is
+ set.</p>
+ </td>
+ </tr>
+
+ <tr valign="top">
+ <td nowrap>
+ <a href="OptionalTasks/jarlib-display.html">Jarlib-display</a></td>
+ <td><p>Display the &quot;Optional Package&quot; and
+ &quot;Package Specification&quot; information contained within the
+ specified jars.</p>
+ </td>
+ </tr>
+
+ <tr valign="top">
+ <td nowrap>
+ <a href="OptionalTasks/jarlib-manifest.html">Jarlib-manifest</a></td>
+ <td><p>Task to generate a manifest that declares all the dependencies
+ in manifest. The dependencies are determined by looking in the
+ specified path and searching for Extension/&quot;Optional Package&quot;
+ specifications in the manifests of the jars.</p>
+ </td>
+ </tr>
+
+ <tr valign="top">
+ <td nowrap>
+ <a href="OptionalTasks/jarlib-resolve.html">Jarlib-resolve</a></td>
+ <td><p>Try to locate a jar to satisfy an extension, and place the
+ location of the jar into the specified property.</p>
+ </td>
+ </tr>
+</table>
+
+<p></p>
+<p></p>
+<table width="100%" border="0" cellpadding="4" cellspacing="0">
+<th align="left">
+<font size="+0" face="arial,helvetica,sanserif">
<a name="log">Logging Tasks</a></th>
</font>
<font size="-1" face="arial,helvetica,sanserif">
@@ -949,7 +1010,13 @@ documentation.</p>
nested <code>&lt;read&gt;</code> and <code>&lt;write&gt;</code> tags
to indicate strings to wait for and specify text to send.</p></td>
</tr>
+ <tr valign="top">
+ <td nowrap><a href="OptionalTasks/setproxy.html">setproxy</a></td>
+ <td><p>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.</p></td>
+ </tr>
+
</table>
<p></p>
diff --git a/docs/manual/using.html b/docs/manual/using.html
index 5719f40b0..a4cf01699 100644
--- a/docs/manual/using.html
+++ b/docs/manual/using.html
@@ -30,7 +30,7 @@ to be unique. (For additional information, see the
<tr>
<td valign="top">default</td>
<td valign="top">the default target to use when no target is supplied.</td>
- <td align="center" valign="top">No. Will default to "main" if not specified.</td>
+ <td align="center" valign="top">Yes.</td>
</tr>
<tr>
<td valign="top">basedir</td>
diff --git a/lib/README b/lib/README
index 4a12ce8d0..aee044c05 100644
--- a/lib/README
+++ b/lib/README
@@ -2,7 +2,14 @@ Please refer to the Ant manual under Installing Ant / Library
Dependencies for a list of the jar requirements for various optional
tasks and features.
-This directory contains xercesImpl.jar and xmlParserAPIs from the
-2.0.1 release of Apache Xerces. For more information or newer
-releases see <http://xml.apache.org/xerces2-j/>.
+This directory contains xercesImpl.jar from the 2.0.2 release of
+Apache Xerces. For more information or newer releases see
+<http://xml.apache.org/xerces2-j/>. See the file LICENSE.xerces for
+the terms of distribution.
+
+It also contains xml-apis.jar, an Apache-controlled collection of
+standard classes from the 1.0b2 release of the Apache XML-Commons
+release. For more information or newer releases see
+<http://xml.apache.org/commons/>. See the files LICENSE.dom and
+LICENSE.sax for the terms of distribution.
diff --git a/lib/xercesImpl.jar b/lib/xercesImpl.jar
index 205138a5c..a9c247ec4 100644
--- a/lib/xercesImpl.jar
+++ b/lib/xercesImpl.jar
Binary files differ
diff --git a/src/etc/testcases/core/include/included_file_parse_error/build.xml b/src/etc/testcases/core/include/included_file_parse_error/build.xml
new file mode 100644
index 000000000..04525e43e
--- /dev/null
+++ b/src/etc/testcases/core/include/included_file_parse_error/build.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+ <!ENTITY included_file SYSTEM "file:./included_file.xml">
+]>
+
+<project name="test" default="test" basedir=".">
+
+ <target name="setup">
+ </target>
+
+ &included_file;
+
+ <target name="test" depends="included-target">
+ <echo>test target ran.</echo>
+ </target>
+
+</project>
diff --git a/src/etc/testcases/core/include/included_file_parse_error/included_file.xml b/src/etc/testcases/core/include/included_file_parse_error/included_file.xml
new file mode 100644
index 000000000..048828d5b
--- /dev/null
+++ b/src/etc/testcases/core/include/included_file_parse_error/included_file.xml
@@ -0,0 +1,4 @@
+<target name="included-target">
+ extraneous_text
+ <echo>included-target ran.</echo>
+</target>
diff --git a/src/etc/testcases/core/include/included_file_task_error/build.xml b/src/etc/testcases/core/include/included_file_task_error/build.xml
new file mode 100644
index 000000000..04525e43e
--- /dev/null
+++ b/src/etc/testcases/core/include/included_file_task_error/build.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+ <!ENTITY included_file SYSTEM "file:./included_file.xml">
+]>
+
+<project name="test" default="test" basedir=".">
+
+ <target name="setup">
+ </target>
+
+ &included_file;
+
+ <target name="test" depends="included-target">
+ <echo>test target ran.</echo>
+ </target>
+
+</project>
diff --git a/src/etc/testcases/core/include/included_file_task_error/included_file.xml b/src/etc/testcases/core/include/included_file_task_error/included_file.xml
new file mode 100644
index 000000000..d8faf2bf4
--- /dev/null
+++ b/src/etc/testcases/core/include/included_file_task_error/included_file.xml
@@ -0,0 +1,4 @@
+<target name="included-target">
+ <copy file="nonexistent-file" todir="/non/existent/dir"/>
+ <echo>included-target ran.</echo>
+</target>
diff --git a/src/etc/testcases/core/include/including_file_parse_error/build.xml b/src/etc/testcases/core/include/including_file_parse_error/build.xml
new file mode 100644
index 000000000..f3d4f01b6
--- /dev/null
+++ b/src/etc/testcases/core/include/including_file_parse_error/build.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+ <!ENTITY included_file SYSTEM "file:./included_file.xml">
+]>
+
+<project name="test" default="test" basedir=".">
+
+ <target name="setup">
+ </target>
+
+ &included_file;
+
+ extraneous_text
+
+ <target name="test" depends="included-target">
+ <echo>test target ran.</echo>
+ </target>
+
+</project>
diff --git a/src/etc/testcases/core/include/including_file_parse_error/included_file.xml b/src/etc/testcases/core/include/including_file_parse_error/included_file.xml
new file mode 100644
index 000000000..433de717c
--- /dev/null
+++ b/src/etc/testcases/core/include/including_file_parse_error/included_file.xml
@@ -0,0 +1,3 @@
+<target name="included-target">
+ <echo>included-target ran.</echo>
+</target>
diff --git a/src/etc/testcases/core/include/including_file_task_error/build.xml b/src/etc/testcases/core/include/including_file_task_error/build.xml
new file mode 100644
index 000000000..e7456b6e2
--- /dev/null
+++ b/src/etc/testcases/core/include/including_file_task_error/build.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+ <!ENTITY included_file SYSTEM "file:./included_file.xml">
+]>
+
+<project name="test" default="test" basedir=".">
+
+ <target name="setup">
+ </target>
+
+ &included_file;
+
+ <target name="test" depends="included-target">
+ <copy file="nonexistent-file" todir="/non/existent/dir"/>
+ <echo>test target ran.</echo>
+ </target>
+
+</project>
diff --git a/src/etc/testcases/core/include/including_file_task_error/included_file.xml b/src/etc/testcases/core/include/including_file_task_error/included_file.xml
new file mode 100644
index 000000000..433de717c
--- /dev/null
+++ b/src/etc/testcases/core/include/including_file_task_error/included_file.xml
@@ -0,0 +1,3 @@
+<target name="included-target">
+ <echo>included-target ran.</echo>
+</target>
diff --git a/src/etc/testcases/taskdefs/optional/xml/test.xml b/src/etc/testcases/taskdefs/optional/xml/test.xml
new file mode 100644
index 000000000..af04697ed
--- /dev/null
+++ b/src/etc/testcases/taskdefs/optional/xml/test.xml
@@ -0,0 +1,8 @@
+<root>
+ <a>this is the first line</a>
+ <b><c>not indented</c></b>
+ <b>
+ <c>indented</c>
+ </b>
+</root>
+ \ No newline at end of file
diff --git a/src/etc/testcases/taskdefs/optional/xml/test.xsl b/src/etc/testcases/taskdefs/optional/xml/test.xsl
new file mode 100644
index 000000000..4578a8eaf
--- /dev/null
+++ b/src/etc/testcases/taskdefs/optional/xml/test.xsl
@@ -0,0 +1,8 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- Copy every node and attributes recursively -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet> \ No newline at end of file
diff --git a/src/etc/testcases/taskdefs/optional/xslt.xml b/src/etc/testcases/taskdefs/optional/xslt.xml
index b6b075099..75814a10c 100644
--- a/src/etc/testcases/taskdefs/optional/xslt.xml
+++ b/src/etc/testcases/taskdefs/optional/xslt.xml
@@ -31,5 +31,16 @@
</style>
</target>
+
+ <target name="testOutputProperty" depends="init">
+ <style in="xml/test.xml"
+ out="xml/out/test-out.xml"
+ style="xml/test.xsl">
+ <outputproperty name="method" value="xml"/>
+ <outputproperty name="standalone" value="yes"/>
+ <outputproperty name="encoding" value="iso8859_1"/>
+ <outputproperty name="indent" value="yes"/>
+ </style>
+ </target>
</project>
diff --git a/src/etc/testcases/taskdefs/zip.xml b/src/etc/testcases/taskdefs/zip.xml
index 6fc7eb7fc..a05f8a782 100644
--- a/src/etc/testcases/taskdefs/zip.xml
+++ b/src/etc/testcases/taskdefs/zip.xml
@@ -78,6 +78,22 @@
</zip>
</target>
+ <target name="testUpdateNotNecessary" depends="feather">
+ <zip destFile="asf-logo.gif.zip"
+ basedir=".."
+ includes="asf-logo.gif"
+ update="true" />
+ </target>
+
+ <target name="testUpdateIsNecessary" depends="feather">
+ <sleep seconds="5" />
+ <touch file="../dummyfile" />
+ <zip destFile="asf-logo.gif.zip"
+ basedir=".."
+ includes="asf-logo.gif,dummyfile"
+ update="true" />
+ </target>
+
<target name="cleanup">
<delete file="test3.zip"/>
<delete file="test4.zip"/>
@@ -88,5 +104,6 @@
<delete file="test8.zip"/>
<delete file="asf-logo.gif.zip"/>
<delete file="zipgroupfileset.zip"/>
+ <delete file="../dummyfile" />
</target>
</project>
diff --git a/src/etc/testcases/types/selectors.xml b/src/etc/testcases/types/selectors.xml
index 087babafa..b44c88ba5 100644
--- a/src/etc/testcases/types/selectors.xml
+++ b/src/etc/testcases/types/selectors.xml
@@ -5,6 +5,8 @@
<property name="etc.dir" value=".."/>
<property name="test.dir"
value="selectortest"/>
+ <property name="mirror.dir"
+ value="selectortest2"/>
<target name="setupfiles">
<mkdir dir="${test.dir}" />
@@ -57,4 +59,27 @@
<delete dir="${test.dir}" />
</target>
+ <target name="mirrorfiles">
+ <mkdir dir="${mirror.dir}" />
+ <mkdir dir="${mirror.dir}/zip" />
+ <mkdir dir="${mirror.dir}/tar" />
+ <mkdir dir="${mirror.dir}/tar/gz" />
+ <mkdir dir="${mirror.dir}/tar/bz2" />
+ <touch file="${mirror.dir}/asf-logo.gif.md5"/>
+ <touch file="${mirror.dir}/asf-logo.gif.bz2"/>
+ <sleep seconds="2"/>
+ <touch file="${mirror.dir}/zip/asf-logo.gif.zip"/>
+ <sleep seconds="3"/>
+ <touch file="${mirror.dir}/tar/asf-logo.gif.tar"/>
+ <sleep seconds="2"/>
+ <touch file="${mirror.dir}/tar/asf-logo-huge.tar"/>
+ <touch file="${mirror.dir}/tar/gz/asf-logo.gif.tar.gz"/>
+ <touch file="${mirror.dir}/tar/bz2/asf-logo.gif.tar.bz2"/>
+ <touch file="${mirror.dir}/tar/bz2/asf-logo-huge.tar.bz2"/>
+ </target>
+
+ <target name="cleanup.mirrorfiles">
+ <delete dir="${mirror.dir}" />
+ </target>
+
</project>
diff --git a/src/main/org/apache/tools/ant/Diagnostics.java b/src/main/org/apache/tools/ant/Diagnostics.java
new file mode 100644
index 000000000..b0ae9733f
--- /dev/null
+++ b/src/main/org/apache/tools/ant/Diagnostics.java
@@ -0,0 +1,307 @@
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Ant", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.apache.tools.ant;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.PrintStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * A little diagnostic helper that output some information that may help
+ * in support. It should quickly give correct information about the
+ * jar existing in ant.home/lib and the jar versions...
+ *
+ * @since Ant 1.5
+ * @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
+ */
+public final class Diagnostics {
+
+ /** utility class */
+ private Diagnostics(){
+ }
+
+ /**
+ * Check if optional tasks are available. Not that it does not check
+ * for implementation version. Use <tt>validateVersion()</tt> for this.
+ * @return <tt>true</tt> if optional tasks are available.
+ */
+ public static boolean isOptionalAvailable() {
+ try {
+ Class.forName("org.apache.tools.ant.taskdefs.optional.Test");
+ } catch (ClassNotFoundException e){
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Check if core and optional implementation version do match.
+ * @throws BuildException if the implementation version of optional tasks
+ * does not match the core implementation version.
+ */
+ public static void validateVersion() throws BuildException {
+ try {
+ Class optional = Class.forName("org.apache.tools.ant.taskdefs.optional.Test");
+ String coreVersion = getImplementationVersion(Main.class);
+ String optionalVersion = getImplementationVersion(optional);
+
+ if (coreVersion != null && !coreVersion.equals(optionalVersion) ){
+ throw new BuildException(
+ "Invalid implementation version between Ant core and Ant optional tasks.\n" +
+ " core : " + coreVersion + "\n" +
+ " optional: " + optionalVersion);
+ }
+ } catch (ClassNotFoundException e){
+ }
+ }
+
+ /**
+ * return the list of jar files existing in ANT_HOME/lib
+ * and that must have been picked up by Ant script.
+ * @return the list of jar files existing in ant.home/lib or
+ * <tt>null</tt> if an error occurs.
+ */
+ public static File[] listLibraries() {
+ String home = System.getProperty("ant.home");
+ File libDir = new File(home, "lib");
+ FilenameFilter filter = new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.endsWith(".jar");
+ }
+ };
+ // listFiles is JDK 1.2+ method...
+ String[] filenames = libDir.list(filter);
+ File[] files = new File[filenames.length];
+ for (int i = 0; i < filenames.length; i++){
+ files[i] = new File(libDir, filenames[i]);
+ }
+ return files;
+ }
+
+ /**
+ * main entry point for command line
+ * @param args command line arguments.
+ */
+ public static void main(String[] args){
+ doReport(System.out);
+ }
+
+
+ /**
+ * Helper method to get the implementation version.
+ * @param clazz the class to get the information from.
+ * @return null if there is no package or implementation version.
+ * '?.?' for JDK 1.0 or 1.1.
+ */
+ private static String getImplementationVersion(Class clazz){
+ try {
+ // Package pkg = clazz.getPackage();
+ Method method = Class.class.getMethod("getPackage", new Class[0]);
+ Object pkg = method.invoke(clazz, null);
+ if (pkg != null) {
+ // pkg.getImplementationVersion();
+ method = pkg.getClass().getMethod("getImplementationVersion", new Class[0]);
+ Object version = method.invoke(pkg, null);
+ return (String)version;
+ }
+ } catch (Exception e){
+ // JDK < 1.2 should land here because the methods above don't exist.
+ return "?.?";
+ }
+ return null;
+ }
+
+ /**
+ * Print a report to the given stream.
+ * @param out the stream to print the report to.
+ */
+ public static void doReport(PrintStream out){
+ out.println("------- Ant diagnostics report -------");
+ out.println(Main.getAntVersion());
+ out.println();
+ out.println("-------------------------------------------");
+ out.println(" Implementation Version (JDK1.2+ only)");
+ out.println("-------------------------------------------");
+ out.println("core tasks : " + getImplementationVersion(Main.class));
+
+ Class optional = null;
+ try {
+ optional = Class.forName(
+ "org.apache.tools.ant.taskdefs.optional.Test");
+ out.println("optional tasks : " + getImplementationVersion(optional));
+ } catch (ClassNotFoundException e){
+ out.println("optional tasks : not available");
+ }
+
+ out.println();
+ out.println("-------------------------------------------");
+ out.println(" ANT_HOME/lib jar listing");
+ out.println("-------------------------------------------");
+ doReportLibraries(out);
+
+ out.println();
+ out.println("-------------------------------------------");
+ out.println(" Tasks availability");
+ out.println("-------------------------------------------");
+ doReportTasksAvailability(out);
+
+ out.println();
+ out.println("-------------------------------------------");
+ out.println(" org.apache.env.Which diagnostics");
+ out.println("-------------------------------------------");
+ doReportWhich(out);
+
+ out.println();
+ out.println("-------------------------------------------");
+ out.println(" System properties");
+ out.println("-------------------------------------------");
+ doReportSystemProperties(out);
+
+ out.println();
+ }
+
+ /**
+ * Report a listing of system properties existing in the current vm.
+ * @param out the stream to print the properties to.
+ */
+ private static void doReportSystemProperties(PrintStream out){
+ for( Enumeration keys = System.getProperties().keys();
+ keys.hasMoreElements(); ){
+ String key = (String)keys.nextElement();
+ out.println(key + " : " + System.getProperty(key));
+ }
+ }
+
+
+ /**
+ * Report the content of ANT_HOME/lib directory
+ * @param out the stream to print the content to
+ */
+ private static void doReportLibraries(PrintStream out){
+ File[] libs = listLibraries();
+ for (int i = 0; i < libs.length; i++){
+ out.println(libs[i].getName()
+ + " (" + libs[i].length() + " bytes)");
+ }
+ }
+
+
+ /**
+ * Call org.apache.env.Which if available
+ * @param out the stream to print the content to.
+ */
+ private static void doReportWhich(PrintStream out){
+ Throwable error = null;
+ try {
+ Class which = Class.forName("org.apache.env.Which");
+ Method method = which.getMethod("main", new Class[]{ String[].class });
+ method.invoke(null, new Object[]{new String[]{}});
+ } catch (ClassNotFoundException e) {
+ out.println("Not available.");
+ out.println("Download it at http://xml.apache.org/commons/");
+ } catch (InvocationTargetException e) {
+ error = e.getTargetException() == null ? e : e.getTargetException();
+ } catch (Exception e) {
+ error = e;
+ }
+ // report error if something weird happens...this is diagnostic.
+ if (error != null) {
+ out.println("Error while running org.apache.env.Which");
+ error.printStackTrace();
+ }
+ }
+
+ /**
+ * Create a report about non-available tasks that are defined in the
+ * mapping but could not be found via lookup. It might generally happen
+ * because Ant requires multiple libraries to compile and one of them
+ * was missing when compiling Ant.
+ * @param out the stream to print the tasks report to
+ * @param is the stream defining the mapping task name/classname, can be
+ * <tt>null</tt> for a missing stream (ie mapping).
+ */
+ private static void doReportTasksAvailability(PrintStream out){
+ InputStream is = Main.class.getResourceAsStream("/org/apache/tools/ant/taskdefs/defaults.properties");
+ if (is == null) {
+ out.println("None available");
+ } else {
+ Properties props = new Properties();
+ try {
+ props.load(is);
+ for (Enumeration keys = props.keys(); keys.hasMoreElements();){
+ String key = (String)keys.nextElement();
+ String classname = props.getProperty(key);
+ try {
+ Class.forName(classname);
+ props.remove(key);
+ } catch (ClassNotFoundException e){
+ out.println(key + " : Not Available");
+ }
+ }
+ if (props.size() == 0){
+ out.println("All defined tasks are available");
+ }
+ } catch (IOException e){
+ out.println(e.getMessage());
+ }
+ }
+ }
+
+}
diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java b/src/main/org/apache/tools/ant/DirectoryScanner.java
index 82134da78..f461bc20b 100644
--- a/src/main/org/apache/tools/ant/DirectoryScanner.java
+++ b/src/main/org/apache/tools/ant/DirectoryScanner.java
@@ -169,7 +169,9 @@ public class DirectoryScanner implements FileScanner, SelectorScanner {
"**/.cvsignore",
"**/SCCS",
"**/SCCS/**",
- "**/vssver.scc"
+ "**/vssver.scc",
+ "**/.svn",
+ "**/.svn/**"
};
/** The base directory to be scanned. */
diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java
index 10696a58c..1b8d3f850 100644
--- a/src/main/org/apache/tools/ant/Main.java
+++ b/src/main/org/apache/tools/ant/Main.java
@@ -176,6 +176,7 @@ public class Main {
Main m = null;
try {
+ Diagnostics.validateVersion();
m = new Main(args);
} catch (Throwable exc) {
printMessage(exc);
@@ -264,6 +265,9 @@ public class Main {
} else if (arg.equals("-version")) {
printVersion();
return;
+ } else if (arg.equals("-diagnostics")){
+ Diagnostics.doReport(System.out);
+ return;
} else if (arg.equals("-quiet") || arg.equals("-q")) {
msgOutputLevel = Project.MSG_WARN;
} else if (arg.equals("-verbose") || arg.equals("-v")) {
@@ -589,7 +593,7 @@ public class Main {
}
project.setUserProperty("ant.file",
- buildFile.getAbsolutePath());
+ buildFile.getAbsolutePath());
ProjectHelper.configureProject(project, buildFile);
@@ -732,6 +736,8 @@ public class Main {
msg.append(" -help print this message" + lSep);
msg.append(" -projecthelp print project help information" + lSep);
msg.append(" -version print the version information and exit" + lSep);
+ msg.append(" -diagnostics print information that might be helpful to" + lSep);
+ msg.append(" diagnose or report problems." + lSep);
msg.append(" -quiet, -q be extra quiet" + lSep);
msg.append(" -verbose, -v be extra verbose" + lSep);
msg.append(" -debug print debugging information" + lSep);
@@ -785,7 +791,6 @@ public class Main {
props.load(in);
in.close();
- String lSep = System.getProperty("line.separator");
StringBuffer msg = new StringBuffer();
msg.append("Apache Ant version ");
msg.append(props.getProperty("VERSION"));
diff --git a/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java b/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
index a611374c0..a954ab9c6 100644
--- a/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
+++ b/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
@@ -155,7 +155,7 @@ public class ProjectHelperImpl extends ProjectHelper {
parser.parse(inputSource);
} catch (SAXParseException exc) {
Location location =
- new Location(buildFile.toString(), exc.getLineNumber(),
+ new Location(exc.getSystemId(), exc.getLineNumber(),
exc.getColumnNumber());
Throwable t = exc.getException();
@@ -452,7 +452,9 @@ public class ProjectHelperImpl extends ProjectHelper {
}
if (def == null) {
- helperImpl.project.setDefaultTarget("main");
+ throw new SAXParseException("The default attribute of project "
+ + "is required",
+ helperImpl.locator);
} else {
helperImpl.project.setDefaultTarget(def);
}
@@ -791,7 +793,7 @@ public class ProjectHelperImpl extends ProjectHelper {
task.setTaskName(tag);
}
- task.setLocation(new Location(helperImpl.buildFile.toString(), helperImpl.locator.getLineNumber(),
+ task.setLocation(new Location(helperImpl.locator.getSystemId(), helperImpl.locator.getLineNumber(),
helperImpl.locator.getColumnNumber()));
helperImpl.configureId(task, attrs);
diff --git a/src/main/org/apache/tools/ant/taskdefs/Ant.java b/src/main/org/apache/tools/ant/taskdefs/Ant.java
index 04ac83d5e..f2f0a2e11 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Ant.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Ant.java
@@ -72,7 +72,7 @@ import java.util.Hashtable;
import java.util.Enumeration;
/**
- * Call Ant in a sub-project.
+ * Build a sub-project.
*
* <pre>
* &lt;target name=&quot;foo&quot; depends=&quot;init&quot;&gt;
@@ -329,7 +329,10 @@ public class Ant extends Task {
if (dir != null) {
newProject.setBaseDir(dir);
- newProject.setUserProperty("basedir" , dir.getAbsolutePath());
+ if (savedDir != null) { // has been set explicitly
+ newProject.setInheritedProperty("basedir" ,
+ dir.getAbsolutePath());
+ }
} else {
dir = project.getBaseDir();
}
@@ -487,7 +490,7 @@ public class Ant extends Task {
}
/**
- * The directory to use as a basedir for the new Ant project.
+ * The directory to use as a base directory for the new Ant project.
* Defaults to the current project's basedir, unless inheritall
* has been set to false, in which case it doesn't have a default
* value. This will override the basedir setting of the called project.
diff --git a/src/main/org/apache/tools/ant/taskdefs/Basename.java b/src/main/org/apache/tools/ant/taskdefs/Basename.java
index 349f1956b..7898f67e9 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Basename.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Basename.java
@@ -59,8 +59,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
/**
- * Task to determine the basename of a specified file, optionally minus a
- * specified suffix.
+ * Sets a property to the base name of a specified file, optionally minus a
+ * suffix.
*
* This task can accept the following attributes:
* <ul>
diff --git a/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java b/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java
index db29c0912..b133f1e24 100644
--- a/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java
+++ b/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java
@@ -63,7 +63,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.util.FileUtils;
/**
- * This is a basic task that can be used to track build numbers. It will first
+ * Read, increment, and write a build number in a file
+ * It will first
* attempt to read a build number from a file, then set the property
* "build.number" to the value that was read in (or 0 if no such value). Then
* it will increment the build number by one and write it back out into the
diff --git a/src/main/org/apache/tools/ant/taskdefs/CVSPass.java b/src/main/org/apache/tools/ant/taskdefs/CVSPass.java
index 265ede0b2..d598908e4 100644
--- a/src/main/org/apache/tools/ant/taskdefs/CVSPass.java
+++ b/src/main/org/apache/tools/ant/taskdefs/CVSPass.java
@@ -67,9 +67,7 @@ import java.io.FileWriter;
import java.io.IOException;
/**
- * CVSLogin
- *
- * Adds an new entry to a CVS password file
+ * Adds an new entry to a CVS password file.
*
* @author <a href="jeff@custommonkey.org">Jeff Martin</a>
* @version $Revision$
diff --git a/src/main/org/apache/tools/ant/taskdefs/CallTarget.java b/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
index 0241cc3d7..c6337898b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
+++ b/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
@@ -136,7 +136,6 @@ public class CallTarget extends Task {
location);
}
- callee.setDir(getProject().getBaseDir());
callee.setAntfile(getProject().getProperty("ant.file"));
callee.setTarget(subTarget);
callee.setInheritAll(inheritAll);
diff --git a/src/main/org/apache/tools/ant/taskdefs/Chmod.java b/src/main/org/apache/tools/ant/taskdefs/Chmod.java
index 13c7cbc30..273c433d3 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Chmod.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Chmod.java
@@ -68,7 +68,7 @@ import org.apache.tools.ant.types.PatternSet;
* Chmod equivalent for unix-like environments.
*
* @author costin@eng.sun.com
- * @author Mariusz Nowostawski (Marni)
+ * @author Mariusz Nowostawski (Marni)
* <a href="mailto:mnowostawski@infoscience.otago.ac.nz">mnowostawski@infoscience.otago.ac.nz</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
*
@@ -233,29 +233,26 @@ public class Chmod extends ExecuteOn {
}
/**
- * Not supported.
- * @param e
+ * @ant.attribute ignore="true"
*/
public void setExecutable(String e) {
- throw new BuildException(taskType
+ throw new BuildException(taskType
+ " doesn\'t support the executable attribute", location);
}
/**
- * Not supported.
- * @param cmdl
+ * @ant.attribute ignore="true"
*/
public void setCommand(Commandline cmdl) {
- throw new BuildException(taskType
+ throw new BuildException(taskType
+ " doesn\'t support the command attribute", location);
}
/**
- * Not supported.
- * @param skip
+ * @ant.attribute ignore="true"
*/
public void setSkipEmptyFilesets(boolean skip) {
- throw new BuildException(taskType
+ throw new BuildException(taskType
+ " doesn\'t support the skipemptyfileset attribute", location);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/Copy.java b/src/main/org/apache/tools/ant/taskdefs/Copy.java
index 877a15623..bfac8c941 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Copy.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Copy.java
@@ -76,7 +76,7 @@ import java.util.Hashtable;
import java.util.Enumeration;
/**
- * A consolidated copy task. Copies a file or directory to a new file
+ * Copies a file or directory to a new file
* or directory. Files are only copied if the source file is newer
* than the destination file, or when the destination file does not
* exist. It is possible to explicitly overwrite existing files.</p>
@@ -85,7 +85,7 @@ import java.util.Enumeration;
* document, the following mailing list discussions, and the
* copyfile/copydir tasks.</p>
*
- * @author Glenn McAllister
+ * @author Glenn McAllister
* <a href="mailto:glennm@ca.ibm.com">glennm@ca.ibm.com</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <A href="gholam@xtra.co.nz">Michael McCallum</A>
@@ -122,7 +122,7 @@ public class Copy extends Task {
private String encoding = null;
/**
- * Copy task constructor.
+ * Copy task constructor.
*/
public Copy() {
fileUtils = FileUtils.newFileUtils();
@@ -316,12 +316,12 @@ public class Copy extends Task {
// will be removed in validateAttributes
savedFileSet = (FileSet) filesets.elementAt(0);
}
-
+
// make sure we don't have an illegal set of options
validateAttributes();
try {
-
+
// deal with the single file
if (file != null) {
if (file.exists()) {
@@ -331,10 +331,10 @@ public class Copy extends Task {
if (forceOverwrite ||
(file.lastModified() > destFile.lastModified())) {
- fileCopyMap.put(file.getAbsolutePath(),
+ fileCopyMap.put(file.getAbsolutePath(),
destFile.getAbsolutePath());
} else {
- log(file + " omitted as " + destFile
+ log(file + " omitted as " + destFile
+ " is up to date.", Project.MSG_VERBOSE);
}
} else {
@@ -353,7 +353,7 @@ public class Copy extends Task {
FileSet fs = (FileSet) filesets.elementAt(i);
DirectoryScanner ds = fs.getDirectoryScanner(project);
File fromDir = fs.getDir(project);
-
+
String[] srcFiles = ds.getIncludedFiles();
String[] srcDirs = ds.getIncludedDirectories();
boolean isEverythingIncluded = ds.isEverythingIncluded();
@@ -363,7 +363,7 @@ public class Copy extends Task {
}
scan(fromDir, destDir, srcFiles, srcDirs);
}
-
+
// do all the copy operations now...
doFileOperations();
} finally {
@@ -447,7 +447,7 @@ public class Copy extends Task {
* Compares source files to destination files to see if they should be
* copied.
*/
- protected void scan(File fromDir, File toDir, String[] files,
+ protected void scan(File fromDir, File toDir, String[] files,
String[] dirs) {
FileNameMapper mapper = null;
if (mapperElement != null) {
@@ -496,8 +496,8 @@ public class Copy extends Task {
*/
protected void doFileOperations() {
if (fileCopyMap.size() > 0) {
- log("Copying " + fileCopyMap.size()
- + " file" + (fileCopyMap.size() == 1 ? "" : "s")
+ log("Copying " + fileCopyMap.size()
+ + " file" + (fileCopyMap.size() == 1 ? "" : "s")
+ " to " + destDir.getAbsolutePath());
Enumeration e = fileCopyMap.keys();
@@ -513,20 +513,20 @@ public class Copy extends Task {
try {
log("Copying " + fromFile + " to " + toFile, verbosity);
- FilterSetCollection executionFilters =
+ FilterSetCollection executionFilters =
new FilterSetCollection();
if (filtering) {
executionFilters
.addFilterSet(project.getGlobalFilterSet());
}
- for (Enumeration filterEnum = filterSets.elements();
+ for (Enumeration filterEnum = filterSets.elements();
filterEnum.hasMoreElements();) {
executionFilters
.addFilterSet((FilterSet) filterEnum.nextElement());
}
- fileUtils.copyFile(fromFile, toFile, executionFilters,
- filterChains, forceOverwrite,
- preserveLastModified, encoding,
+ fileUtils.copyFile(fromFile, toFile, executionFilters,
+ filterChains, forceOverwrite,
+ preserveLastModified, encoding,
project);
} catch (IOException ioe) {
String msg = "Failed to copy " + fromFile + " to " + toFile
@@ -543,7 +543,7 @@ public class Copy extends Task {
File d = new File((String) e.nextElement());
if (!d.exists()) {
if (!d.mkdirs()) {
- log("Unable to create directory "
+ log("Unable to create directory "
+ d.getAbsolutePath(), Project.MSG_ERR);
} else {
count++;
diff --git a/src/main/org/apache/tools/ant/taskdefs/DependSet.java b/src/main/org/apache/tools/ant/taskdefs/DependSet.java
index f87a72bb4..5bed88134 100644
--- a/src/main/org/apache/tools/ant/taskdefs/DependSet.java
+++ b/src/main/org/apache/tools/ant/taskdefs/DependSet.java
@@ -66,7 +66,7 @@ import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.FileList;
/**
- * A Task to record explicit dependencies. If any of the target files
+ * Examines and removes out of date target files. If any of the target files
* are out of date with respect to any of the source files, all target
* files are removed. This is useful where dependencies cannot be
* computed (for example, dynamically interpreted parameters or files
diff --git a/src/main/org/apache/tools/ant/taskdefs/Dirname.java b/src/main/org/apache/tools/ant/taskdefs/Dirname.java
index c041368a0..54f37c9f9 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Dirname.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Dirname.java
@@ -60,7 +60,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
/**
- * Task to determine the directory name of the specified file.
+ * Determines the directory name of the specified file.
*
* This task can accept the following attributes:
* <ul>
diff --git a/src/main/org/apache/tools/ant/taskdefs/Echo.java b/src/main/org/apache/tools/ant/taskdefs/Echo.java
index 821a6a905..e6c540631 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Echo.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Echo.java
@@ -63,7 +63,7 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
/**
- * Echo
+ * Writes a message to the Ant logging facilities.
*
* @author costin@dnt.ro
*
diff --git a/src/main/org/apache/tools/ant/taskdefs/ExecTask.java b/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
index 73f0fe175..b49424efb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
@@ -99,9 +99,9 @@ public class ExecTask extends Task {
private boolean failIfExecFails = true;
private boolean append = false;
- /**
+ /**
* Controls whether the VM (1.3 and above) is used to execute the
- * command
+ * command
*/
private boolean vmLauncher = true;
@@ -147,8 +147,7 @@ public class ExecTask extends Task {
}
/**
- * Deprecated, use executable instead.
- * The full commandline to execute, executable + arguments.
+ * @ant.attribute ignore="true"
*/
public void setCommand(Commandline cmdl) {
log("The command attribute is deprecated. " +
@@ -209,9 +208,9 @@ public class ExecTask extends Task {
public void setResultProperty(String resultProperty) {
this.resultProperty = resultProperty;
}
-
+
/**
- * helper method to set result property to the
+ * helper method to set result property to the
* passed in value if appropriate
*/
protected void maybeSetResultPropertyValue(int result) {
@@ -220,16 +219,16 @@ public class ExecTask extends Task {
project.setNewProperty(resultProperty, res);
}
}
-
+
/**
* Stop the build if program cannot be started. Defaults to true.
*
- * @since Ant 1.5
+ * @since Ant 1.5
*/
public void setFailIfExecutionFails(boolean flag) {
failIfExecFails = flag;
}
-
+
/**
* Whether output should be appended to or overwrite an existing file.
* Defaults to false.
@@ -281,7 +280,7 @@ public class ExecTask extends Task {
log("Current OS is " + myos, Project.MSG_VERBOSE);
if ((os != null) && (os.indexOf(myos) < 0)){
// this command will be executed only on the specified OS
- log("This OS, " + myos
+ log("This OS, " + myos
+ " was not found in the specified list of valid OSes: " + os,
Project.MSG_VERBOSE);
return false;
@@ -330,7 +329,7 @@ public class ExecTask extends Task {
err = exe.execute();
//test for and handle a forced process death
if (exe.killedProcess()) {
- log("Timeout: killed the sub-process", Project.MSG_WARN);
+ log("Timeout: killed the sub-process", Project.MSG_WARN);
}
maybeSetResultPropertyValue(err);
if (err != 0) {
@@ -390,10 +389,10 @@ public class ExecTask extends Task {
log("Output redirected to " + out, Project.MSG_VERBOSE);
return new PumpStreamHandler(fos);
} catch (FileNotFoundException fne) {
- throw new BuildException("Cannot write to " + out, fne,
+ throw new BuildException("Cannot write to " + out, fne,
location);
} catch (IOException ioe) {
- throw new BuildException("Cannot write to " + out, ioe,
+ throw new BuildException("Cannot write to " + out, ioe,
location);
}
} else if (outputprop != null) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java b/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
index 429a80edd..71eb68227 100644
--- a/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
+++ b/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
@@ -184,6 +184,10 @@ public class ExecuteOn extends ExecTask {
return mapperElement;
}
+ /**
+ * @todo using taskName here is brittle, as a user could override it.
+ * this should probably be modified to use the classname instead.
+ */
protected void checkConfiguration() {
if ("execon".equals(taskName)) {
log("!! execon is deprecated. Use apply instead. !!");
diff --git a/src/main/org/apache/tools/ant/taskdefs/Exit.java b/src/main/org/apache/tools/ant/taskdefs/Exit.java
index ba75f017b..c38430263 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Exit.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Exit.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,7 @@ import org.apache.tools.ant.BuildException;
/**
- * Exit the active build, giving an additional message
+ * Exits the active build, giving an additional message
* if available.
*
* @author <a href="mailto:nico@seessle.de">Nico Seessle</a>
@@ -68,7 +68,7 @@ import org.apache.tools.ant.BuildException;
*
* @ant.task name="fail" category="control"
*/
-public class Exit extends Task {
+public class Exit extends Task {
private String message;
private String ifCondition, unlessCondition;
@@ -100,7 +100,7 @@ public class Exit extends Task {
public void execute() throws BuildException {
if (testIfCondition() && testUnlessCondition()) {
- if (message != null && message.length() > 0) {
+ if (message != null && message.length() > 0) {
throw new BuildException(message);
} else {
throw new BuildException("No message");
@@ -122,7 +122,7 @@ public class Exit extends Task {
if (ifCondition == null || "".equals(ifCondition)) {
return true;
}
-
+
return project.getProperty(ifCondition) != null;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/Filter.java b/src/main/org/apache/tools/ant/taskdefs/Filter.java
index 368168de5..9a3fa05ed 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Filter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Filter.java
@@ -61,11 +61,11 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
/**
- * Sets a token filter that is used by the file copy methods
- * of the project to do token substitution, or sets mutiple tokens by
+ * Sets a token filter that is used by the file copy tasks
+ * to do token substitution. Sets mutiple tokens by
* reading these from a file.
*
- * @author Stefano Mazzocchi
+ * @author Stefano Mazzocchi
* <a href="mailto:stefano@apache.org">stefano@apache.org</a>
* @author Gero Vermaas <a href="mailto:gero@xs4all.nl">gero@xs4all.nl</a>
* @author <A href="gholam@xtra.co.nz">Michael McCallum</A>
@@ -107,26 +107,26 @@ public class Filter extends Task {
}
public void execute() throws BuildException {
- boolean isFiltersFromFile =
+ boolean isFiltersFromFile =
filtersFile != null && token == null && value == null;
- boolean isSingleFilter =
+ boolean isSingleFilter =
filtersFile == null && token != null && value != null;
-
+
if (!isFiltersFromFile && !isSingleFilter) {
throw new BuildException("both token and value parameters, or "
+ "only a filtersFile parameter is "
+ "required", location);
}
-
+
if (isSingleFilter) {
project.getGlobalFilterSet().addFilter(token, value);
}
-
+
if (isFiltersFromFile) {
readFilters();
}
}
-
+
protected void readFilters() throws BuildException {
log("Reading filters from " + filtersFile, Project.MSG_VERBOSE);
project.getGlobalFilterSet().readFiltersFromFile(filtersFile);
diff --git a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
index 764244a23..3599e15d0 100644
--- a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
+++ b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
@@ -449,7 +449,7 @@ public class FixCRLF extends MatchingTask {
break;
case IN_MULTI_COMMENT:
- endComment
+ endComment
= lineString.indexOf("*/", line.getNext());
if (endComment >= 0) {
// End of multiLineComment on this line
@@ -486,7 +486,7 @@ public class FixCRLF extends MatchingTask {
if (line.getNextCharInc() == '\t') {
line.setColumn(line.getColumn() +
tablength -
- (line.getColumn()
+ (line.getColumn()
% tablength));
} else {
line.incColumn();
@@ -495,7 +495,7 @@ public class FixCRLF extends MatchingTask {
// Now output the substring
try {
- outWriter.write(line.substring(begin,
+ outWriter.write(line.substring(begin,
line.getNext()));
} catch (IOException e) {
throw new BuildException(e);
@@ -547,7 +547,7 @@ public class FixCRLF extends MatchingTask {
lines.close();
lines = null;
} catch (IOException e) {
- throw new BuildException("Unable to close source file "
+ throw new BuildException("Unable to close source file "
+ srcFile);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/Get.java b/src/main/org/apache/tools/ant/taskdefs/Get.java
index c76e1bb07..5cd37060d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Get.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Get.java
@@ -69,7 +69,7 @@ import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.JavaEnvUtils;
/**
- * Get a particular file from a URL source.
+ * Gets a particular file from a URL source.
* Options include verbose reporting, timestamp based fetches and controlling
* actions on failures. NB: access through a firewall only works if the whole
* Java runtime is correctly configured.
diff --git a/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java b/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
index 2815aecdb..fbc3271c8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
@@ -83,7 +83,7 @@ import java.sql.Statement;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.JDBCTask;
-public class SQLExampleTask extends JDBCTask {
+public class SQLExampleTask extends JDBCTask {
private String tableName;
@@ -93,7 +93,7 @@ public class SQLExampleTask extends JDBCTask {
try {
if (tableName == null ) {
throw new BuildException("TableName must be specified",location);
- }
+ }
String sql = "SELECT * FROM "+tableName;
stmt= conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
@@ -101,7 +101,7 @@ public class SQLExampleTask extends JDBCTask {
log(rs.getObject(1).toString());
}
} catch (SQLException e) {
-
+
} finally {
if (stmt != null) {
try {stmt.close();}catch (SQLException ingore){}
@@ -117,7 +117,7 @@ public class SQLExampleTask extends JDBCTask {
}
-
+
</pre></code>
@@ -182,7 +182,7 @@ public abstract class JDBCTask extends Task {
private String version = null;
/**
- * Sets the classpath.
+ * Sets the classpath for loading the driver.
* @param classpath The classpath to set
*/
public void setClasspath(Path classpath) {
@@ -200,7 +200,7 @@ public abstract class JDBCTask extends Task {
}
/**
- * Add the classpath for loading the driver;
+ * Add a path to the classpath for loading the driver.
*/
public Path createClasspath() {
if (this.classpath == null) {
@@ -210,7 +210,7 @@ public abstract class JDBCTask extends Task {
}
/**
- * Set the classpath for loading the driver
+ * Set the classpath for loading the driver
* using the classpath reference.
*/
public void setClasspathRef(Reference r) {
@@ -218,7 +218,7 @@ public abstract class JDBCTask extends Task {
}
/**
- * Class name of the jdbc driver; required.
+ * Class name of the JDBC driver; required.
* @param driver The driver to set
*/
public void setDriver(String driver) {
@@ -226,7 +226,7 @@ public abstract class JDBCTask extends Task {
}
/**
- * Sets the database connection url; required.
+ * Sets the database connection URL; required.
* @param url The url to set
*/
public void setUrl(String url) {
@@ -234,13 +234,6 @@ public abstract class JDBCTask extends Task {
}
/**
- * Set the user name for the connection; required.
- */
- public void setUserid(String userId) {
- this.userId = userId;
- }
-
- /**
* Sets the password; required.
* @param password The password to set
*/
@@ -258,7 +251,7 @@ public abstract class JDBCTask extends Task {
}
/**
- * Execute task only if the lower case product name
+ * Execute task only if the lower case product name
* of the DB matches this
* @param rdbms The rdbms to set
*/
@@ -267,7 +260,7 @@ public abstract class JDBCTask extends Task {
}
/**
- * Sets the version string, execute task only if
+ * Sets the version string, execute task only if
* rdbms version match; optional.
* @param version The version to set
*/
@@ -460,10 +453,10 @@ public abstract class JDBCTask extends Task {
}
/**
- * Sets the userId.
+ * Set the user name for the connection; required.
* @param userId The userId to set
*/
- public void setUserId(String userId) {
+ public void setUserid(String userId) {
this.userId = userId;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/Jar.java b/src/main/org/apache/tools/ant/taskdefs/Jar.java
index e2ad0e0cc..8d2aca62c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Jar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Jar.java
@@ -137,9 +137,7 @@ public class Jar extends Zip {
}
/**
- * Not supported.
- *
- * @param we
+ * @ant.attribute ignore="true"
*/
public void setWhenempty(WhenEmpty we) {
log("JARs are never empty, they contain at least a manifest file",
@@ -246,10 +244,12 @@ public class Jar extends Zip {
*
* @param config setting for found manifest behavior.
*/
+ /*
public void setFilesetmanifest(FilesetManifestConfig config) {
filesetManifestConfig = config;
mergeManifestsMain = "merge".equals(config.getValue());
}
+ */
/**
* Adds a zipfileset to include in the META-INF directory.
@@ -439,7 +439,13 @@ public class Jar extends Zip {
Project.MSG_VERBOSE);
try {
- Manifest newManifest = getManifest(new InputStreamReader(is));
+ Manifest newManifest = null;
+ if (is != null) {
+ newManifest = getManifest(new InputStreamReader(is));
+ } else {
+ newManifest = getManifest(file);
+ }
+
if (filesetManifest == null) {
filesetManifest = newManifest;
} else {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Java.java b/src/main/org/apache/tools/ant/taskdefs/Java.java
index d0457cb88..638796bcb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Java.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Java.java
@@ -72,7 +72,7 @@ import java.io.IOException;
import java.util.Vector;
/**
- * This task acts as a loader for java applications but allows to use
+ * Launcher for Java applications. Allows use of
* the same JVM for the called application thus resulting in much
* faster operation.
*
@@ -231,6 +231,7 @@ public class Java extends Task {
/**
* Deprecated: use nested arg instead.
* Set the command line arguments for the class.
+ * @ant.attribute ignore="true"
*/
public void setArgs(String s) {
log("The args attribute is deprecated. " +
diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java
index 270a78a17..9109deaa7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Javac.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java
@@ -97,7 +97,7 @@ import java.io.File;
* compile decision based on timestamp.
*
* @author James Davidson <a href="mailto:duncan@x180.com">duncan@x180.com</a>
- * @author Robin Green
+ * @author Robin Green
* <a href="mailto:greenrd@hotmail.com">greenrd@hotmail.com</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
@@ -198,7 +198,7 @@ public class Javac extends MatchingTask {
*
* If you use this attribute together with jikes, you must
* make sure that your version of jikes supports the -source switch.
- * Legal values are 1.3 and 1.4 – by default, no -source argument
+ * Legal values are 1.3 and 1.4 - by default, no -source argument
* will be used at all.
*
* @param v Value to assign to source.
@@ -220,7 +220,7 @@ public class Javac extends MatchingTask {
}
/**
- * Recreate src
+ * Recreate src.
*
* @return a nested src element.
*/
@@ -296,7 +296,7 @@ public class Javac extends MatchingTask {
/**
* Set the classpath to be used for this compilation.
- *
+ *
* @param classpath an Ant Path object containing the compilation classpath.
*/
public void setClasspath(Path classpath) {
@@ -417,8 +417,7 @@ public class Javac extends MatchingTask {
}
/**
- * Proceed if compilation fails, but use
- * failonerror instead.
+ * @ant.attribute ignore="true"
*/
public void setProceed(boolean proceed) {
failOnError = !proceed;
@@ -654,7 +653,7 @@ public class Javac extends MatchingTask {
facade.setImplementation(chosen);
}
}
-
+
/**
* Executes the task.
@@ -669,8 +668,8 @@ public class Javac extends MatchingTask {
for (int i = 0; i < list.length; i++) {
File srcDir = project.resolveFile(list[i]);
if (!srcDir.exists()) {
- throw new BuildException("srcdir \""
- + srcDir.getPath()
+ throw new BuildException("srcdir \""
+ + srcDir.getPath()
+ "\" does not exist!", location);
}
@@ -748,9 +747,9 @@ public class Javac extends MatchingTask {
* <p>If fork has been set to true, the result will be extJavac
* and not classic or java1.2 - no matter what the compiler
* attribute looks like.</p>
- *
+ *
* @see #getCompilerVersion
- *
+ *
* @since Ant 1.5
*/
public String getCompiler() {
@@ -776,7 +775,7 @@ public class Javac extends MatchingTask {
*
* <p>This method does not take the fork attribute into
* account.</p>
- *
+ *
* @see #getCompiler
*
* @since Ant 1.5
@@ -794,17 +793,17 @@ public class Javac extends MatchingTask {
*/
protected void checkParameters() throws BuildException {
if (src == null) {
- throw new BuildException("srcdir attribute must be set!",
+ throw new BuildException("srcdir attribute must be set!",
location);
}
if (src.size() == 0) {
- throw new BuildException("srcdir attribute must be set!",
+ throw new BuildException("srcdir attribute must be set!",
location);
}
if (destDir != null && !destDir.isDirectory()) {
- throw new BuildException("destination directory \""
- + destDir
+ throw new BuildException("destination directory \""
+ + destDir
+ "\" does not exist "
+ "or is not a directory", location);
}
@@ -831,7 +830,7 @@ public class Javac extends MatchingTask {
}
}
- CompilerAdapter adapter =
+ CompilerAdapter adapter =
CompilerAdapterFactory.getCompiler(compilerImpl, this);
// now we need to populate the compiler adapter
@@ -853,7 +852,7 @@ public class Javac extends MatchingTask {
* filter command line attributes based on the current
* implementation.
*/
- public class ImplementationSpecificArgument extends
+ public class ImplementationSpecificArgument extends
org.apache.tools.ant.util.facade.ImplementationSpecificArgument {
public void setCompiler(String impl) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
index 39b9c113c..19c1a0226 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -1654,7 +1654,6 @@ public class Javadoc extends Task {
}
}
-
if (la.isLinkOffline()) {
File packageListLocation = la.getPackagelistLoc();
if (packageListLocation == null) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Manifest.java b/src/main/org/apache/tools/ant/taskdefs/Manifest.java
index bf04e7fa9..a2eb2a10d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Manifest.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Manifest.java
@@ -58,9 +58,6 @@ import java.util.Vector;
import java.util.Hashtable;
import java.util.Enumeration;
import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -70,16 +67,11 @@ import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.util.CollectionUtils;
/**
+ * Holds the data of a jar manifest.
*
- * Creates a manifest file for inclusion in a JAR.
- * This task can be used to write a Manifest file, optionally
- * replacing or updating an existing file.
* Manifests are processed according to the
* {@link <a href="http://java.sun.com/j2se/1.4/docs/guide/jar/jar.html">Jar
* file specification.</a>}.
@@ -89,16 +81,13 @@ import org.apache.tools.ant.util.CollectionUtils;
* greater than 72 bytes being wrapped and continued on the next
* line. If an application can not handle the continuation mechanism, it
* is a defect in the application, not this task.
-
* @author Conor MacNeill
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <a href="mailto:j_a_fernandez@yahoo.com">Jose Alberto Fernandez</a>
*
* @since Ant 1.4
- *
- * @ant.task category="java"
*/
-public class Manifest extends Task {
+public class Manifest {
/** The standard manifest version header */
public static final String ATTRIBUTE_MANIFEST_VERSION
= "Manifest-Version";
@@ -132,20 +121,6 @@ public class Manifest extends Task {
public static final String EOL = "\r\n";
/**
- * Helper class for Manifest's mode attribute.
- */
- public static class Mode extends EnumeratedAttribute {
- /**
- * Get Allowed values for the mode attribute.
- *
- * @return a String array of the allowed values.
- */
- public String[] getValues() {
- return new String[] {"update", "replace"};
- }
- }
-
- /**
* An attribute for the manifest.
* Those attributes that are not nested into a section will be added to the "Main" section.
*/
@@ -704,7 +679,7 @@ public class Manifest extends Task {
Section rhsSection = (Section) rhs;
- return attributes.equals(rhsSection.attributes);
+ return CollectionUtils.equals(attributes, rhsSection.attributes);
}
}
@@ -722,16 +697,6 @@ public class Manifest extends Task {
private Vector sectionIndex = new Vector();
/**
- * The file to which the manifest should be written when used as a task
- */
- private File manifestFile;
-
- /**
- * The mode with which the manifest file is written
- */
- private Mode mode;
-
- /**
* Construct a manifest from Ant's default manifest file.
*
* @return the default manifest.
@@ -760,8 +725,6 @@ public class Manifest extends Task {
/** Construct an empty manifest */
public Manifest() {
- mode = new Mode();
- mode.setValue("replace");
manifestVersion = null;
}
@@ -843,7 +806,14 @@ public class Manifest extends Task {
*/
public void addConfiguredAttribute(Attribute attribute)
throws ManifestException {
- mainSection.addConfiguredAttribute(attribute);
+ if (attribute.getKey() == null || attribute.getValue() == null) {
+ throw new BuildException("Attributes must have name and value");
+ }
+ if (attribute.getKey().equalsIgnoreCase(ATTRIBUTE_MANIFEST_VERSION)) {
+ manifestVersion = attribute.getValue();
+ } else {
+ mainSection.addConfiguredAttribute(attribute);
+ }
}
/**
@@ -1017,24 +987,7 @@ public class Manifest extends Task {
return false;
}
- return sections.equals(rhsManifest.sections);
- }
-
- /**
- * The name of the manifest file to create/update.
- * Required if used as a task.
- * @param f the Manifest file to be written
- */
- public void setFile(File f) {
- manifestFile = f;
- }
-
- /**
- * Update policy: either "update" or "replace"; default is "replace".
- * @param m the mode value - update or replace.
- */
- public void setMode(Mode m) {
- mode = m;
+ return CollectionUtils.equals(sections, rhsManifest.sections);
}
/**
@@ -1074,73 +1027,4 @@ public class Manifest extends Task {
public Enumeration getSectionNames() {
return sectionIndex.elements();
}
-
- /**
- * Create or update the Manifest when used as a task.
- *
- * @throws BuildException if the manifest cannot be written.
- */
- public void execute() throws BuildException {
- if (manifestFile == null) {
- throw new BuildException("the file attribute is required");
- }
-
- Manifest toWrite = getDefaultManifest();
- Manifest current = null;
- BuildException error = null;
-
- if (manifestFile.exists()) {
- FileReader f = null;
- try {
- f = new FileReader(manifestFile);
- current = new Manifest(f);
- } catch (ManifestException m) {
- error = new BuildException("Existing manifest " + manifestFile
- + " is invalid", m, location);
- } catch (IOException e) {
- error = new BuildException("Failed to read " + manifestFile,
- e, location);
- } finally {
- if (f != null) {
- try {
- f.close();
- } catch (IOException e) {}
- }
- }
- }
-
- try {
- if (mode.getValue().equals("update") && manifestFile.exists()) {
- if (current != null) {
- toWrite.merge(current);
- } else if (error != null) {
- throw error;
- }
- }
-
- toWrite.merge(this);
- } catch (ManifestException m) {
- throw new BuildException("Manifest is invalid", m, location);
- }
-
- if (toWrite.equals(current)) {
- log("Manifest has not changed, do not recreate",
- Project.MSG_VERBOSE);
- return;
- }
-
- PrintWriter w = null;
- try {
- w = new PrintWriter(new FileWriter(manifestFile));
- toWrite.write(w);
- } catch (IOException e) {
- throw new BuildException("Failed to write " + manifestFile,
- e, location);
- } finally {
- if (w != null) {
- w.close();
- }
- }
- }
-
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java b/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java
new file mode 100644
index 000000000..c94d67c75
--- /dev/null
+++ b/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java
@@ -0,0 +1,226 @@
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Ant", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+package org.apache.tools.ant.taskdefs;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * Creates a manifest file for inclusion in a JAR, Ant task wrapper
+ * around {@link Manifest Manifest}. This task can be used to write a
+ * Manifest file, optionally replacing or updating an existing file.
+ *
+ * @author Conor MacNeill
+ * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @author <a href="mailto:j_a_fernandez@yahoo.com">Jose Alberto Fernandez</a>
+ *
+ * @since Ant 1.5
+ *
+ * @ant.task category="java"
+ */
+public class ManifestTask extends Task {
+
+ /**
+ * Holds the real data.
+ */
+ private Manifest nestedManifest = new Manifest();
+
+ /**
+ * The file to which the manifest should be written when used as a task
+ */
+ private File manifestFile;
+
+ /**
+ * The mode with which the manifest file is written
+ */
+ private Mode mode;
+
+ /**
+ * Helper class for Manifest's mode attribute.
+ */
+ public static class Mode extends EnumeratedAttribute {
+ /**
+ * Get Allowed values for the mode attribute.
+ *
+ * @return a String array of the allowed values.
+ */
+ public String[] getValues() {
+ return new String[] {"update", "replace"};
+ }
+ }
+
+ public ManifestTask() {
+ mode = new Mode();
+ mode.setValue("replace");
+ }
+
+ /**
+ * Add a section to the manifest
+ *
+ * @param section the manifest section to be added
+ *
+ * @exception ManifestException if the secti0on is not valid.
+ */
+ public void addConfiguredSection(Manifest.Section section)
+ throws ManifestException {
+ nestedManifest.addConfiguredSection(section);
+ }
+
+ /**
+ * Add an attribute to the manifest - it is added to the main section.
+ *
+ * @param attribute the attribute to be added.
+ *
+ * @exception ManifestException if the attribute is not valid.
+ */
+ public void addConfiguredAttribute(Manifest.Attribute attribute)
+ throws ManifestException {
+ nestedManifest.addConfiguredAttribute(attribute);
+ }
+
+ /**
+ * The name of the manifest file to create/update.
+ * Required if used as a task.
+ * @param f the Manifest file to be written
+ */
+ public void setFile(File f) {
+ manifestFile = f;
+ }
+
+ /**
+ * Update policy: either "update" or "replace"; default is "replace".
+ * @param m the mode value - update or replace.
+ */
+ public void setMode(Mode m) {
+ mode = m;
+ }
+
+ /**
+ * Create or update the Manifest when used as a task.
+ *
+ * @throws BuildException if the manifest cannot be written.
+ */
+ public void execute() throws BuildException {
+ if (manifestFile == null) {
+ throw new BuildException("the file attribute is required");
+ }
+
+ Manifest toWrite = Manifest.getDefaultManifest();
+ Manifest current = null;
+ BuildException error = null;
+
+ if (manifestFile.exists()) {
+ FileReader f = null;
+ try {
+ f = new FileReader(manifestFile);
+ current = new Manifest(f);
+ } catch (ManifestException m) {
+ error = new BuildException("Existing manifest " + manifestFile
+ + " is invalid", m, location);
+ } catch (IOException e) {
+ error = new BuildException("Failed to read " + manifestFile,
+ e, location);
+ } finally {
+ if (f != null) {
+ try {
+ f.close();
+ } catch (IOException e) {}
+ }
+ }
+ }
+
+ try {
+ if (mode.getValue().equals("update") && manifestFile.exists()) {
+ if (current != null) {
+ toWrite.merge(current);
+ } else if (error != null) {
+ throw error;
+ }
+ }
+
+ toWrite.merge(nestedManifest);
+ } catch (ManifestException m) {
+ throw new BuildException("Manifest is invalid", m, location);
+ }
+
+ if (toWrite.equals(current)) {
+ log("Manifest has not changed, do not recreate",
+ Project.MSG_VERBOSE);
+ return;
+ }
+
+ PrintWriter w = null;
+ try {
+ w = new PrintWriter(new FileWriter(manifestFile));
+ toWrite.write(w);
+ } catch (IOException e) {
+ throw new BuildException("Failed to write " + manifestFile,
+ e, location);
+ } finally {
+ if (w != null) {
+ w.close();
+ }
+ }
+ }
+
+}
diff --git a/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java b/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
index cd0f52b93..ca05f0ca1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
@@ -66,12 +66,12 @@ import java.util.StringTokenizer;
import java.util.Enumeration;
/**
- * This is an abstract task that should be used by all those tasks that
+ * This is an abstract task that should be used by all those tasks that
* require to include or exclude files based on pattern matching.
*
- * @author Arnout J. Kuiper
- * <a href="mailto:ajkuiper@wxs.nl">ajkuiper@wxs.nl</a>
- * @author Stefano Mazzocchi
+ * @author Arnout J. Kuiper
+ * <a href="mailto:ajkuiper@wxs.nl">ajkuiper@wxs.nl</a>
+ * @author Stefano Mazzocchi
* <a href="mailto:stefano@apache.org">stefano@apache.org</a>
* @author Sam Ruby <a href="mailto:rubys@us.ibm.com">rubys@us.ibm.com</a>
* @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
@@ -99,14 +99,14 @@ public abstract class MatchingTask extends Task implements SelectorContainer {
public PatternSet.NameEntry createInclude() {
return fileset.createInclude();
}
-
+
/**
* add a name entry on the include files list
*/
public PatternSet.NameEntry createIncludesFile() {
return fileset.createIncludesFile();
}
-
+
/**
* add a name entry on the exclude list
*/
@@ -120,7 +120,7 @@ public abstract class MatchingTask extends Task implements SelectorContainer {
public PatternSet.NameEntry createExcludesFile() {
return fileset.createExcludesFile();
}
-
+
/**
* add a set of patterns
*/
@@ -149,7 +149,7 @@ public abstract class MatchingTask extends Task implements SelectorContainer {
log("The items attribute is deprecated. " +
"Please use the includes attribute.",
Project.MSG_WARN);
- if (itemString == null || itemString.equals("*")
+ if (itemString == null || itemString.equals("*")
|| itemString.equals(".")) {
createInclude().setName("**");
} else {
@@ -162,7 +162,7 @@ public abstract class MatchingTask extends Task implements SelectorContainer {
}
}
}
-
+
/**
* Sets the set of exclude patterns. Patterns may be separated by a comma
* or a space.
@@ -174,7 +174,7 @@ public abstract class MatchingTask extends Task implements SelectorContainer {
}
/**
- * List of filenames and directory names to not include. They should be
+ * List of filenames and directory names to not include. They should be
* either , or " " (space) separated. The ignored files will be logged.
*
* @param ignoreString the string containing the files to ignore.
@@ -233,6 +233,25 @@ public abstract class MatchingTask extends Task implements SelectorContainer {
}
/**
+ * Sets case sensitivity of the file system
+ *
+ * @param isCaseSensitive "true"|"on"|"yes" if file system is case
+ * sensitive, "false"|"off"|"no" when not.
+ */
+ public void setCaseSensitive(boolean isCaseSensitive) {
+ fileset.setCaseSensitive(isCaseSensitive);
+ }
+
+ /**
+ * Sets whether or not symbolic links should be followed.
+ *
+ * @param followSymlinks whether or not symbolic links should be followed
+ */
+ public void setFollowSymlinks(boolean followSymlinks) {
+ fileset.setFollowSymlinks(followSymlinks);
+ }
+
+ /**
* Indicates whether there are any selectors here.
*
* @return whether any selectors are in this container
diff --git a/src/main/org/apache/tools/ant/taskdefs/PathConvert.java b/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
index 0c8b65482..950b0587d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
+++ b/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
@@ -69,7 +69,7 @@ import java.util.Vector;
import java.io.File;
/**
- * This task converts path and classpath information to a specific target OS
+ * Converts path and classpath information to a specific target OS
* format. The resulting formatted path is placed into the specified property.
*
* @author Larry Streepy <a href="mailto:streepy@healthlanguage.com">
@@ -101,6 +101,10 @@ public class PathConvert extends Task {
*/
private boolean onWindows = false;
/**
+ * Set if we should create a new property even if the result is empty
+ */
+ private boolean setonempty = true;
+ /**
* The property to receive the conversion
*/
private String property = null;//
@@ -268,6 +272,17 @@ public class PathConvert extends Task {
targetWindows = !targetOS.equals("unix");
}
+ /**
+ * Set setonempty
+ *
+ * If false, don't set the new property if the result is the empty string.
+ * @param setonempty true or false
+ *
+ * @since Ant 1.5
+ */
+ public void setSetonempty(boolean setonempty) {
+ this.setonempty = setonempty;
+ }
/**
* The property into which the converted path will be placed.
@@ -401,13 +416,20 @@ public class PathConvert extends Task {
}
}
- // Place the result into the specified property
- if( rslt.length() > 0 ) {
- String value = rslt.toString();
- log("Set property " + property + " = " + value,
- Project.MSG_VERBOSE);
- getProject().setNewProperty(property, value);
- }
+ // Place the result into the specified property,
+ // unless setonempty == false
+ String value = rslt.toString();
+ if(setonempty) {
+ log("Set property " + property + " = " + value,
+ Project.MSG_VERBOSE);
+ getProject().setNewProperty(property, value);
+ } else {
+ if(rslt.length() > 0) {
+ log("Set property " + property + " = " + value,
+ Project.MSG_VERBOSE);
+ getProject().setNewProperty(property, value);
+ }
+ }
} finally {
path = savedPath;
dirSep = savedDirSep;
diff --git a/src/main/org/apache/tools/ant/taskdefs/Property.java b/src/main/org/apache/tools/ant/taskdefs/Property.java
index 05b8cc857..e1475a901 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Property.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Property.java
@@ -162,12 +162,10 @@ public class Property extends Task {
* Sets the value of the property.
* @param value value to assign
*/
-
public void setValue(String value) {
this.value = value;
}
-
public String getValue() {
return value;
}
@@ -250,7 +248,6 @@ public class Property extends Task {
* will be ${env.Path} not ${env.PATH} on Windows 2000.
* @param env prefix
*/
-
public void setEnvironment(String env) {
this.env = env;
}
@@ -262,12 +259,10 @@ public class Property extends Task {
return env;
}
-
/**
* The classpath to use when looking up a resource.
* @param classpath to add to any existing classpath
*/
-
public void setClasspath(Path classpath) {
if (this.classpath == null) {
this.classpath = classpath;
diff --git a/src/main/org/apache/tools/ant/taskdefs/Recorder.java b/src/main/org/apache/tools/ant/taskdefs/Recorder.java
index d18e1a44e..27858f064 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Recorder.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Recorder.java
@@ -67,7 +67,7 @@ import java.io.IOException;
import java.util.Hashtable;
/**
- * Add a listener to the current build process that records the
+ * Adds a listener to the current build process that records the
* output to a file.
* <p>Several recorders can exist at the same time. Each recorder is
* associated with a file. The filename is used as a unique identifier for
@@ -79,7 +79,6 @@ import java.util.Hashtable;
* <p>Some technical issues: the file's print stream is flushed for &quot;finished&quot;
* events (buildFinished, targetFinished and taskFinished), and is closed on
* a buildFinished event.</p>
-
* @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
* @see RecorderEntry
* @version 0.5
diff --git a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
index a3de0904f..5c485dfb5 100644
--- a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
+++ b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,15 +54,10 @@
package org.apache.tools.ant.taskdefs;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
-
import org.apache.tools.ant.types.EnumeratedAttribute;
-import org.apache.tools.ant.types.Path;
-import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.types.FileSet;
import java.io.File;
@@ -79,39 +74,36 @@ import java.io.FileInputStream;
import java.util.Enumeration;
import java.util.StringTokenizer;
import java.util.Vector;
-import java.util.Properties;
-import java.util.Hashtable;
import java.sql.Connection;
import java.sql.Statement;
-import java.sql.Driver;
import java.sql.SQLException;
-import java.sql.DatabaseMetaData;
import java.sql.SQLWarning;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
/**
- * <p>Executes a series of SQL statements via JDBC to a database. Statements can
- * either be read in from a text file using the <i>src</i> attribute or from
+ * Executes a series of SQL statements on a database using JDBC.
+ *
+ * <p>Statements can
+ * either be read in from a text file using the <i>src</i> attribute or from
* between the enclosing SQL tags.</p>
- *
- * <p>Multiple statements can be provided, separated by semicolons (or the
- * defined <i>delimiter</i>). Individual lines within the statements can be
+ *
+ * <p>Multiple statements can be provided, separated by semicolons (or the
+ * defined <i>delimiter</i>). Individual lines within the statements can be
* commented using either --, // or REM at the start of the line.</p>
- *
- * <p>The <i>autocommit</i> 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
+ *
+ * <p>The <i>autocommit</i> 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.</p>
- *
- * <p>The <i>onerror</i> attribute specifies how to proceed when an error occurs
- * during the execution of one of the statements.
+ *
+ * <p>The <i>onerror</i> attribute specifies how to proceed when an error occurs
+ * during the execution of one of the statements.
* The possible values are: <b>continue</b> execution, only show the error;
* <b>stop</b> execution and commit transaction;
* and <b>abort</b> execution and transaction and fail task.</p>
-
- *
+ *
* @author <a href="mailto:jeff@custommonkey.org">Jeff Martin</a>
* @author <A href="mailto:gholam@xtra.co.nz">Michael McCallum</A>
* @author <A href="mailto:tim.stephenson@sybase.com">Tim Stephenson</A>
@@ -133,13 +125,13 @@ public class SQLExec extends JDBCTask {
}
}
-
-
+
+
private int goodSql = 0;
private int totalSql = 0;
- /**
+ /**
* Database connection
*/
private Connection conn = null;
@@ -173,13 +165,13 @@ public class SQLExec extends JDBCTask {
* SQL Statement delimiter
*/
private String delimiter = ";";
-
+
/**
* The delimiter type indicating whether the delimiter will
* only be recognized on a line by itself
*/
private String delimiterType = DelimiterType.NORMAL;
-
+
/**
* Print SQL results.
*/
@@ -195,12 +187,12 @@ public class SQLExec extends JDBCTask {
*/
private File output = null;
-
+
/**
* Action to perform if an error is found
**/
private String onError = "abort";
-
+
/**
* Encoding to use when reading SQL statements from a file
*/
@@ -211,23 +203,23 @@ public class SQLExec extends JDBCTask {
*/
private boolean append = false;
-
+
/**
- * Set the name of the sql file to be run.
+ * Set the name of the SQL file to be run.
* Required unless statements are enclosed in the build file
*/
public void setSrc(File srcFile) {
this.srcFile = srcFile;
}
-
+
/**
- * Set an inline SQL command to execute.
+ * Set an inline SQL command to execute.
* NB: Properties are not expanded in this text.
*/
public void addText(String sql) {
this.sqlCommand += sql;
}
-
+
/**
* Adds a set of files (nested fileset attribute).
*/
@@ -244,7 +236,7 @@ public class SQLExec extends JDBCTask {
transactions.addElement(t);
return t;
}
-
+
/**
* Set the file encoding to use on the SQL files read in
*
@@ -253,9 +245,9 @@ public class SQLExec extends JDBCTask {
public void setEncoding(String encoding) {
this.encoding = encoding;
}
-
+
/**
- * Set the delimiter that separates SQL statements;
+ * Set the delimiter that separates SQL statements;
* optional, default &quot;;&quot;
*
* <p>For example, set this to "go" and delimitertype to "ROW" for
@@ -266,7 +258,7 @@ public class SQLExec extends JDBCTask {
}
/**
- * Set the Delimiter type for this sql task; default "normal"
+ * Set the delimiter type: "normal" or "row" (default "normal").
*
* <p>The delimiter type takes two values - normal and row. Normal
* means that any occurence of the delimiter terminate the SQL
@@ -276,7 +268,7 @@ public class SQLExec extends JDBCTask {
public void setDelimiterType(DelimiterType delimiterType) {
this.delimiterType = delimiterType.getValue();
}
-
+
/**
* Print result sets from the statements;
* optional, default false
@@ -284,9 +276,9 @@ public class SQLExec extends JDBCTask {
public void setPrint(boolean print) {
this.print = print;
}
-
+
/**
- * Print headers for result sets from the
+ * Print headers for result sets from the
* statements; optional, default true.
*/
public void setShowheaders(boolean showheaders) {
@@ -294,8 +286,8 @@ public class SQLExec extends JDBCTask {
}
/**
- * Set the output file;
- * optional, defaults to the ant log
+ * Set the output file;
+ * optional, defaults to the Ant log.
*/
public void setOutput(File output) {
this.output = output;
@@ -311,7 +303,7 @@ public class SQLExec extends JDBCTask {
this.append = append;
}
-
+
/**
* Action to perform when statement fails: continue, stop, or abort
* optional; default &quot;abort&quot;
@@ -330,15 +322,15 @@ public class SQLExec extends JDBCTask {
sqlCommand = sqlCommand.trim();
try {
- if (srcFile == null && sqlCommand.length() == 0
- && filesets.isEmpty()) {
+ if (srcFile == null && sqlCommand.length() == 0
+ && filesets.isEmpty()) {
if (transactions.size() == 0) {
throw new BuildException("Source file or fileset, "
+ "transactions or sql statement "
+ "must be set!", location);
}
}
-
+
if (srcFile != null && !srcFile.exists()) {
throw new BuildException("Source file does not exist!", location);
}
@@ -348,16 +340,16 @@ public class SQLExec extends JDBCTask {
FileSet fs = (FileSet) filesets.elementAt(i);
DirectoryScanner ds = fs.getDirectoryScanner(project);
File srcDir = fs.getDir(project);
-
+
String[] srcFiles = ds.getIncludedFiles();
-
+
// Make a transaction for each file
for (int j = 0 ; j < srcFiles.length ; j++) {
Transaction t = createTransaction();
t.setSrc(new File(srcDir, srcFiles[j]));
}
}
-
+
// Make a transaction group for the outer command
Transaction t = createTransaction();
t.setSrc(srcFile);
@@ -369,11 +361,11 @@ public class SQLExec extends JDBCTask {
try {
statement = conn.createStatement();
-
+
PrintStream out = System.out;
try {
if (output != null) {
- log("Opening PrintStream to output file " + output,
+ log("Opening PrintStream to output file " + output,
Project.MSG_VERBOSE);
out = new PrintStream(
new BufferedOutputStream(
@@ -381,11 +373,11 @@ public class SQLExec extends JDBCTask {
.getAbsolutePath(),
append)));
}
-
+
// Process all transactions
- for (Enumeration e = transactions.elements();
+ for (Enumeration e = transactions.elements();
e.hasMoreElements();) {
-
+
((Transaction) e.nextElement()).runTransaction(out);
if (!isAutocommit()) {
log("Commiting transaction", Project.MSG_VERBOSE);
@@ -396,7 +388,7 @@ public class SQLExec extends JDBCTask {
if (out != null && out != System.out) {
out.close();
}
- }
+ }
} catch (IOException e){
if (!isAutocommit() && conn != null && onError.equals("abort")) {
try {
@@ -421,8 +413,8 @@ public class SQLExec extends JDBCTask {
}
} catch (SQLException e) {}
}
-
- log(goodSql + " of " + totalSql +
+
+ log(goodSql + " of " + totalSql +
" SQL statements executed successfully");
} finally {
transactions = savedTransaction;
@@ -434,13 +426,13 @@ public class SQLExec extends JDBCTask {
/**
* read in lines and execute them
*/
- protected void runStatements(Reader reader, PrintStream out)
+ protected void runStatements(Reader reader, PrintStream out)
throws SQLException, IOException {
String sql = "";
String line = "";
-
+
BufferedReader in = new BufferedReader(reader);
-
+
while ((line = in.readLine()) != null){
line = line.trim();
line = project.replaceProperties(line);
@@ -457,36 +449,36 @@ public class SQLExec extends JDBCTask {
continue;
}
}
-
+
sql += " " + line;
sql = sql.trim();
-
+
// SQL defines "--" as a comment to EOL
// and in Oracle it may contain a hint
// so we cannot just remove it, instead we must end it
if (line.indexOf("--") >= 0) {
sql += "\n";
}
-
- if ((delimiterType.equals(DelimiterType.NORMAL)
- && sql.endsWith(delimiter))
+
+ if ((delimiterType.equals(DelimiterType.NORMAL)
+ && sql.endsWith(delimiter))
||
- (delimiterType.equals(DelimiterType.ROW)
+ (delimiterType.equals(DelimiterType.ROW)
&& line.equals(delimiter))) {
log("SQL: " + sql, Project.MSG_VERBOSE);
- execSQL(sql.substring(0, sql.length() - delimiter.length()),
+ execSQL(sql.substring(0, sql.length() - delimiter.length()),
out);
sql = "";
}
}
-
+
// Catch any statements not followed by ;
if (!sql.equals("")){
execSQL(sql, out);
}
}
-
-
+
+
/**
* Exec the sql statement.
*/
@@ -495,18 +487,18 @@ public class SQLExec extends JDBCTask {
if ("".equals(sql.trim())) {
return;
}
-
- try {
+
+ try {
totalSql++;
if (!statement.execute(sql)) {
- log(statement.getUpdateCount() + " rows affected",
+ log(statement.getUpdateCount() + " rows affected",
Project.MSG_VERBOSE);
} else {
if (print) {
printResults(out);
}
}
-
+
SQLWarning warning = conn.getWarnings();
while (warning != null){
log(warning + " sql warning", Project.MSG_VERBOSE);
@@ -522,7 +514,7 @@ public class SQLExec extends JDBCTask {
log(e.toString(), Project.MSG_ERR);
}
}
-
+
/**
* print any results in the statement.
*/
@@ -551,7 +543,7 @@ public class SQLExec extends JDBCTask {
if (columnValue != null) {
columnValue = columnValue.trim();
}
-
+
if (first) {
first = false;
} else {
@@ -605,20 +597,20 @@ public class SQLExec extends JDBCTask {
/**
*
*/
- private void runTransaction(PrintStream out)
+ private void runTransaction(PrintStream out)
throws IOException, SQLException {
if (tSqlCommand.length() != 0) {
log("Executing commands", Project.MSG_INFO);
runStatements(new StringReader(tSqlCommand), out);
}
-
+
if (tSrcFile != null) {
- log("Executing file: " + tSrcFile.getAbsolutePath(),
+ log("Executing file: " + tSrcFile.getAbsolutePath(),
Project.MSG_INFO);
- Reader reader =
+ Reader reader =
(encoding == null) ? new FileReader(tSrcFile)
: new InputStreamReader(
- new FileInputStream(tSrcFile),
+ new FileInputStream(tSrcFile),
encoding);
try {
runStatements(reader, out);
diff --git a/src/main/org/apache/tools/ant/taskdefs/Sleep.java b/src/main/org/apache/tools/ant/taskdefs/Sleep.java
index 608172d45..3a59e5429 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Sleep.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Sleep.java
@@ -58,18 +58,19 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.BuildException;
/**
- * Sleep for a period of time
+ * Sleep, or pause, for a period of time.
+ *
* A task for sleeping a short period of time, useful when a
* build or deployment process requires an interval between tasks.
*<p>
- * A negative value can be supplied to any of attributes provided the total sleep time
+ * A negative value can be supplied to any of attributes provided the total sleep time
* is positive, pending fundamental changes in physics and JVM
* execution tims</p>
- * 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
+ * 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.</p>
-*
+ *
* @author steve_l@iseran.com steve loughran
* @since Ant 1.4
* @ant.task category="utility"
@@ -87,7 +88,7 @@ public class Sleep extends Task {
private int seconds = 0;
/**
- * sleep hours
+ * sleep hours
*/
private int hours = 0;
/**
@@ -110,7 +111,7 @@ public class Sleep extends Task {
/**
- * adds some seconds to the Sleep
+ * seconds to add to the sleep time
*
* @param seconds The new Seconds value
*/
@@ -120,7 +121,7 @@ public class Sleep extends Task {
/**
- * hours to to add to the sleep time
+ * hours to add to the sleep time.
*
* @param hours The new Hours value
*/
@@ -130,7 +131,7 @@ public class Sleep extends Task {
/**
- * Sets the Minutes attribute of the Sleep object
+ * minutes to add to the sleep time
*
* @param minutes The new Minutes value
*/
@@ -140,7 +141,7 @@ public class Sleep extends Task {
/**
- * minutes to add to the sleep time
+ * milliseconds to add to the sleep time
*
* @param milliseconds The new Milliseconds value
*/
@@ -179,7 +180,7 @@ public class Sleep extends Task {
*/
private long getSleepTime() {
- return ((((long) hours * 60) + minutes) * 60 + seconds) * 1000
+ return ((((long) hours * 60) + minutes) * 60 + seconds) * 1000
+ milliseconds;
}
@@ -189,7 +190,7 @@ public class Sleep extends Task {
*
* @throws BuildException if something is invalid
*/
- public void validate()
+ public void validate()
throws BuildException {
if (getSleepTime() < 0) {
throw new BuildException("Negative sleep periods are not "
diff --git a/src/main/org/apache/tools/ant/taskdefs/Transform.java b/src/main/org/apache/tools/ant/taskdefs/Transform.java
index 32a153a8f..6fc3bfbd0 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Transform.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Transform.java
@@ -57,6 +57,7 @@ package org.apache.tools.ant.taskdefs;
/**
* Has been merged into ExecuteOn, empty class for backwards compatibility.
*
- * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @ant.task ignore="true"
*/
public class Transform extends ExecuteOn {}
diff --git a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
index 6627c2f3d..d31838667 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
@@ -72,7 +72,7 @@ import java.util.Vector;
import java.text.SimpleDateFormat;
/**
- * Sets properties to the current time.
+ * Sets properties to the current time, or offsets from the current time.
* The default properties are TSTAMP, DSTAMP and TODAY;
*
* @author costin@dnt.ro
@@ -204,7 +204,7 @@ public class Tstamp extends Task {
if (st.hasMoreElements()) {
variant = st.nextToken();
if (st.hasMoreElements()) {
- throw new BuildException("bad locale format",
+ throw new BuildException("bad locale format",
getLocation());
}
}
@@ -212,7 +212,7 @@ public class Tstamp extends Task {
country = "";
}
} catch (NoSuchElementException e) {
- throw new BuildException("bad locale format", e,
+ throw new BuildException("bad locale format", e,
getLocation());
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
index 0afd81860..a68115b25 100644
--- a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
+++ b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
@@ -70,7 +70,7 @@ import java.util.Enumeration;
import java.util.Vector;
/**
- * Will set the given property if the specified target has a timestamp
+ * Sets the given property if the specified target has a timestamp
* greater than all of the source files.
*
* @author William Ferguson
diff --git a/src/main/org/apache/tools/ant/taskdefs/War.java b/src/main/org/apache/tools/ant/taskdefs/War.java
index a69d4b559..fc89b2661 100644
--- a/src/main/org/apache/tools/ant/taskdefs/War.java
+++ b/src/main/org/apache/tools/ant/taskdefs/War.java
@@ -68,7 +68,7 @@ import java.io.IOException;
* Contains special treatment for files that should end up in the
* <code>WEB-INF/lib</code>, <code>WEB-INF/classes</code> or
* <code>WEB-INF</code> directories of the Web Application Archive.</p>
- * <p>(The War task is a shortcut for specifying the particular layout of a WAR file.
+ * <p>(The War task is a shortcut for specifying the particular layout of a WAR file.
* The same thing can be accomplished by using the <i>prefix</i> and <i>fullpath</i>
* attributes of zipfilesets in a Zip or Jar task.)</p>
* <p>The extended zipfileset element from the zip task (with attributes <i>prefix</i>, <i>fullpath</i>, and <i>src</i>) is available in the War task.</p>
@@ -86,7 +86,7 @@ public class War extends Jar {
* our web.xml deployment descriptor
*/
private File deploymentDescriptor;
-
+
/**
* flag set if the descriptor is added
*/
@@ -99,10 +99,10 @@ public class War extends Jar {
}
/**
- * <i>Deprecated<i> name of the file to create
- * -use <tt>destfile</tt> instead.
+ * <i>Deprecated<i> name of the file to create
+ * -use <tt>destfile</tt> instead.
* @deprecated Use setDestFile(File) instead
- * @ant.attribute ignored="true"
+ * @ant.attribute ignore="true"
*/
public void setWarfile(File warFile) {
setDestFile(warFile);
@@ -115,8 +115,8 @@ public class War extends Jar {
public void setWebxml(File descr) {
deploymentDescriptor = descr;
if (!deploymentDescriptor.exists()) {
- throw new BuildException("Deployment descriptor: "
- + deploymentDescriptor
+ throw new BuildException("Deployment descriptor: "
+ + deploymentDescriptor
+ " does not exist.");
}
@@ -131,7 +131,7 @@ public class War extends Jar {
/**
* add files under WEB-INF/lib/
*/
-
+
public void addLib(ZipFileSet fs) {
// We just set the prefix for this fileset, and pass it up.
fs.setPrefix("WEB-INF/lib/");
@@ -148,7 +148,7 @@ public class War extends Jar {
}
/**
- * files to add under WEB-INF;
+ * files to add under WEB-INF;
*/
public void addWebinf(ZipFileSet fs) {
// We just set the prefix for this fileset, and pass it up.
@@ -180,8 +180,8 @@ public class War extends Jar {
// it's being added twice, meaning the same file is specified
// by the "webxml" attribute and in a <fileset> element.
if (vPath.equalsIgnoreCase("WEB-INF/web.xml")) {
- if (deploymentDescriptor == null
- || !deploymentDescriptor.equals(file)
+ if (deploymentDescriptor == null
+ || !deploymentDescriptor.equals(file)
|| descriptorAdded) {
log("Warning: selected " + archiveType
+ " files include a WEB-INF/web.xml which will be ignored "
diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java b/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java
index 33f0d529b..11f1af92e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java
@@ -93,15 +93,6 @@ public interface XSLTLiaison {
void addParam(String name, String expression) throws Exception;
/**
- * set the output type to use for the transformation. Only "xml" (the
- * default) is guaranteed to work for all parsers. Xalan2 also
- * supports "html" and "text".
- * @param type the output method to use
- * @since Ant 1.5
- */
- void setOutputtype(String type) throws Exception;
-
- /**
* Perform the transformation of a file into another.
* @param infile the input file, probably an XML one. :-)
* @param outfile the output file resulting from the transformation
diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
index 15ad53e96..472388b5f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
@@ -62,6 +62,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.taskdefs.optional.TraXLiaison;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.util.FileUtils;
@@ -69,7 +70,7 @@ import org.apache.tools.ant.types.XMLCatalog;
import org.xml.sax.EntityResolver;
/**
- * A Task to process via XSLT a set of XML documents. This is
+ * Processes a set of XML documents via XSLT. This is
* useful for building views of XML based documentation.
*
* @version $Revision$
@@ -127,7 +128,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
private FileUtils fileUtils;
/** XSL output method to be used */
- private String outputtype = null;
+ private Vector outputProperties = new Vector();
/** for resolving entities such as dtds */
private XMLCatalog xmlCatalog = new XMLCatalog();
@@ -137,11 +138,11 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
"org.apache.tools.ant.taskdefs.optional.TraXLiaison";
/** Name of the now-deprecated XSLP Liason class */
- private static final String XSLP_LIASON_CLASS =
+ private static final String XSLP_LIAISON_CLASS =
"org.apache.tools.ant.taskdefs.optional.XslpLiaison";
/** Name of the Xalan liason class */
- private static final String XALAN_LIASON_CLASS =
+ private static final String XALAN_LIAISON_CLASS =
"org.apache.tools.ant.taskdefs.optional.XalanLiaison";
/**
@@ -298,8 +299,6 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
/**
* Name of the stylesheet to use - given either relative
* to the project's basedir or as an absolute path; required.
- *
- * @param xslFile the stylesheet to use
*/
public void setStyle(String xslFile) {
this.xslFile = xslFile;
@@ -371,10 +370,10 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
} else if (proc.equals("xslp")) {
log("DEPRECATED - xslp processor is deprecated. Use trax or "
+ "xalan instead.");
- final Class clazz = loadClass(XSLP_LIASON_CLASS);
+ final Class clazz = loadClass(XSLP_LIAISON_CLASS);
liaison = (XSLTLiaison) clazz.newInstance();
} else if (proc.equals("xalan")) {
- final Class clazz = loadClass(XALAN_LIASON_CLASS);
+ final Class clazz = loadClass(XALAN_LIAISON_CLASS);
liaison = (XSLTLiaison) clazz.newInstance();
} else {
liaison = (XSLTLiaison) loadClass(proc).newInstance();
@@ -631,17 +630,64 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
}
return expression;
}
+ } // Param
+
+
+ /**
+ * Create an instance of an output property to be configured.
+ * @return the newly created output property.
+ * @since Ant 1.5
+ */
+ public OutputProperty createOutputProperty() {
+ OutputProperty p = new OutputProperty();
+ outputProperties.addElement(p);
+ return p;
}
+
/**
- * Set the output type to use for the transformation;
- * optional, default="xml".
- * Only "xml" is guaranteed to work for all parsers.
- * Xalan2 also supports "html" and "text".
- * @param type the output method to use
+ * Specify how the result tree should be output as specified
+ * in the <a href="http://www.w3.org/TR/xslt#output">
+ * specification</a>.
+ * @since Ant 1.5
*/
- public void setOutputtype(String type) {
- this.outputtype = type;
+ public static class OutputProperty {
+ /** output property name */
+ private String name;
+
+ /** output property value */
+ private String value;
+
+ /**
+ * @return the output property name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * set the name for this property
+ * @param name A non-null String that specifies an
+ * output property name, which may be namespace qualified.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the output property value.
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * set the value for this property
+ * @param value The non-null string value of the output property.
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
}
/**
@@ -649,7 +695,6 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
*/
public void init() throws BuildException {
super.init();
-
xmlCatalog.setProject(project);
}
@@ -668,38 +713,37 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
try {
log("Loading stylesheet " + stylesheet, Project.MSG_INFO);
liaison.setStylesheet(stylesheet);
- if (outputtype != null) {
- liaison.setOutputtype(outputtype);
- }
for (Enumeration e = params.elements(); e.hasMoreElements();) {
Param p = (Param) e.nextElement();
liaison.addParam(p.getName(), p.getExpression());
}
+ if (liaison instanceof TraXLiaison) {
+ configureTraXLiaison((TraXLiaison)liaison);
+ }
} catch (Exception ex) {
- log("Failed to read stylesheet " + stylesheet, Project.MSG_INFO);
+ log("Failed to transform using stylesheet " + stylesheet, Project.MSG_INFO);
throw new BuildException(ex);
}
+ }
- try {
- // if liaison is a TraxLiason, use XMLCatalog as the entity
- // resolver and URI resolver
- if (liaison.getClass().getName().equals(TRAX_LIAISON_CLASS) &&
- xmlCatalog != null) {
- log("Configuring TraxLiaison: setting entity resolver " +
- "and setting URI resolver", Project.MSG_DEBUG);
- Method resolver = liaison.getClass()
- .getDeclaredMethod("setEntityResolver",
- new Class[] {EntityResolver.class});
- resolver.invoke(liaison, new Object[] {xmlCatalog});
-
- resolver = liaison.getClass()
- .getDeclaredMethod("setURIResolver",
- new Class[] {loadClass("javax.xml.transform.URIResolver")});
- resolver.invoke(liaison, new Object[] {xmlCatalog});
- }
- } catch (Exception e) {
- throw new BuildException("Failed to configure XMLCatalog for "
- + "TraxLiaison", e);
+ /**
+ * Specific configuration for the TRaX liaison... support for
+ * all other has been dropped so this liaison will soon look
+ * like the exact copy of JAXP interface..
+ * @param liaison the TRaXLiaison to configure.
+ */
+ protected void configureTraXLiaison(TraXLiaison liaison){
+ // use XMLCatalog as the entity resolver and URI resolver
+ if (xmlCatalog != null) {
+ liaison.setEntityResolver(xmlCatalog);
+ liaison.setURIResolver(xmlCatalog);
+ }
+
+ // configure output properties
+ for (Enumeration props = outputProperties.elements();
+ props.hasMoreElements();) {
+ OutputProperty prop = (OutputProperty)props.nextElement();
+ liaison.setOutputProperty(prop.getName(), prop.getValue());
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java b/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java
index b3449cf0c..34755c1e6 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java
@@ -72,8 +72,9 @@ import java.io.IOException;
import java.util.Vector;
/**
- * Task that gets property values from a valid xml file,
+ * Loads property values from a valid XML file,
* generating the property names from the file's element and attribute names.
+ *
* Example:
* <pre>
* &lt;root-tag myattr="true"&gt;
diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java
index 7fdc74933..f666c4085 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Zip.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java
@@ -84,7 +84,7 @@ import org.apache.tools.zip.ZipOutputStream;
import org.apache.tools.zip.ZipEntry;
/**
- * Create a zipfile.
+ * Create a Zip file.
*
* @author James Davidson <a href="mailto:duncan@x180.com">duncan@x180.com</a>
* @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
@@ -116,9 +116,9 @@ public class Zip extends MatchingTask {
protected Hashtable addedDirs = new Hashtable();
private Vector addedFiles = new Vector();
- /**
+ /**
* true when we are adding new files into the Zip file, as opposed
- * to adding back the unchanged files
+ * to adding back the unchanged files
*/
private boolean addingNewFiles = false;
@@ -144,7 +144,7 @@ public class Zip extends MatchingTask {
* create the file.
* @since Ant 1.5
* @deprecated Use setDestFile(File) instead
- * @ant.attribute ignored="true"
+ * @ant.attribute ignore="true"
*/
public void setFile(File file) {
setDestFile(file);
@@ -276,12 +276,12 @@ public class Zip extends MatchingTask {
if (baseDir == null && filesets.size() == 0
&& groupfilesets.size() == 0 && "zip".equals(archiveType)) {
throw new BuildException("basedir attribute must be set, "
- + "or at least "
+ + "or at least "
+ "one fileset must be given!");
}
if (zipFile == null) {
- throw new BuildException("You must specify the "
+ throw new BuildException("You must specify the "
+ archiveType + " file to create!");
}
@@ -292,22 +292,6 @@ public class Zip extends MatchingTask {
addingNewFiles = true;
doUpdate = doUpdate && zipFile.exists();
- if (doUpdate) {
- FileUtils fileUtils = FileUtils.newFileUtils();
- renamedFile =
- fileUtils.createTempFile("zip", ".tmp",
- fileUtils.getParentFile(zipFile));
-
- try {
- if (!zipFile.renameTo(renamedFile)) {
- throw new BuildException("Unable to rename old file to "
- + "temporary file");
- }
- } catch (SecurityException e) {
- throw new BuildException("Not allowed to rename old file to "
- + "temporary file");
- }
- }
// Add the files found in groupfileset to fileset
for (int i = 0; i < groupfilesets.size(); i++) {
@@ -319,7 +303,7 @@ public class Zip extends MatchingTask {
File basedir = scanner.getBasedir();
for (int j = 0; j < files.length; j++) {
- log("Adding file " + files[j] + " to fileset",
+ log("Adding file " + files[j] + " to fileset",
Project.MSG_VERBOSE);
ZipFileSet zf = new ZipFileSet();
zf.setSrc(new File(basedir, files[j]));
@@ -348,9 +332,26 @@ public class Zip extends MatchingTask {
if (isUpToDate(scanners, zipFile)) {
return;
}
-
+
+ if (doUpdate) {
+ FileUtils fileUtils = FileUtils.newFileUtils();
+ renamedFile =
+ fileUtils.createTempFile("zip", ".tmp",
+ fileUtils.getParentFile(zipFile));
+
+ try {
+ if (!zipFile.renameTo(renamedFile)) {
+ throw new BuildException("Unable to rename old file "
+ + "to temporary file");
+ }
+ } catch (SecurityException e) {
+ throw new BuildException("Not allowed to rename old file "
+ + "to temporary file");
+ }
+ }
+
String action = doUpdate ? "Updating " : "Building ";
-
+
log(action + archiveType + ": " + zipFile.getAbsolutePath());
ZipOutputStream zOut =
@@ -416,16 +417,16 @@ public class Zip extends MatchingTask {
}
}
} catch (IOException ioe) {
- String msg = "Problem creating " + archiveType + ": "
+ String msg = "Problem creating " + archiveType + ": "
+ ioe.getMessage();
- // delete a bogus ZIP file
- if (!zipFile.delete()) {
+ // delete a bogus ZIP file (but only if it's not the original one)
+ if ((!doUpdate || renamedFile != null) && !zipFile.delete()) {
msg += " (and the archive is probably corrupt but I could not "
+ "delete it)";
}
- if (doUpdate) {
+ if (doUpdate && renamedFile != null) {
if (!renamedFile.renameTo(zipFile)) {
msg += " (and I couldn't rename the temporary file " +
renamedFile.getName() + " back)";
@@ -453,7 +454,7 @@ public class Zip extends MatchingTask {
* <p>Ensure parent directories have been added as well.
*/
protected void addFiles(FileScanner scanner, ZipOutputStream zOut,
- String prefix, String fullpath)
+ String prefix, String fullpath)
throws IOException {
if (prefix.length() > 0 && fullpath.length() > 0) {
@@ -504,7 +505,7 @@ public class Zip extends MatchingTask {
}
protected void addZipEntries(ZipFileSet fs, DirectoryScanner ds,
- ZipOutputStream zOut, String prefix,
+ ZipOutputStream zOut, String prefix,
String fullpath)
throws IOException {
log("adding zip entries: " + fullpath, Project.MSG_VERBOSE);
@@ -533,7 +534,7 @@ public class Zip extends MatchingTask {
} else {
addParentDirs(null, vPath, zOut, prefix);
if (!entry.isDirectory()) {
- zipFile(in, zOut, prefix + vPath, entry.getTime(),
+ zipFile(in, zOut, prefix + vPath, entry.getTime(),
zipSrc);
}
}
@@ -569,7 +570,7 @@ public class Zip extends MatchingTask {
// In this case using java.util.zip will not work
// because it does not permit a zero-entry archive.
// Must create it manually.
- log("Note: creating empty " + archiveType + " archive " + zipFile,
+ log("Note: creating empty " + archiveType + " archive " + zipFile,
Project.MSG_INFO);
OutputStream os = null;
try {
@@ -584,7 +585,7 @@ public class Zip extends MatchingTask {
os.write(empty);
} catch (IOException ioe) {
throw new BuildException("Could not create empty ZIP archive "
- + "(" + ioe.getMessage() + ")", ioe,
+ + "(" + ioe.getMessage() + ")", ioe,
location);
} finally {
if (os != null) {
@@ -607,7 +608,7 @@ public class Zip extends MatchingTask {
* already); false if archive creation should proceed
* @exception BuildException if it likes
*/
- protected boolean isUpToDate(FileScanner[] scanners, File zipFile)
+ protected boolean isUpToDate(FileScanner[] scanners, File zipFile)
throws BuildException {
String[][] fileNames = grabFileNames(scanners);
File[] files = grabFiles(scanners, fileNames);
@@ -627,7 +628,7 @@ public class Zip extends MatchingTask {
} else {
for (int i = 0; i < files.length; ++i) {
if (files[i].equals(zipFile)) {
- throw new BuildException("A zip file cannot include "
+ throw new BuildException("A zip file cannot include "
+ "itself", location);
}
}
@@ -716,12 +717,12 @@ public class Zip extends MatchingTask {
log(vPath + " already added, skipping", Project.MSG_INFO);
return;
} else if (duplicate.equals("fail")) {
- throw new BuildException("Duplicate file " + vPath
+ throw new BuildException("Duplicate file " + vPath
+ " was found and the duplicate "
+ "attribute is 'fail'.");
} else {
// duplicate equal to add, so we continue
- log("duplicate file " + vPath
+ log("duplicate file " + vPath
+ " found, adding.", Project.MSG_VERBOSE);
}
} else {
@@ -791,7 +792,7 @@ public class Zip extends MatchingTask {
protected void zipFile(File file, ZipOutputStream zOut, String vPath)
throws IOException {
if (file.equals(zipFile)) {
- throw new BuildException("A zip file cannot include itself",
+ throw new BuildException("A zip file cannot include itself",
location);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
index e5c5d221b..2b752ee2a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
@@ -74,8 +74,8 @@ import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.FileSet;
/**
- * Change log task.
- * The task will examine the output of cvs log and group related changes together.
+ * Examines the output of cvs log and group related changes together.
+ *
* It produces an XML output representing the list of changes.
* <PRE>
* <FONT color=#0000ff>&lt;!-- Root element --&gt;</FONT>
@@ -217,7 +217,7 @@ public class ChangeLogTask extends Task {
/**
* Execute task
*
- * @exception BuildException if something goes wrong executing the
+ * @exception BuildException if something goes wrong executing the
* cvs command
*/
public void execute() throws BuildException {
diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
index ca2131348..158c56916 100644
--- a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
+++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
@@ -70,8 +70,8 @@ import java.io.UnsupportedEncodingException;
import java.util.Vector;
/**
- * Cvs tag diff.
- * The task will examine the output of cvs rdiff between two tags.
+ * Examines the output of cvs rdiff between two tags.
+ *
* It produces an XML output representing the list of changes.
* <PRE>
* &lt;!-- Root element --&gt;
diff --git a/src/main/org/apache/tools/ant/taskdefs/defaults.properties b/src/main/org/apache/tools/ant/taskdefs/defaults.properties
index 92a7d4805..bb5ba235d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/defaults.properties
+++ b/src/main/org/apache/tools/ant/taskdefs/defaults.properties
@@ -61,7 +61,7 @@ checksum=org.apache.tools.ant.taskdefs.Checksum
waitfor=org.apache.tools.ant.taskdefs.WaitFor
input=org.apache.tools.ant.taskdefs.Input
loadfile=org.apache.tools.ant.taskdefs.LoadFile
-manifest=org.apache.tools.ant.taskdefs.Manifest
+manifest=org.apache.tools.ant.taskdefs.ManifestTask
loadproperties=org.apache.tools.ant.taskdefs.LoadProperties
basename=org.apache.tools.ant.taskdefs.Basename
dirname=org.apache.tools.ant.taskdefs.Dirname
@@ -119,12 +119,15 @@ stylebook=org.apache.tools.ant.taskdefs.optional.StyleBook
test=org.apache.tools.ant.taskdefs.optional.Test
pvcs=org.apache.tools.ant.taskdefs.optional.pvcs.Pvcs
p4change=org.apache.tools.ant.taskdefs.optional.perforce.P4Change
+p4delete=org.apache.tools.ant.taskdefs.optional.perforce.P4Delete
p4label=org.apache.tools.ant.taskdefs.optional.perforce.P4Label
p4have=org.apache.tools.ant.taskdefs.optional.perforce.P4Have
p4sync=org.apache.tools.ant.taskdefs.optional.perforce.P4Sync
p4edit=org.apache.tools.ant.taskdefs.optional.perforce.P4Edit
p4submit=org.apache.tools.ant.taskdefs.optional.perforce.P4Submit
p4counter=org.apache.tools.ant.taskdefs.optional.perforce.P4Counter
+p4revert=org.apache.tools.ant.taskdefs.optional.perforce.P4Revert
+p4reopen=org.apache.tools.ant.taskdefs.optional.perforce.P4Reopen
javah=org.apache.tools.ant.taskdefs.optional.Javah
ccupdate=org.apache.tools.ant.taskdefs.optional.clearcase.CCUpdate
cccheckout=org.apache.tools.ant.taskdefs.optional.clearcase.CCCheckout
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java b/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
index 9f0ae8298..437dbeb6e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
@@ -70,7 +70,7 @@ import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
/**
- * ANTLR task.
+ * Invokes the ANTLR Translator generator on a grammar file.
*
* @author <a href="mailto:emeade@geekfarm.org">Erik Meade</a>
* @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
@@ -121,32 +121,38 @@ public class ANTLR extends Task {
commandline.setClassname("antlr.Tool");
}
+ /**
+ * The grammar file to process.
+ */
public void setTarget(File target) {
log("Setting target to: " + target.toString(), Project.MSG_VERBOSE);
this.target = target;
}
+ /**
+ * The directory to write the generated files to.
+ */
public void setOutputdirectory(File outputDirectory) {
log("Setting output directory to: " + outputDirectory.toString(), Project.MSG_VERBOSE);
this.outputDirectory = outputDirectory;
}
/**
- * Sets an optional super grammar file
+ * Sets an optional super grammar file.
*/
public void setGlib(String superGrammar) {
this.superGrammar = superGrammar;
}
-
+
/**
* Sets a flag to enable ParseView debugging
*/
public void setDebug(boolean enable) {
debug = enable;
}
-
+
/**
- * Sets a flag to emit html
+ * If true, emit html
*/
public void setHtml(boolean enable) {
html = enable;
@@ -158,43 +164,46 @@ public class ANTLR extends Task {
public void setDiagnostic(boolean enable) {
diagnostic = enable;
}
-
+
/**
- * Sets a flag to enable all tracing
+ * If true, enables all tracing.
*/
public void setTrace(boolean enable) {
trace = enable;
}
-
+
/**
- * Sets a flag to enable parser tracing
+ * If true, enables parser tracing.
*/
public void setTraceParser(boolean enable) {
traceParser = enable;
}
-
+
/**
- * Sets a flag to allow the user to enable lexer tracing
+ * If true, enables lexer tracing.
*/
public void setTraceLexer(boolean enable) {
traceLexer = enable;
}
-
+
/**
* Sets a flag to allow the user to enable tree walker tracing
*/
public void setTraceTreeWalker(boolean enable) {
traceTreeWalker = enable;
}
-
+
// we are forced to fork ANTLR since there is a call
// to System.exit() and there is nothing we can do
// right now to avoid this. :-( (SBa)
// I'm not removing this method to keep backward compatibility
+ /**
+ * @ant.attribute ignore="true"
+ */
public void setFork(boolean s) {
//this.fork = s;
}
-
+
/**
* The working directory of the process
*/
@@ -203,15 +212,15 @@ public class ANTLR extends Task {
}
/**
- * <code>&lt;classpath&gt;</code> allows classpath to be set
- * because a directory might be given for Antlr debug...
+ * Adds a classpath to be set
+ * because a directory might be given for Antlr debug.
*/
public Path createClasspath() {
return commandline.createClasspath(project).createPath();
}
/**
- * Create a new JVM argument. Ignored if no JVM is forked.
+ * Adds a new JVM argument.
* @return create a new JVM argument so that any argument can be passed to the JVM.
* @see #setFork(boolean)
*/
@@ -266,7 +275,7 @@ public class ANTLR extends Task {
if (target.lastModified() > getGeneratedFile().lastModified()) {
populateAttributes();
commandline.createArgument().setValue(target.toString());
-
+
log(commandline.describeCommand(), Project.MSG_VERBOSE);
int err = run(commandline.getCommandline());
if (err == 1) {
@@ -312,12 +321,12 @@ public class ANTLR extends Task {
if (target == null || !target.isFile()) {
throw new BuildException("Invalid target: " + target);
}
-
+
// validate the superGrammar file
if (superGrammar != null && !new File(superGrammar).isFile()) {
throw new BuildException("Invalid super grammar file: " + superGrammar);
}
-
+
// if no output directory is specified, used the target's directory
if (outputDirectory == null) {
String fileName = target.toString();
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
index 319fad590..896d06d4f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
@@ -66,6 +66,8 @@ import org.w3c.dom.Element;
import java.util.Enumeration;
import java.util.Hashtable;
+import java.util.Enumeration;
+import java.util.Hashtable;
import java.util.Properties;
import java.io.ByteArrayOutputStream;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java b/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
index 0de4c5f67..32b0d2ccd 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
@@ -77,12 +77,12 @@ import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
/**
- * Instruments Java classes with <a href="http://www.reliable-systems.com/tools/">iContract</a>
- * DBC preprocessor.
+ * Instruments Java classes with iContract DBC preprocessor.
* <br/>
* The task can generate a properties file for <a href="http://hjem.sol.no/hellesoy/icontrol.html">iControl</a>,
* a graphical user interface that lets you turn on/off assertions. iControl generates a control file that you can refer to
* from this task using the controlfile attribute.
+ * iContract is at <a href="http://www.reliable-systems.com/tools/">http://www.reliable-systems.com/tools/</a>
* <p/>
* Thanks to Rainer Schmitz for enhancements and comments.
*
@@ -226,12 +226,6 @@ public class IContract extends MatchingTask {
private static final String ICONTROL_PROPERTIES_HEADER =
" You might want to set classRoot to point to your normal compilation class root directory.";
- private static final String ICONTROL_PROPERTIES_MESSAGE =
- "You should probably modify icontrol.properties' classRoot to where comiled (uninstrumented) classes go.";
-
- /** \ on windows, / on linux/unix */
- private static final String ps = System.getProperty("path.separator");
-
/** compiler to use for instrumenation */
private String icCompiler = "javac";
@@ -274,9 +268,6 @@ public class IContract extends MatchingTask {
/** The -q option */
private boolean quiet = false;
- /** Indicates whether or not to use internal compilation */
- private boolean internalcompilation = false;
-
/** The -m option */
private File controlFile = null;
@@ -305,9 +296,8 @@ public class IContract extends MatchingTask {
/** Regular compilation class root */
private File classDir = null;
-
/**
- * Sets the source directory
+ * Sets the source directory.
*
* @param srcDir the source directory
*/
@@ -317,9 +307,9 @@ public class IContract extends MatchingTask {
/**
- * Sets the class directory (uninstrumented classes)
+ * Sets the class directory (uninstrumented classes).
*
- * @param srcDir the source directory
+ * @param classDir the source directory
*/
public void setClassdir(File classDir) {
this.classDir = classDir;
@@ -327,7 +317,7 @@ public class IContract extends MatchingTask {
/**
- * Sets the instrumentation directory
+ * Sets the instrumentation directory.
*
* @param instrumentDir the source directory
*/
@@ -340,7 +330,7 @@ public class IContract extends MatchingTask {
/**
- * Sets the build directory for instrumented classes
+ * Sets the build directory for instrumented classes.
*
* @param buildDir the build directory
*/
@@ -350,7 +340,7 @@ public class IContract extends MatchingTask {
/**
- * Sets the build directory for repository classes
+ * Sets the build directory for repository classes.
*
* @param repositoryDir the source directory
*/
@@ -363,9 +353,9 @@ public class IContract extends MatchingTask {
/**
- * Sets the build directory for instrumented classes
+ * Sets the build directory for instrumented classes.
*
- * @param buildDir the build directory
+ * @param repBuildDir the build directory
*/
public void setRepbuilddir(File repBuildDir) {
this.repBuildDir = repBuildDir;
@@ -373,7 +363,7 @@ public class IContract extends MatchingTask {
/**
- * Turns on/off precondition instrumentation
+ * Turns on/off precondition instrumentation.
*
* @param pre true turns it on
*/
@@ -384,7 +374,7 @@ public class IContract extends MatchingTask {
/**
- * Turns on/off postcondition instrumentation
+ * Turns on/off postcondition instrumentation.
*
* @param post true turns it on
*/
@@ -395,7 +385,7 @@ public class IContract extends MatchingTask {
/**
- * Turns on/off invariant instrumentation
+ * Turns on/off invariant instrumentation.
*
* @param invariant true turns it on
*/
@@ -406,7 +396,7 @@ public class IContract extends MatchingTask {
/**
- * Sets the Throwable (Exception) to be thrown on assertion violation
+ * Sets the Throwable (Exception) to be thrown on assertion violation.
*
* @param clazz the fully qualified Throwable class name
*/
@@ -474,9 +464,12 @@ public class IContract extends MatchingTask {
/**
- * Creates a nested classpath element
+ * Sets the classpath.
*
* @return the nested classpath element
+ * @todo this overwrites the classpath so only one
+ * effective classpath element would work. This
+ * is not how we do this elsewhere.
*/
public Path createClasspath() {
if (classpath == null) {
@@ -497,7 +490,7 @@ public class IContract extends MatchingTask {
/**
- * Decides whether or not to update iControl properties file
+ * If true, updates iControl properties file
*
* @param updateIcontrol true if iControl properties file should be
* updated
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
index b7daeb43d..741c21126 100755
--- a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
@@ -71,8 +71,9 @@ import java.util.StringTokenizer;
import java.util.Enumeration;
/**
- * Task to generate JNI header files using javah. This task can take the following
- * arguments:
+ * Generates JNI header files using javah.
+ *
+ * This task can take the following arguments:
* <ul>
* <li>classname - the fully-qualified name of a class</li>
* <li>outputFile - Concatenates the resulting header or source files for all
@@ -118,10 +119,16 @@ public class Javah extends Task {
//private Path extdirs;
private static String lSep = System.getProperty("line.separator");
+ /**
+ * the fully-qualified name of the class (or classes, separated by commas).
+ */
public void setClass(String cls) {
this.cls = cls;
}
+ /**
+ * Adds class to process.
+ */
public ClassArgument createClass() {
ClassArgument ga = new ClassArgument();
classes.addElement(ga);
@@ -152,6 +159,9 @@ public class Javah extends Task {
this.destDir = destDir;
}
+ /**
+ * the classpath to use.
+ */
public void setClasspath(Path src) {
if (classpath == null) {
classpath = src;
@@ -159,6 +169,10 @@ public class Javah extends Task {
classpath.append(src);
}
}
+
+ /**
+ * Path to use for classpath.
+ */
public Path createClasspath() {
if (classpath == null) {
classpath = new Path(project);
@@ -167,12 +181,16 @@ public class Javah extends Task {
}
/**
- * Adds a reference to a CLASSPATH defined elsewhere.
+ * Adds a reference to a classpath defined elsewhere.
+ * @todo this needs to be documented in the HTML docs
*/
public void setClasspathRef(Reference r) {
createClasspath().setRefid(r);
}
+ /**
+ * location of bootstrap class files.
+ */
public void setBootclasspath(Path src) {
if (bootclasspath == null) {
bootclasspath = src;
@@ -180,6 +198,10 @@ public class Javah extends Task {
bootclasspath.append(src);
}
}
+
+ /**
+ * Adds path to bootstrap class files.
+ */
public Path createBootclasspath() {
if (bootclasspath == null) {
bootclasspath = new Path(project);
@@ -188,7 +210,8 @@ public class Javah extends Task {
}
/**
- * Adds a reference to a CLASSPATH defined elsewhere.
+ * Adds a reference to a classpath defined elsewhere.
+ * @todo this needs to be documented in the HTML
*/
public void setBootClasspathRef(Reference r) {
createBootclasspath().setRefid(r);
@@ -217,35 +240,39 @@ public class Javah extends Task {
//}
/**
- * Set the output file name.
+ * Concatenates the resulting header or source files for all
+ * the classes listed into this file.
*/
public void setOutputFile(File outputFile) {
this.outputFile = outputFile;
}
/**
- * Set the force-write flag.
+ * If true, output files should always be written (JDK1.2 only).
*/
public void setForce(boolean force) {
this.force = force;
}
/**
- * Set the old flag.
+ * If true, specifies that old JDK1.0-style header files should be
+ * generated.
+ * (otherwise output file contain JNI-style native method function prototypes) (JDK1.2 only)
*/
public void setOld(boolean old) {
this.old = old;
}
/**
- * Set the stubs flag.
+ * If true, generate C declarations from the Java object file (used with old).
*/
public void setStubs(boolean stubs) {
this.stubs = stubs;
}
/**
- * Set the verbose flag.
+ * If true, causes Javah to print a message concerning
+ * the status of the generated files.
*/
public void setVerbose(boolean verbose) {
this.verbose = verbose;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java b/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java
index fdc1bf7f7..cec2b55cf 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java
@@ -67,7 +67,7 @@ import org.apache.tools.ant.util.SourceFileScanner;
import java.io.File;
/**
- * Convert files from native encodings to ascii.
+ * Converts files from native encodings to ASCII.
*
* @author <a href="asudell@acm.org">Drew Sudell</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
index 7d35ea72b..a949b609a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
@@ -73,7 +73,8 @@ import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.EnumeratedAttribute;
/**
- * Task to compile NetRexx source files. This task can take the following
+ * Compiles NetRexx source files.
+ * This task can take the following
* arguments:
* <ul>
* <li>binary</li>
@@ -517,9 +518,8 @@ public class NetRexxC extends MatchingTask {
/**
- * Whether the task should suppress the "FooException is in SIGNALS list
- * but is not signalled within the method", which is sometimes rather
- * useless. The warning is logged as verbose message, though.
+ * Tells whether we should filter out any deprecation-messages
+ * of the compiler out.
*/
public void setSuppressDeprecation(boolean suppressDeprecation) {
this.suppressDeprecation = suppressDeprecation;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java b/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java
index aef99650f..798e578df 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java
@@ -78,10 +78,9 @@ import java.text.ParseException;
import java.text.DecimalFormat;
/**
- *PropertyFile task uses java.util.Properties to modify integer, String and
- *Date settings in a property file.<p>
- *
+ *Modifies settings in a property file.
*
+ * <p>
*The following is an example of its usage:
* <ul>&lt;target name="setState"&gt;<br>
* <ul>&lt;property<br>
@@ -240,10 +239,16 @@ public class PropertyFile extends Task {
}
}
+ /**
+ * Location of the property file to be edited; required.
+ */
public void setFile(File file) {
propertyfile = file;
}
+ /**
+ * optional header comment for the file
+ */
public void setComment(String hdr) {
comment = hdr;
}
@@ -280,8 +285,9 @@ public class PropertyFile extends Task {
}
}
- /*
+ /**
* Returns whether the given parameter has been defined.
+ * @todo IDEA is saying this method is never used - remove?
*/
private boolean checkParam(String param) {
return !((param == null) || (param.equals("null")));
@@ -308,27 +314,69 @@ public class PropertyFile extends Task {
private String pattern = null;
private int field = Calendar.DATE;
+ /**
+ * Name of the property name/value pair
+ */
public void setKey(String value) {
this.key = value;
}
+
+ /**
+ * Value to set (=), to add (+) or subtract (-)
+ */
public void setValue(String value) {
this.value = value;
}
+
+ /**
+ * operation to apply.
+ * &quot;+&quot; or &quot;=&quot;
+ *(default) for all datatypes; &quot;-&quot; for date and int only)\.
+ */
public void setOperation(Operation value) {
this.operation = Operation.toOperation(value.getValue());
}
+
+ /**
+ * Regard the value as : int, date or string (default)
+ */
public void setType(Type value) {
this.type = Type.toType(value.getValue());
}
+
+ /**
+ * Initial value to set for a property if it is not
+ * already defined in the property file.
+ * For type date, an additional keyword is allowed: &quot;now&quot;
+ */
+
public void setDefault(String value) {
this.defaultValue = value;
}
+
+ /**
+ * For int and date type only. If present, Values will
+ * be parsed and formatted accordingly.
+ */
public void setPattern(String value) {
this.pattern = value;
}
/**
- * @since 1.15, Ant 1.5
+ * The unit of the value to be applied to date +/- operations.
+ * Valid Values are:
+ * <ul>
+ * <li>millisecond</li>
+ * <li>second</li>
+ * <li>minute</li>
+ * <li>hour</li>
+ * <li>day (default)</li>
+ * <li>week</li>
+ * <li>month</li>
+ * <li>year</li>
+ * </ul>
+ * This only applies to date types using a +/- operation.
+ * @since Ant 1.5
*/
public void setUnit(PropertyFile.Unit unit) {
field = unit.getCalendarField();
@@ -598,8 +646,8 @@ public class PropertyFile extends Task {
/**
* Borrowed from Tstamp
- *
- * @since 1.15, Ant 1.5
+ * @todo share all this time stuff across many tasks as a datetime datatype
+ * @since Ant 1.5
*/
public static class Unit extends EnumeratedAttribute {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java b/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
index 86855404a..6104412d2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
@@ -97,12 +97,17 @@ public class RenameExtensions extends MatchingTask {
globType.setValue("glob");
}
- /** store fromExtension **/
+ /**
+ * The string that files must end in to be renamed
+ **/
public void setFromExtension(String from) {
fromExtension = from;
}
- /** store toExtension **/
+ /**
+ * The string that renamed files will end with on
+ * completion
+ */
public void setToExtension(String to) {
toExtension = to;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
index f0531ff4b..6a4602d9f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
@@ -74,8 +74,7 @@ import java.io.PrintWriter;
import java.util.Vector;
/**
- * <pre>
- * Task to do regular expression string replacements in a text
+ * Performs regular expression string replacements in a text
* file. The input file(s) must be able to be properly processed by
* a Reader instance. That is, they must be text only, no binary.
*
@@ -85,6 +84,7 @@ import java.util.Vector;
* is <code>org.apache.tools.ant.util.regexp.JakartaOroRegexp</code> and
* requires the Jakarta Oro Package).
*
+ * <pre>
* For jdk &lt;= 1.3, there are two available implementations:
* org.apache.tools.ant.util.regexp.JakartaOroRegexp (the default)
* Requires the jakarta-oro package
@@ -169,11 +169,19 @@ public class ReplaceRegExp extends Task {
}
+ /**
+ * file for which the regular expression should be replaced;
+ * required unless a nested fileset is supplied.
+ */
public void setFile(File file) {
this.file = file;
}
+ /**
+ * the regular expression pattern to match in the file(s);
+ * required if no nested &lt;regexp&gt; is used
+ */
public void setMatch(String match) {
if (regex != null) {
throw new BuildException("Only one regular expression is allowed");
@@ -184,6 +192,12 @@ public class ReplaceRegExp extends Task {
}
+ /**
+ * The substitution pattern to place in the file(s) in place
+ * of the regular expression.
+ * Required if no nested &lt;substitution&gt; is used
+ */
+
public void setReplace(String replace) {
if (subs != null) {
throw new BuildException("Only one substitution expression is "
@@ -194,12 +208,30 @@ public class ReplaceRegExp extends Task {
subs.setExpression(replace);
}
-
+ /**
+ * The flags to use when matching the regular expression. For more
+ * information, consult the Perl5 syntax.
+ * <ul>
+ * <li>g : Global replacement. Replace all occurences found
+ * <li>i : Case Insensitive. Do not consider case in the match
+ * <li>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.
+ * <li> 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.
+ *</ul>
+ */
public void setFlags(String flags) {
this.flags = flags;
}
+ /**
+ * Process the file(s) one line at a time, executing the replacement
+ * on one line at a time. This is useful if you
+ * want to only replace the first occurence of a regular expression on
+ * each line, which is not easy to do when processing the file as a whole.
+ * Defaults to <i>false</i>.</td>
+ */
public void setByLine(String byline) {
Boolean res = Boolean.valueOf(byline);
@@ -210,11 +242,19 @@ public class ReplaceRegExp extends Task {
}
+ /**
+ * list files to apply the replacement to
+ */
public void addFileset(FileSet set) {
filesets.addElement(set);
}
+ /**
+ * A regular expression.
+ * You can use this element to refer to a previously
+ * defined regular expression datatype instance
+ */
public RegularExpression createRegexp() {
if (regex != null) {
throw new BuildException("Only one regular expression is allowed.");
@@ -225,6 +265,10 @@ public class ReplaceRegExp extends Task {
}
+ /**
+ * A substitution pattern. You can use this element to refer to a previously
+ * defined substitution pattern datatype instance.
+ */
public Substitution createSubstitution() {
if (subs != null) {
throw new BuildException("Only one substitution expression is "
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
index a6a971e5c..8b8b964e6 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
@@ -70,7 +70,7 @@ import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
/**
- *
+ * Invokes the rpm tool to build a Linux installation file.
* @author lucas@collab.net
*/
public class Rpm extends Task {
@@ -195,14 +195,27 @@ public class Rpm extends Task {
}
}
+ /**
+ * The directory which will have the expected
+ * subdirectories, SPECS, SOURCES, BUILD, SRPMS ; optional.
+ * If this isn't specified,
+ * the <tt>baseDir</tt> value is used
+ */
public void setTopDir(File td) {
this.topDir = td;
}
+ /**
+ * What command to issue to the rpm tool; optional.
+ * The default is "-bb"
+ */
public void setCommand(String c) {
this.command = c;
}
+ /**
+ * The name of the spec File to use; required.
+ */
public void setSpecFile(String sf) {
if ((sf == null) || (sf.trim().equals(""))) {
throw new BuildException("You must specify a spec file", location);
@@ -210,22 +223,40 @@ public class Rpm extends Task {
this.specFile = sf;
}
+ /**
+ * Flag (optional, default=false) to remove
+ * the generated files in the BUILD directory
+ */
public void setCleanBuildDir(boolean cbd) {
cleanBuildDir = cbd;
}
+ /**
+ * Flag (optional, default=false) to remove the spec file from SPECS
+ */
public void setRemoveSpec(boolean rs) {
removeSpec = rs;
}
+ /**
+ * Flag (optional, default=false)
+ * to remove the sources after the build.
+ * See the the <tt>--rmsource</tt> option of rpmbuild.
+ */
public void setRemoveSource(boolean rs) {
removeSource = rs;
}
+ /**
+ * Optional file to save stdout to.
+ */
public void setOutput(File output) {
this.output = output;
}
+ /**
+ * Optional file to save stderr to
+ */
public void setError(File error) {
this.error = error;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Script.java b/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
index e384fdbe1..0e0f671ef 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
@@ -64,7 +64,7 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.BuildException;
/**
- * Execute a script
+ * Executes a script.
*
* @ant.task name="script"
* @author Sam Ruby <a href="mailto:rubys@us.ibm.com">rubys@us.ibm.com</a>
@@ -154,7 +154,7 @@ public class Script extends Task {
}
/**
- * Load the script from an external file
+ * Load the script from an external file ; optional.
*
* @param msg Sets the value for the script variable.
*/
@@ -179,7 +179,7 @@ public class Script extends Task {
}
/**
- * Defines the script.
+ * The script text.
*
* @param msg Sets the value for the script variable.
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/StyleBook.java b/src/main/org/apache/tools/ant/taskdefs/optional/StyleBook.java
index be7d1044d..0aa4cc35b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/StyleBook.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/StyleBook.java
@@ -60,8 +60,14 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.Java;
/**
- * Basic task for apache stylebook.
- *
+ * Executes the Apache Stylebook documentation generator.
+ * Unlike the commandline version of this tool, all three arguments
+ * are required to run stylebook.
+ * <p>
+ * Being extended from &lt;Java&gt;, all the parent's attributes
+ * and options are available. Do not set any apart from the <tt>classpath</tt>
+ * as they are not guaranteed to be there in future.
+ * @todo stop extending from Java.
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
* @author <a href="mailto:marcus.boerger@post.rwth-aachen.de">Marcus
* B&ouml;rger</a>
@@ -80,27 +86,44 @@ public class StyleBook
setFailonerror(true);
}
-
+ /**
+ * The book xml file that the documentation generation starts from;
+ * required.
+ */
+
public void setBook(final File book) {
m_book = book;
}
+ /**
+ * the directory that contains the stylebook skin;
+ * required.
+ */
public void setSkinDirectory(final File skinDirectory) {
m_skinDirectory = skinDirectory;
}
+ /**
+ * the destination directory where the documentation is generated;
+ * required.
+ */
public void setTargetDirectory(final File targetDirectory) {
m_targetDirectory = targetDirectory;
}
-
+ /**
+ * A loader configuration to send to stylebook; optional.
+ */
public void setLoaderConfig(final String loaderConfig) {
m_loaderConfig = loaderConfig;
}
+ /**
+ * call the program
+ */
public void execute()
throws BuildException {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Test.java b/src/main/org/apache/tools/ant/taskdefs/optional/Test.java
index 2469f90a4..29bfc78d7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/Test.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/Test.java
@@ -58,18 +58,25 @@ import org.apache.tools.ant.taskdefs.Java;
import java.util.Vector;
/**
+ * This is a primitive task to execute a unit test in the org.apache.testlet framework.
+ *
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
+ * @ant.task ignore="true"
*/
public class Test extends Java {
protected Vector m_tests = new Vector();
+ /**
+ * testlet to run
+ */
protected static final class TestletEntry {
protected String m_testname = "";
+ /** name of test. No property expansion takes place here */
public void addText(final String testname) {
m_testname += testname;
}
@@ -86,6 +93,9 @@ public class Test extends Java {
}
+ /**
+ * add a declaration of a testlet to run
+ */
public TestletEntry createTestlet() {
final TestletEntry entry = new TestletEntry();
@@ -94,16 +104,29 @@ public class Test extends Java {
}
+ /**
+ * a boolean value indicating whether tests should display a
+ * message on success; optional
+ */
+
public void setShowSuccess(final boolean showSuccess) {
createArg().setValue("-s=" + showSuccess);
}
+ /**
+ * a boolean value indicating whether a banner should be displayed
+ * when starting testlet engine; optional.
+ */
public void setShowBanner(final String showBanner) {
createArg().setValue("-b=" + showBanner);
}
+ /**
+ * a boolean indicating that a stack trace is displayed on
+ * error (but not normal failure); optional.
+ */
public void setShowTrace(final boolean showTrace) {
createArg().setValue("-t=" + showTrace);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java b/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
index 6875b9fbc..1e47a6c43 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
@@ -78,7 +78,6 @@ import javax.xml.transform.Templates;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.URIResolver;
@@ -107,7 +106,7 @@ public class TraXLiaison implements XSLTLiaison, ErrorListener, XSLTLoggerAware
private Transformer transformer = null;
private XSLTLogger logger;
-
+
/** possible resolver for publicIds */
private EntityResolver entityResolver;
@@ -119,6 +118,21 @@ public class TraXLiaison implements XSLTLiaison, ErrorListener, XSLTLoggerAware
tfactory.setErrorListener(this);
}
+
+ /**
+ * Set the output property for the current transformer.
+ * Note that the stylesheet must be set prior to calling
+ * this method.
+ * @param name the output property name.
+ * @param value the output property value.
+ */
+ public void setOutputProperty(String name, String value){
+ if (transformer == null){
+ throw new IllegalStateException("stylesheet must be set prior to setting the output properties");
+ }
+ transformer.setOutputProperty(name, value);
+ }
+
//------------------- IMPORTANT
// 1) Don't use the StreamSource(File) ctor. It won't work with
// xalan prior to 2.2 because of systemid bugs.
@@ -152,7 +166,7 @@ public class TraXLiaison implements XSLTLiaison, ErrorListener, XSLTLoggerAware
if (entityResolver != null) {
if (tfactory.getFeature(SAXSource.FEATURE)) {
SAXParserFactory spFactory = SAXParserFactory.newInstance();
- spFactory.setNamespaceAware(true);
+ spFactory.setNamespaceAware(true);
XMLReader reader = spFactory.newSAXParser().getXMLReader();
reader.setEntityResolver(entityResolver);
src = new SAXSource(reader, new InputSource(fis));
@@ -214,32 +228,28 @@ public class TraXLiaison implements XSLTLiaison, ErrorListener, XSLTLoggerAware
transformer.setParameter(name, value);
}
- public void setOutputtype(String type) throws Exception {
- transformer.setOutputProperty(OutputKeys.METHOD, type);
- }
-
public void setLogger(XSLTLogger l) {
logger = l;
}
-
+
public void error(TransformerException e) {
logError(e, "Error");
}
-
+
public void fatalError(TransformerException e) {
logError(e, "Fatal Error");
throw new BuildException("Fatal error during transformation", e);
}
-
+
public void warning(TransformerException e) {
logError(e, "Warning");
}
-
+
private void logError(TransformerException e, String type) {
if (logger == null) {
return;
}
-
+
StringBuffer msg = new StringBuffer();
if (e.getLocator() != null) {
if (e.getLocator().getSystemId() != null) {
@@ -251,7 +261,7 @@ public class TraXLiaison implements XSLTLiaison, ErrorListener, XSLTLoggerAware
} else {
msg.append("Unknown file");
}
- if (e.getLocator().getLineNumber() != -1) {
+ if (e.getLocator().getLineNumber() != -1) {
msg.append(":" + e.getLocator().getLineNumber());
if (e.getLocator().getColumnNumber() != -1) {
msg.append(":" + e.getLocator().getColumnNumber());
@@ -269,14 +279,14 @@ public class TraXLiaison implements XSLTLiaison, ErrorListener, XSLTLoggerAware
/** Set the class to resolve entities during the transformation
*/
- public void setEntityResolver(EntityResolver aResolver) throws Exception {
+ public void setEntityResolver(EntityResolver aResolver) {
entityResolver = aResolver;
}
/** Set the class to resolve URIs during the transformation
*/
- public void setURIResolver(URIResolver aResolver) throws Exception {
+ public void setURIResolver(URIResolver aResolver) {
uriResolver = aResolver;
}
-
+
} //-- TraXLiaison
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java
index 63c176265..7d9f519b7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java
@@ -87,8 +87,10 @@ import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.ParserAdapter;
/**
- * The <code>XMLValidateTask</code> checks that an XML document is valid,
- * with a SAX validating parser.
+ * Checks 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 Ant itself), but one can specify any
+ * SAX1/2 parser if needed
* @author Raphael Pierquin <a href="mailto:raphael.pierquin@agisphere.com">raphael.pierquin@agisphere.com</a>
*/
public class XMLValidateTask extends Task {
@@ -122,7 +124,8 @@ public class XMLValidateTask extends Task {
private XMLCatalog xmlCatalog = new XMLCatalog();
/**
- * Specify how parser error are to be handled.
+ * Specify how parser error are to be handled;
+ * optional, default=true
* <p>
* If set to <code>true</code> (default), throw a buildException if the parser yields an error.
*/
@@ -193,6 +196,7 @@ public class XMLValidateTask extends Task {
}
/**
+ * Where to find the parser class; optional.
* @see #setClasspath
*/
public void setClasspathRef(Reference r) {
@@ -200,21 +204,21 @@ public class XMLValidateTask extends Task {
}
/**
- * specifify the file to be checked
+ * specify the file to be checked; optional.
*/
public void setFile(File file) {
this.file = file;
}
/**
- *
+ * add an XMLCatalog as a nested element; optional.
*/
public void addConfiguredXMLCatalog(XMLCatalog catalog) {
xmlCatalog.addConfiguredXMLCatalog(catalog);
}
/**
- * specifify a set of file to be checked
+ * specify a set of file to be checked
*/
public void addFileset(FileSet set) {
filesets.addElement(set);
@@ -226,7 +230,8 @@ public class XMLValidateTask extends Task {
}
/**
- * Create a DTD location record. This stores the location of a DTD. The DTD is identified
+ * Create a DTD location record; optional.
+ * This stores the location of a DTD. The DTD is identified
* by its public Id.
*/
public DTDLocation createDTD() {
@@ -353,9 +358,9 @@ public class XMLValidateTask extends Task {
}
}
- /*
+ /**
* set a feature on the parser.
- * TODO: find a way to set any feature from build.xml
+ * @todo find a way to set any feature from build.xml
*/
private boolean setFeature(String feature, boolean value, boolean warn) {
@@ -380,7 +385,8 @@ public class XMLValidateTask extends Task {
}
return toReturn;
}
- /*
+
+ /**
* parse the file
*/
private void doValidate(File afile) {
@@ -415,7 +421,7 @@ public class XMLValidateTask extends Task {
}
}
- /*
+ /**
* ValidatorErrorHandler role :
* <ul>
* <li> log SAX parse exceptions,
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java b/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java
index 589dafeb4..066d4dbfd 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java
@@ -130,9 +130,4 @@ public class XalanLiaison implements XSLTLiaison {
processor.setStylesheetParam(name, value);
}
- public void setOutputtype(String type) throws Exception {
- if (!type.equals("xml")) {
- throw new BuildException("Unsupported output type: " + type);
- }
- }
} //-- XalanLiaison
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java b/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java
index f9806049a..0a8a1b27d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java
@@ -103,10 +103,4 @@ public class XslpLiaison implements XSLTLiaison {
processor.setProperty(name, expression);
}
- public void setOutputtype(String type) throws Exception {
- if (!type.equals("xml")) {
- throw new BuildException("Unsupported output type: " + type);
- }
- }
-
} //-- XSLPLiaison
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
index 10de5b7e1..1de708c17 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
@@ -74,7 +74,7 @@ import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.util.depend.DependencyAnalyzer;
/**
- * Generate a dependency file for a given set of classes
+ * Generates a dependency file for a given set of classes.
*
* @author Conor MacNeill
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
index 57aad1a53..b63f8380c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
@@ -156,6 +156,7 @@ import org.apache.tools.ant.types.Path;
*@author Steve Loughran steve_l@iseran.com
*@version 0.5
*@ant.task name="csc" category="dotnet"
+ * @since Ant 1.3
*/
public class CSharp
@@ -208,7 +209,8 @@ public class CSharp
private File win32res;
/**
- * Description of the Field
+ * A flag that tells the compiler not to read in the compiler
+ * settings files 'csc.rsp' in its bin directory and then the local directory
*/
private boolean noconfig = false;
@@ -850,11 +852,12 @@ public class CSharp
/**
- * Sets the noConfig attribute of the CSharp object
+ * A flag that tells the compiler not to read in the compiler
+ * settings files 'csc.rsp' in its bin directory and then the local directory
*
*@param enabled The new noConfig value
*/
- protected void setNoConfig(boolean enabled) {
+ public void setNoConfig(boolean enabled) {
noconfig = enabled;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
index b24753de0..f7f56a103 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
@@ -78,7 +78,7 @@ import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
/**
- * Task to assemble .net 'Intermediate Language' files. The task will only work
+ * Assembles .NET Intermediate Language files. The task will only work
* on win2K until other platforms support csc.exe or an equivalent. ilasm.exe
* must be on the execute path too. <p>
*
@@ -207,9 +207,9 @@ public class Ilasm
/**
- * Set the source dir to find the files to be compiled
+ * Set the source directory containing the files to be compiled.
*
- *@param srcDirName The new SrcDir value
+ * @param srcDirName The new SrcDir value
*/
public void setSrcDir(File srcDirName) {
srcDir = srcDirName;
@@ -217,13 +217,12 @@ public class Ilasm
/**
- * define the target
+ * Sets the type of target, either "exe" or "library".
*
*@param targetType one of exe|library|
*@exception BuildException if target is not one of
- * exe|library|module|winexe
+ * exe|library
*/
-
public void setTargetType(String targetType)
throws BuildException {
this.targetType = targetType.toLowerCase();
@@ -266,11 +265,11 @@ public class Ilasm
/**
- * Sets the Owner attribute
+ * Sets the Owner attribute.
*
- *@param s The new Owner value
+ * @param s The new Owner value
+ * @ant.attribute ignore="true"
*/
-
public void setOwner(String s) {
log("This option is not supported by ILASM as of Beta-2, and will be ignored", Project.MSG_WARN);
}
@@ -288,7 +287,7 @@ public class Ilasm
/**
- * enable/disable verbose ILASM output
+ * If true, enable verbose ILASM output.
*
*@param b flag set to true for verbose on
*/
@@ -308,7 +307,7 @@ public class Ilasm
/**
- * enable/disable listing
+ * If true, produce a listing (off by default).
*
*@param b flag set to true for listing on
*/
@@ -328,7 +327,7 @@ public class Ilasm
/**
- * Set the output file
+ * Set the output file.
*
*@param params The new outputFile value
*/
@@ -352,9 +351,9 @@ public class Ilasm
/**
- * Set the resource file
+ * name of resource file to include.
*
- *@param fileName path to the file. Can be relative, absolute, whatever.
+ * @param fileName path to the file. Can be relative, absolute, whatever.
*/
public void setResourceFile(File fileName) {
resourceFile = fileName;
@@ -376,7 +375,7 @@ public class Ilasm
/**
- * set fail on error flag
+ * If true, fails if ilasm tool fails.
*
*@param b The new failOnError value
*/
@@ -396,7 +395,7 @@ public class Ilasm
/**
- * set the debug flag on or off
+ * set the debug flag on or off.
*
*@param f on/off flag
*/
@@ -426,7 +425,7 @@ public class Ilasm
/**
- * Sets the keyfile attribute of the Ilasm object
+ * the name of a file containing a private key.
*
*@param keyfile The new keyfile value
*/
@@ -450,7 +449,8 @@ public class Ilasm
/**
- * Sets the ExtraOptions attribute
+ * Any extra options which are not explicitly
+ * supported by this task.
*
*@param extraOptions The new ExtraOptions value
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java
index 3772e1c23..6f4e59465 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java
@@ -58,7 +58,8 @@ import org.apache.tools.ant.BuildException;
import java.io.File;
/**
- * Task to convert a WSDL file/url into a dotnet language.
+ * Converts a WSDL file or URL resource into a .NET language.
+ *
* See "Creating an XML Web Service Proxy", "wsdl.exe" docs in
* the framework SDK documentation
* @author Steve Loughran steve_l@iseran.com
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
index ab8d42da0..9a6c54584 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
@@ -63,7 +63,7 @@ import org.apache.tools.ant.types.Path;
import java.io.File;
/**
- * Build a serialised deployment descriptor given a text file description of the
+ * Builds a serialized deployment descriptor given a text file description of the
* descriptor in the format supported by WebLogic.
*
* This ant task is a front end for the weblogic DDCreator tool.
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
index 59429a550..e4ec51a36 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
@@ -76,8 +76,9 @@ import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.FileSet;
/**
+ * Provides automated EJB JAR file creation.
* <p>
- * Provides automated EJB JAR file creation. Extends the
+ * Extends the
* MatchingTask class provided in the default ant distribution to provide a
* directory scanning EJB jarfile generator.
* </p>
@@ -473,7 +474,7 @@ public class EjbJar extends MatchingTask {
/**
* Controls whether the
- * destination jars are written out in the destination directory with
+ * destination JARs are written out in the destination directory with
* the same hierarchical structure from which the deployment descriptors
* have been read. If this is set to true the generated EJB jars are
* written into the root of the destination directory, otherwise they
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
index 0b30460a2..81dbd8131 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
@@ -63,7 +63,7 @@ import org.apache.tools.ant.types.Path;
import java.io.File;
/**
- * Build EJB support classes using Weblogic's ejbc tool from a directory containing
+ * Builds EJB support classes using WebLogic's ejbc tool from a directory containing
* a set of deployment descriptors.
*
*
@@ -184,6 +184,11 @@ public class Ejbc extends MatchingTask {
generatedFilesDirectory = new File(dirName);
}
+ /**
+ * If true, ejbc will keep the
+ * intermediate Java files used to build the class files.
+ * This can be useful when debugging.
+ */
public void setKeepgenerated(String newKeepgenerated) {
keepgenerated = Boolean.valueOf(newKeepgenerated.trim()).booleanValue();
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
index 14e1998a4..6ef63de85 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
@@ -169,8 +169,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
/**
- * Setter used to store the value of destination directory prior to
- * execute() being called.
+ * Set the destination directory; required.
* @param inDir the destination directory.
*/
public void setDestdir(File inDir) {
@@ -225,7 +224,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
}
/**
- * Setter used to store the suffix for the generated jar file.
+ * Set the suffix for the generated jar file.
* @param inString the string to use as the suffix.
*/
public void setGenericJarSuffix(String inString) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
index 5e034dc29..502864c9c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
@@ -80,7 +80,7 @@ import org.xml.sax.InputSource;
import org.xml.sax.AttributeList;
/**
- * Utility class to compile EJB stubs and skeletons for the iPlanet Application
+ * Compiles EJB stubs and skeletons for the iPlanet Application
* Server (iAS). The class will read a standard EJB descriptor (as well as an
* EJB descriptor specific to iPlanet Application Server) to identify one or
* more EJBs to process. It will search for EJB "source" classes (the remote
@@ -102,6 +102,7 @@ import org.xml.sax.AttributeList;
* @see IPlanetDeploymentTool
* @see IPlanetEjbcTask
* @author Greg Nelson <a href="mailto:greg@netscape.com">greg@netscape.com</a>
+ * @ant.task ignore="true"
*/
public class IPlanetEjbc {
@@ -160,6 +161,8 @@ public class IPlanetEjbc {
* by the iAS ejbc utility.
* @param parser SAXParser to be used to process both of the EJB
* descriptors.
+ * @todo classpathElements is not needed here, its never used
+ * (at least IDEA tells me so! :)
*/
public IPlanetEjbc(File stdDescriptor,
File iasDescriptor,
@@ -189,19 +192,19 @@ public class IPlanetEjbc {
}
/**
- * Sets whether or not the Java source files which are generated by the
- * ejbc process should be retained or automatically deleted.
+ * If true, the Java source files which are generated by the
+ * ejbc process are retained.
*
- * @param retainsource A boolean indicating if the Java source files for
+ * @param retainSource A boolean indicating if the Java source files for
* the stubs and skeletons should be retained.
+ * @todo This is not documented in the HTML. On purpose?
*/
public void setRetainSource(boolean retainSource) {
this.retainSource = retainSource;
}
/**
- * Sets whether or not debugging output will be generated when ejbc is
- * executed.
+ * If true, enables debugging output when ejbc is executed.
*
* @param debugOutput A boolean indicating if debugging output should be
* generated
@@ -224,11 +227,11 @@ public class IPlanetEjbc {
}
/**
- * Setter method used to store the "home" directory of the user's iAS
- * installation. The directory specified should typically be
+ * May be used to specify the "home" directory for this iAS installation.
+ * The directory specified should typically be
* <code>[install-location]/iplanet/ias6/ias</code>.
*
- * @param iashome The home directory for the user's iAS installation.
+ * @param iasHomeDir The home directory for the user's iAS installation.
*/
public void setIasHomeDir(File iasHomeDir) {
this.iasHomeDir = iasHomeDir;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
index 247094be4..66e86e20c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
@@ -67,7 +67,7 @@ import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.BuildException;
/**
- * Task to compile EJB stubs and skeletons for the iPlanet Application Server.
+ * Compiles EJB stubs and skeletons for the iPlanet Application Server.
* The EJBs to be processed are specified by the EJB 1.1 standard XML
* descriptor, and additional attributes are obtained from the iPlanet Application
* Server-specific XML descriptor. Since the XML descriptors can include
@@ -156,7 +156,7 @@ public class IPlanetEjbcTask extends Task {
}
/**
- * Sets the destination directory where the EJB "source" classes must exist
+ * Sets the destination directory where the EJB source classes must exist
* and where the stubs and skeletons will be written. The destination
* directory must exist before this task is executed.
*
@@ -180,7 +180,7 @@ public class IPlanetEjbcTask extends Task {
}
/**
- * Creates a nested classpath element.
+ * Adds to the classpath used when compiling the EJB stubs and skeletons.
*/
public Path createClasspath() {
if (classpath == null) {
@@ -190,8 +190,7 @@ public class IPlanetEjbcTask extends Task {
}
/**
- * Sets whether or not the Java source files which are generated by the
- * ejbc process should be retained or automatically deleted.
+ * If true, the Java source files which are generated by ejbc will be saved .
*
* @param keepgenerated A boolean indicating if the Java source files for
* the stubs and skeletons should be retained.
@@ -201,7 +200,7 @@ public class IPlanetEjbcTask extends Task {
}
/**
- * Sets whether or not debugging output will be generated when ejbc is
+ * If true, debugging output will be generated when ejbc is
* executed.
*
* @param debug A boolean indicating if debugging output should be generated
@@ -211,8 +210,8 @@ public class IPlanetEjbcTask extends Task {
}
/**
- * Setter method used to store the "home" directory of the user's iAS
- * installation. The directory specified should typically be
+ * May be used to specify the "home" directory for this iAS installation.
+ * The directory specified should typically be
* <code>[install-location]/iplanet/ias6/ias</code>.
*
* @param iashome The home directory for the user's iAS installation.
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
index b6fddc88f..11185582f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,8 +63,9 @@ import org.apache.tools.ant.types.Path;
import java.io.File;
/**
- * Execute a Weblogic server.
-
+ * Starts a WebLogic server.
+ * 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.</p>
*
* @author Conor MacNeill, Cortex ebusiness Pty Limited
*/
@@ -85,17 +86,17 @@ public class WLRun extends Task {
private Path weblogicClasspath;
private String weblogicMainClass = "weblogic.Server";
-
+
/**
* Addional arguments to pass to the JVM used to run weblogic
*/
private String additionalArgs = "";
-
+
/**
* The security policy to use when running the weblogic server
*/
private String securityPolicy;
-
+
/**
* The weblogic system home directory
*/
@@ -105,13 +106,13 @@ public class WLRun extends Task {
* The weblogic domain
*/
private String weblogicDomainName;
-
+
/**
- * The name of the weblogic server - used to select the server's directory in the
+ * The name of the weblogic server - used to select the server's directory in the
* weblogic home directory.
*/
private String weblogicSystemName = "myserver";
-
+
/**
* The file containing the weblogic properties for this server.
*/
@@ -132,7 +133,7 @@ public class WLRun extends Task {
* The management username
*/
private String managementUsername = "system";
-
+
/**
* The management password
*/
@@ -166,10 +167,10 @@ public class WLRun extends Task {
/**
* Do the work.
*
- * The work is actually done by creating a separate JVM to run a helper task.
- * This approach allows the classpath of the helper task to be set. Since the
- * weblogic tools require the class files of the project's home and remote
- * interfaces to be available in the classpath, this also avoids having to
+ * The work is actually done by creating a separate JVM to run a helper task.
+ * This approach allows the classpath of the helper task to be set. Since the
+ * weblogic tools require the class files of the project's home and remote
+ * interfaces to be available in the classpath, this also avoids having to
* start ant with the class path of the project it is building.
*
* @exception BuildException if someting goes wrong with the build
@@ -179,7 +180,7 @@ public class WLRun extends Task {
throw new BuildException("weblogic home must be set");
}
if (!weblogicSystemHome.isDirectory()) {
- throw new BuildException("weblogic home directory " + weblogicSystemHome.getPath() +
+ throw new BuildException("weblogic home directory " + weblogicSystemHome.getPath() +
" is not valid");
}
@@ -189,7 +190,7 @@ public class WLRun extends Task {
executeWLS();
}
}
-
+
private File findSecurityPolicyFile(String defaultSecurityPolicy) {
String securityPolicy = this.securityPolicy;
if (securityPolicy == null) {
@@ -208,22 +209,22 @@ public class WLRun extends Task {
}
return securityPolicyFile;
}
-
+
private void executeWLS6() {
- File securityPolicyFile
+ File securityPolicyFile
= findSecurityPolicyFile(DEFAULT_WL60_POLICY_FILE);
if (!beaHome.isDirectory()) {
- throw new BuildException("BEA home " + beaHome.getPath() +
+ throw new BuildException("BEA home " + beaHome.getPath() +
" is not valid");
}
-
- File configFile = new File(weblogicSystemHome, "config/"
+
+ File configFile = new File(weblogicSystemHome, "config/"
+ weblogicDomainName + "/config.xml");
if (!configFile.exists()) {
- throw new BuildException("Server config file " + configFile
+ throw new BuildException("Server config file " + configFile
+ " not found.");
}
-
+
if (managementPassword == null) {
throw new BuildException("You must supply a management password to start the server");
}
@@ -235,38 +236,38 @@ public class WLRun extends Task {
weblogicServer.setClassname(weblogicMainClass);
String jvmArgs = additionalJvmArgs;
-
+
jvmArgs += " -Dweblogic.Domain=" + weblogicDomainName;
jvmArgs += " -Dweblogic.Name=" + weblogicSystemName;
jvmArgs += " -Dweblogic.system.home=" + weblogicSystemHome;
jvmArgs += " -Dbea.home=" + beaHome;
jvmArgs += " -Djava.security.policy==" + securityPolicyFile;
-
+
jvmArgs += " -Dweblogic.management.username=" + managementUsername;
jvmArgs += " -Dweblogic.management.password=" + managementPassword;
if (pkPassword != null) {
jvmArgs += " -Dweblogic.pkpassword=" + pkPassword;
}
-
+
weblogicServer.createJvmarg().setLine(jvmArgs);
weblogicServer.createArg().setLine(additionalArgs);
-
+
if (classpath != null) {
- weblogicServer.setClasspath(classpath);
+ weblogicServer.setClasspath(classpath);
}
-
- if (weblogicServer.executeJava() != 0) {
+
+ if (weblogicServer.executeJava() != 0) {
throw new BuildException("Execution of weblogic server failed");
}
}
-
+
private void executeWLS() {
- File securityPolicyFile
+ File securityPolicyFile
= findSecurityPolicyFile(DEFAULT_WL51_POLICY_FILE);
File propertiesFile = null;
-
+
if (weblogicPropertiesFile == null) {
weblogicPropertiesFile = DEFAULT_PROPERTIES_FILE;
@@ -279,7 +280,7 @@ public class WLRun extends Task {
throw new BuildException("Properties file " + weblogicPropertiesFile +
" not found in weblogic home " + weblogicSystemHome +
" or as absolute file");
- }
+ }
}
Java weblogicServer = (Java) project.createTask("java");
@@ -288,11 +289,11 @@ public class WLRun extends Task {
weblogicServer.setClassname(weblogicMainClass);
String jvmArgs = additionalJvmArgs;
-
+
if (weblogicClasspath != null) {
jvmArgs += " -Dweblogic.class.path=" + weblogicClasspath;
}
-
+
jvmArgs += " -Djava.security.manager -Djava.security.policy==" + securityPolicyFile;
jvmArgs += " -Dweblogic.system.home=" + weblogicSystemHome;
jvmArgs += " -Dweblogic.system.name=" + weblogicSystemName;
@@ -300,27 +301,31 @@ public class WLRun extends Task {
weblogicServer.createJvmarg().setLine(jvmArgs);
weblogicServer.createArg().setLine(additionalArgs);
-
+
if (classpath != null) {
- weblogicServer.setClasspath(classpath);
+ weblogicServer.setClasspath(classpath);
}
- if (weblogicServer.executeJava() != 0) {
+ if (weblogicServer.executeJava() != 0) {
throw new BuildException("Execution of weblogic server failed");
}
}
-
+
/**
- * Set the classpath to be used for this execution.
+ * The classpath to be used with the Java Virtual Machine that runs the Weblogic
+ * Server; required. Prior to Weblogic 6.0, this is typically set to the Weblogic
+ * boot classpath. Under Weblogic 6.0 this should include all the
+ * weblogic jars
*
- * @param s the classpath to use when executing the weblogic server.
+ * @param classpath the classpath to use when executing the weblogic server.
*/
public void setClasspath(Path classpath) {
this.classpath = classpath;
}
-
+
/**
- * Set the weblogic classpath.
+ * Set the weblogic classpath used by the Weblogic Server;
+ * optional, and only applicable to WL4.5.1
*
* The weblogic classpath is used by weblogic to support dynamic class loading.
*
@@ -329,19 +334,22 @@ public class WLRun extends Task {
public void setWlclasspath(Path weblogicClasspath) {
this.weblogicClasspath = weblogicClasspath;
}
-
+
/**
- * Set the security policy for this invocation of weblogic.
+ * The name of the security policy file within the weblogic home directory that
+ * is to be used. If not specified, the default policy file <code>weblogic.policy</code>
+ * is used.
*
* @param securityPolicy the security policy to use.
*/
public void setPolicy(String securityPolicy) {
this.securityPolicy = securityPolicy;
}
-
+
/**
* The location where weblogic lives.
- *
+ * Required. This is the absolute location, not relative to
+ * BEA home.
* @param weblogicHome the home directory of weblogic.
*
*/
@@ -350,7 +358,8 @@ public class WLRun extends Task {
}
/**
- * The location of the BEA Home.
+ * The location of the BEA Home; implicitly
+ * selects Weblogic 6.0; optional.
*
* @param beaHome the BEA Home directory.
*
@@ -358,29 +367,31 @@ public class WLRun extends Task {
public void setBEAHome(File beaHome) {
this.beaHome = beaHome;
}
-
+
/**
- * Set the name of the server to run
+ * The name of the weblogic server within the weblogic home which is to be run.
+ * Optiona, defaults to &quot;myserver&quot;
*
- * @param systemName the name of the server.
+ * @param serverName the name of the server.
*/
public void setName(String serverName) {
this.weblogicSystemName = serverName;
}
-
+
/**
- * Set the Domain to run in
+ * Set the Domain to run in; required for WL6.0
*
* @param domain the domain
*/
public void setDomain(String domain) {
this.weblogicDomainName = domain;
}
-
+
/**
- * Set the properties file to use.
+ * The name of the server's properties file within the weblogic home directory
+ * used to control the weblogic instance;
+ * required for WL4.5.1
*
- * The location of the properties file is relative to the weblogi system home
*
* @param propertiesFilename the properties file name
*/
@@ -395,40 +406,47 @@ public class WLRun extends Task {
public void setJvmargs(String args) {
this.additionalJvmArgs = args;
}
-
+
/**
- * Set the management username to run the server
+ * Set the management username to run the server;
+ * optional and only applicable to WL6.0.
*
* @param username the management username of the server.
*/
public void setUsername(String username) {
this.managementUsername = username;
}
-
+
/**
- * Set the management password of the server
- *
+ * Set the management password of the server;
+ * optional and only applicable to WL6.0.
* @param password the management pasword of the server.
*/
public void setPassword(String password) {
this.managementPassword = password;
}
-
+
/**
- * Set the private key password so the server can decrypt the SSL private key file.
- *
+ * Set the private key password so the server can decrypt the SSL private key file;
+ * optional and only applicable to WL6.0.
* @param pkpassword the private key password,
*/
public void setPKPassword(String pkpassword) {
this.pkPassword = pkpassword;
}
-
+
+ /**
+ * Additional argument string passed to the Weblogic instance;
+ * optional.
+ */
public void setArgs(String args) {
additionalArgs = args;
}
-
+ /**
+ * name of the main class for weblogic; optional.
+ */
public void setWeblogicMainClass(String c) {
weblogicMainClass = c;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
index d31a236d7..9632909aa 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
@@ -62,8 +62,9 @@ import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.Path;
/**
- * Shutdown a Weblogic server.
-
+ * Shuts down a WebLogic server.
+ * To shut down an instance you must supply both a username and
+ * a password.
*
* @author Conor MacNeill, Cortex ebusiness Pty Limited
*/
@@ -136,16 +137,18 @@ public class WLStop extends Task {
}
/**
- * Set the classpath to be used for this compilation.
+ * The classpath to be used with the Java Virtual Machine that runs the Weblogic
+ * Shutdown command;
*
- * @param s the classpath to use when executing the weblogic admin task.
+ * @param path the classpath to use when executing the weblogic admin task.
*/
public void setClasspath(Path path) {
this.classpath = path;
}
/**
- * Add the classpath for the user classes
+ * The classpath to be used with the Java Virtual Machine that runs the Weblogic
+ * Shutdown command;
*/
public Path createClasspath() {
if (classpath == null) {
@@ -155,7 +158,8 @@ public class WLStop extends Task {
}
/**
- * Set the username to use to request shutdown of the server.
+ * The username of the account which will be used to shutdown the server;
+ * required.
*
* @param s the username.
*/
@@ -164,7 +168,8 @@ public class WLStop extends Task {
}
/**
- * Set the password to use to request shutdown of the server.
+ * The password for the account specified in the
+ * user parameter; required
*
* @param s the password.
*/
@@ -173,7 +178,8 @@ public class WLStop extends Task {
}
/**
- * Set the URL to which the weblogic server is listening.
+ * Set the URL to which the weblogic server is listening
+ * for T3 connections; required.
*
* @param s the url.
*/
@@ -183,7 +189,8 @@ public class WLStop extends Task {
/**
- * Set the delay (in seconds) before shutting down the server.
+ * Set the delay (in seconds) before shutting down the server;
+ * optional.
*
* @param s the selay.
*/
@@ -192,7 +199,8 @@ public class WLStop extends Task {
}
/**
- * The location of the BEA Home.
+ * The location of the BEA Home; implicitly
+ * selects Weblogic 6.0 shutdown; optional.
*
* @param beaHome the BEA Home directory.
*
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
index 4cc23aa29..d20108c9a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
@@ -78,6 +78,17 @@ import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.Environment;
import org.apache.tools.ant.util.FileUtils;
+/**
+ 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 &lt;type-storage&gt; 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.
+*/
public class WeblogicDeploymentTool extends GenericDeploymentTool {
public static final String PUBLICID_EJB11
= "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN";
@@ -186,19 +197,40 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
- * Output the generated jar to a directory.
+ * If set ejbc will use this directory as the output
+ * destination rather than a jar file. This allows for the
+ * generation of &quot;exploded&quot; jars.
*/
public void setOutputDir(File outputDir) {
this.outputDir = outputDir;
}
+ /**
+ * Optional classpath to WL6.0.
+ * Weblogic 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
+ * attribute
+ */
public void setWLClasspath(Path wlClasspath) {
this.wlClasspath = wlClasspath;
}
- /** The compiler (switch <code>-compiler</code>) to use */
+ /**
+ * The compiler (switch <code>-compiler</code>) to use; optional.
+ * This allows for the selection of a different compiler
+ * to be used for the compilation of the generated Java
+ * files. This could be set, for example, to Jikes to
+ * compile with the Jikes compiler. If this is not set
+ * and the <code>build.compiler</code> property is set
+ * to jikes, the Jikes compiler will be used. If this
+ * is not desired, the value &quot;<code>default</code>&quot;
+ * may be given to use the default compiler
+ */
public void setCompiler(String compiler) {
this.compiler = compiler;
}
@@ -206,7 +238,13 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
* Set the rebuild flag to false to only update changes in the jar rather
- * than rerunning ejbc
+ * than rerunning ejbc; optional, default true.
+ * This 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.
*/
public void setRebuild(boolean rebuild) {
this.alwaysRebuild = rebuild;
@@ -215,7 +253,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
* Sets the weblogic.StdoutSeverityLevel to use when running the JVM that
- * executes ejbc. Set to 16 to avoid the warnings about EJB Home and
+ * executes ejbc; optional. Set to 16 to avoid the warnings about EJB Home and
* Remotes being in the classpath
*/
public void setJvmDebugLevel(Integer jvmDebugLevel) {
@@ -240,9 +278,10 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
- * Setter used to store the value of keepGeneric
+ * controls whether the generic file used as input to
+ * ejbc is retained; defaults to false
*
- * @param inValue a string, either 'true' or 'false'.
+ * @param inValue true for keep generic
*/
public void setKeepgeneric(boolean inValue) {
this.keepGeneric = inValue;
@@ -250,8 +289,9 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
- * Sets whether -keepgenerated is passed to ejbc (that is, the .java
- * source files are kept).
+ * Controls whether weblogic will keep the generated Java
+ * files used to build the class files added to the
+ * jar. This can be useful when debugging; default is false.
*
* @param inValue either 'true' or 'false'
*/
@@ -260,20 +300,31 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
- /** sets some additional args to send to ejbc. */
+ /**
+ * Any optional extra arguments pass to the weblogic.ejbc
+ * tool.
+ */
public void setArgs(String args) {
this.additionalArgs = args;
}
+
/**
- * Set the additional arguments to pass to the weblogic JVM
+ * Set any additional arguments to pass to the weblogic JVM; optional.
* @param args the arguments to be passed to the JVM
*/
public void setJvmargs(String args) {
this.additionalJvmArgs = args;
}
- /** Set the classname of the ejbc compiler */
+ /**
+ * Set the classname of the ejbc compiler; optional
+ * 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
+ * &quot;weblogic.ejbc&quot; to avoid the deprecation warning.
+ */
public void setEjbcClass(String ejbcClass) {
this.ejbcClass = ejbcClass;
}
@@ -286,8 +337,9 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
- * Setter used to store the location of the ejb-jar DTD. This can be a
- * file on the system or a resource on the classpath.
+ * <b>Deprecated</b>. Defines the location of the ejb-jar DTD in
+ * the weblogic class hierarchy. Should not be needed, and the
+ * nested &lt;dtd&gt; element is recommended when it is.
*
* @param inString the string to use as the DTD location.
*/
@@ -297,8 +349,9 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
- * Setter used to store the location of the weblogic DTD. This can be a
- * file on the system or a resource on the classpath.
+ * <b>Deprecated</b>. Defines the location of weblogic DTD in
+ * the weblogic class hierarchy. Should not be needed, and the
+ * nested &lt;dtd&gt; element is recommended when it is.
*
* @param inString the string to use as the DTD location.
*/
@@ -308,8 +361,9 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
- * Setter used to store the location of the Sun's Generic EJB DTD. This
- * can be a file on the system or a resource on the classpath.
+ * <b>Deprecated</b>. Defines the location of Sun's EJB DTD in
+ * the weblogic class hierarchy. Should not be needed, and the
+ * nested &lt;dtd&gt; element is recommended when it is.
*
* @param inString the string to use as the DTD location.
*/
@@ -320,6 +374,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
* Set the value of the oldCMP scheme. This is an antonym for newCMP
+ * @ant.attribute ignore="true'
*/
public void setOldCMP(boolean oldCMP) {
this.newCMP = !oldCMP;
@@ -327,7 +382,10 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
- * Set the value of the newCMP scheme. The old CMP scheme locates the
+ * If this is set to true, the new method for locating
+ * CMP descriptors will be used; optional, default false.
+ * <P>
+ * The old CMP scheme locates the
* weblogic CMP descriptor based on the naming convention where the
* weblogic CMP file is expected to be named with the bean name as the
* prefix. Under this scheme the name of the CMP descriptor does not match
@@ -339,7 +397,10 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
- /** Do not EJBC the jar after it has been put together. */
+ /**
+ * Do not EJBC the jar after it has been put together;
+ * optional, default false
+ */
public void setNoEJBC(boolean noEJBC) {
this.noEJBC = noEJBC;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
index 1d1987643..ae47c939f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
@@ -88,6 +88,24 @@ import org.apache.tools.ant.types.Commandline;
/**
* Websphere deployment tool that augments the ejbjar task.
+ * Searches for the websphere specific deployment descriptors and
+ * adds them to the final ejb jar file. Websphere has two specific descriptors for session
+ * beans:
+ * <ul>
+ * <li>ibm-ejb-jar-bnd.xmi</li>
+ * <li>ibm-ejb-jar-ext.xmi</li>
+ * </ul>
+ * and another two for container managed entity beans:
+ * <ul>
+ * <li>Map.mapxmi</li>
+ * <li>Schema.dbxmi</li>
+ * </ul>
+ * In terms of WebSphere, the generation of container code and stubs is called <code>deployment</code>.
+ * This step can be performed by the websphere element as part of the jar generation process. If the
+ * switch <code>ejbdeploy</code> 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
+ * sun jdk.
*
* @author <a href="mailto:msahu@interkeel.com">Maneesh Sahu</a>
*/
@@ -195,14 +213,24 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
}
- /** Sets the DB Vendor for the Entity Bean mapping */
+ /** Sets the DB Vendor for the Entity Bean mapping ; optional.
+ * Valid options are for example:
+ * <ul>
+ * <li>SQL92</li> <li>SQL99</li> <li>DB2UDBWIN_V71</li>
+ * <li>DB2UDBOS390_V6</li> <li>DB2UDBAS400_V4R5</li> <li>ORACLE_V8</li>
+ * <li>INFORMIX_V92</li> <li>SYBASE_V1192</li> <li>MYSQL_V323</li>
+ * </ul>
+ * 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.
+ */
public void setDbvendor(DBVendor dbvendor) {
this.dbVendor = dbvendor.getValue();
}
/**
- * Sets the name of the Database to create
+ * Sets the name of the Database to create; optional.
*
* @param String
*/
@@ -212,7 +240,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * Sets the name of the schema to create
+ * Sets the name of the schema to create; optional.
*
* @param String
*/
@@ -222,9 +250,10 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * (true) Only generate the deployment code, do not run RMIC or Javac
+ * Flag, default false, to only generate the deployment
+ * code, do not run RMIC or Javac
*
- * @param boolean
+ * @param codegen option
*/
public void setCodegen(boolean codegen) {
this.codegen = codegen;
@@ -232,9 +261,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * (true) Only output error messages, suppress informational messages
+ * Flag, default true, to only output error messages.
*
- * @param boolean
+ * @param quiet option
*/
public void setQuiet(boolean quiet) {
this.quiet = quiet;
@@ -242,9 +271,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * (true) Disable the validation steps
+ * Flag to disable the validation steps; optional, default false.
*
- * @param boolean
+ * @param novalidate option
*/
public void setNovalidate(boolean novalidate) {
this.novalidate = novalidate;
@@ -252,9 +281,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * (true) Disable warning and informational messages
+ * Flag to disable warning and informational messages; optional, default false.
*
- * @param boolean
+ * @param nowarn option
*/
public void setNowarn(boolean nowarn) {
this.nowarn = nowarn;
@@ -262,9 +291,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * (true) Disable informational messages
+ * Flag to disable informational messages; optional, default false.
*
- * @param boolean
+ * @param noinfom
*/
public void setNoinform(boolean noinfom) {
this.noinform = noinform;
@@ -272,9 +301,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * (true) Enable internal tracing
+ * Flag to enable internal tracing when set, optional, default false.
*
- * @param boolean
+ * @param trace
*/
public void setTrace(boolean trace) {
this.trace = trace;
@@ -282,16 +311,18 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * (true) Use the WebSphere 3.5 compatible mapping rules
+ * Flag to use the WebSphere 3.5 compatible mapping rules ; optional, default false.
*
- * @param boolean
+ * @param attr
*/
public void setUse35(boolean attr) {
use35MappingRules = attr;
}
- /** The compiler (switch <code>-compiler</code>) to use */
+ /**
+ * The compiler (switch <code>-compiler</code>) to use
+ */
public void setCompiler(String compiler) {
this.compiler = compiler;
}
@@ -299,7 +330,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
* Set the rebuild flag to false to only update changes in the jar rather
- * than rerunning ejbdeploy
+ * than rerunning ejbdeploy; optional, default true.
*/
public void setRebuild(boolean rebuild) {
this.alwaysRebuild = rebuild;
@@ -307,8 +338,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * Setter used to store the suffix for the generated websphere jar file.
- *
+ * String value appended to the basename of the deployment
+ * descriptor to create the filename of the WebLogic EJB
+ * jar file. Optional, default '.jar'.
* @param inString the string to use as the suffix.
*/
public void setSuffix(String inString) {
@@ -317,9 +349,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * Setter used to store the value of keepGeneric
- *
- * @param inValue a string, either 'true' or 'false'.
+ * This controls whether the generic file used as input to
+ * ejbdeploy is retained; optional, default false.
+ * @param inValue either 'true' or 'false'.
*/
public void setKeepgeneric(boolean inValue) {
this.keepGeneric = inValue;
@@ -338,7 +370,8 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
- * Decide, wether ejbdeploy should be called or not
+ * Decide, wether ejbdeploy should be called or not;
+ * optional, default true.
*
* @param ejbdeploy
*/
@@ -366,6 +399,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/**
* Set the value of the oldCMP scheme. This is an antonym for newCMP
+ * @ant.attribute ignore="true"
*/
public void setOldCMP(boolean oldCMP) {
this.newCMP = !oldCMP;
@@ -385,7 +419,11 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
}
- /** Sets the temporary directory for the ejbdeploy task */
+ /**
+ * The directory, where ejbdeploy will write temporary files;
+ * optional, defaults to '_ejbdeploy_temp'.
+ */
+
public void setTempdir(String tempdir) {
this.tempdir = tempdir;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java
index f8f3fbf53..f3b8fa146 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java
@@ -61,7 +61,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
/**
- * Check whether an extension is present in a fileset or an extensionSet.
+ * Checks whether an extension is present in a fileset or an extensionSet.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @ant.task name="jarlib-available"
@@ -91,7 +91,7 @@ public class JarLibAvailableTask
private ExtensionAdapter m_extension;
/**
- * The name of property to set if extensions is available.
+ * The name of property to set if extensions are available.
*
* @param property The name of property to set if extensions is available.
*/
@@ -101,7 +101,7 @@ public class JarLibAvailableTask
}
/**
- * The jar library to check.
+ * The JAR library to check.
*
* @param file The jar library to check.
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java
index be5382b59..7941fbdba 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java
@@ -62,8 +62,8 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileSet;
/**
- * 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.
*
* <p>Prior to JDK1.3, an "Optional Package" was known as an Extension.
* The specification for this mechanism is available in the JDK1.3
@@ -90,7 +90,7 @@ public class JarLibDisplayTask
private final Vector m_filesets = new Vector();
/**
- * The jar library to display information for.
+ * The JAR library to display information for.
*
* @param file The jar library to display information for.
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
index 7f485a98c..f8f773c6f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
@@ -65,8 +65,8 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.Project;
/**
- * Task to generate a manifest that declares all the dependencies
- * in manifest. The dependencies are determined by looking in the
+ * Generates a manifest that declares all the dependencies.
+ * The dependencies are determined by looking in the
* specified path and searching for Extension / "Optional Package"
* specifications in the manifests of the jars.
*
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java
index 6c16665e8..29fe286fc 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java
@@ -64,12 +64,12 @@ import org.apache.tools.ant.taskdefs.optional.extension.resolvers.URLResolver;
import org.apache.tools.ant.taskdefs.optional.extension.resolvers.AntResolver;
/**
- * Try to locate a jar to satisfy an extension and place
- * location of jar into property.
+ * Tries to locate a JAR to satisfy an extension and place
+ * location of JAR into property.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:jeff@socialchange.net.au">Jeff Turner</a>
- * @ant.task name="jarlib-resolver"
+ * @ant.task name="jarlib-resolve"
*/
public class JarLibResolveTask
extends Task
@@ -117,26 +117,44 @@ public class JarLibResolveTask
m_property = property;
}
+ /**
+ * If true, libraries returned by nested resolvers should be
+ * checked to see if they supply extension.
+ */
public void setCheckExtension( final boolean checkExtension )
{
m_checkExtension = checkExtension;
}
+ /**
+ * If true, failure to locate library should fail build.
+ */
public void setFailOnError( final boolean failOnError )
{
m_failOnError = failOnError;
}
+ /**
+ * Adds location resolver to look for a library in a location
+ * relative to project directory.
+ */
public void addConfiguredLocation( final LocationResolver location )
{
m_resolvers.add( location );
}
+ /**
+ * Adds a URL resolver to download a library from a URL
+ * to a local file.
+ */
public void addConfiguredUrl( final URLResolver url )
{
m_resolvers.add( url );
}
+ /**
+ * Adds Ant resolver to run an Ant build file to generate a library.
+ */
public void addConfiguredAnt( final AntResolver ant )
{
m_resolvers.add( ant );
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
index 6a5d26da3..5eadcfabc 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
@@ -157,63 +157,64 @@ public class Translate extends MatchingTask {
private boolean loaded = false;
/**
- * Sets Family name of resource bundle
+ * Sets Family name of resource bundle; required.
*/
public void setBundle(String bundle) {
this.bundle = bundle;
}
/**
- * Sets locale specific language of resource bundle
+ * Sets locale specific language of resource bundle; optional.
*/
public void setBundleLanguage(String bundleLanguage) {
this.bundleLanguage = bundleLanguage;
}
/**
- * Sets locale specific country of resource bundle
+ * Sets locale specific country of resource bundle; optional.
*/
public void setBundleCountry(String bundleCountry) {
this.bundleCountry = bundleCountry;
}
/**
- * Sets locale specific variant of resource bundle
+ * Sets locale specific variant of resource bundle; optional.
*/
public void setBundleVariant(String bundleVariant) {
this.bundleVariant = bundleVariant;
}
/**
- * Sets Destination directory
+ * Sets Destination directory; required.
*/
public void setToDir(File toDir) {
this.toDir = toDir;
}
/**
- * Sets starting token to identify keys
+ * Sets starting token to identify keys; required.
*/
public void setStartToken(String startToken) {
this.startToken = startToken;
}
/**
- * Sets ending token to identify keys
+ * Sets ending token to identify keys; required.
*/
public void setEndToken(String endToken) {
this.endToken = endToken;
}
/**
- * Sets source file encoding scheme
+ * Sets source file encoding scheme; optional,
+ * defaults to encoding of local system.
*/
public void setSrcEncoding(String srcEncoding) {
this.srcEncoding = srcEncoding;
}
/**
- * Sets destination file encoding scheme. Defaults to source file
+ * Sets destination file encoding scheme; optional. Defaults to source file
* encoding
*/
public void setDestEncoding(String destEncoding) {
@@ -221,7 +222,8 @@ public class Translate extends MatchingTask {
}
/**
- * Sets Resource Bundle file encoding scheme
+ * Sets Resource Bundle file encoding scheme; optional. Defaults to source file
+ * encoding
*/
public void setBundleEncoding(String bundleEncoding) {
this.bundleEncoding = bundleEncoding;
@@ -238,7 +240,7 @@ public class Translate extends MatchingTask {
}
/**
- * Adds a set of files (nested fileset attribute).
+ * Adds a set of files to translate as a nested fileset element.
*/
public void addFileset(FileSet set) {
filesets.addElement(set);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java
index 8075a71a6..f33d05a3c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -133,7 +133,7 @@ public class VAJExport extends VAJTask {
}
/**
- * Sets whether default exclusions should be used or not.
+ * Sets whether default exclusions should be used or not; default true.
*
* @param useDefaultExcludes "true"|"on"|"yes" when default exclusions
* should be used, "false"|"off"|"no" when they
@@ -145,7 +145,7 @@ public class VAJExport extends VAJTask {
/**
* Set the destination directory into which the selected
- * items should be exported
+ * items should be exported; required.
*/
public void setDestdir(File destDir) {
this.destDir = destDir;
@@ -163,14 +163,14 @@ public class VAJExport extends VAJTask {
}
/**
- * if exportClasses is set, class files are exported
+ * optional flag to export the class files; default false.
*/
public void setExportClasses(boolean doExport) {
exportClasses = doExport;
}
/**
- * if exportDebugInfo is set, the exported class files contain
+ * optional flag to export the debug info; default false.
* debug info
*/
public void setExportDebugInfo(boolean doExport) {
@@ -178,14 +178,14 @@ public class VAJExport extends VAJTask {
}
/**
- * if exportResources is set, resource file will be exported
+ * optional flag to export the resource file; default true.
*/
public void setExportResources(boolean doExport) {
exportResources = doExport;
}
/**
- * if exportSources is set, java files will be exported
+ * optional flag to export the Java files; default true.
*/
public void setExportSources(boolean doExport) {
exportSources = doExport;
@@ -193,7 +193,7 @@ public class VAJExport extends VAJTask {
/**
* Sets the set of include patterns. Patterns may be separated by a comma
- * or a space.Currently only patterns denoting packages are
+ * or a space. Currently only patterns denoting packages are
* supported
*
* @param includes the string containing the include patterns
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java
index 4f55cf9a6..88568ae10 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java
@@ -65,7 +65,7 @@ import java.lang.reflect.Field;
/**
* Import source, class files, and resources to the Visual Age for Java
- * workspace using FileSets.
+ * workspace.
* <p>
* Example:
* <pre>
@@ -140,7 +140,7 @@ public class VAJImport extends VAJTask {
}
/**
- * Import .class files.
+ * Flag to import .class files; optional, default false.
*/
public void setImportClasses(boolean importClasses) {
this.importClasses = importClasses;
@@ -148,14 +148,14 @@ public class VAJImport extends VAJTask {
/**
* Import resource files (anything that doesn't end in
- * .class or .java)
+ * .class or .java); optional, default true.
*/
public void setImportResources(boolean importResources) {
this.importResources = importResources;
}
/**
- * Import .java files
+ * Import .java files; optional, default true.
*/
public void setImportSources(boolean importSources) {
this.importSources = importSources;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java
index 0d1247190..d5118203b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java
@@ -67,6 +67,7 @@ package org.apache.tools.ant.taskdefs.optional.ide;
* and will be removed soon
*
* @author Wolf Siberski, TUI Infotec GmbH
+ * @ant.task ignore="true"
*/
public class VAJLoadProjects extends VAJLoad {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java
index 76de6f9a1..e8c7d7a73 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java
@@ -85,6 +85,10 @@ public class VAJProjectDescription {
return projectFound;
}
+ /**
+ * name of the VAJ project to load into
+ * the workspace; required
+ */
public void setName(String newName) {
if (newName == null || newName.equals("")) {
throw new BuildException("name attribute must be set");
@@ -92,6 +96,9 @@ public class VAJProjectDescription {
name = newName;
}
+ /**
+ * name of the requested version; required.
+ */
public void setVersion(String newVersion) {
if (newVersion == null || newVersion.equals("")) {
throw new BuildException("version attribute must be set");
@@ -99,6 +106,11 @@ public class VAJProjectDescription {
version = newVersion;
}
+ /**
+ * this may be a helper method, and is being ignored for now
+
+ * @ant.attribute ignore="true"
+ */
public void setProjectFound() {
projectFound = true;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java
index 50eb56edb..7c86b3499 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java
@@ -95,7 +95,10 @@ public class VAJTask extends Task {
}
/**
- * Set remote server attribute
+ * Name and port of a remote tool server, optiona.
+ * Format: &lt;servername&gt;:&lt;port no&gt;.
+ * If this attribute is set, the tasks will be executed on the specified tool
+ * server.
*/
public void setRemote(String remoteServer) {
this.remoteServer = remoteServer;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java
index 0f4612496..ce4f42dd8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java
@@ -97,8 +97,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
private String server;
/**
- * Add a classpath. Used to handle the nested classpath
- * element.
+ * Add a classpath as a nested element.
* @return A Path object representing the classpath to be used.
*/
public Path createClasspath() {
@@ -147,6 +146,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
/**
* Sets the parent task.
* @param task a ServerDeploy object representing the parent task.
+ * @ant.attribute ignore="true"
*/
public void setTask(ServerDeploy task) {
this.task = task;
@@ -169,8 +169,9 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
}
/**
- * Sets the classpath field.
- * This is a required attribute.
+ * The classpath to be passed to the JVM running the tool;
+ * optional depending upon the tool.
+ * The classpath may also be supplied as a nested element.
* @param classpath A Path object representing the "classpath" attribute.
*/
public void setClasspath(Path classpath) {
@@ -186,8 +187,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
}
/**
- * Sets the userName field.
- * This is a <b>not</b> required attribute.
+ * The user with privileges to deploy applications to the server; optional.
* @param userName A String representing the "userName" attribute.
*/
public void setUserName(String userName) {
@@ -203,8 +203,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
}
/**
- * Set the password field.
- * This is a <b>not</b> required attribute.
+ * The password of the user; optional.
* @param password A String representing the "password" attribute.
*/
public void setPassword(String password) {
@@ -220,8 +219,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
}
/**
- * Sets the server field.
- * This is <b>not</b> a required attribute.
+ * The address or URL for the server where the component will be deployed.
* @param server A String representing the "server" attribute.
*/
public void setServer(String server) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java
index c8462174e..8ca148daa 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java
@@ -80,7 +80,7 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool {
private static final String[] VALID_ACTIONS = { ACTION_DEPLOY };
/**
- * Creates a nested arg element.
+ * Add a nested argument element to hand to the deployment tool; optional.
* @return A Commandline.Argument object representing the
* command line argument being passed when the deployment
* tool is run. IE: "-user=mark", "-password=venture"...
@@ -90,7 +90,8 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool {
}
/**
- * Creates a nested jvmarg element.
+ * Add a nested argment element to hand to the JVM running the
+ * deployment tool.
* Creates a nested arg element.
* @return A Commandline.Argument object representing the
* JVM command line argument being passed when the deployment
@@ -114,6 +115,7 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool {
/**
* Sets the parent task.
* @param task An ServerDeploy object representing the parent task.
+ * @ant.attribute ignored="true"
*/
public void setTask(ServerDeploy task) {
super.setTask(task);
@@ -147,10 +149,9 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool {
}
/**
- * Sets the className field.
- * <p>The className is the name of the class to execute to perfom
- * deployment. IE: "com.foobar.tools.deploy.DeployTool"
- * This is a required attribute.
+ * The name of the class to execute to perfom
+ * deployment; required.
+ * Example: "com.foobar.tools.deploy.DeployTool"
* @param className The fully qualified class name of the class
* to perform deployment.
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java
index 58adff522..b2cf2182b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java
@@ -115,7 +115,8 @@ public class JonasHotDeploymentTool extends GenericHotDeploymentTool implements
/**
- * Set the host for the David ORB.
+ * Set the host for the David ORB; required if
+ * ORB==david.
*
*@param inValue The new davidhost value
*/
@@ -125,7 +126,8 @@ public class JonasHotDeploymentTool extends GenericHotDeploymentTool implements
/**
- * Set the port for the David ORB.
+ * Set the port for the David ORB; required if
+ * ORB==david.
*
*@param inValue The new davidport value
*/
@@ -146,7 +148,12 @@ public class JonasHotDeploymentTool extends GenericHotDeploymentTool implements
/**
- * Set the ORB to construct classpath.
+ *
+ * Choose your ORB : RMI, JEREMIE, DAVID, ...; optional.
+ * 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.
*
*@param inValue RMI, JEREMIE, DAVID,...
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
index dae14f7a9..b501a5a59 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
@@ -62,7 +62,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
/**
- * A task to support hot deployment tools for J2EE servers.
+ * Controls hot deployment tools for J2EE servers.
*
* This class is used as a framework for the creation of vendor specific
* hot deployment tools.
@@ -162,8 +162,8 @@ public class ServerDeploy extends Task {
}
/**
- * Sets the action field.
- * This is a required attribute.
+ * The action to be performed, usually "deploy"; required.
+ * Some tools support additional actions, such as "delete", "list", "undeploy", "update"...
* @param action A String representing the "action" attribute.
*/
public void setAction(String action) {
@@ -180,9 +180,8 @@ public class ServerDeploy extends Task {
}
/**
- * Sets the source field (the path/filename of the component to be
- * deployed.
- * This is <b>not</b> a required attribute.
+ * The filename of the component to be deployed; optional
+ * depending upon the tool and the action.
* @param source String representing the "source" attribute.
*/
public void setSource(File source) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
index 28284c89e..c182ed263 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
@@ -246,8 +246,8 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool impleme
}
/**
- * Sets the debug field.
- * <p>This is not a required attribute.
+ * If set to true, additional information will be
+ * printed during the deployment process; optional.
* @param debug A boolean representing weblogic.deploy "-debug" flag.
*/
public void setDebug(boolean debug) {
@@ -255,8 +255,7 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool impleme
}
/**
- * Sets the application field.
- * <p>This is a required attribute.
+ * The name of the application being deployed; required.
* @param application A String representing the application portion of the
* weblogic.deploy command line.
*/
@@ -265,12 +264,13 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool impleme
}
/**
- * Sets the component attribute.
- * <p>This attribute is not a required attribute.
+ * the component string for the deployment targets; optional.
+ * It is in the form <code>&lt;component&gt;:&lt;target1&gt;,&lt;target2&gt;...</code>
+ * Where component is the archive name (minus the .jar, .ear, .war
+ * extension). Targets are the servers where the components will be deployed
+
* @param component A String representing the value of the "-component"
- * argument of the weblogic.deploy command line argument.<br>
- * This string should be in the format of
- * &lt;<i>componentName</i>&gt;:&lt<i>target1</i>&gt;,&lt<i>target2</i>&gt;...
+ * argument of the weblogic.deploy command line argument.
*/
public void setComponent(String component) {
this.component = component;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
index def2ea427..1d8703325 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
@@ -69,7 +69,7 @@ import java.util.Hashtable;
import java.util.Enumeration;
/**
- * Taskdef for the JJTree compiler compiler.
+ * Runs the JJTree compiler compiler.
*
* @author thomas.haas@softwired-inc.com
* @author Michael Saunders <a href="mailto:michael@amtec.com">michael@amtec.com</a>
@@ -100,58 +100,102 @@ public class JJTree extends Task {
private CommandlineJava cmdl = new CommandlineJava();
+ /**
+ * Sets the BUILD_NODE_FILES grammar option.
+ */
public void setBuildnodefiles(boolean buildNodeFiles) {
optionalAttrs.put(BUILD_NODE_FILES, new Boolean(buildNodeFiles));
}
+ /**
+ * Sets the MULTI grammar option.
+ */
public void setMulti(boolean multi) {
optionalAttrs.put(MULTI, new Boolean(multi));
}
+ /**
+ * Sets the NODE_DEFAULT_VOID grammar option.
+ */
public void setNodedefaultvoid(boolean nodeDefaultVoid) {
optionalAttrs.put(NODE_DEFAULT_VOID, new Boolean(nodeDefaultVoid));
}
+ /**
+ * Sets the NODE_FACTORY grammar option.
+ */
public void setNodefactory(boolean nodeFactory) {
optionalAttrs.put(NODE_FACTORY, new Boolean(nodeFactory));
}
+ /**
+ * Sets the NODE_SCOPE_HOOK grammar option.
+ */
public void setNodescopehook(boolean nodeScopeHook) {
optionalAttrs.put(NODE_SCOPE_HOOK, new Boolean(nodeScopeHook));
}
+ /**
+ * Sets the NODE_USES_PARSER grammar option.
+ */
public void setNodeusesparser(boolean nodeUsesParser) {
optionalAttrs.put(NODE_USES_PARSER, new Boolean(nodeUsesParser));
}
+ /**
+ * Sets the STATIC grammar option.
+ */
public void setStatic(boolean staticParser) {
optionalAttrs.put(STATIC, new Boolean(staticParser));
}
+ /**
+ * Sets the VISITOR grammar option.
+ */
public void setVisitor(boolean visitor) {
optionalAttrs.put(VISITOR, new Boolean(visitor));
}
+ /**
+ * Sets the NODE_PACKAGE grammar option.
+ */
public void setNodepackage(String nodePackage) {
optionalAttrs.put(NODE_PACKAGE, new String(nodePackage));
}
+ /**
+ * Sets the VISITOR_EXCEPTION grammar option.
+ */
public void setVisitorException(String visitorException) {
optionalAttrs.put(VISITOR_EXCEPTION, new String(visitorException));
}
+ /**
+ * Sets the NODE_PREFIX grammar option.
+ */
public void setNodeprefix(String nodePrefix) {
optionalAttrs.put(NODE_PREFIX, new String(nodePrefix));
}
+ /**
+ * The directory to write the generated file to.
+ * If not set, the files are written to the directory
+ * containing the grammar file.
+ */
public void setOutputdirectory(File outputDirectory) {
this.outputDirectory = outputDirectory;
}
+ /**
+ * The jjtree grammar file to process.
+ */
public void setTarget(File target) {
this.target = target;
}
+ /**
+ * The directory containing the JavaCC distribution.
+ */
public void setJavacchome(File javaccHome) {
this.javaccHome = javaccHome;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
index dc1435ee1..170f9cb36 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
@@ -69,7 +69,7 @@ import java.util.Hashtable;
import java.util.Enumeration;
/**
- * Taskdef for the JavaCC compiler compiler.
+ * JavaCC compiler compiler task.
*
* @author thomas.haas@softwired-inc.com
* @author Michael Saunders <a href="mailto:michael@amtec.com">michael@amtec.com</a>
@@ -109,94 +109,165 @@ public class JavaCC extends Task {
private CommandlineJava cmdl = new CommandlineJava();
+ /**
+ * Sets the LOOKAHEAD grammar option.
+ */
public void setLookahead(int lookahead) {
optionalAttrs.put(LOOKAHEAD, new Integer(lookahead));
}
+ /**
+ * Sets the CHOICE_AMBIGUITY_CHECK grammar option.
+ */
public void setChoiceambiguitycheck(int choiceAmbiguityCheck) {
optionalAttrs.put(CHOICE_AMBIGUITY_CHECK, new Integer(choiceAmbiguityCheck));
}
+ /**
+ * Sets the OTHER_AMBIGUITY_CHECK grammar option.
+ */
public void setOtherambiguityCheck(int otherAmbiguityCheck) {
optionalAttrs.put(OTHER_AMBIGUITY_CHECK, new Integer(otherAmbiguityCheck));
}
+ /**
+ * Sets the STATIC grammar option.
+ */
public void setStatic(boolean staticParser) {
optionalAttrs.put(STATIC, new Boolean(staticParser));
}
+ /**
+ * Sets the DEBUG_PARSER grammar option.
+ */
public void setDebugparser(boolean debugParser) {
optionalAttrs.put(DEBUG_PARSER, new Boolean(debugParser));
}
+ /**
+ * Sets the DEBUG_LOOKAHEAD grammar option.
+ */
public void setDebuglookahead(boolean debugLookahead) {
optionalAttrs.put(DEBUG_LOOKAHEAD, new Boolean(debugLookahead));
}
+ /**
+ * Sets the DEBUG_TOKEN_MANAGER grammar option.
+ */
public void setDebugtokenmanager(boolean debugTokenManager) {
optionalAttrs.put(DEBUG_TOKEN_MANAGER, new Boolean(debugTokenManager));
}
+ /**
+ * Sets the OPTIMIZE_TOKEN_MANAGER grammar option.
+ */
public void setOptimizetokenmanager(boolean optimizeTokenManager) {
optionalAttrs.put(OPTIMIZE_TOKEN_MANAGER, new Boolean(optimizeTokenManager));
}
+ /**
+ * Sets the ERROR_REPORTING grammar option.
+ */
public void setErrorreporting(boolean errorReporting) {
optionalAttrs.put(ERROR_REPORTING, new Boolean(errorReporting));
}
+ /**
+ * Sets the JAVA_UNICODE_ESCAPE grammar option.
+ */
public void setJavaunicodeescape(boolean javaUnicodeEscape) {
optionalAttrs.put(JAVA_UNICODE_ESCAPE, new Boolean(javaUnicodeEscape));
}
+ /**
+ * Sets the UNICODE_INPUT grammar option.
+ */
public void setUnicodeinput(boolean unicodeInput) {
optionalAttrs.put(UNICODE_INPUT, new Boolean(unicodeInput));
}
+ /**
+ * Sets the IGNORE_CASE grammar option.
+ */
public void setIgnorecase(boolean ignoreCase) {
optionalAttrs.put(IGNORE_CASE, new Boolean(ignoreCase));
}
+ /**
+ * Sets the COMMON_TOKEN_ACTION grammar option.
+ */
public void setCommontokenaction(boolean commonTokenAction) {
optionalAttrs.put(COMMON_TOKEN_ACTION, new Boolean(commonTokenAction));
}
+ /**
+ * Sets the USER_TOKEN_MANAGER grammar option.
+ */
public void setUsertokenmanager(boolean userTokenManager) {
optionalAttrs.put(USER_TOKEN_MANAGER, new Boolean(userTokenManager));
}
+ /**
+ * Sets the USER_CHAR_STREAM grammar option.
+ */
public void setUsercharstream(boolean userCharStream) {
optionalAttrs.put(USER_CHAR_STREAM, new Boolean(userCharStream));
}
+ /**
+ * Sets the BUILD_PARSER grammar option.
+ */
public void setBuildparser(boolean buildParser) {
optionalAttrs.put(BUILD_PARSER, new Boolean(buildParser));
}
+ /**
+ * Sets the BUILD_TOKEN_MANAGER grammar option.
+ */
public void setBuildtokenmanager(boolean buildTokenManager) {
optionalAttrs.put(BUILD_TOKEN_MANAGER, new Boolean(buildTokenManager));
}
+ /**
+ * Sets the SANITY_CHECK grammar option.
+ */
public void setSanitycheck(boolean sanityCheck) {
optionalAttrs.put(SANITY_CHECK, new Boolean(sanityCheck));
}
+ /**
+ * Sets the FORCE_LA_CHECK grammar option.
+ */
public void setForcelacheck(boolean forceLACheck) {
optionalAttrs.put(FORCE_LA_CHECK, new Boolean(forceLACheck));
}
+ /**
+ * Sets the CACHE_TOKENS grammar option.
+ */
public void setCachetokens(boolean cacheTokens) {
optionalAttrs.put(CACHE_TOKENS, new Boolean(cacheTokens));
}
+ /**
+ * The directory to write the generated files to.
+ * If not set, the files are written to the directory
+ * containing the grammar file.
+ */
public void setOutputdirectory(File outputDirectory) {
this.outputDirectory = outputDirectory;
}
+ /**
+ * The grammar file to process.
+ */
public void setTarget(File target) {
this.target = target;
}
+ /**
+ * The directory containing the JavaCC distribution.
+ */
public void setJavacchome(File javaccHome) {
this.javaccHome = javaccHome;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
index 92377b72a..8d7a2572e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
@@ -74,7 +74,7 @@ import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.types.EnumeratedAttribute;
/**
- * Ant task to run JDepend tests.
+ * Runs JDepend tests.
*
* <p>JDepend is a tool to generate design quality metrics for each Java package.
* It has been initially created by Mike Clark. JDepend can be found at <a
@@ -116,6 +116,11 @@ public class JDependTask extends Task {
}
*/
+ /**
+ * The output file name.
+ *
+ * @param outputFile
+ */
public void setOutputFile(File outputFile) {
_outputFile = outputFile;
}
@@ -136,7 +141,8 @@ public class JDependTask extends Task {
}
/**
- * Tells whether a JVM should be forked for the task. Default: false.
+ * If true, forks into a new JVM. Default: false.
+ *
* @param value <tt>true</tt> if a JVM should be forked, otherwise <tt>false<tt>
*/
public void setFork(boolean value) {
@@ -148,7 +154,9 @@ public class JDependTask extends Task {
}
/**
- * Set a new VM to execute the task. Default is <tt>java</tt>. Ignored if no JVM is forked.
+ * The command used to invoke a forked Java Virtual Machine.
+ *
+ * Default is <tt>java</tt>. Ignored if no JVM is forked.
* @param value the new VM to use instead of <tt>java</tt>
* @see #setFork(boolean)
*/
@@ -158,7 +166,7 @@ public class JDependTask extends Task {
}
/**
- * Maybe creates a nested classpath element.
+ * Adds a path to source code to analyze.
*/
public Path createSourcespath() {
if (_sourcesPath == null) {
@@ -202,7 +210,7 @@ public class JDependTask extends Task {
}
/**
- * Maybe creates a nested classpath element.
+ * Adds a path to the classpath.
*/
public Path createClasspath() {
if (_compileClasspath == null) {
@@ -221,13 +229,18 @@ public class JDependTask extends Task {
}
/**
- * Adds a reference to a CLASSPATH defined elsewhere.
+ * Adds a reference to a classpath defined elsewhere.
*/
public void setClasspathRef(Reference r) {
createClasspath().setRefid(r);
}
+ /**
+ * The format to write the output in, "xml" or "text".
+ *
+ * @param ea
+ */
public void setFormat(FormatAttribute ea) {
format = ea.getValue();
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
index 09ad63ab2..f698b6cf6 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
@@ -85,7 +85,9 @@ import java.io.File;
* </pre>
* </code>
*
- * @author <a href="mailto:matthew.k.heun@gaerospace.com">Matthew Kuperus Heun</a> */
+ * @author <a href="mailto:matthew.k.heun@gaerospace.com">Matthew Kuperus Heun</a>
+ * @ant.task ignore="true"
+ */
public class JlinkTask extends MatchingTask {
/**
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
index a9ae1bf27..ab3436ab8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
@@ -72,7 +72,9 @@ import org.apache.tools.ant.taskdefs.optional.jsp.compilers.JspCompilerAdapterFa
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
-/** Ant task to run the jsp compiler.
+/**
+ * Runs a JSP compiler.
+ *
* <p> This task takes the given jsp files and compiles them into java
* files. It is then up to the user to compile the java files into classes.
*
@@ -130,7 +132,7 @@ public class JspC extends MatchingTask {
* flag to control action on execution trouble
*/
protected boolean failOnError = true;
-
+
/**
* -uribase &lt;dir&gt; The uri directory compilations should be relative to
* (Default is "/")
@@ -140,7 +142,7 @@ public class JspC extends MatchingTask {
/**
* -uriroot &lt;dir&gt; The root directory that uri files should be resolved
- * against,
+ * against,
*/
private File uriroot;
@@ -161,12 +163,12 @@ public class JspC extends MatchingTask {
protected WebAppParameter webApp;
-
+
private static final String FAIL_MSG
= "Compile failed, messages should have been provided.";
/* ------------------------------------------------------------ */
/**
- * Set the source dirs to find the source JSP files.
+ * Path for source JSP files.
*/
public void setSrcdir(Path srcDir) {
if (src == null) {
@@ -190,16 +192,18 @@ public class JspC extends MatchingTask {
return destDir;
}
/* ------------------------------------------------------------ */
+
/**
- * Set the name of the package the compiled jsp files should be in
+ * Set the name of the package the compiled jsp files should be in.
*/
public void setPackage(String pkg){
this.packageName = pkg;
}
+
public String getPackage(){
return packageName;
}
-
+
/* ------------------------------------------------------------ */
/**
* Set the verbose level of the compiler
@@ -210,7 +214,7 @@ public class JspC extends MatchingTask {
public int getVerbose(){
return verbose;
}
-
+
/* ------------------------------------------------------------ */
/**
* should the build halt if compilation fails? default=true
@@ -228,7 +232,9 @@ public class JspC extends MatchingTask {
public String getIeplugin() {
return iepluginid;
}
- /** Set the ieplugin id */
+ /**
+ * Java Plugin CLASSID for Internet Explorer
+ */
public void setIeplugin(String iepluginid_) {
iepluginid = iepluginid_;
}
@@ -236,16 +242,18 @@ public class JspC extends MatchingTask {
public boolean isMapped() {
return mapped;
}
- /** set the mapped flag */
+ /**
+ * If true, generate separate write() calls for each HTML line
+ * in the JSP.
+ */
public void setMapped(boolean mapped_) {
mapped = mapped_;
}
-
+
/**
- * The -uribase option. 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.
+ * 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.
*
* @param uribase The new Uribase value
*/
@@ -258,9 +266,8 @@ public class JspC extends MatchingTask {
}
/**
- * The -uriroot option.
- * <p>The root directory that uri files should be resolved
- * against, (Default is the directory jspc is invoked from)
+ * The root directory that uri files should be resolved
+ * against. (Default is the directory jspc is invoked from)
*
* @param uriroot The new Uribase value
*/
@@ -271,10 +278,12 @@ public class JspC extends MatchingTask {
public File getUriroot() {
return uriroot;
}
-
-
+
+
/* ------------------------------------------------------------ */
- /** Set the classpath to be used for this compilation */
+ /**
+ * Set the classpath to be used for this compilation.
+ */
public void setClasspath(Path cp) {
if (classpath == null) {
classpath = cp;
@@ -282,14 +291,20 @@ public class JspC extends MatchingTask {
classpath.append(cp);
}
}
- /** Maybe creates a nested classpath element. */
+
+ /**
+ * Adds a path to the classpath.
+ */
public Path createClasspath() {
if (classpath == null) {
classpath = new Path(project);
}
return classpath.createPath();
}
- /** Adds a reference to a CLASSPATH defined elsewhere */
+
+ /**
+ * Adds a reference to a classpath defined elsewhere
+ */
public void setClasspathRef(Reference r) {
createClasspath().setRefid(r);
}
@@ -299,7 +314,7 @@ public class JspC extends MatchingTask {
/* ------------------------------------------------------------ */
/**
- * Set the classpath to be used to find this compiler adapter
+ * Set the classpath to be used to find this compiler adapter
*/
public void setCompilerclasspath(Path cp) {
if (compilerClasspath == null) {
@@ -327,7 +342,7 @@ public class JspC extends MatchingTask {
}
/**
- * -webxml &lt;file&gt; Creates a complete web.xml when using the -webapp option.
+ * Filename for web.xml.
*
* @param webxml The new Webxml value
*/
@@ -338,26 +353,26 @@ public class JspC extends MatchingTask {
public File getWebxml() {
return this.webxml;
}
-
+
/**
- * name output file for the fraction of web.xml that lists
- * servlets
+ * output filename for the fraction of web.xml that lists
+ * servlets.
* @param webinc The new Webinc value
*/
public void setWebinc(File webinc) {
this.webinc = webinc;
}
-
+
public File getWebinc() {
return this.webinc;
}
-
+
/**
- * Web apps parameter. Only one is allowed.
+ * Adds a single webapp.
*
- * @param fs add a web app fileset
+ * @param webappParam add a web app parameter
*/
- public void addWebApp(WebAppParameter webappParam)
+ public void addWebApp(WebAppParameter webappParam)
throws BuildException {
//demand create vector of filesets
if (webApp == null) {
@@ -372,7 +387,7 @@ public class JspC extends MatchingTask {
}
/**
- * Sets the compiler to use. Optional: default=jasper
+ * Class name of a JSP compiler adapter.
*/
public void setCompiler(String compiler) {
this.compilerName = compiler;
@@ -384,7 +399,7 @@ public class JspC extends MatchingTask {
public Vector getCompileList(){
return compileList;
}
-
+
/**
* execute by building up a list of files that
* have changed and hand them off to a jsp compiler
@@ -532,7 +547,7 @@ public class JspC extends MatchingTask {
}
/**
- * Test whether or not compilation is needed. A return value of
+ * Test whether or not compilation is needed. A return value of
* <code>true<code> means yes, <code>false</code> means
* our tests do not indicate this, but as the TLDs are
* not used for dependency checking this is not guaranteed.
@@ -551,20 +566,20 @@ public class JspC extends MatchingTask {
boolean shouldCompile = false;
if (!javaFile.exists()) {
shouldCompile = true;
- log("Compiling " + srcFile.getPath()
- + " because java file " + javaFile.getPath()
+ log("Compiling " + srcFile.getPath()
+ + " because java file " + javaFile.getPath()
+ " does not exist", Project.MSG_VERBOSE);
} else {
if (srcFile.lastModified() > javaFile.lastModified()) {
shouldCompile = true;
- log("Compiling " + srcFile.getPath()
- + " because it is out of date with respect to "
+ log("Compiling " + srcFile.getPath()
+ + " because it is out of date with respect to "
+ javaFile.getPath(),
Project.MSG_VERBOSE);
} else {
if (javaFile.length() == 0) {
shouldCompile = true;
- log("Compiling " + srcFile.getPath()
+ log("Compiling " + srcFile.getPath()
+ " because java file " + javaFile.getPath()
+ " is empty", Project.MSG_VERBOSE);
}
@@ -610,7 +625,7 @@ public class JspC extends MatchingTask {
* static inner class used as a parameter element
*/
public static class WebAppParameter {
-
+
/**
* the sole option
*/
@@ -619,18 +634,18 @@ public class JspC extends MatchingTask {
/**
* query current directory
*/
-
+
public File getDirectory() {
return directory;
}
-
+
/**
* set directory; alternate syntax
*/
public void setBaseDir(File directory) {
this.directory = directory;
}
- //end inner class
+ //end inner class
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
index 6a44bfcb6..be898ac3c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
@@ -69,7 +69,7 @@ import java.util.Date;
import java.util.StringTokenizer;
/**
- * Class to precompile JSP's using weblogic's jsp compiler (weblogic.jspc)
+ * Precompiles JSP's using WebLogic's JSP compiler (weblogic.jspc).
*
* @author <a href="mailto:avik@aviksengupta.com">Avik Sengupta</a> http://www.webteksoftware.com
*
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
index 59e292849..96c7df9f1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
@@ -82,7 +82,7 @@ import java.util.Vector;
import java.net.URL;
/**
- * Ant task to run JUnit tests.
+ * Runs JUnit tests.
*
* <p> JUnit is a framework to create unit test. It has been initially
* created by Erich Gamma and Kent Beck. JUnit can be found at <a
@@ -175,8 +175,8 @@ public class JUnitTask extends Task {
private boolean showOutput = false;
/**
- * Tells this task whether to smartly filter the stack frames of
- * JUnit testcase errors and failures before reporting them.
+ * If true, smartly filter the stack frames of
+ * JUnit errors and failures before reporting them.
*
* <p>This property is applied on all BatchTest (batchtest) and
* JUnitTest (test) however it can possibly be overridden by their
@@ -195,8 +195,8 @@ public class JUnitTask extends Task {
}
/**
- * Tells this task to halt when there is an error in a test. this
- * property is applied on all BatchTest (batchtest) and JUnitTest
+ * If true, stop the build process when there is an error in a test.
+ * This property is applied on all BatchTest (batchtest) and JUnitTest
* (test) however it can possibly be overridden by their own
* properties.
* @param value <tt>true</tt> if it should halt, otherwise
@@ -213,8 +213,7 @@ public class JUnitTask extends Task {
}
/**
- * Tells this task to set the named property to "true" when there
- * is a error in a test.
+ * Property to set to "true" if there is a error in a test.
*
* <p>This property is applied on all BatchTest (batchtest) and
* JUnitTest (test), however, it can possibly be overriden by
@@ -233,8 +232,9 @@ public class JUnitTask extends Task {
}
/**
- * Tells this task to halt when there is a failure in a test.
- * this property is applied on all BatchTest (batchtest) and
+ * If true, stop the build process if a test fails
+ * (errors are considered failures as well).
+ * This property is applied on all BatchTest (batchtest) and
* JUnitTest (test) however it can possibly be overridden by their
* own properties.
* @param value <tt>true</tt> if it should halt, otherwise
@@ -251,8 +251,7 @@ public class JUnitTask extends Task {
}
/**
- * Tells this task to set the named property to "true" when there
- * is a failure in a test.
+ * Property to set to "true" if there is a failure in a test.
*
* <p>This property is applied on all BatchTest (batchtest) and
* JUnitTest (test), however, it can possibly be overriden by
@@ -271,7 +270,7 @@ public class JUnitTask extends Task {
}
/**
- * Tells whether a JVM should be forked for each testcase.
+ * If true, JVM should be forked for each test.
*
* <p>It avoids interference between testcases and possibly avoids
* hanging the build. this property is applied on all BatchTest
@@ -292,8 +291,10 @@ public class JUnitTask extends Task {
}
/**
- * Tells whether the task should print a short summary of the
- * task.
+ * If true, print one-line statistics for each test, or "withOutAndErr"
+ * to also show standard output and error.
+ *
+ * Can take the values on, off, and withOutAndErr.
* @param value <tt>true</tt> to print a summary,
* <tt>withOutAndErr</tt> to include the test&apos;s output as
* well, <tt>false</tt> otherwise.
@@ -351,8 +352,10 @@ public class JUnitTask extends Task {
}
/**
- * Set a new VM to execute the testcase. Default is
- * <tt>java</tt>. Ignored if no JVM is forked.
+ * The 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.
+ *
* @param value the new VM to use instead of <tt>java</tt>
* @see #setFork(boolean)
*
@@ -363,7 +366,8 @@ public class JUnitTask extends Task {
}
/**
- * Create a new JVM argument. Ignored if no JVM is forked.
+ * Adds a JVM argument; ignored if not forking.
+ *
* @return create a new JVM argument so that any argument can be
* passed to the JVM.
* @see #setFork(boolean)
@@ -386,8 +390,9 @@ public class JUnitTask extends Task {
}
/**
- * Add a nested sysproperty element. This might be useful to tranfer
- * Ant properties to the testcases when JVM forking is not enabled.
+ * Adds a system property that tests can access.
+ * This might be useful to tranfer Ant properties to the
+ * testcases when JVM forking is not enabled.
*
* @since Ant 1.3
*/
@@ -396,7 +401,7 @@ public class JUnitTask extends Task {
}
/**
- * <code>&lt;classpath&gt;</code> allows classpath to be set for tests.
+ * Adds path to classpath used for tests.
*
* @since Ant 1.2
*/
@@ -405,7 +410,7 @@ public class JUnitTask extends Task {
}
/**
- * Add a nested env element - an environment variable.
+ * Adds an environment variable; used when forking.
*
* <p>Will be ignored if we are not forking a new VM.</p>
*
@@ -416,7 +421,7 @@ public class JUnitTask extends Task {
}
/**
- * Use a completely new environment.
+ * If true, use a new environment when forked.
*
* <p>Will be ignored if we are not forking a new VM.</p>
*
@@ -438,8 +443,8 @@ public class JUnitTask extends Task {
}
/**
- * Create a new set of testcases (also called ..batchtest) and add
- * it to the list.
+ * Adds a set of tests based on pattern matching.
+ *
* @return a new instance of a batch test.
* @see BatchTest
*
@@ -461,7 +466,7 @@ public class JUnitTask extends Task {
}
/**
- * Whether to include ant.jar, optional.jar and junit.jar in the forked VM.
+ * If true, include ant.jar, optional.jar and junit.jar in the forked VM.
*
* @since Ant 1.5
*/
@@ -470,7 +475,9 @@ public class JUnitTask extends Task {
}
/**
- * Whether to send output of the testcases to Ant's logging system or not.
+ * If true, send any output generated by tests to Ant's logging system
+ * as well as to the formatters.
+ * By default only the formatters receive the output.
*
* <p>Output will always be passed to the formatters and not by
* shown by default. This option should for example be set for
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
index 9c3f32f4c..06ce5e934 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
@@ -80,8 +80,9 @@ import org.apache.tools.ant.util.StringUtils;
/**
- * <p> This is an helper class that will aggregate all testsuites under a specific
- * directory and create a new single document. It is not particulary clean but
+ * Aggregates all &lt;junit&gt; XML formatter testsuite data under
+ * a specific directory and transforms the results via XSLT.
+ * It is not particulary clean but
* should be helpful while I am thinking about another technique.
*
* <p> The main problem is due to the fact that a JVM can be forked for a testcase
@@ -113,7 +114,9 @@ public class XMLResultAggregator extends Task implements XMLConstants {
/** the default file name: <tt>TESTS-TestSuites.xml</tt> */
public static final String DEFAULT_FILENAME = "TESTS-TestSuites.xml";
-
+ /**
+ * Generate a report based on the document created by the merge.
+ */
public AggregateTransformer createReport(){
AggregateTransformer transformer = new AggregateTransformer(this);
transformers.addElement(transformer);
@@ -121,7 +124,7 @@ public class XMLResultAggregator extends Task implements XMLConstants {
}
/**
- * Set the name of the file aggregating the results. It must be relative
+ * Set the name of the aggregegated results file. It must be relative
* from the <tt>todir</tt> attribute. If not set it will use {@link #DEFAULT_FILENAME}
* @param value the name of the file.
* @see #setTodir(File)
@@ -142,7 +145,7 @@ public class XMLResultAggregator extends Task implements XMLConstants {
}
/**
- * Add a new fileset containing the xml results to aggregate
+ * Add a new fileset containing the XML results to aggregate
* @param fs the new fileset of xml results.
*/
public void addFileSet(FileSet fs) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
index 386bc83b8..e7a102cdd 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
@@ -123,16 +123,25 @@ public abstract class AbstractMetamataTask extends Task {
cmdl.setClassname(className);
}
- /** the metamata.home property to run all tasks. */
+ /**
+ * the metamata.home property to run all tasks.
+ * @ant.attribute ignore="true"
+ */
public void setHome(final File value) {
this.metamataHome = value;
}
+ /**
+ * The home directory containing the Metamata distribution; required
+ */
public void setMetamatahome(final File value) {
setHome(value);
}
- /** user classpath */
+ /**
+ * Sets the class path (also source path unless one explicitly set).
+ * Overrides METAPATH/CLASSPATH environment variables.
+ */
public Path createClasspath() {
if (classPath == null) {
classPath = new Path(project);
@@ -140,7 +149,10 @@ public abstract class AbstractMetamataTask extends Task {
return classPath;
}
- /** create the source path for this task */
+ /**
+ * Sets the source path.
+ * Overrides the SOURCEPATH environment variable.
+ */
public Path createSourcepath() {
if (sourcePath == null) {
sourcePath = new Path(project);
@@ -148,18 +160,37 @@ public abstract class AbstractMetamataTask extends Task {
return sourcePath;
}
- /** Creates a nested jvmarg element. */
+ /**
+ * Additional optional parameters to pass to the JVM.
+ * You can avoid using the <code>&lt;jvmarg&gt;</code> by adding these empty
+ * entries to <code>metamata.properties</code> located at <code>${metamata.home}/bin</code>
+ *
+ * <pre>metamata.classpath=
+ * metamata.sourcepath=
+ * metamata.baseclasspath=
+ * </pre>
+ */
public Commandline.Argument createJvmarg() {
return cmdl.createVmArgument();
}
- /** -mx or -Xmx depending on VM version */
+ /**
+ * Set the maximum memory for the JVM; optional.
+ * -mx or -Xmx depending on VM version
+ */
public void setMaxmemory(String max) {
cmdl.setMaxmemory(max);
}
- /** The java files or directory to be audited */
+ /**
+ * The java files or directory to audit.
+ * Whatever the filter is, only the files that end
+ * with .java will be included for processing.
+ * Note that the base directory used for the fileset
+ * MUST be the root of the source files otherwise package names
+ * deduced from the file path will be incorrect.
+ */
public void addFileSet(FileSet fs) {
fileSets.addElement(fs);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java
index 9a6252683..ea8b2d842 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java
@@ -67,17 +67,12 @@ import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
/**
- * Metamata Audit evaluates Java code for programming errors, weaknesses, and
- * style violation.
+ * Invokes the Metamata Audit/ Webgain Quality Analyzer on a set of Java files.
* <p>
- * Metamata Audit exists in three versions:
- * <ul>
- * <li>The Lite version evaluates about 15 built-in rules.</li>
- * <li>The Pro version evaluates about 50 built-in rules.</li>
- * <li>The Enterprise version allows you to add your own customized rules via the API.</li>
- * <ul>
- * For more information, visit the website at
- * <a href="http://www.metamata.com">www.metamata.com</a>
+ * <i>maudit</i> performs static analysis of the Java source code and byte code files to find and report
+ * errors of style and potential problems related to performance, maintenance and robustness.
+ * As a convenience, a stylesheet is given in <tt>etc</tt> directory, so that an HTML report
+ * can be generated from the XML file.
*
* @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
*/
@@ -141,44 +136,89 @@ public class MAudit extends AbstractMetamataTask {
super("com.metamata.gui.rc.MAudit");
}
- /** set the destination file which should be an xml file */
+ /**
+ * The XML file to which the Audit result should be written to; required
+ */
+
public void setTofile(File outFile) {
this.outFile = outFile;
}
+ /**
+ * Automatically fix certain errors
+ * (those marked as fixable in the manual);
+ * optional, default=false
+ */
public void setFix(boolean flag) {
this.fix = flag;
}
+ /**
+ * Creates listing file for each audited file; optional, default false.
+ * When set, a .maudit file will be generated in the
+ * same location as the source file.
+ */
public void setList(boolean flag) {
this.list = flag;
}
+ /**
+ * Finds declarations unused in search paths; optional, default false.
+ * It will look for unused global declarations
+ * in the source code within a use domain specified by the
+ * <tt>searchpath</tt> element.
+ */
public void setUnused(boolean flag) {
this.unused = flag;
}
+ /**
+ * flag to suppress copyright and summary messages; default false.
+ * internal/testing only
+ * @ant.attribute ignore="true"
+ */
public void setQuiet(boolean flag) {
this.quiet = flag;
}
+ /**
+ * flag to tell the task to exit after the first error.
+ * internal/testing only
+ * @ant.attribute ignore="true"
+ */
public void setExit(boolean flag) {
this.exit = flag;
}
+ /**
+ * internal/testing only
+ * @ant.attribute ignore="true"
+ */
public void setOffsets(boolean flag) {
this.offsets = flag;
}
+ /**
+ * flag to print all messages; optional, default false.
+ * internal/testing only
+ * @ant.attribute ignore="true"
+ */
public void setVerbose(boolean flag) {
this.verbose = flag;
}
+ /**
+ * internal/testing only
+ * @ant.attribute ignore="true"
+ */
public void setFullsemanticize(boolean flag) {
this.fullsemanticize = flag;
}
- /** one or more path for rules that must be placed before metamata.jar !! */
+ /**
+ * classpath for additional audit rules
+ * these must be placed before metamata.jar !!
+ */
public Path createRulespath() {
if (rulesPath == null) {
rulesPath = new Path(getProject());
@@ -186,7 +226,10 @@ public class MAudit extends AbstractMetamataTask {
return rulesPath;
}
- /** search path to use for unused global declarations */
+ /**
+ * search path to use for unused global declarations;
+ * required when <tt>unused</tt> is set.
+ */
public Path createSearchpath() {
if (searchPath == null) {
searchPath = new Path(getProject());
@@ -194,6 +237,9 @@ public class MAudit extends AbstractMetamataTask {
return searchPath;
}
+ /**
+ * create the option vector for the command
+ */
protected Vector getOptions() {
Vector options = new Vector(512);
// add the source path automatically from the fileset.
@@ -259,6 +305,9 @@ public class MAudit extends AbstractMetamataTask {
return options;
}
+ /**
+ * validate the settings
+ */
protected void checkOptions() throws BuildException {
super.checkOptions();
if (unused && searchPath == null) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java
index 9a4c8c245..e16f02816 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java
@@ -67,13 +67,13 @@ import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.Path;
/**
- * Calculates global complexity and quality metrics on Java source code.
- *
+ * Computes the metrics of a set of Java files and write the results to an XML
+ * file. As a convenience, a stylesheet is given in <tt>etc</tt> directory,
+ * so that an HTML report can be generated from the XML file.
+ * <p>
* You will not be able to use this task with the evaluation version since
* as of Metamata 2.0, Metrics does not support command line :-(
*
- * For more information, visit the website at
- * <a href="http://www.metamata.com">www.metamata.com</a>
*
* @author <a href="mailto:sbailliez@imediation.com">Stephane Bailliez</a>
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
index c604fa4ab..6801447d4 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
@@ -69,13 +69,15 @@ import java.io.PrintWriter;
import java.util.Vector;
/**
- * Simple Metamata MParse task based on the original written by
+ * Simple Metamata MParse task.
+ * Based on the original written by
* <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>.
*
* This version was written for Metamata 2.0 available at
* <a href="http://www.metamata.com">http://www.metamata.com</a>
*
* @author <a href="mailto:sbailliez@imediation.com">Stephane Bailliez</a>
+ * @todo make a subclass of AbstractMetaMataTask
*/
public class MParse extends AbstractMetamataTask {
@@ -85,7 +87,7 @@ public class MParse extends AbstractMetamataTask {
private boolean debugscanner = false;
private boolean cleanup = false;
- /** the .jj file to process */
+ /** The .jj file to process; required. */
public void setTarget(File target) {
this.target = target;
}
@@ -95,17 +97,19 @@ public class MParse extends AbstractMetamataTask {
verbose = flag;
}
- /** set scanner debug mode */
+ /** set scanner debug mode; optional, default false */
public void setDebugscanner(boolean flag){
debugscanner = flag;
}
- /** set parser debug mode */
+ /** set parser debug mode; optional, default false */
public void setDebugparser(boolean flag){
debugparser = flag;
}
- /** set the hack to cleanup the temp file */
+ /** Remove the intermediate Sun JavaCC file
+ * ; optional, default false.
+ */
public void setCleanup(boolean value) {
cleanup = value;
}
@@ -253,6 +257,7 @@ public class MParse extends AbstractMetamataTask {
/**
* return all options of the command line as string elements
+ * @return an array of options corresponding to the setted options.
*/
protected Vector getOptions() {
Vector options = new Vector();
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
index d652fe50f..601c845a0 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
@@ -214,25 +214,25 @@ public class FTP
if (!isExcluded(name)) {
dirsIncluded.addElement(name);
if (fast) {
- scandir(file.getName(),
+ scandir(file.getName(),
name + File.separator, fast);
}
} else {
dirsExcluded.addElement(name);
if (fast && couldHoldIncluded(name)) {
- scandir(file.getName(),
+ scandir(file.getName(),
name + File.separator, fast);
}
}
} else {
dirsNotIncluded.addElement(name);
if (fast && couldHoldIncluded(name)) {
- scandir(file.getName(),
+ scandir(file.getName(),
name + File.separator, fast);
}
}
if (!fast) {
- scandir(file.getName(),
+ scandir(file.getName(),
name + File.separator, fast);
}
} else {
@@ -323,8 +323,8 @@ public class FTP
/**
- * Set to true to transmit only files that are new or changed from their
- * remote counterparts. The default is to transmit all files.
+ * A synonym for <tt>depends</tt>. Set to true to transmit only new or changed
+ * files.
*/
public void setNewer(boolean newer) {
this.newerOnly = newer;
@@ -332,8 +332,8 @@ public class FTP
/**
- * A synonym for setnewer. Set to true to transmit only new or changed
- * files.
+ * Set to true to transmit only files that are new or changed from their
+ * remote counterparts. The default is to transmit all files.
*/
public void setDepends(boolean depends) {
this.newerOnly = depends;
@@ -368,7 +368,7 @@ public class FTP
/**
- * Adds a set of files.
+ * A set of files to upload or download
*/
public void addFileset(FileSet set) {
filesets.addElement(set);
@@ -383,6 +383,7 @@ public class FTP
* setAction(FTP.Action) to make Ant's Introspection mechanism do the
* work and also to encapsulate operations on the type in its own
* class.
+ * @ant.attribute ignore="true"
*/
public void setAction(String action) throws BuildException {
log("DEPRECATED - The setAction(String) method has been deprecated."
@@ -893,7 +894,7 @@ public class FTP
* @param ftp current ftp connection
* @throws BuildException if this is an error to signal
*/
- private void handleMkDirFailure(FTPClient ftp)
+ private void handleMkDirFailure(FTPClient ftp)
throws BuildException {
int rc=ftp.getReplyCode();
if (!(ignoreNoncriticalErrors
@@ -992,6 +993,10 @@ public class FTP
}
+ /**
+ * an action to perform, one of
+ * "send", "put", "recv", "get", "del", "delete", "list", "mkdir", "chmod"
+ */
public static class Action extends EnumeratedAttribute {
private static final String[] validActions = {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
index 17eda1514..87ddab7e0 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
@@ -57,10 +57,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.email.EmailTask;
/**
- * A task to send SMTP email. This version has near identical syntax to
- * the SendEmail task, but is MIME aware. It also requires Sun's mail.jar and
- * activation.jar to compile and execute, which puts it clearly into the
- * very optional category.
+ * A task to send SMTP email; Use <tt>mail</tt> instead
*
* @deprecated Use {@link EmailTask} instead.
*
@@ -68,6 +65,7 @@ import org.apache.tools.ant.taskdefs.email.EmailTask;
* @author steve_l@iseran.com steve loughran
* @author ehatcher@apache.org Erik Hatcher
* @author paulo.gaspar@krankikom.de Paulo Gaspar
+ * @since Ant1.4
*/
public class MimeMail extends EmailTask {
/**
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java
index f2310f03d..f5e16729d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java
@@ -67,7 +67,7 @@ import java.util.Enumeration;
import java.util.Vector;
/**
- * Class to provide automated telnet protocol support for the Ant build tool
+ * Automates the telnet protocol.
*
* @author <a href="mailto:ScottCarlson@email.com">ScottCarlson@email.com</a>
* @version $Revision$
@@ -172,41 +172,44 @@ public class TelnetTask extends Task {
}
/**
- * Set the userid attribute
+ * Set the the login id to use on the server;
+ * required if <tt>password</tt> is set.
*/
public void setUserid(String u) { this.userid = u; }
/**
- * Set the password attribute
+ * Set the the login password to use
+ * required if <tt>userid</tt> is set.
*/
public void setPassword(String p) { this.password = p; }
/**
- * Set the server address attribute
+ * Set the hostname or address of the remote server.
*/
public void setServer(String m) { this.server = m; }
/**
- * Set the tcp port to connect to attribute
+ * Set the tcp port to connect to; default is 23.
*/
public void setPort(int p) { this.port = p; }
/**
- * Set the tcp port to connect to attribute
+ * send a carriage return after connecting; optional, defaults to false.
*/
public void setInitialCR(boolean b) {
this.addCarriageReturn = b;
}
/**
- * Change the default timeout to wait for
- * valid responses
+ * set a default timeout in seconds to wait for a response,
+ * zero means forever (the default)
*/
public void setTimeout(Integer i) {
this.defaultTimeout = i;
}
/**
+ * A string to wait for from the server.
* A subTask &lt;read&gt; tag was found. Create the object,
* Save it in our list, and return it.
*/
@@ -218,6 +221,7 @@ public class TelnetTask extends Task {
}
/**
+ * Add text to send to the server
* A subTask &lt;write&gt; tag was found. Create the object,
* Save it in our list, and return it.
*/
@@ -237,21 +241,24 @@ public class TelnetTask extends Task {
throws BuildException {
throw new BuildException("Shouldn't be able instantiate a SubTask directly");
}
+
/**
- * nested text elements need their properties explicitly expanded
+ * the message as nested text
*/
public void addText(String s) {
setString(getProject().replaceProperties(s));
}
+
/**
- * attribute assignment of properties
+ * the message as an attribute
*/
public void setString(String s) {
taskString += s;
}
}
+
/**
- * This class sends text to the connected server
+ * Sends text to the connected server
*/
public class TelnetWrite extends TelnetSubTask {
private boolean echoString = true;
@@ -260,13 +267,17 @@ public class TelnetTask extends Task {
telnet.sendString(taskString, echoString);
}
+ /**
+ * should the message be echoed to the log? default=true.
+ */
public void setEcho(boolean b) {
echoString = b;
}
}
+
/**
- * This class reads the output from the connected server
- * until the required string is found.
+ * Reads the output from the connected server
+ * until the required string is found or we time out.
*/
public class TelnetRead extends TelnetSubTask {
private Integer timeout = null;
@@ -275,13 +286,15 @@ public class TelnetTask extends Task {
telnet.waitForString(taskString, timeout);
}
/**
- * Override any default timeouts
+ * a timeout value that overrides any task wide timeout.
*/
public void setTimeout(Integer i) {
this.timeout = i;
}
+
/**
- * Sets the default timeout if none has been set already
+ * Sets the default timeout if none has been set already
+ * @ant.attribute ignore="true"
*/
public void setDefaultTimeout(Integer defaultTimeout) {
if (timeout == null) {
@@ -289,6 +302,7 @@ public class TelnetTask extends Task {
}
}
}
+
/**
* This class handles the abstraction of the telnet protocol.
* Currently it is a wrapper around <a href="www.oroinc.com">ORO</a>'s
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
index 7a66d7817..8bbde0898 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
@@ -68,7 +68,7 @@ import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.FileSet;
-/** P4Add - add the specified files to perforce.
+/** Adds specified files to Perforce.
*
* <b>Example Usage:</b>
* <table border="1">
@@ -88,6 +88,13 @@ public class P4Add extends P4Base {
private Vector filesets = new Vector();
private int cmdLength = 450;
+ /**
+ * positive integer specifying the maximum length
+ * of the commandline when calling Perforce to add the files.
+ * Defaults to 450, higher values mean faster execution,
+ * but also possible failures.
+ */
+
public void setCommandlength(int len) throws BuildException {
if (len <= 0) {
throw new BuildException("P4Add: Commandlength should be a positive number");
@@ -95,6 +102,11 @@ public class P4Add extends P4Base {
this.cmdLength = len;
}
+ /**
+ * If specified the open files are associated with the
+ * specified pending changelist number; otherwise the open files are
+ * associated with the default changelist.
+ */
public void setChangelist(int changelist) throws BuildException {
if (changelist <= 0) {
throw new BuildException("P4Add: Changelist# should be a positive number");
@@ -103,6 +115,9 @@ public class P4Add extends P4Base {
this.changelist = changelist;
}
+ /**
+ * files to add
+ */
public void addFileset(FileSet set) {
filesets.addElement(set);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
index 7628294d8..dcc868f19 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
@@ -109,28 +109,50 @@ public abstract class P4Base extends org.apache.tools.ant.Task {
protected String P4CmdOpts = "";
//Setters called by Ant
+
+ /**
+ * The p4d server and port to connect to;
+ * optional, default "perforce:1666"
+ */
public void setPort(String P4Port) {
this.P4Port = "-p" + P4Port;
}
+ /**
+ * The p4 client spec to use;
+ * optional, defaults to the current user
+ */
public void setClient(String P4Client) {
this.P4Client = "-c" + P4Client;
}
+ /**
+ * The p4 username;
+ * optional, defaults to the current user
+ */
public void setUser(String P4User) {
this.P4User = "-u" + P4User;
}
+ /**
+ * The client, branch or label view to operate upon;
+ * optional default "//..."
+ */
public void setView(String P4View) {
this.P4View = P4View;
}
+ /**
+ * Set extra command options; only used on some
+ * of the Perforce tasks.
+ */
public void setCmdopts(String P4CmdOpts) {
this.P4CmdOpts = P4CmdOpts;
}
/**
- * Optionally throw a BuildException if p4 command fails
+ * whether to stop the build (true, default)
+ * or keep going if an error is returned from the p4 command
*/
public void setFailonerror(boolean fail) {
failOnError = fail;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java
index 9ecb885cb..548b5aabe 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java
@@ -62,11 +62,12 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-/** P4Change - grab a new changelist from Perforce.
- *
+/**
+ * Requests a new changelist from the Perforce server.
* P4Change creates a new changelist in perforce. P4Change sets the property
* ${p4.change} with the new changelist number. This should then be passed into
* p4edit and p4submit.
+ *
*
* @see P4Edit
* @see P4Submit
@@ -78,6 +79,9 @@ public class P4Change extends P4Base {
protected String emptyChangeList = null;
protected String description = "AutoSubmit By Ant";
+ /**
+ * throw all immutability rules to the wind
+ */
public void execute() throws BuildException {
if (emptyChangeList == null) {
@@ -162,7 +166,10 @@ public class P4Change extends P4Base {
return buf.toString();
}
- /* Set Description Variable. */
+ /**
+ * Description for ChangeList;optional.
+ * If none is specified, it will default to "AutoSubmit By Ant"
+ */
public void setDescription(String desc) {
this.description = desc;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java
index 6d07cc984..99f333bd3 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java
@@ -62,13 +62,22 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-/** P4Counter - Obtain or set the value of a counter.
- * P4Counter can be used to either print the value of a counter
- * to the output stream for the project (by setting the "name"
- * attribute only), to set a property based on the value of
- * a counter (by setting the "property" attribute) or to set the counter
- * on the perforce server (by setting the "value" attribute).
+/**
+ * Obtains or sets the value of a counter.
*
+ * <p> When used in its base form
+ * (where only the counter name is provided), the counter value will be
+ * printed to the output stream. When the value is provided, the counter
+ * will be set to the value provided. When a property name is provided,
+ * the property will be filled with the value of the counter. You may
+ * not specify to both get and set the value of the counter in the same
+ * Task.
+ * </p>
+ * <P>
+ * The user performing this task must have Perforce &quot;review&quot; permissions
+ * as defined by Perforce protections in order for this task to succeed.
+</P>
+
* Example Usage:<br>
* &lt;p4counter name="${p4.counter}" property=${p4.change}"/&gt;
* @author <a href="mailto:kirk@radik.com">Kirk Wylie</a>
@@ -81,20 +90,32 @@ public class P4Counter extends P4Base {
public boolean shouldSetProperty = false;
public int value = 0;
+ /**
+ * The name of the counter; required
+ */
public void setName(String counter) {
this.counter = counter;
}
+ /**
+ * The new value for the counter; optional.
+ */
public void setValue(int value) {
this.value = value;
shouldSetValue = true;
}
+ /**
+ * A property to be set with the value of the counter
+ */
public void setProperty(String property) {
this.property = property;
shouldSetProperty = true;
}
+ /**
+ * again, properties are mutable in this tsk
+ */
public void execute() throws BuildException {
if ((counter == null) || counter.length() == 0) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java
index fa36eef8a..47366de0d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -55,14 +55,14 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
-/** P4Delete - checkout file(s) for delete.
+/** Checkout files for deletion.
*
* Example Usage:<br>
* &lt;p4delete change="${p4.change}" view="//depot/project/foo.txt" /&gt;<br>
*
* Simple re-write of P4Edit changing 'edit' to 'delete'.<br>
*
- * ToDo: What to do if file is already open in one of our changelists perhaps
+ * @todo What to do if file is already open in one of our changelists perhaps
* (See also {@link P4Edit P4Edit})?<br>
*
* @author <A HREF="mailto:mike@tmorph.com">Mike Roberts</A>, <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
@@ -71,6 +71,10 @@ public class P4Delete extends P4Base {
public String change = null;
+ /**
+ * An existing changelist number for the deletion; optional
+ * but strongly recommended.
+ */
public void setChange(String change) {
this.change = change;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java
index 8af392a7b..d2434b56d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java
@@ -61,19 +61,27 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
-/** P4Edit - checkout file(s) for edit.
- *
+/**
+ * Open file(s) for edit.
+ * P4Change should be used to obtain a new changelist for P4Edit as,
+ * although P4Edit can open files to the default change,
+ * P4Submit cannot yet submit to it.
* Example Usage:<br>
* &lt;p4edit change="${p4.change}" view="//depot/project/foo.txt" /&gt;
+ *
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
- * ToDo: Should call reopen if file is already open in one of our changelists perhaps?
+ * @todo Should call reopen if file is already open in one of our changelists perhaps?
*/
public class P4Edit extends P4Base {
public String change = null;
+ /**
+ * An existing changelist number to assign files to; optional
+ * but strongly recommended.
+ */
public void setChange(String change) {
this.change = change;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Have.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Have.java
index db61b0a6a..98b547819 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Have.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Have.java
@@ -62,7 +62,7 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
-/** P4Have - lists files currently on client.
+/** Lists Perforce files currently on client.
*
* P4Have simply dumps the current file version info into
* the Ant log (or stdout).
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java
index b35dd1598..5f0ee9db2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java
@@ -66,10 +66,9 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-/** P4Label - create a Perforce Label.
- *
- * P4Label inserts a label into perforce reflecting the
- * current client contents.
+/**
+ * Creates a new Perforce label and set contents to reflect current
+ * client file revisions.
*
* Label name defaults to AntLabel if none set.
*
@@ -86,18 +85,30 @@ public class P4Label extends P4Base {
protected String desc;
protected String lock;
+ /**
+ * The name of the label; optional, default "AntLabel"
+ */
public void setName(String name) {
this.name = name;
}
+ /**
+ *Label Description; optional
+ */
public void setDesc(String desc) {
this.desc = desc;
}
+ /**
+ * when set to "locked", Perforce will lock the label once created; optional.
+ */
public void setLock(String lock) {
this.lock = lock;
}
+ /**
+ * do the work
+ */
public void execute() throws BuildException {
log("P4Label exec:", Project.MSG_INFO);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
index 31e27549f..c3b8b811b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
@@ -61,15 +61,18 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
-/* P4Reopen - move files to a new changelist
+/*
+ * Reopen Perforce checkout files between changelists.
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*/
-
public class P4Reopen extends P4Base {
private String toChange = "";
+ /**
+ * The changelist to move files to; required.
+ */
public void setToChange(String toChange) throws BuildException {
if (toChange == null && !toChange.equals("")) {
throw new BuildException("P4Reopen: tochange cannot be null or empty");
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
index 02d792e2b..1d6c8eb3a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
@@ -61,16 +61,19 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
-/* P4Revert - revert open files or files in a changelist
+/**
+ * Revert Perforce open files or files in a changelist
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*/
-
public class P4Revert extends P4Base {
private String revertChange = null;
private boolean onlyUnchanged = false;
+ /**
+ * The changelist to revert; optional.
+ */
public void setChange(String revertChange) throws BuildException {
if (revertChange == null && !revertChange.equals("")) {
throw new BuildException("P4Revert: change cannot be null or empty");
@@ -80,6 +83,9 @@ public class P4Revert extends P4Base {
}
+ /**
+ * flag to revert only unchanged files (p4 revert -a); optional, default false.
+ */
public void setRevertOnlyUnchanged(boolean onlyUnchanged) {
this.onlyUnchanged = onlyUnchanged;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java
index dddd7c0d0..541b44175 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java
@@ -62,10 +62,10 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-/** P4Submit - submit a numbered changelist to Perforce.
+/** Submits a numbered changelist to Perforce.
*
* <B>Note:</B> P4Submit cannot (yet) submit the default changelist.
- * This shouldn't be a problem with the ANT API as the usual flow is
+ * This shouldn't be a problem with the ANT task as the usual flow is
* P4Change to create a new numbered change followed by P4Edit then P4Submit.
*
* Example Usage:-<br>
@@ -79,6 +79,9 @@ public class P4Submit extends P4Base {
//ToDo: If dealing with default cl need to parse out <enter description here>
public String change;
+ /**
+ * The changelist number to submit; required.
+ */
public void setChange(String change) {
this.change = change;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java
index e35b96f3f..daf99b5b1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java
@@ -62,7 +62,8 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-/** P4Sync - synchronise client space to a perforce depot view.
+/** Synchronize client space to a Perforce depot view.
+ *
* The API allows additional functionality of the "p4 sync" command
* (such as "p4 sync -f //...#have" or other exotic invocations).</P>
*
@@ -75,7 +76,7 @@ import org.apache.tools.ant.Project;
* <tr><td>Sync to a label</td><td>&lt;P4Sync label="myPerforceLabel" /&gt;</td></tr>
* </table>
*
- * ToDo: Add decent label error handling for non-exsitant labels
+ * @todo Add decent label error handling for non-exsitant labels
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*/
@@ -84,6 +85,9 @@ public class P4Sync extends P4Base {
String label;
private String syncCmd = "";
+ /**
+ * Label to sync client to; optional.
+ */
public void setLabel(String label) throws BuildException {
if (label == null && !label.equals("")) {
throw new BuildException("P4Sync: Labels cannot be Null or Empty");
@@ -94,6 +98,9 @@ public class P4Sync extends P4Base {
}
+ /**
+ * force a refresh of files, if this attribute is set; false by default.
+ */
public void setForce(String force) throws BuildException {
if (force == null && !label.equals("")) {
throw new BuildException("P4Sync: If you want to force, set force to non-null string!");
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
index 09296f68a..299c4ca55 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
@@ -76,7 +76,17 @@ import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
import org.apache.tools.ant.types.Commandline;
/**
- * A task that fetches source files from a PVCS archive.
+ *
+ * Extracts the latest edition of the source code from a PVCS repository.
+ * PVCS is a version control system
+ * developed by <a href="http://www.merant.com/products/pvcs">Merant</a>.
+ * <br>
+ * Before using this tag, 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.
+ * <br>
+ * This version has been tested agains PVCS version 6.5 and 6.6 under Windows and Solaris.
+
*
* <b>19-04-2001</b> <p>The task now has a more robust
* parser. It allows for platform independant file paths
@@ -91,7 +101,7 @@ import org.apache.tools.ant.types.Commandline;
*
* @author <a href="mailto:tchristensen@nordija.com">Thomas Christensen</a>
* @author <a href="mailto:donj@apogeenet.com">Don Jeffery</a>
- * @author <a href="snewton@standard.com">Steven E. Newton</a>
+ * @author <a href="mailto:snewton@standard.com">Steven E. Newton</a>
*/
public class Pvcs extends org.apache.tools.ant.Task {
private String pvcsbin;
@@ -380,24 +390,54 @@ public class Pvcs extends org.apache.tools.ant.Task {
return repository;
}
+ /**
+ * The filenameFormat attribute defines a MessageFormat string used
+ * to parse the output of the pcli command. It defaults to
+ * <code>{0}-arc({1})</code>. Repositories where the archive
+ * extension is not -arc should set this.
+ */
public String getFilenameFormat() {
return filenameFormat;
}
+ /**
+ * The format of the folder names; optional.
+ * This must be in a format suitable for
+ * <code>java.text.MessageFormat</code>.
+ * Index 1 of the format will be used as the file name.
+ * Defaults to <code>{0}-arc({1})</code>
+ */
public void setFilenameFormat(String f) {
filenameFormat = f;
}
+ /**
+
+ * The lineStart attribute is used to parse the output of the pcli
+ * command. It defaults to <code>&quot;P:</code>. 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.
+ */
public String getLineStart() {
return lineStart;
}
+ /**
+ * What a valid return value from PVCS looks like
+ * when it describes a file. Defaults to <code>&quot;P:</code>.
+ * If you are not using an UNC name for your repository and the
+ * drive letter <code>P</code> is incorrect for your setup, you may
+ * need to change this value, UNC names will always be
+ * accepted.
+ */
+
public void setLineStart(String l) {
lineStart = l;
}
/**
- * Specifies the network name of the PVCS repository
+ * The network name of the PVCS repository; required.
* @param repo String
*/
public void setRepository(String repo) {
@@ -413,7 +453,8 @@ public class Pvcs extends org.apache.tools.ant.Task {
}
/**
- * Specifies the name of the project in the PVCS repository
+ * The project within the PVCS repository to extract files from;
+ * optional, default &quot;/&quot;
* @param prj String
*/
public void setPvcsproject(String prj) {
@@ -437,7 +478,12 @@ public class Pvcs extends org.apache.tools.ant.Task {
}
/**
- * Specifies the name of the workspace to store retrieved files
+ * Workspace to use; optional.
+ * By 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.
* @param ws String
*/
public void setWorkspace(String ws) {
@@ -453,8 +499,14 @@ public class Pvcs extends org.apache.tools.ant.Task {
}
/**
- * Specifies the location of the PVCS bin directory
+ * Specifies the location of the PVCS bin directory; optional if on the PATH.
+ * On some systems the PVCS executables <i>pcli</i>
+ * and <i>get</i> 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.
* @param ws String
+ * @todo use a File setter and resolve paths.
*/
public void setPvcsbin(String bin) {
pvcsbin = bin;
@@ -469,7 +521,12 @@ public class Pvcs extends org.apache.tools.ant.Task {
}
/**
- * Specifies the value of the force argument
+ * Specifies the value of the force argument; optional.
+ * If set to <i>yes</i> all files that exists and are
+ * writable are overwritten. Default <i>no</i> causes the files
+ * that are writable to be ignored. This stops the PVCS command
+ * <i>get</i> to stop asking questions!
+ * @todo make a boolean setter
* @param repo String (yes/no)
*/
public void setForce(String f) {
@@ -505,7 +562,7 @@ public class Pvcs extends org.apache.tools.ant.Task {
}
/**
- * Specifies the name of the label argument
+ * Only files marked with this label are extracted; optional.
* @param repo String
*/
public void setLabel(String l) {
@@ -522,14 +579,14 @@ public class Pvcs extends org.apache.tools.ant.Task {
/**
* If set to true the return value from executing the pvcs
- * commands are ignored.
+ * commands are ignored; optional, default false.
*/
public void setIgnoreReturnCode(boolean b) {
ignorerc = b;
}
/**
- * handles &lt;pvcsproject&gt; subelements
+ * Specify a project within the PVCS repository to extract files from.
* @param PvcsProject
*/
public void addPvcsproject(PvcsProject p) {
@@ -541,8 +598,8 @@ public class Pvcs extends org.apache.tools.ant.Task {
}
/**
- * If set to true files are gotten only if newer
- * than existing local files.
+ * If set to <i>true</i> files are fetched only if
+ * newer than existing local files; optional, default false.
*/
public void setUpdateOnly(boolean l) {
updateOnly = l;
@@ -552,6 +609,11 @@ public class Pvcs extends org.apache.tools.ant.Task {
return userId;
}
+ /**
+ * User ID; unused.
+ * @ant.attribute ignore="true"
+ */
+
public void setUserId(String u) {
userId = u;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java
index 65b0750be..b349835bc 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java
@@ -57,7 +57,7 @@ package org.apache.tools.ant.taskdefs.optional.pvcs;
/**
- * class to handle &lt;pvcsprojec&gt; elements
+ * represents a project within the PVCS repository to extract files from.
*/
public class PvcsProject {
private String name;
@@ -66,9 +66,16 @@ public class PvcsProject {
super();
}
+ /**
+ * Set the name of the project
+ */
public void setName(String name) {
PvcsProject.this.name = name;
}
+
+ /**
+ * Get the name of the project
+ */
public String getName() {
return name;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java b/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
index 40e7bb402..a0be93f74 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
@@ -111,7 +111,7 @@ import org.apache.tools.ant.Project;
* @version 1.0
* @see <A HREF="http://www.starbase.com/">StarBase Web Site</A>
*
- * @ant.task name="starteam" category="scm"
+ * @ant.task name="starteam" category="scm" ignore="true"
*/
public class AntStarTeamCheckOut extends org.apache.tools.ant.Task {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
index 8d1e76818..24473f1ed 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
@@ -71,10 +71,9 @@ import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.FileSet;
/**
- * Convenient task to run the snapshot merge utility for JProbe Coverage.
+ * Runs the snapshot merge utility for JProbe Coverage.
*
* @author <a href="sbailliez@imediation.com">Stephane Bailliez</a>
- *
* @ant.task name="jpcovmerge" category="metrics"
*/
public class CovMerge extends Task {
@@ -91,26 +90,30 @@ public class CovMerge extends Task {
private boolean verbose;
/**
- * set the coverage home. It must point to JProbe coverage
- * directories where are stored native librairies and jars
+ * The directory where JProbe is installed.
*/
public void setHome(File value) {
this.home = value;
}
/**
- * Set the output snapshot file
+ * Set the output snapshot file.
*/
public void setTofile(File value) {
this.tofile = value;
}
- /** run the merging in verbose mode */
+ /**
+ * If true, perform the merge in verbose mode giving details
+ * about the snapshot processing.
+ */
public void setVerbose(boolean flag) {
this.verbose = flag;
}
- /** add a fileset containing the snapshots to include/exclude */
+ /**
+ * add a fileset containing the snapshots to include.
+ */
public void addFileset(FileSet fs) {
filesets.addElement(fs);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java
index 6a799bdc3..d7ecc5555 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java
@@ -78,10 +78,9 @@ import org.apache.tools.ant.types.Path;
/**
- * Convenient task to run the snapshot merge utility for JProbe Coverage 3.0.
+ * Runs the JProbe Coverage 3.0 snapshot merge utility.
*
* @author <a href="sbailliez@imediation.com">Stephane Bailliez</a>
- *
* @ant.task name="jpcovreport" category="metrics"
*/
public class CovReport extends Task {
@@ -167,8 +166,7 @@ public class CovReport extends Task {
/**
- * Set the coverage home. It must point to JProbe coverage
- * directories where are stored native libraries and jars.
+ * The directory where JProbe is installed.
*/
public void setHome(File value) {
this.home = value;
@@ -180,7 +178,9 @@ public class CovReport extends Task {
}
}
- /** set the format of the report html|text|xml*/
+ /**
+ * set the format of the report: "html", "text", or "xml"
+ */
public void setFormat(ReportFormat value) {
this.format = value.getValue();
}
@@ -191,26 +191,41 @@ public class CovReport extends Task {
}
}
- /** sets the report type executive|summary|detailed|verydetailed */
+ /**
+ * The type of report to be generated: "executive", "summary",
+ * "detailed" or "verydetailed".
+ */
public void setType(ReportType value) {
this.type = value.getValue();
}
- /** include source code lines. XML report only */
+ /**
+ * If true, include text of the source code lines.
+ * Only applies to format="xml" and type="verydetailed"
+ */
public void setIncludesource(boolean value) {
this.includeSource = value;
}
- /** sets the threshold printing method 0-100*/
+ /**
+ * A numeric value for the threshold for printing methods.
+ * Must be between 0 and 100.
+ */
public void setPercent(Integer value) {
this.percent = value;
}
- /** set the filters */
+ /**
+ * set the filters
+ * @ant.attribute ignore="true"
+ */
public void setFilters(String values) {
this.filters = values;
}
+ /**
+ * Adds a path to source files.
+ */
public Path createSourcepath() {
if (sourcePath == null) {
sourcePath = new Path(project);
@@ -218,18 +233,24 @@ public class CovReport extends Task {
return sourcePath.createPath();
}
+ /**
+ * The name of the snapshot file that is the source to the report.
+ */
public void setSnapshot(File value) {
this.snapshot = value;
}
/**
- * Set the output snapshot file
+ * The name of the generated output file.
*/
public void setTofile(File value) {
this.tofile = value;
}
- //@todo to remove
+ /**
+ * @todo needs to be removed
+ * @ant.element ignore="true"
+ */
public Path createCoveragepath() {
if (coveragePath == null) {
coveragePath = new Path(project);
@@ -237,6 +258,10 @@ public class CovReport extends Task {
return coveragePath.createPath();
}
+ /**
+ * Adds a set of classes whose coverage information will be
+ * checked against.
+ */
public Reference createReference() {
if (reference == null) {
reference = new Reference();
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java
index 77c28ffb9..30b6878d7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java
@@ -75,7 +75,8 @@ import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
/**
- * Convenient task to run Sitraka JProbe Coverage from Ant.
+ * Runs Sitraka JProbe Coverage.
+ *
* Options are pretty numerous, you'd better check the manual for a full
* descriptions of options. (not that simple since they differ from the online
* help, from the usage command line and from the examples...)
@@ -131,7 +132,9 @@ public class Coverage extends Task {
//--------- setters used via reflection --
- /** set the coverage home directory where are libraries, jars and jplauncher */
+ /**
+ * The directory where JProbe is installed.
+ */
public void setHome(File value) {
home = value;
}
@@ -141,10 +144,16 @@ public class Coverage extends Task {
seedName = value;
}
+ /**
+ * @ant.attribute ignore="true"
+ */
public void setInputfile(File value) {
inputFile = value;
}
+ /**
+ * Path to the java executable.
+ */
public void setJavaexe(File value) {
javaExe = value;
}
@@ -155,25 +164,43 @@ public class Coverage extends Task {
}
}
- /** jdk117, jdk118 or java2, can be null, default to java2 */
+ /**
+ * Indicates which virtual machine to run: "jdk117", "jdk118" or "java2".
+ * Can be null, default to "java2". */
public void setVm(Javavm value) {
vm = value.getValue();
}
- /** default to false unless file is htm or html */
+ /**
+ * If true, run an applet.
+ */
public void setApplet(boolean value) {
applet = value;
}
- /** always, error, never */
+ /**
+ * Toggles display of the console prompt: always, error, never
+ */
public void setExitprompt(String value) {
exitPrompt = value;
}
+ /**
+ * Defines class/method filters based on pattern matching.
+ * The syntax is filters is similar to a fileset.
+ */
public Filters createFilters() {
return filters;
}
+ /**
+ * Defines events to use for interacting with the
+ * collection of data performed during coverage.
+ *
+ * For example you may run a whole application but only decide
+ * to collect data once it reaches a certain method and once it
+ * exits another one.
+ */
public Triggers createTriggers() {
if (triggers == null) {
triggers = new Triggers();
@@ -181,6 +208,10 @@ public class Coverage extends Task {
return triggers;
}
+ /**
+ * Define a host and port to connect to if you want to do
+ * remote viewing.
+ */
public Socket createSocket() {
if (socket == null) {
socket = new Socket();
@@ -194,7 +225,10 @@ public class Coverage extends Task {
}
}
- /** none, coverage, all. Can be null, default to none */
+ /**
+ * Type of snapshot to send at program termination: none, coverage, all.
+ * Can be null, default to none
+ */
public void setFinalsnapshot(String value) {
finalSnapshot = value;
}
@@ -205,50 +239,77 @@ public class Coverage extends Task {
}
}
- /** all, coverage, none */
+ /**
+ * "all", "coverage", or "none".
+ */
public void setRecordfromstart(Recordfromstart value) {
recordFromStart = value.getValue();
}
+ /**
+ * Set warning level (0-3, where 0 is the least amount of warnings).
+ */
public void setWarnlevel(Integer value) {
warnLevel = value.intValue();
}
+ /**
+ * The path to the directory where snapshot files are stored.
+ * Choose a directory that is reachable by both the remote
+ * and local computers, and enter the same path on the command-line
+ * and in the viewer.
+ */
public void setSnapshotdir(File value) {
snapshotDir = value;
}
+ /**
+ * The physical path to the working directory for the VM.
+ */
public void setWorkingdir(File value) {
workingDir = value;
}
+ /**
+ * If true, track native methods.
+ */
public void setTracknatives(boolean value) {
trackNatives = value;
}
//
- /** the jvm arguments */
+ /**
+ * Adds a JVM argument.
+ */
public Commandline.Argument createJvmarg() {
return cmdlJava.createVmArgument();
}
- /** the command arguments */
+ /**
+ * Adds a command argument.
+ */
public Commandline.Argument createArg() {
return cmdlJava.createArgument();
}
- /** classpath to run the files */
+ /**
+ * classpath to run the files.
+ */
public Path createClasspath() {
return cmdlJava.createClasspath(project).createPath();
}
- /** classname to run as standalone or runner for filesets */
+ /**
+ * classname to run as standalone or runner for filesets.
+ */
public void setClassname(String value) {
cmdlJava.setClassname(value);
}
- /** the classnames to execute */
+ /**
+ * the classnames to execute.
+ */
public void addFileset(FileSet fs) {
filesets.addElement(fs);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java
index 76af99a05..4317eb18e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java
@@ -75,14 +75,24 @@ public class Filters {
public Filters() {
}
+ /**
+ * Automatically exclude all classes and methods
+ * unless included in nested elements; optional, default true.
+ */
public void setDefaultExclude(boolean value) {
defaultExclude = value;
}
+ /**
+ * include classes and methods in the analysis
+ */
public void addInclude(Include incl) {
filters.addElement(incl);
}
+ /**
+ * exclude classes and methods from the analysis
+ */
public void addExclude(Exclude excl) {
filters.addElement(excl);
}
@@ -105,23 +115,43 @@ public class Filters {
return buf.toString();
}
+ /**
+ * an includes or excludes element
+ */
public abstract static class FilterElement {
protected String clazz;
protected String method = "*"; // default is all methods
protected boolean enabled = true; // default is enable
- public void setName(String value) { // this one is deprecated.
+ /**
+ * this one is deprecated.
+ * @ant.task ignore="true"
+ */
+
+ public void setName(String value) {
clazz = value;
}
+ /**
+ * The classname mask as a simple regular expression;
+ * optional, defaults to "*"
+ */
public void setClass(String value) {
clazz = value;
}
+ /**
+ * The method mask as a simple regular expression;
+ * optional, defaults to "*"
+ */
public void setMethod(String value) {
method = value;
}
+ /**
+ * enable or disable the filter; optional, default true
+ */
+
public void setEnabled(boolean value) {
enabled = value;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Socket.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Socket.java
index 1158b4a45..ccf229213 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Socket.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Socket.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
package org.apache.tools.ant.taskdefs.optional.sitraka;
/**
- * Socket element for connection.
+ * Define a host and port to connect to if you want to do remote viewing.
* <tt>&lt;socket/&gt;</tt> defaults to host 127.0.0.1 and port 4444
*
* Otherwise it requires the host and port attributes to be set:
@@ -70,10 +70,17 @@ public class Socket {
/** default to 4444 */
private int port = 4444;
+ /**
+ * the host name/ip of the machine on which the Viewer is running;
+ * defaults to localhost.
+ */
public void setHost(String value) {
host = value;
}
+ /**
+ * Optional port number for the viewer; default is 4444
+ */
public void setPort(Integer value) {
port = value.intValue();
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java
index 3238d369b..2b5642af9 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java
@@ -72,6 +72,10 @@ public class Triggers {
public Triggers() {
}
+
+ /**
+ * add a method trigger
+ */
public void addMethod(Method method) {
triggers.addElement(method);
}
@@ -90,16 +94,29 @@ public class Triggers {
}
+ /**
+ * A trigger for the coverage report
+ */
public static class Method {
protected String name;
protected String event;
protected String action;
protected String param;
+ /**
+ * The name of the method(s) as a regular expression. The name
+ * is the fully qualified name on the form <tt>package.classname.method</tt>
+ * required.
+ */
public void setName(String value) {
name = value;
}
+ /**
+ * the event on the method that will trigger the action. Must be
+ * &quot;enter&quot; or &quot;exit&quot;
+ * required.
+ */
public void setEvent(String value) {
if (eventMap.get(value) == null) {
throw new BuildException("Invalid event, must be one of " + eventMap);
@@ -107,6 +124,12 @@ public class Triggers {
event = value;
}
+ /**
+ * The action to execute; required. Must be one of &quot;clear&quot;,
+ * &quot;pause&quot;, &quot;resume&quot;, &quot;snapshot&quot;, &quot;suspend&quot;,
+ * or &quot;exit&quot;. They respectively clear recording, pause recording,
+ * resume recording, take a snapshot, suspend the recording and exit the program.
+ */
public void setAction(String value) throws BuildException {
if (actionMap.get(value) == null) {
throw new BuildException("Invalid action, must be one of " + actionMap);
@@ -114,6 +137,9 @@ public class Triggers {
action = value;
}
+ /**
+ * A alphanumeric custom name for the snapshot; optional.
+ */
public void setParam(String value) {
param = value;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java
index ca903ebd4..69eced645 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java
@@ -119,7 +119,8 @@ public abstract class SOS extends Task {
/**
- * Disable the cache
+ * flag to disable the cache when set;
+ * optional needed if SOSHOME is set as an environment variable.
*
* @param nocache The new noCache value
*/
@@ -129,9 +130,9 @@ public abstract class SOS extends Task {
/**
- * Disable compression
+ * Flag that disables compression when set; optional, default
*
- * @param nocompress The new noCompress value
+ * @param nocompress true to disable compression
*/
public void setNoCompress(boolean nocompress) {
noCompress = nocompress;
@@ -139,7 +140,8 @@ public abstract class SOS extends Task {
/**
- * Set the directory where soscmd(.exe) is located
+ * Set the directory where soscmd(.exe) is located;
+ * optional, soscmd must be on the path if omitted.
*
* @param dir The new sosCmd value
*/
@@ -149,7 +151,7 @@ public abstract class SOS extends Task {
/**
- * Set the username to use to access SOS.
+ * Set the SourceSafe username; required.
*
* @param username The new username value
*/
@@ -159,7 +161,7 @@ public abstract class SOS extends Task {
/**
- * Set the password to use to access SOS.
+ * Set the SourceSafe password; optional.
*
* @param password The new password value
*/
@@ -169,9 +171,7 @@ public abstract class SOS extends Task {
/**
- * Set the path to the item in SOS to operate on.
- * <p>
- * To avoid the "$$" in th build file we add it here
+ * Set the SourceSafe project path without the "$" prefix; required
*
* @param projectpath The new projectPath value
*/
@@ -181,7 +181,8 @@ public abstract class SOS extends Task {
/**
- * Set the path to the location of the ss.ini.
+ * Set the path to the location of the ss.ini file;
+ * required.
*
* @param vssServerPath The new vssServerPath value
*/
@@ -191,7 +192,7 @@ public abstract class SOS extends Task {
/**
- * Set the path of soshome
+ * The path to the SourceOffSite home directory
*
* @param sosHome The new sosHome value
*/
@@ -201,7 +202,8 @@ public abstract class SOS extends Task {
/**
- * Set the address & port of SourceOffSite Server
+ * Set the address and port of SourceOffSite Server,
+ * eg. 192.168.0.1:8888 ; required.
*
* @param sosServerPath The new sosServerPath value
*/
@@ -211,7 +213,7 @@ public abstract class SOS extends Task {
/**
- * Set the local path.
+ * Override the working directory and get to the specified path; optional.
*
* @param path The new localPath value
*/
@@ -221,7 +223,9 @@ public abstract class SOS extends Task {
/**
- * Set the filename to get from SOS
+ * Set the Filename to act upon; optional.
+ * If no file is specified then the tasks
+ * act upon the project
*
* @param filename The new file value
*/
@@ -231,7 +235,7 @@ public abstract class SOS extends Task {
/**
- * Set behaviour verbose or quiet
+ * Enable verbose output; optional, default false
*
* @param verbose The new verbose value
*/
@@ -241,7 +245,8 @@ public abstract class SOS extends Task {
/**
- * Set behaviour recursive or non-recursive
+ * Flag to recursively apply the action (not valid
+ * on all SOS tasks ); optional, default false
*
* @param recursive The new recursive value
*/
@@ -251,7 +256,8 @@ public abstract class SOS extends Task {
/**
- * Set the stored version string
+ * Set the a version number to get -
+ * only works with the SOSGet on a file; optional.
*
* @param version The new version value
*/
@@ -271,7 +277,8 @@ public abstract class SOS extends Task {
/**
- * Set the comment to get
+ * Set the comment to apply to all files being labelled;
+ * optional, only valid in SOSLabel
*
* @param comment The new comment value
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java
index c3eda091a..349daff98 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java
@@ -57,7 +57,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.Commandline;
/**
- * Task to commit and unlock file(s) in Visual Source Safe via a SourceOffSite server.
+ * Commits and unlocks files in Visual SourceSafe via a SourceOffSite server.
+ *
* <p>
* The following attributes are interpretted:
* <table border="1">
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java
index f7a85d353..3ea44bc18 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java
@@ -57,7 +57,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.Commandline;
/**
- * Task to retreive and lock file(s) in Visual Source Safe via a SourceOffSite server.
+ * Retrieves and locks files in Visual SourceSafe via a SourceOffSite server.
+ *
* <p>
* The following attributes are interpretted:
* <table border="1">
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java
index 3ee4c5cb6..6aa1462fa 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java
@@ -57,7 +57,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.Commandline;
/**
- * Task to retreive file(s) from Visual Source Safe via a SourceOffSite server.
+ * Retrieves a read-only copy of the specified project or file
+ * from Visual SourceSafe via a SourceOffSite server.
* <p>
* The following attributes are interpretted:
* <table border="1">
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java
index 953a31ee1..5a4066352 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java
@@ -57,9 +57,9 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.Commandline;
/**
- * Task to label a Visual Source Safe via a SourceOffSite server.
+ * Labels Visual SourceSafe files via a SourceOffSite server.
* <p>
- * The following attributes are interpretted:
+ * The following attributes are interpreted:
* <table border="1">
* <tr>
* <th>Attribute</th>
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java
index bc68c2589..e9280854c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java
@@ -63,7 +63,7 @@ import java.util.Random;
import java.util.Vector;
/**
- * This is an example of an AntTask that makes of use of the AntSoundPlayer.
+ * Plays a sound file at the end of the build, according to whether the build failed or succeeded.
*
* There are three attributes to be set:
*
@@ -87,11 +87,17 @@ public class SoundTask extends Task {
private BuildAlert success = null;
private BuildAlert fail = null;
+ /**
+ * add a sound when the build succeeds
+ */
public BuildAlert createSuccess() {
success = new BuildAlert();
return success;
}
+ /**
+ * add a sound when the build fails
+ */
public BuildAlert createFail() {
fail = new BuildAlert();
return fail;
@@ -135,14 +141,14 @@ public class SoundTask extends Task {
private Long duration = null;
/**
- * Sets the duration in milliseconds the file should be played.
+ * Sets the duration in milliseconds the file should be played; optional.
*/
public void setDuration(Long duration) {
this.duration = duration;
}
/**
- * Sets the location of the file to get the audio.
+ * Sets the location of the file to get the audio; required.
*
* @param source the name of a sound-file directory or of the audio file
*/
@@ -151,7 +157,7 @@ public class SoundTask extends Task {
}
/**
- * Sets the number of times the source file should be played.
+ * Sets the number of times the source file should be played; optional.
*
* @param loops the number of loops to play the source file
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java
index edbdeaee2..2e66ed0a9 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java
@@ -65,6 +65,14 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.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...
+ * @since Ant1.5
+ * @author Les Hughes (leslie.hughes@rubus.com)
+ */
public class SplashTask extends Task {
private String imgurl = null;
@@ -77,24 +85,55 @@ public class SplashTask extends Task {
private static SplashScreen splash = null;
+ /**
+ * A URL pointing to an image to display; optional, default antlogo.gif
+ * from the classpath.
+ */
public void setImageURL(String imgurl) {
this.imgurl = imgurl;
}
+
+ /**
+ * flag to enable proxy settings; optional, deprecated : consider
+ * using &lt;setproxy&gt; instead
+ * @deprecated use org.apache.tools.ant.taskdefs.optional.SetProxy
+ */
public void setUseproxy(boolean useProxy) {
this.useProxy = useProxy;
}
+
+ /**
+ * name of proxy; optional.
+ */
public void setProxy(String proxy){
this.proxy = proxy;
}
+
+ /**
+ * Proxy port; optional, default 80.
+ */
public void setPort(String port){
this.port = port;
}
+
+ /**
+ * Proxy user; optional, default =none.
+ */
public void setUser(String user){
this.user = user;
}
- public void setPassword(String password){
+
+ /**
+ * Proxy password; required if <tt>user</tt> is set.
+ */
+ public void setPassword(String password){
this.password = password;
}
+
+ /**
+ * how long to show the splash screen in milliseconds,
+ * optional; default 5000 ms.
+ */
public void setShowduration(int duration) {
this.showDuration = duration;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckin.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckin.java
index acfe33a59..cf72f8a5c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckin.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckin.java
@@ -69,7 +69,9 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
/**
- * StarTeamCheckIn.java
+ * Checks files into a StarTeam project.
+ * Optionally adds files and in the local tree that
+ * are not managed by the repository to its control.
*
*
* Created: Sat Dec 15 20:26:07 2001
@@ -118,7 +120,7 @@ public class StarTeamCheckin extends TreeBasedTask {
}
/**
- * Set the value of comment.
+ * Optional checkin comment to be saved with the file.
* @param comment Value to assign to comment.
*/
public void setComment(String comment) {
@@ -134,7 +136,8 @@ public class StarTeamCheckin extends TreeBasedTask {
}
/**
- * Set the value of addUncontrolled.
+ * if true, any files or folders NOT in StarTeam will be
+ * added to the repository. Defaults to "false".
* @param addUncontrolled Value to assign to addUncontrolled.
*/
public void setAddUncontrolled(boolean addUncontrolled) {
@@ -150,7 +153,9 @@ public class StarTeamCheckin extends TreeBasedTask {
private int lockStatus = Item.LockType.UNCHANGED;
/**
- * Set to do an unlocked checkout. Default is false;
+ * Set to do an unlocked checkout; optional, default is false;
+ * If true, file will be unlocked so that other users may
+ * change it. If false, lock status will not change.
* @param v true means do an unlocked checkout
* false means leave status alone.
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
index 79963e772..bf7864631 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
@@ -68,8 +68,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
/**
- * This class logs into StarTeam checks out any changes that have occurred since
- * the last successful build. It also creates all working directories on the
+ * Checks out files from a StarTeam project.
+ * It also creates all working directories on the
* local directory if appropriate. Ant Usage:
* <pre>
* &lt;taskdef name="starteamcheckout"
@@ -102,8 +102,8 @@ public class StarTeamCheckout extends TreeBasedTask {
private boolean deleteUncontrolled = true;
/**
- * Set the attribute that tells ant if we want to create all directories
- * that are in the Starteam repository regardless if they are empty.
+ * flag (defaults to true) to create all directories
+ * that are in the Starteam repository even if they are empty.
*
* @param value the value to set the attribute to.
*/
@@ -112,9 +112,8 @@ public class StarTeamCheckout extends TreeBasedTask {
}
/**
- * Sets the attribute that tells ant whether or not to remove local files
- * that are NOT found in the Starteam repository to the supplied value.
- *
+ * Should all all local files <i>not<i> in StarTeam be deleted?
+ * Optional, defaults to "true".
* @param value the value to set the attribute to.
*/
public void setDeleteUncontrolled(boolean value) {
@@ -122,8 +121,8 @@ public class StarTeamCheckout extends TreeBasedTask {
}
/**
- * Sets the label StarTeam is to use for checkout.
- *
+ * Sets the label StarTeam is to use for checkout; defaults to the most recent file.
+ * The label must exist in starteam or an exception will be thrown.
* @param label the label to be used
*/
public void setLabel(String label) {
@@ -142,7 +141,7 @@ public class StarTeamCheckout extends TreeBasedTask {
private int lockStatus = Item.LockType.UNCHANGED;
/**
- * Set to do a locked checkout. Default is false.
+ * Set to do a locked checkout; optional default is false.
* @param v True to do a locked checkout, false to checkout without
* changing status/.
* @exception BuildException if both locked and unlocked are set true
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamLabel.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamLabel.java
index 6e11a5968..705a6e01a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamLabel.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamLabel.java
@@ -65,8 +65,8 @@ import com.starbase.util.OLEDate;
import org.apache.tools.ant.BuildException;
/**
- * This class logs into StarTeam and creates a label for the repository at the
- * time of the last successful build.
+ * Creates a view label in StarTeam at the specified view.
+ *
* Ant Usage:
* <pre>
* &lt;taskdef name="stlabel"
@@ -105,14 +105,24 @@ public class StarTeamLabel extends StarTeamTask {
new SimpleDateFormat("yyyyMMddHHmmss");
+ /**
+ * The name to be given to the label; required.
+ */
public void setLabel(String label) {
this.labelName = label;
}
+ /**
+ * Optional description of the label to be stored in the StarTeam project.
+ */
public void setDescription(String description) {
this.description = description;
}
+ /**
+ * The timestamp of the build that will be stored with the label; required.
+ * Must be formatted <code>yyyyMMddHHmmss</code>
+ */
public void setLastBuild(String lastbuild) throws BuildException {
try {
Date lastBuildTime = DATE_FORMAT.parse(lastbuild);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamList.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamList.java
index f7f3910da..2ca5aa67b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamList.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamList.java
@@ -66,8 +66,8 @@ import com.starbase.starteam.ViewConfiguration;
import org.apache.tools.ant.BuildException;
/**
- * StarTeamList.java
- *
+ * Produces a listing of the contents of the StarTeam repository
+ * at the specified view and StarTeamFolder.
*
* Created: Tue Dec 25 06:51:14 2001
*
@@ -79,7 +79,9 @@ import org.apache.tools.ant.BuildException;
public class StarTeamList extends TreeBasedTask {
/**
- * Sets the label StarTeam is to be listed.
+ * List files, dates, and statuses as of this label; optional.
+ * The label must exist in starteam or an exception will be thrown.
+ * If not specified, the most recent version of each file will be listed.
*
* @param label the label to be listed
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamTask.java
index c6f6f4d62..910f37a07 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamTask.java
@@ -120,8 +120,8 @@ public abstract class StarTeamTask extends Task {
/////////////////////////////////////////////////////////
/**
- * Set the name of StarTeamServer
- *
+ * Set the name of StarTeamServer;
+ * required if <tt>URL</tt> is not set.
* @param servername a <code>String</code> value
* @see #setURL(String)
*/
@@ -140,8 +140,8 @@ public abstract class StarTeamTask extends Task {
}
/**
- * set the port number of the StarTeam connection
- *
+ * set the port number of the StarTeam connection;
+ * required if <tt>URL</tt> is not set.
* @param serverport port number to be set
* @see #setURL(String)
*/
@@ -160,7 +160,8 @@ public abstract class StarTeamTask extends Task {
}
/**
- * set the name of the StarTeam project to be acted on
+ * set the name of the StarTeam project to be acted on;
+ * required if <tt>URL</tt> is not set.
*
* @param projectname the name of the StarTeam project to be acted on
* @see #setURL(String)
@@ -180,7 +181,8 @@ public abstract class StarTeamTask extends Task {
}
/**
- * set the name of the StarTeam view to be acted on
+ * set the name of the StarTeam view to be acted on;
+ * required if <tt>URL</tt> is not set.
*
* @param projectname the name of the StarTeam view to be acted on
* @see #setURL(String)
@@ -201,8 +203,9 @@ public abstract class StarTeamTask extends Task {
/**
- * This is a convenience method for setting the server name, server port,
- * project name and project folder at one shot.
+ * Set the server name, server port,
+ * project name and project folder in one shot;
+ * optional, but the server connection must be specified somehow.
*
* @param url a <code>String</code> of the form
* "servername:portnum/project/view"
@@ -272,7 +275,7 @@ public abstract class StarTeamTask extends Task {
}
/**
- * set the password to be used for login.
+ * set the password to be used for login; required.
*
* @param password the password to be used for login
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
index 8d7851e32..620e64d03 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
@@ -157,7 +157,8 @@ public abstract class TreeBasedTask extends StarTeamTask {
///////////////////////////////////////////////////////////////
/**
- * Set the root folder in the Starteam repository for this operation
+ * Set the root of the subtree in the StarTeam repository from which to
+ * work; optional. Defaults to the root folder of the view ('/').
* @param rootStarteamFolder the root folder
*/
public void setRootStarteamFolder(String rootStarteamFolder) {
@@ -174,10 +175,10 @@ public abstract class TreeBasedTask extends StarTeamTask {
}
/**
- * Set the local folder corresponding to the
- * starteam folder for this operation.
- * If not specified, the StarTeam default will be used
- * the default is used.
+ * Set the local folder that will be the root of the tree
+ * to which files are checked out; optional.
+ * If this is not supplied, then the StarTeam "default folder"
+ * associated with <tt>rootstarteamfolder</tt> is used.
* @param rootLocalFolder the local folder that will mirror
* this.rootStarteamFolder
*/
@@ -196,8 +197,7 @@ public abstract class TreeBasedTask extends StarTeamTask {
}
/**
- * sets the pattern of files to be included. See setExcludes() for a
- * description
+ * Declare files to include using standard <tt>includes</tt> patterns; optional.
* @param includes A string of filter patterns to include. Separate the
* patterns by spaces.
* @see #getIncludes()
@@ -210,7 +210,7 @@ public abstract class TreeBasedTask extends StarTeamTask {
/**
* Gets the patterns from the include filter. Rather that duplicate the
- * details of AntStarTeanCheckOut's filtering here, refer to these
+ * details of AntStarTeamCheckOut's filtering here, refer to these
* links:
*
* @return A string of filter patterns separated by spaces.
@@ -223,7 +223,8 @@ public abstract class TreeBasedTask extends StarTeamTask {
}
/**
- * Sets the exclude filter. When filtering files, AntStarTeamCheckOut
+ * Declare files to exclude using standard <tt>excludes</tt> patterns; optional.
+ * When filtering files, AntStarTeamCheckOut
* uses an unmodified version of <CODE>DirectoryScanner</CODE>'s
* <CODE>match</CODE> method, so here are the patterns straight from the
* Ant source code:
@@ -297,7 +298,8 @@ public abstract class TreeBasedTask extends StarTeamTask {
}
/**
- * Set the value of recursive.
+ * Flag to set to include files in subfolders in the operation; optional,
+ * default true.
* @param v Value to assign to recursive.
*/
public void setRecursive(boolean v) {
@@ -313,7 +315,11 @@ public abstract class TreeBasedTask extends StarTeamTask {
}
/**
- * Set the value of forced.
+ * Flag to force actions regardless of the status
+ * that StarTeam is maintaining for the file; optional, default false.
+ * If <tt>rootlocalfolder</tt> is set then
+ * this should be set "true" as otherwise the checkout will be based on statuses
+ * which do not relate to the target folder.
* @param v Value to assign to forced.
*/
public void setForced(boolean v) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
index 670aee252..85ff4b990 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
@@ -86,7 +86,8 @@ public abstract class MSVSS extends Task {
private String m_serverPath = null;
/**
- * Set the directory where ss.exe is located
+ * directory where <code>ss.exe</code> resides; optional.
+ * By default the task expects it to be in the PATH.
*
* @param dir the directory containing ss.exe
*/
@@ -108,9 +109,11 @@ public abstract class MSVSS extends Task {
}
/**
- * Set the login to use when accessing vss.
+ * The login to use when accessing VSS, formatted as "username,password";
+ * optional.
* <p>
- * Should be formatted as username,password
+ * You can omit the password if your database is not password protected.
+ * if you have a password and omit it, Ant/VSS will hang.
*
* @param login the login string to use
*/
@@ -130,11 +133,13 @@ public abstract class MSVSS extends Task {
}
/**
- * Set the path to the item in vss to operate on.
+ * SourceSafe path which specifies the project/file(s) you wish to
+ * perform the action on; required. You should not specify the leading dollar-sign -
+ * it is prepended by Ant automatically.
* <p>
* Ant can't cope with a '$' sign in an attribute so we have to add it here.
* Also we strip off any 'vss://' prefix which is an XMS special and should probably be removed!
- *
+ * @todo dont add a $ prefix if it has one
* @param vssPath
*/
public final void setVsspath(String vssPath) {
@@ -153,8 +158,7 @@ public abstract class MSVSS extends Task {
}
/**
- * Set the path to the location of the ss.ini
- *
+ * Set the directory where <code>srssafe.ini</code> resides; optional.
* @param serverPath
*/
public final void setServerpath(String serverPath) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java
index fcd0ddaf5..4fa00e582 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java
@@ -59,10 +59,11 @@ import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.Path;
/**
- * Task to perform Add commands to Microsoft Visual Source Safe.
+ * Performs Add commands to Microsoft Visual SourceSafe.
* Based on the VSS Checkin code by Martin Poeschl
*
* @author Nigel Magnay
+ * @ant.task name="vssadd" category="scm"
*/
public class MSVSSADD extends MSVSS {
@@ -135,7 +136,7 @@ public class MSVSSADD extends MSVSS {
}
/**
- * Set behaviour, used in get command to make files that are 'got' writable
+ * Leave added files writable? Default: false.
*/
public final void setWritable(boolean argWritable) {
m_Writable = argWritable;
@@ -152,6 +153,10 @@ public class MSVSSADD extends MSVSS {
}
}
+ /**
+ * What to respond with (sets the -I option). By default, -I- is
+ * used; values of Y or N will be appended to this.
+ */
public void setAutoresponse(String response){
if (response.equals("") || response.equals("null")) {
m_AutoResponse = null;
@@ -182,7 +187,7 @@ public class MSVSSADD extends MSVSS {
}
/**
- * Sets the comment to apply in SourceSafe.
+ * Sets the comment to apply; optional.
* <p>
* If this is null or empty, it will be replaced with "-" which
* is what SourceSafe uses for an empty comment.
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java
index fdce2fdf7..675adb4de 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java
@@ -61,7 +61,7 @@ import org.apache.tools.ant.types.Path;
import java.io.File;
/**
- * Task to perform CheckIn commands to Microsoft Visual Source Safe.
+ * Performs CheckIn commands to Microsoft Visual SourceSafe.
*
* @author Martin Poeschl
*
@@ -156,7 +156,8 @@ public class MSVSSCHECKIN extends MSVSS {
}
/**
- * Set behaviour recursive or non-recursive
+ * Flag to tell the task to recurse down the tree;
+ * optional, default false.
*/
public void setRecursive(boolean recursive) {
m_Recursive = recursive;
@@ -174,7 +175,7 @@ public class MSVSSCHECKIN extends MSVSS {
}
/**
- * Set behaviour, used in get command to make files that are 'got' writable
+ * Leave checked in files writable? Default: false.
*/
public final void setWritable(boolean argWritable) {
m_Writable = argWritable;
@@ -191,6 +192,10 @@ public class MSVSSCHECKIN extends MSVSS {
}
}
+ /**
+ * What to respond with (sets the -I option). By default, -I- is
+ * used; values of Y or N will be appended to this.
+ */
public void setAutoresponse(String response){
if (response.equals("") || response.equals("null")) {
m_AutoResponse = null;
@@ -221,7 +226,7 @@ public class MSVSSCHECKIN extends MSVSS {
}
/**
- * Set the comment to apply in SourceSafe.
+ * Set the comment to apply; optional.
* <p>
* If this is null or empty, it will be replaced with "-" which
* is what SourceSafe uses for an empty comment.
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java
index 3ae66524e..753bcc120 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java
@@ -61,8 +61,9 @@ import org.apache.tools.ant.types.Path;
import java.io.File;
/**
- * Task to perform CheckOut commands to Microsoft Visual Source Safe.
- *
+ * Performs CheckOut commands to Microsoft Visual SourceSafe.
+ * <p>If you specify two or more attributes from version, date and
+ * label only one will be used in the order version, date, label.</p>
* @author Martin Poeschl
*
* @ant.task name="vsscheckout" category="scm"
@@ -153,7 +154,8 @@ public class MSVSSCHECKOUT extends MSVSS {
}
/**
- * Set behaviour recursive or non-recursive
+ * Flag to tell the task to recurse down the tree;
+ * optional, default false.
*/
public void setRecursive(boolean recursive) {
m_Recursive = recursive;
@@ -171,12 +173,9 @@ public class MSVSSCHECKOUT extends MSVSS {
}
/**
- * Set the stored version string.
- * <p>
- * Note we assume that if the supplied string has the value "null" that something
- * went wrong and that the string value got populated from a null object. This
- * happens if a ant variable is used e.g. version="${ver_server}" when ver_server
- * has not been defined to ant!
+ * Set the version to get;
+ * optional, only one of <tt>version</tt>, <tt>label</tt>, or <tt>date</tt>
+ * allowed.
*/
public void setVersion(String version) {
if (version.equals("") || version.equals("null")) {
@@ -187,12 +186,9 @@ public class MSVSSCHECKOUT extends MSVSS {
}
/**
- * Set the stored date string.
- * <p>
- * Note we assume that if the supplied string has the value "null" that something
- * went wrong and that the string value got populated from a null object. This
- * happens if a ant variable is used e.g. date="${date}" when date
- * has not been defined to ant!
+ * Set the date to get;
+ * optional, only one of <tt>version</tt>, <tt>label</tt>, or <tt>date</tt>
+ * allowed.
*/
public void setDate(String date) {
if (date.equals("") || date.equals("null")) {
@@ -203,12 +199,9 @@ public class MSVSSCHECKOUT extends MSVSS {
}
/**
- * Set the labeled version to operate on in SourceSafe.
- * <p>
- * Note we assume that if the supplied string has the value "null" that something
- * went wrong and that the string value got populated from a null object. This
- * happens if a ant variable is used e.g. label="${label_server}" when label_server
- * has not been defined to ant!
+ * Set the label to get;
+ * optional, only one of <tt>version</tt>, <tt>label</tt>, or <tt>date</tt>
+ * allowed.
*/
public void setLabel(String label) {
if (label.equals("") || label.equals("null")) {
@@ -233,6 +226,10 @@ public class MSVSSCHECKOUT extends MSVSS {
}
}
+ /**
+ * What to respond with (sets the -I option). By default, -I- is
+ * used; values of Y or N will be appended to this.
+ */
public void setAutoresponse(String response){
if (response.equals("") || response.equals("null")) {
m_AutoResponse = null;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java
index 5741c666a..48e059fa3 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java
@@ -58,7 +58,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.Commandline;
/**
- * Task to perform CP (Change Project) commands to Microsoft Visual Source Safe.
+ * Performs CP (Change Project) commands to Microsoft Visual SourceSafe.
+ * <p>This task is typically used before a VssAdd in order to set the target project</p>
* Based on the VSS Checkin code by Martin Poeschl
*
* @author Nigel Magnay
@@ -107,6 +108,10 @@ public class MSVSSCP extends MSVSS {
}
}
+ /**
+ * What to respond with (sets the -I option). By default, -I- is
+ * used; values of Y or N will be appended to this.
+ */
public void setAutoresponse(String response) {
if (response.equals("") || response.equals("null")) {
m_AutoResponse = null;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java
index 51e47a84a..23567b39a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java
@@ -58,7 +58,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.Commandline;
/**
- * Task to perform CREATE commands to Microsoft Visual Source Safe.
+ * Creates a new project in Microsoft Visual SourceSafe.
* <p>
* The following attributes are interpreted:
* <table border="1">
@@ -108,6 +108,7 @@ import org.apache.tools.ant.types.Commandline;
* </table>
*
* @author Gary S. Weaver
+ * @ant.task name="vsscreate" category="scm"
*/
public class MSVSSCREATE extends MSVSS {
@@ -194,7 +195,7 @@ public class MSVSSCREATE extends MSVSS {
}
/**
- * Sets/clears quiet mode
+ * Sets/clears quiet mode; optional, default false.
* @param quiet whether or not command should be run in "quiet mode".
*/
public final void setQuiet (boolean quiet) {
@@ -212,7 +213,8 @@ public class MSVSSCREATE extends MSVSS {
}
/**
- * Sets whether task should fail if there is an error creating the project.
+ * Sets whether task should fail if there is an error creating the project;
+ * optional, default true.
* @param failOnError true if task should fail if there is an error creating
* the project.
*/
@@ -221,7 +223,8 @@ public class MSVSSCREATE extends MSVSS {
}
/**
- * Sets the AutoResponse.
+ * What to respond with (sets the -I option). By default, -I- is
+ * used; values of Y or N will be appended to this.
* @param response the response.
*/
public void setAutoresponse(String response) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java
index 919b3d692..5a32f1081 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java
@@ -61,9 +61,9 @@ import org.apache.tools.ant.types.Path;
import java.io.File;
/**
- * Task to perform GET commands to Microsoft Visual Source Safe.
+ * Perform Get commands to Microsoft Visual SourceSafe.
* <p>
- * The following attributes are interpretted:
+ * The following attributes are interpreted:
* <table border="1">
* <tr>
* <th>Attribute</th>
@@ -189,7 +189,7 @@ public class MSVSSGET extends MSVSS {
}
/**
- * Set the local path.
+ * Override the working directory and get to the specified path; optional.
*/
public void setLocalpath(Path localPath) {
m_LocalPath = localPath.toString();
@@ -221,7 +221,8 @@ public class MSVSSGET extends MSVSS {
}
/**
- * Set behaviour recursive or non-recursive
+ * Flag to tell the task to recurse down the tree;
+ * optional, default false.
*/
public void setRecursive(boolean recursive) {
m_Recursive = recursive;
@@ -239,7 +240,7 @@ public class MSVSSGET extends MSVSS {
}
/**
- * Sets/clears quiet mode
+ * Flag to suppress output when true ; false by default.
*/
public final void setQuiet (boolean quiet) {
this.m_Quiet = quiet;
@@ -252,7 +253,7 @@ public class MSVSSGET extends MSVSS {
}
/**
- * Set behaviour, used in get command to make files that are 'got' writable
+ * make fetched files writable; optional, default false.
*/
public final void setWritable(boolean argWritable) {
m_Writable = argWritable;
@@ -270,12 +271,17 @@ public class MSVSSGET extends MSVSS {
}
/**
- * Set the stored version string.
+ * Set a version number to get;
+ * optional, only one of <tt>version</tt>, <tt>label</tt>, or <tt>date</tt>
+ * allowed.
* <p>
+ * ORIGINAL COMMENT THAT DOES NOT SEEM AT ALL VALID:
* Note we assume that if the supplied string has the value "null" that something
* went wrong and that the string value got populated from a null object. This
* happens if a ant variable is used e.g. version="${ver_server}" when ver_server
* has not been defined to ant!
+ * NO, in this case the version string is "${ver_server}".
+ * @todo fix this
*/
public void setVersion(String version) {
if (version.equals("") || version.equals("null")) {
@@ -286,12 +292,16 @@ public class MSVSSGET extends MSVSS {
}
/**
- * Set the stored date string.
+ * Set the date to get;
+ * optional, only one of <tt>version</tt>, <tt>label</tt>, or <tt>date</tt>
+ * allowed.
* <p>
+ * ORIGINAL COMMENT THAT DOES NOT SEEM AT ALL VALID:
* Note we assume that if the supplied string has the value "null" that something
* went wrong and that the string value got populated from a null object. This
* happens if a ant variable is used e.g. date="${date}" when date
* has not been defined to ant!
+ * @todo fix this
*/
public void setDate(String date) {
if (date.equals("") || date.equals("null")) {
@@ -302,7 +312,9 @@ public class MSVSSGET extends MSVSS {
}
/**
- * Set the labeled version to operate on in SourceSafe.
+ * Set the label to get;
+ * optional, only one of <tt>version</tt>, <tt>label</tt>, or <tt>date</tt>
+ * allowed.
* <p>
* Note we assume that if the supplied string has the value "null" that something
* went wrong and that the string value got populated from a null object. This
@@ -332,6 +344,10 @@ public class MSVSSGET extends MSVSS {
}
}
+ /**
+ * What to respond with (sets the -I option). By default, -I- is
+ * used; values of Y or N will be appended to this.
+ */
public void setAutoresponse(String response){
if (response.equals("") || response.equals("null")) {
m_AutoResponse = null;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java
index 123faacef..365a92906 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java
@@ -65,7 +65,7 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.text.ParseException;
/**
- * Task to perform HISTORY commands to Microsoft Visual Source Safe.
+ * Performs History commands to Microsoft Visual SourceSafe.
*
* @author Balazs Fejes 2
* @author Glenn_Twiggs@bmc.com
@@ -156,7 +156,7 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Set the Start Date for the Comparison of two versions in SourceSafe History
+ * Set the Start Date for the Comparison of two versions; optional.
*/
public void setFromDate(String fromDate) {
if (fromDate.equals("") || fromDate == null) {
@@ -167,7 +167,7 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Set the Start Label
+ * Set the Start Label; optional
*/
public void setFromLabel(String fromLabel) {
if (fromLabel.equals("") || fromLabel == null) {
@@ -178,7 +178,7 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Set the End Label
+ * Set the End Label ; optional
*/
public void setToLabel(String toLabel) {
if (toLabel.equals("") || toLabel == null) {
@@ -189,7 +189,7 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Set the End Date for the Comparison of two versions in SourceSafe History
+ * Set the End Date for the Comparison of two versions; optional.
*/
public void setToDate(String toDate) {
if (toDate.equals("") || toDate == null) {
@@ -200,16 +200,17 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Set the number of days to go back for Comparison.
+ * Set the number of days for comparison;
+ * optional.
* <p>
- * The default value is 2 days.
+ * The default value is 2 days. (maybe)
*/
public void setNumdays(int numd) {
m_NumDays = numd;
}
/**
- * Set the output file name for SourceSafe output.
+ * Set the output file name for the history; optional.
*/
public void setOutput(File outfile) {
if (outfile == null) {
@@ -220,7 +221,11 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Set the Start Date for the Comparison of two versions in SourceSafe History.
+ * Format of dates in fromDate and toDate; optional.
+ * Used when calculating dates with
+ * the numdays attribute.
+ * This string uses the formatting rules of SimpleDateFormat.
+ * Defaults to DateFormat.SHORT.
*/
public void setDateFormat(String dateFormat) {
if (!(dateFormat.equals("") || dateFormat == null)) {
@@ -323,14 +328,16 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Set behaviour recursive or non-recursive
+ * Flag to tell the task to recurse down the tree;
+ * optional, default false.
*/
+
public void setRecursive(boolean recursive) {
m_Recursive = recursive;
}
/**
- * Set the Username of the user whose changes we would like to see.
+ * Name the user whose changes we would like to see; optional
*/
public void setUser(String user) {
m_User = user;
@@ -348,7 +355,7 @@ public class MSVSSHISTORY extends MSVSS {
}
/**
- * Specify the detail of output.
+ * Specify the output style; optional.
*
* @param option valid values:
* <ul>
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java
index f6ca9095d..a0fcc48fa 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java
@@ -58,7 +58,8 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.Commandline;
/**
- * Task to perform LABEL commands to Microsoft Visual Source Safe.
+ * Performs Label commands to Microsoft Visual SourceSafe.
+ *
* <p>
* The following attributes are interpreted:
* <table border="1">
@@ -176,12 +177,13 @@ public class MSVSSLABEL extends MSVSS {
}
/**
- * Set the label to apply in SourceSafe.
+ * Set the label to apply; required.
* <p>
* Note we assume that if the supplied string has the value "null" that something
* went wrong and that the string value got populated from a null object. This
* happens if a ant variable is used e.g. label="${label_server}" when label_server
* has not been defined to ant!
+ * @todo correct.
*/
public void setLabel(String label) {
if (label.equals("") || label.equals("null")) {
@@ -212,12 +214,14 @@ public class MSVSSLABEL extends MSVSS {
}
/**
- * Set the stored version string.
+ * Name an existing file or project version to label; optional.
+ * By default the current version is labelled.
* <p>
* Note we assume that if the supplied string has the value "null" that something
* went wrong and that the string value got populated from a null object. This
* happens if a ant variable is used e.g. version="${ver_server}" when ver_server
* has not been defined to ant!
+ * @todo fix
*/
public void setVersion(String version) {
if (version.equals("") || version.equals("null")) {
@@ -236,10 +240,12 @@ public class MSVSSLABEL extends MSVSS {
}
/**
- * Set the comment to apply in SourceSafe.
+ * The comment to use for this label; optional.
+ * Empty or '-' for no comment.
* <p>
* If this is null or empty, it will be replaced with "-" which
* is what SourceSafe uses for an empty comment.
+ *@todo correct
*/
public void setComment(String comment) {
if (comment.equals("") || comment.equals("null")) {
@@ -257,6 +263,11 @@ public class MSVSSLABEL extends MSVSS {
return m_Comment;
}
+ /**
+ * What to respond with (sets the -I option). By default, -I- is
+ * used; values of Y or N will be appended to this.
+ */
+
public void setAutoresponse(String response){
if (response.equals("") || response.equals("null")) {
m_AutoResponse = null;
diff --git a/src/main/org/apache/tools/ant/types/AbstractFileSet.java b/src/main/org/apache/tools/ant/types/AbstractFileSet.java
index 31af72392..c3917c2de 100644
--- a/src/main/org/apache/tools/ant/types/AbstractFileSet.java
+++ b/src/main/org/apache/tools/ant/types/AbstractFileSet.java
@@ -99,6 +99,7 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
this.dir = fileset.dir;
this.defaultPatterns = fileset.defaultPatterns;
this.additionalPatterns = fileset.additionalPatterns;
+ this.selectors = fileset.selectors;
this.useDefaultExcludes = fileset.useDefaultExcludes;
this.isCaseSensitive = fileset.isCaseSensitive;
this.followSymlinks = fileset.followSymlinks;
diff --git a/src/main/org/apache/tools/ant/types/XMLCatalog.java b/src/main/org/apache/tools/ant/types/XMLCatalog.java
index c0d4e2c96..f787bf5bc 100644
--- a/src/main/org/apache/tools/ant/types/XMLCatalog.java
+++ b/src/main/org/apache/tools/ant/types/XMLCatalog.java
@@ -375,7 +375,6 @@ public class XMLCatalog extends DataType implements Cloneable, EntityResolver, U
}
SAXSource source = null;
- InputSource inputSource = null;
String uri = removeFragment(href);
@@ -497,7 +496,6 @@ public class XMLCatalog extends DataType implements Cloneable, EntityResolver, U
private InputSource filesystemLookup(DTDLocation matchingEntry) {
String uri = matchingEntry.getLocation();
- File basedir = null;
//
// The DTDLocation may specify a relative path for its
diff --git a/src/main/org/apache/tools/ant/types/selectors/DependSelector.java b/src/main/org/apache/tools/ant/types/selectors/DependSelector.java
index f4d92a4a2..8a374a107 100644
--- a/src/main/org/apache/tools/ant/types/selectors/DependSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/DependSelector.java
@@ -74,8 +74,7 @@ import org.apache.tools.ant.taskdefs.condition.Os;
*/
public class DependSelector extends BaseSelector {
- private String targetdir = null;
- private File targetbase = null;
+ private File targetdir = null;
private Mapper mapperElement = null;
private FileNameMapper map = null;
private int granularity = 0;
@@ -88,7 +87,12 @@ public class DependSelector extends BaseSelector {
public String toString() {
StringBuffer buf = new StringBuffer("{dependselector targetdir: ");
- buf.append(targetdir);
+ if (targetdir == null) {
+ buf.append("NOT YET SET");
+ }
+ else {
+ buf.append(targetdir.getName());
+ }
buf.append(" granularity: ");
buf.append(granularity);
if (map != null) {
@@ -109,9 +113,8 @@ public class DependSelector extends BaseSelector {
*
* @param targetdir the directory to scan looking for files.
*/
- public void setTargetdir(String targetdir) {
- this.targetdir = SelectorUtils.fixPath(targetdir);
- targetbase = new File(this.targetdir);
+ public void setTargetdir(File targetdir) {
+ this.targetdir = targetdir;
}
/**
@@ -167,12 +170,6 @@ public class DependSelector extends BaseSelector {
// throw BuildException on error
validate();
- // Get File object for the target directory
- File target = targetbase;
- if (target == null) {
- target = new File(basedir,targetdir);
- }
-
// Determine file whose out-of-dateness is to be checked
String[] destfiles = map.mapFileName(filename);
// If filename does not match the To attribute of the mapper
@@ -183,10 +180,10 @@ public class DependSelector extends BaseSelector {
// Sanity check
if (destfiles.length != 1 || destfiles[0] == null) {
throw new BuildException("Invalid destination file results for "
- + targetdir + " with filename " + filename);
+ + targetdir.getName() + " with filename " + filename);
}
String destname = destfiles[0];
- File destfile = new File(target,destname);
+ File destfile = new File(targetdir,destname);
return SelectorUtils.isOutOfDate(file, destfile, granularity);
}
diff --git a/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java b/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
index eba5848ed..3091ded39 100644
--- a/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
@@ -74,8 +74,7 @@ import org.apache.tools.ant.BuildException;
*/
public class PresentSelector extends BaseSelector {
- private String targetdir = null;
- private File targetbase = null;
+ private File targetdir = null;
private Mapper mapperElement = null;
private FileNameMapper map = null;
private boolean destmustexist = true;
@@ -85,7 +84,12 @@ public class PresentSelector extends BaseSelector {
public String toString() {
StringBuffer buf = new StringBuffer("{presentselector targetdir: ");
- buf.append(targetdir);
+ if (targetdir == null) {
+ buf.append("NOT YET SET");
+ }
+ else {
+ buf.append(targetdir.getName());
+ }
buf.append(" present: ");
if (destmustexist) {
buf.append("both");
@@ -108,9 +112,8 @@ public class PresentSelector extends BaseSelector {
*
* @param targetdir the directory to scan looking for matching files.
*/
- public void setTargetdir(String targetdir) {
- this.targetdir = SelectorUtils.fixPath(targetdir);
- targetbase = new File(this.targetdir);
+ public void setTargetdir(File targetdir) {
+ this.targetdir = targetdir;
}
/**
@@ -176,12 +179,6 @@ public class PresentSelector extends BaseSelector {
// throw BuildException on error
validate();
- // Get File object for the target directory
- File target = targetbase;
- if (target == null) {
- target = new File(basedir,targetdir);
- }
-
// Determine file whose existence is to be checked
String[] destfiles = map.mapFileName(filename);
// If filename does not match the To attribute of the mapper
@@ -195,7 +192,7 @@ public class PresentSelector extends BaseSelector {
+ targetdir + " with filename " + filename);
}
String destname = destfiles[0];
- File destfile = new File(target,destname);
+ File destfile = new File(targetdir,destname);
return destfile.exists() == destmustexist;
}
diff --git a/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java b/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
index 5c678fb26..1c9d7daec 100644
--- a/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
+++ b/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
@@ -522,16 +522,6 @@ strLoop:
return ret;
}
- /**
- * Helper method which corrects paths to use forward slashes.
- *
- * @param pattern the path pattern which needs correcting
- * @return corrected pattern
- */
- public static String fixPath(String pattern) {
- return pattern.replace('/',File.separatorChar).replace('\\',
- File.separatorChar);
- }
/**
* Returns dependency information on these two files. If src has been
diff --git a/src/main/org/apache/tools/ant/util/CollectionUtils.java b/src/main/org/apache/tools/ant/util/CollectionUtils.java
index b609a562d..f8ebc2546 100644
--- a/src/main/org/apache/tools/ant/util/CollectionUtils.java
+++ b/src/main/org/apache/tools/ant/util/CollectionUtils.java
@@ -68,9 +68,9 @@ import java.util.Vector;
public class CollectionUtils {
/**
- * Believe it or not, Vector.equals() doesn't do any good in 1.1
+ * Vector.equals() doesn't do any good in 1.1
*
- * @since 1.1, Ant 1.5
+ * @since Ant 1.5
*/
public static boolean equals(Vector v1, Vector v2) {
if (v1 == v2) {
@@ -93,6 +93,45 @@ public class CollectionUtils {
}
}
+ // don't need to check e2.hasMoreElements as the Vectors have
+ // same size.
+
+ return true;
+ }
+
+ /**
+ * Hashtable.equals() doesn't do any good in 1.1
+ *
+ * <p>Follows the equals contract of Java 2's Map.</p>
+ *
+ * @since Ant 1.5
+ */
+ public static boolean equals(Dictionary d1, Dictionary d2) {
+ if (d1 == d2) {
+ return true;
+ }
+
+ if (d1 == null || d2 == null) {
+ return false;
+ }
+
+ if (d1.size() != d2.size()) {
+ return false;
+ }
+
+ Enumeration e1 = d1.keys();
+ while (e1.hasMoreElements()) {
+ Object key = e1.nextElement();
+ Object value1 = d1.get(key);
+ Object value2 = d2.get(key);
+ if (value2 == null || !value1.equals(value2)) {
+ return false;
+ }
+ }
+
+ // don't need the opposite check as the Dictionaries have the
+ // same size, so we've also covered all keys of d2 already.
+
return true;
}
diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
index 5d3e51c3d..16883c7a1 100644
--- a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
+++ b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
@@ -82,7 +82,7 @@ public class JavaEnvUtils {
/** Version of currently running VM. */
private static String javaVersion;
-
+
/** floating version of the JVM */
private static int javaVersionNumber;
@@ -97,9 +97,9 @@ public class JavaEnvUtils {
/** Version constant for Java 1.4 */
public static final String JAVA_1_4 = "1.4";
- /** array of packages in the runtime */
+ /** array of packages in the runtime */
private static Vector jrePackages;
-
+
static {
@@ -185,7 +185,7 @@ public class JavaEnvUtils {
jExecutable = findInDir(javaHome + "/sh", command);
}
- if (jExecutable == null) {
+ if (jExecutable == null) {
jExecutable = findInDir(javaHome + "/bin", command);
}
@@ -225,7 +225,7 @@ public class JavaEnvUtils {
jExecutable = findInDir(javaHome + "/../sh", command);
}
- if (jExecutable == null) {
+ if (jExecutable == null) {
jExecutable = findInDir(javaHome + "/../bin", command);
}
@@ -266,11 +266,12 @@ public class JavaEnvUtils {
}
return executable;
}
-
+
/**
- * demand creation of the package list
+ * demand creation of the package list.
+ * When you add a new package, add a new test below
*/
-
+
private static void buildJrePackages() {
jrePackages=new Vector();
switch(javaVersionNumber) {
@@ -279,28 +280,83 @@ public class JavaEnvUtils {
jrePackages.addElement("org.apache.xalan");
jrePackages.addElement("org.apache.xml");
jrePackages.addElement("org.apache.xpath");
+ jrePackages.addElement("org.ietf.jgss");
jrePackages.addElement("org.w3c.dom");
jrePackages.addElement("org.xml.sax");
// fall through
- case 13:
+ case 13:
jrePackages.addElement("org.omg");
+ jrePackages.addElement("com.sun.corba");
+ jrePackages.addElement("com.sun.jndi");
+ jrePackages.addElement("com.sun.media");
+ jrePackages.addElement("com.sun.naming");
+ jrePackages.addElement("com.sun.org.omg");
+ jrePackages.addElement("com.sun.rmi");
+ jrePackages.addElement("sunw.io");
+ jrePackages.addElement("sunw.util");
// fall through
- case 12:
- jrePackages.addElement("sun.misc");
+ case 12:
+ jrePackages.addElement("com.sun.java");
+ jrePackages.addElement("com.sun.image");
// are there any here that we forgot?
// fall through
- case 11:
+ case 11:
default:
+ //things like sun.reflection, sun.misc, sun.net
+ jrePackages.addElement("sun.");
jrePackages.addElement("java");
jrePackages.addElement("javax");
break;
}
}
-
+
+ /**
+ * testing helper method; kept here for unification of changes.
+ * @return
+ */
+ public static Vector getJrePackageTestCases() {
+ Vector tests=new Vector();
+ tests.addElement("java.lang.Object");
+ switch(javaVersionNumber) {
+ case 14:
+ tests.addElement("sun.audio.AudioPlayer");
+ tests.addElement("org.apache.crimson.parser.ContentModel");
+ tests.addElement("org.apache.xalan.processor.ProcessorImport");
+ tests.addElement("org.apache.xml.utils.URI");
+ tests.addElement("org.apache.xpath.XPathFactory");
+ tests.addElement("org.ietf.jgss.Oid");
+ tests.addElement("org.w3c.dom.Attr");
+ tests.addElement("org.xml.sax.XMLReader");
+ // fall through
+ case 13:
+ tests.addElement("org.omg.CORBA.Any");
+ tests.addElement("com.sun.corba.se.internal.corba.AnyImpl");
+ tests.addElement("com.sun.jndi.ldap.LdapURL");
+ tests.addElement("com.sun.media.sound.Printer");
+ tests.addElement("com.sun.naming.internal.VersionHelper");
+ tests.addElement("com.sun.org.omg.CORBA.Initializer");
+ tests.addElement("sunw.io.Serializable");
+ tests.addElement("sunw.util.EventListener");
+ // fall through
+ case 12:
+ tests.addElement("javax.accessibility.Accessible");
+ tests.addElement("sun.misc.BASE64Encoder");
+ tests.addElement("com.sun.image.codec.jpeg.JPEGCodec");
+ // fall through
+ case 11:
+ default:
+ //things like sun.reflection, sun.misc, sun.net
+ tests.addElement("sun.reflect.SerializationConstructorAccessorImpl");
+ tests.addElement("sun.net.www.http.HttpClient");
+ tests.addElement("sun.audio.AudioPlayer");
+ break;
+ }
+ return tests;
+ }
/**
- * get a vector of strings of packages built into
+ * get a vector of strings of packages built into
* that platforms runtime jar(s)
- * @return list of packages
+ * @return list of packages
*/
public static Vector getJrePackages() {
if(jrePackages==null) {
diff --git a/src/script/ant b/src/script/ant
index 3d00feb69..47ea69cd9 100644
--- a/src/script/ant
+++ b/src/script/ant
@@ -69,6 +69,9 @@ if [ -z "$ANT_HOME" ] ; then
cd $saveddir
fi
+# set ANT_LIB location
+ANT_LIB=${ANT_HOME}/lib
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$ANT_HOME" ] &&
@@ -113,23 +116,26 @@ if $rpm_mode; then
LOCALCLASSPATH="$JAVALIBDIR/$i.jar":"$LOCALCLASSPATH"
fi
done
-else
- # add in the dependency .jar files in non-RPM mode (the default)
- DIRLIBS="${ANT_HOME}"/lib
- for i in "${DIRLIBS}"/*.jar
- do
- # if the directory is empty, then it will return the input string
- # this is stupid, so case for it
- if [ "$i" != "${DIRLIBS}/*.jar" ] ; then
- if [ -z "$LOCALCLASSPATH" ] ; then
- LOCALCLASSPATH=$i
- else
- LOCALCLASSPATH="$i":"$LOCALCLASSPATH"
- fi
- fi
- done
+
+# in rpm mode ant/lib is in /usr/share/java/ant
+ANT_LIB=${JAVALIBDIR}/ant
+
fi
+# add in the dependency .jar files in non-RPM mode (the default)
+for i in "${ANT_LIB}"/*.jar
+do
+ # if the directory is empty, then it will return the input string
+ # this is stupid, so case for it
+ if [ "$i" != "${ANT_LIB}/*.jar" ] ; then
+ if [ -z "$LOCALCLASSPATH" ] ; then
+ LOCALCLASSPATH=$i
+ else
+ LOCALCLASSPATH="$i":"$LOCALCLASSPATH"
+ fi
+ fi
+done
+
if [ -n "$JAVA_HOME" ] ; then
if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
diff --git a/src/testcases/org/apache/tools/ant/BuildFileTest.java b/src/testcases/org/apache/tools/ant/BuildFileTest.java
index 2d1b8331c..4d3a6cdc9 100644
--- a/src/testcases/org/apache/tools/ant/BuildFileTest.java
+++ b/src/testcases/org/apache/tools/ant/BuildFileTest.java
@@ -221,7 +221,7 @@ public abstract class BuildFileTest extends TestCase {
*
* @param filename name of project file to run
*/
- protected void configureProject(String filename) {
+ protected void configureProject(String filename) throws BuildException {
logBuffer = new StringBuffer();
fullLogBuffer = new StringBuffer();
project = new Project();
diff --git a/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java b/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java
index d31b6a7f3..6f47ca8ce 100644
--- a/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java
+++ b/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java
@@ -55,6 +55,7 @@
package org.apache.tools.ant;
import org.apache.tools.ant.taskdefs.condition.Os;
+import org.apache.tools.ant.util.JavaEnvUtils;
import junit.framework.TestCase;
import junit.framework.AssertionFailedError;
@@ -64,15 +65,15 @@ import java.io.IOException;
/**
* JUnit 3 testcases for org.apache.tools.ant.DirectoryScanner
*
- * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
*/
public class DirectoryScannerTest extends TestCase {
public DirectoryScannerTest(String name) {super(name);}
-
// keep track of what operating systems are supported here.
- private boolean supportsSymlinks = Os.isFamily("unix");
+ private boolean supportsSymlinks = Os.isFamily("unix")
+ && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1);
/**
* Test case for setFollowLinks() and associated funtionality.
@@ -93,23 +94,23 @@ public class DirectoryScannerTest extends TestCase {
// give ourselves some time for the system call
// to execute... tweak if you have a really over
// loaded system.
- Thread.sleep(1000);
+ Thread.sleep(1000);
} catch (IOException ioe) {
fail("IOException making link "+ioe);
} catch (InterruptedException ie) {
}
-
+
File dir = new File("src/main/org/apache/tools");
DirectoryScanner ds = new DirectoryScanner();
// followLinks should be true by default, but if this ever
// changes we will need this line.
ds.setFollowSymlinks(true);
-
+
ds.setBasedir(dir);
ds.setExcludes(new String[] {"ant/**"});
ds.scan();
-
+
boolean haveZipPackage = false;
boolean haveTaskdefsPackage = false;
@@ -125,19 +126,19 @@ public class DirectoryScannerTest extends TestCase {
// if we followed the symlink we just made we should
// bypass the excludes.
-
+
assertTrue("(1) zip package included", haveZipPackage);
- assertTrue("(1) taskdefs package included",
+ assertTrue("(1) taskdefs package included",
haveTaskdefsPackage);
-
+
ds = new DirectoryScanner();
ds.setFollowSymlinks(false);
-
+
ds.setBasedir(dir);
ds.setExcludes(new String[] {"ant/**"});
ds.scan();
-
+
haveZipPackage = false;
haveTaskdefsPackage = false;
included = ds.getIncludedDirectories();
@@ -150,12 +151,15 @@ public class DirectoryScannerTest extends TestCase {
}
}
assertTrue("(2) zip package included", haveZipPackage);
- assertTrue("(2) taskdefs package not included",
+ assertTrue("(2) taskdefs package not included",
!haveTaskdefsPackage);
-
+
} finally {
- (new File("src/main/org/apache/tools/ThisIsALink")).delete();
- }
+ File f = new File("src/main/org/apache/tools/ThisIsALink");
+ if (!f.delete()) {
+ throw new RuntimeException("Failed to delete "+f);
+ }
+ }
}
}
diff --git a/src/testcases/org/apache/tools/ant/IncludeTest.java b/src/testcases/org/apache/tools/ant/IncludeTest.java
index 6eccbdea2..b422abb1e 100644
--- a/src/testcases/org/apache/tools/ant/IncludeTest.java
+++ b/src/testcases/org/apache/tools/ant/IncludeTest.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -91,4 +91,58 @@ public class IncludeTest extends BuildFileTest {
configureProject("src/etc/testcases/core/include/frag#ment/relative.xml");
expectLog("test1", "from included entity");
}
+
+ public void testParseErrorInIncluding() {
+ try {
+ configureProject("src/etc/testcases/core/include/including_file_parse_error/build.xml");
+ fail("should have caused a parser exception");
+ } catch (BuildException e) {
+ assertTrue(e.getLocation().toString()
+ + " should refer to build.xml",
+ e.getLocation().toString().indexOf("build.xml:") > -1);
+ }
+ }
+
+ public void testTaskErrorInIncluding() {
+ configureProject("src/etc/testcases/core/include/including_file_task_error/build.xml");
+ try {
+ executeTarget("test");
+ fail("should have cause a build failure");
+ } catch (BuildException e) {
+ assertTrue(e.getMessage()
+ + " should start with \'Warning: Could not find",
+ e.getMessage().startsWith("Warning: Could not find file "));
+ assertTrue(e.getLocation().toString()
+ + " should end with build.xml:14: ",
+ e.getLocation().toString().endsWith("build.xml:14: "));
+ }
+ }
+
+ public void testParseErrorInIncluded() {
+ try {
+ configureProject("src/etc/testcases/core/include/included_file_parse_error/build.xml");
+ fail("should have caused a parser exception");
+ } catch (BuildException e) {
+ assertTrue(e.getLocation().toString()
+ + " should refer to included_file.xml",
+ e.getLocation().toString()
+ .indexOf("included_file.xml:") > -1);
+ }
+ }
+
+ public void testTaskErrorInIncluded() {
+ configureProject("src/etc/testcases/core/include/included_file_task_error/build.xml");
+ try {
+ executeTarget("test");
+ fail("should have cause a build failure");
+ } catch (BuildException e) {
+ assertTrue(e.getMessage()
+ + " should start with \'Warning: Could not find",
+ e.getMessage().startsWith("Warning: Could not find file "));
+ assertTrue(e.getLocation().toString()
+ + " should end with included_file.xml:2: ",
+ e.getLocation().toString().endsWith("included_file.xml:2: "));
+ }
+ }
+
}
diff --git a/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java b/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
index 270d3248a..252253a13 100644
--- a/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
+++ b/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
@@ -125,4 +125,13 @@ public class ZipTest extends BuildFileTest {
zipFile.close();
}
+
+ public void testUpdateNotNecessary() {
+ executeTarget("testUpdateNotNecessary");
+ assertEquals(-1, getLog().indexOf("Updating"));
+ }
+
+ public void testUpdateIsNecessary() {
+ expectLogContaining("testUpdateIsNecessary", "Updating");
+ }
}
diff --git a/src/testcases/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java b/src/testcases/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
index e30d64c36..d5a9f6e18 100644
--- a/src/testcases/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
+++ b/src/testcases/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
@@ -103,24 +103,6 @@ public class EchoPropertiesTest extends BuildFileTest {
}
- public void testEchoToLogXml() {
- executeTarget( "testEchoToLogXml" );
- String out = getLog();
- assertTrue(
- "Did not output testEchoToLogXml.",
- out.indexOf( "<property name=\"test.property\" value=\""+TEST_VALUE+"\"></property>" ) >= 0 );
- }
-
-
- public void testReadAndEchoToLog() {
- executeTarget( "testReadAndEchoToLog" );
- String out = getLog();
- assertTrue(
- "Did not output testEchoToLog.",
- out.indexOf( "test.infile=true" ) >= 0 );
- }
-
-
public void testReadBadFile() {
expectBuildExceptionContaining( "testReadBadFile",
"srcfile is a directory", "srcfile is a directory!" );
diff --git a/src/testcases/org/apache/tools/ant/taskdefs/optional/XsltTest.java b/src/testcases/org/apache/tools/ant/taskdefs/optional/XsltTest.java
index 285328450..168203add 100644
--- a/src/testcases/org/apache/tools/ant/taskdefs/optional/XsltTest.java
+++ b/src/testcases/org/apache/tools/ant/taskdefs/optional/XsltTest.java
@@ -114,5 +114,9 @@ public class XsltTest extends BuildFileTest {
public void testCatalog() throws Exception {
executeTarget("testCatalog");
}
+
+ public void testOutputProperty() throws Exception {
+ executeTarget("testOutputProperty");
+ }
}
diff --git a/src/testcases/org/apache/tools/ant/types/selectors/BaseSelectorTest.java b/src/testcases/org/apache/tools/ant/types/selectors/BaseSelectorTest.java
index 9cda505e1..9c16107f8 100644
--- a/src/testcases/org/apache/tools/ant/types/selectors/BaseSelectorTest.java
+++ b/src/testcases/org/apache/tools/ant/types/selectors/BaseSelectorTest.java
@@ -74,14 +74,19 @@ public abstract class BaseSelectorTest extends TestCase {
private Project project;
private TaskdefForMakingBed tbed = null;
- protected String basedirname = "src/etc/testcases/types/selectortest";
+ protected String basedirname = "src/etc/testcases/types";
+ protected String beddirname = basedirname + "/selectortest";
+ protected String mirrordirname = basedirname + "/selectortest2";
protected File basedir = new File(basedirname);
+ protected File beddir = new File(beddirname);
+ protected File mirrordir = new File(mirrordirname);
protected String[] filenames = {".","asf-logo.gif.md5","asf-logo.gif.bz2",
"asf-logo.gif.gz","copy.filterset.filtered","zip/asf-logo.gif.zip",
"tar/asf-logo.gif.tar","tar/asf-logo-huge.tar",
"tar/gz/asf-logo.gif.tar.gz","tar/bz2/asf-logo.gif.tar.bz2",
"tar/bz2/asf-logo-huge.tar.bz2","tar/bz2"};
protected File[] files = new File[filenames.length];
+ protected File[] mirrorfiles = new File[filenames.length];
public BaseSelectorTest(String name) {
super(name);
@@ -89,9 +94,11 @@ public abstract class BaseSelectorTest extends TestCase {
public void setUp() {
project = new Project();
- project.setBasedir(".");
+ project.init();
+ project.setBaseDir(basedir);
for (int x = 0; x < files.length; x++) {
- files[x] = new File(basedir,filenames[x]);
+ files[x] = new File(beddir,filenames[x]);
+ mirrorfiles[x] = new File(mirrordir,filenames[x]);
}
}
@@ -101,6 +108,10 @@ public abstract class BaseSelectorTest extends TestCase {
public abstract BaseSelector getInstance();
+ public Project getProject() {
+ return project;
+ }
+
/**
* This is a test that all Selectors derived from BaseSelector can
* use. It calls the setError() method and checks to ensure that a
@@ -113,7 +124,7 @@ public abstract class BaseSelectorTest extends TestCase {
}
s.setError("test error");
try {
- s.isSelected(basedir,filenames[0],files[0]);
+ s.isSelected(beddir,filenames[0],files[0]);
fail("Cannot cause BuildException when setError() is called");
} catch (BuildException be) {
assertEquals("test error",
@@ -128,6 +139,26 @@ public abstract class BaseSelectorTest extends TestCase {
* a string of "T"s amd "F"s
*/
public String selectionString(FileSelector selector) {
+ return selectionString(beddir,files,selector);
+ }
+
+ /**
+ * This is a helper method that takes a selector and calls its
+ * isSelected() method on each file in the mirror testbed. This
+ * variation is used for dependency checks and to get around the
+ * limitations in the touch task when running JDK 1.1. It returns
+ * a string of "T"s amd "F"s.
+ */
+ public String mirrorSelectionString(FileSelector selector) {
+ return selectionString(mirrordir,mirrorfiles,selector);
+ }
+
+ /**
+ * Worker method for the two convenience methods above. Applies a
+ * selector on a set of files passed in and returns a string of
+ * "T"s amd "F"s from applying the selector to each file.
+ */
+ public String selectionString(File basedir, File[] files, FileSelector selector) {
StringBuffer buf = new StringBuffer();
for (int x = 0; x < files.length; x++) {
if (selector.isSelected(basedir,filenames[x],files[x])) {
@@ -168,6 +199,30 @@ public abstract class BaseSelectorTest extends TestCase {
}
+ /**
+ * <p>Creates a mirror of the testbed for use in dependency checks.</p>
+ *
+ * <p>Note that the right way to call this is within a try block,
+ * with a finally clause that calls cleanupMirror(). You place tests of
+ * the isSelected() method within the try block.</p>
+ */
+ protected void makeMirror() {
+ tbed = new TaskdefForMakingBed("mirrorfiles");
+ tbed.setUp();
+ tbed.makeMirror();
+ }
+
+ /**
+ * Cleans up the mirror testbed by calling a target in the
+ * <code>src/etc/testcases/types/selectors.xml</code> file.
+ */
+ protected void cleanupMirror() {
+ if (tbed != null) {
+ tbed.deleteMirror();
+ tbed = null;
+ }
+ }
+
private class TaskdefForMakingBed extends BuildFileTest {
TaskdefForMakingBed(String name) {
@@ -185,6 +240,14 @@ public abstract class BaseSelectorTest extends TestCase {
public void makeTestbed() {
executeTarget("setupfiles");
}
+
+ public void makeMirror() {
+ executeTarget("mirrorfiles");
+ }
+
+ public void deleteMirror() {
+ executeTarget("cleanup.mirrorfiles");
+ }
}
diff --git a/src/testcases/org/apache/tools/ant/types/selectors/DateSelectorTest.java b/src/testcases/org/apache/tools/ant/types/selectors/DateSelectorTest.java
index e61d887a9..4c341a39f 100644
--- a/src/testcases/org/apache/tools/ant/types/selectors/DateSelectorTest.java
+++ b/src/testcases/org/apache/tools/ant/types/selectors/DateSelectorTest.java
@@ -56,9 +56,13 @@ package org.apache.tools.ant.types.selectors;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-import org.apache.tools.ant.util.*;
import org.apache.tools.ant.BuildFileTest;
import org.apache.tools.ant.types.Parameter;
+import org.apache.tools.ant.util.JavaEnvUtils;
+
+import java.text.SimpleDateFormat;
+import java.text.ParsePosition;
+import java.util.Date;
import junit.framework.TestCase;
import junit.framework.AssertionFailedError;
@@ -204,56 +208,69 @@ public class DateSelectorTest extends BaseSelectorTest {
results = selectionString(s);
assertEquals("TTTTTTTTTTTT", results);
- s = (DateSelector)getInstance();
- s.setDatetime("11/21/2001 4:54 AM");
- s.setWhen(before);
- results = selectionString(s);
- assertEquals("TFTFFFFFFFFT", results);
-/*
- s = (DateSelector)getInstance();
- s.setDatetime("11/21/2001 4:55 AM");
- java.util.Date d = new java.util.Date("11/21/2001 4:55 AM");
- long milliseconds = s.getMillis();
- s.setWhen(equal);
- results = selectionString(s);
- assertEquals("TTFFTFFFTTTT", results);
+ if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
+ s = (DateSelector)getInstance();
+ s.setDatetime("11/21/2001 4:54 AM");
+ s.setWhen(before);
+ results = selectionString(s);
+ assertEquals("TFTFFFFFFFFT", results);
- s = (DateSelector)getInstance();
- s.setMillis(1006347300000L);
- s.setWhen(equal);
- results = selectionString(s);
- assertEquals("TTFFTFFFTTTT", results);
+ s = (DateSelector)getInstance();
+ s.setDatetime("11/21/2001 4:55 AM");
+ SimpleDateFormat formatter = new SimpleDateFormat();
+ Date d = formatter.parse("11/21/2001 4:55 AM",new ParsePosition(0));
- s = (DateSelector)getInstance();
- s.setMillis(milliseconds);
- s.setWhen(equal);
- results = selectionString(s);
- assertEquals("TTFFTFFFTTTT", results);
+ long milliseconds = s.getMillis();
+ s.setWhen(equal);
+ results = selectionString(s);
+ assertEquals("TTFFTFFFTTTT", results);
- s = (DateSelector)getInstance();
- s.setMillis(1006347305000L);
- s.setWhen(equal);
- s.setGranularity(15000);
- results = selectionString(s);
- assertEquals("TTFFTFFFTTTT", results);
-*/
- s = (DateSelector)getInstance();
- s.setDatetime("11/21/2001 4:56 AM");
- s.setWhen(after);
- results = selectionString(s);
- assertEquals("TFFTFTTTFFFT", results);
+ s = (DateSelector)getInstance();
+ s.setMillis(milliseconds);
+ s.setWhen(equal);
+ results = selectionString(s);
+ assertEquals("TTFFTFFFTTTT", results);
- s = (DateSelector)getInstance();
- Parameter param1 = new Parameter();
- Parameter param2 = new Parameter();
- param1.setName("datetime");
- param1.setValue("11/21/2001 4:56 AM");
- param2.setName("when");
- param2.setValue("after");
- Parameter[] params = {param1,param2};
- s.setParameters(params);
- results = selectionString(s);
- assertEquals("TFFTFTTTFFFT", results);
+ s = (DateSelector)getInstance();
+ s.setDatetime("11/21/2001 4:56 AM");
+ s.setWhen(after);
+ results = selectionString(s);
+ assertEquals("TFFTFTTTFFFT", results);
+
+ s = (DateSelector)getInstance();
+ Parameter param1 = new Parameter();
+ Parameter param2 = new Parameter();
+ param1.setName("datetime");
+ param1.setValue("11/21/2001 4:56 AM");
+ param2.setName("when");
+ param2.setValue("after");
+ Parameter[] params = {param1,param2};
+ s.setParameters(params);
+ results = selectionString(s);
+ assertEquals("TFFTFTTTFFFT", results);
+ }
+ try {
+ makeMirror();
+
+ s = (DateSelector)getInstance();
+ long testtime = mirrorfiles[5].lastModified();
+ s.setMillis(testtime);
+ s.setWhen(after);
+ s.setGranularity(2);
+ results = mirrorSelectionString(s);
+ assertEquals("TFFFFTTTTTTT", results);
+
+ s = (DateSelector)getInstance();
+ testtime = mirrorfiles[6].lastModified();
+ s.setMillis(testtime);
+ s.setWhen(before);
+ s.setGranularity(2);
+ results = mirrorSelectionString(s);
+ assertEquals("TTTTTTTFFFFT", results);
+ }
+ finally {
+ cleanupMirror();
+ }
}
finally {
diff --git a/src/testcases/org/apache/tools/ant/types/selectors/DependSelectorTest.java b/src/testcases/org/apache/tools/ant/types/selectors/DependSelectorTest.java
index ae4014b2f..bb57bf8b4 100644
--- a/src/testcases/org/apache/tools/ant/types/selectors/DependSelectorTest.java
+++ b/src/testcases/org/apache/tools/ant/types/selectors/DependSelectorTest.java
@@ -56,12 +56,14 @@ package org.apache.tools.ant.types.selectors;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-import org.apache.tools.ant.util.*;
import org.apache.tools.ant.BuildFileTest;
import org.apache.tools.ant.types.Mapper;
import org.apache.tools.ant.util.FileNameMapper;
import org.apache.tools.ant.util.IdentityMapper;
import org.apache.tools.ant.util.GlobPatternMapper;
+import org.apache.tools.ant.util.JavaEnvUtils;
+
+import java.io.File;
import junit.framework.TestCase;
import junit.framework.AssertionFailedError;
@@ -118,6 +120,7 @@ public class DependSelectorTest extends BaseSelectorTest {
public void testSelectionBehaviour() {
DependSelector s;
String results;
+ File subdir;
Mapper m;
Mapper.MapperType identity = new Mapper.MapperType();
identity.setValue("identity");
@@ -130,35 +133,49 @@ public class DependSelectorTest extends BaseSelectorTest {
makeBed();
s = (DependSelector)getInstance();
- s.setTargetdir(basedirname);
+ s.setTargetdir(beddir);
results = selectionString(s);
assertEquals("FFFFFFFFFFFF", results);
s = (DependSelector)getInstance();
- s.setTargetdir(basedirname);
+ s.setTargetdir(beddir);
m = s.createMapper();
m.setType(identity);
results = selectionString(s);
assertEquals("FFFFFFFFFFFF", results);
- s = (DependSelector)getInstance();
- s.setTargetdir(basedirname);
- m = s.createMapper();
- m.setType(merge);
- m.setTo("asf-logo.gif.gz");
- results = selectionString(s);
- assertEquals("TFFFFTTTFFFF", results);
+ if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
+ s = (DependSelector)getInstance();
+ s.setTargetdir(beddir);
+ m = s.createMapper();
+ m.setType(merge);
+ m.setTo("asf-logo.gif.gz");
+ results = selectionString(s);
+ assertEquals("TFFFFTTTFFF", results.substring(0,11));
+
+ s = (DependSelector)getInstance();
+ s.setTargetdir(beddir);
+ m = s.createMapper();
+ m.setType(merge);
+ m.setTo("asf-logo.gif.bz2");
+ results = selectionString(s);
+ assertEquals("TTFTTTTTTTTT", results);
+
+ // Test for path relative to project base directory
+ s = (DependSelector)getInstance();
+ subdir = new File("selectortest/tar/bz2");
+ s.setTargetdir(subdir);
+ m = s.createMapper();
+ m.setType(glob);
+ m.setFrom("*.bz2");
+ m.setTo("*.tar.bz2");
+ results = selectionString(s);
+ assertEquals("FFTFFFFFFTTF", results);
+ }
s = (DependSelector)getInstance();
- s.setTargetdir(basedirname);
- m = s.createMapper();
- m.setType(merge);
- m.setTo("asf-logo.gif.bz2");
- results = selectionString(s);
- assertEquals("TTFTTTTTTTTT", results);
-
- s = (DependSelector)getInstance();
- s.setTargetdir(basedirname + "/tar/bz2");
+ subdir = new File(beddir,"tar/bz2");
+ s.setTargetdir(subdir);
m = s.createMapper();
m.setType(glob);
m.setFrom("*.bz2");
@@ -166,6 +183,31 @@ public class DependSelectorTest extends BaseSelectorTest {
results = selectionString(s);
assertEquals("FFFFFFFFFTTF", results);
+ try {
+ makeMirror();
+
+ s = (DependSelector)getInstance();
+ File testdir = getProject().resolveFile("selectortest2");
+ s.setTargetdir(testdir);
+ results = selectionString(s);
+ assertEquals("FFFTTFFFFFFF", results);
+
+ s = (DependSelector)getInstance();
+ testdir = getProject().resolveFile("selectortest2/tar/bz2");
+ s.setTargetdir(testdir);
+ m = s.createMapper();
+ m.setType(glob);
+ m.setFrom("*.bz2");
+ m.setTo("*.tar.bz2");
+ results = mirrorSelectionString(s);
+ assertEquals("FFFFFFFFFTTF", results);
+ results = selectionString(s);
+ assertEquals("FFFFFFFFFTTF", results);
+ }
+ finally {
+ cleanupMirror();
+ }
+
}
finally {
cleanupBed();
diff --git a/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java b/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java
index eea20975f..cc7a4c170 100644
--- a/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java
+++ b/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java
@@ -63,6 +63,8 @@ import org.apache.tools.ant.util.FileNameMapper;
import org.apache.tools.ant.util.IdentityMapper;
import org.apache.tools.ant.util.GlobPatternMapper;
+import java.io.File;
+
import junit.framework.TestCase;
import junit.framework.AssertionFailedError;
@@ -132,26 +134,31 @@ public class PresentSelectorTest extends BaseSelectorTest {
makeBed();
s = (PresentSelector)getInstance();
- s.setTargetdir(basedirname);
+ s.setTargetdir(beddir);
results = selectionString(s);
assertEquals("TTTTTTTTTTTT", results);
s = (PresentSelector)getInstance();
- s.setTargetdir(basedirname);
+ s.setTargetdir(beddir);
m = s.createMapper();
m.setType(identity);
results = selectionString(s);
assertEquals("TTTTTTTTTTTT", results);
s = (PresentSelector)getInstance();
- s.setTargetdir("src/etc/testcases/taskdefs/expected");
+ File subdir = new File("src/etc/testcases/taskdefs/expected");
+ s.setTargetdir(subdir);
m = s.createMapper();
m.setType(flatten);
results = selectionString(s);
- assertEquals("TTTTTTTTTTTF", results);
+ if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
+ assertEquals("TTTTTFFFFFFF", results);
+ } else {
+ assertEquals("TTTTTTTTTTTF", results);
+ }
s = (PresentSelector)getInstance();
- s.setTargetdir(basedirname);
+ s.setTargetdir(beddir);
m = s.createMapper();
m.setType(merge);
m.setTo("asf-logo.gif.gz");
@@ -159,7 +166,8 @@ public class PresentSelectorTest extends BaseSelectorTest {
assertEquals("TTTTTTTTTTTT", results);
s = (PresentSelector)getInstance();
- s.setTargetdir(basedirname + "/tar/bz2");
+ subdir = new File(beddir, "tar/bz2");
+ s.setTargetdir(subdir);
m = s.createMapper();
m.setType(glob);
m.setFrom("*.bz2");
@@ -167,6 +175,23 @@ public class PresentSelectorTest extends BaseSelectorTest {
results = selectionString(s);
assertEquals("FFTFFFFFFFFF", results);
+ try {
+ makeMirror();
+
+ s = (PresentSelector)getInstance();
+ subdir = getProject().resolveFile("selectortest2");
+ s.setTargetdir(subdir);
+ results = mirrorSelectionString(s);
+ assertEquals("TTTFFTTTTTTT", results);
+ results = selectionString(s);
+ assertEquals("TTTFFTTTTTTT", results);
+
+
+ }
+ finally {
+ cleanupMirror();
+ }
+
}
finally {
cleanupBed();
diff --git a/src/testcases/org/apache/tools/ant/util/CollectionUtilsTest.java b/src/testcases/org/apache/tools/ant/util/CollectionUtilsTest.java
new file mode 100644
index 000000000..00a5dbff4
--- /dev/null
+++ b/src/testcases/org/apache/tools/ant/util/CollectionUtilsTest.java
@@ -0,0 +1,139 @@
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Ant", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+package org.apache.tools.ant.util;
+
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Stack;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for org.apache.tools.ant.util.CollectionUtils.
+ *
+ * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @author <a href="mailto:jtulley@novell.com">Jeff Tulley</a>
+ */
+public class CollectionUtilsTest extends TestCase {
+
+ public CollectionUtilsTest(String name) {
+ super(name);
+ }
+
+ public void testVectorEquals() {
+ assertTrue(!CollectionUtils.equals(null, new Vector()));
+ assertTrue(!CollectionUtils.equals(new Vector(), null));
+ assertTrue(CollectionUtils.equals(new Vector(), new Vector()));
+ Vector v1 = new Vector();
+ Stack s2 = new Stack();
+ v1.addElement("foo");
+ s2.push("foo");
+ assertTrue(CollectionUtils.equals(v1, s2));
+ assertTrue(CollectionUtils.equals(s2, v1));
+ v1.addElement("bar");
+ assertTrue(!CollectionUtils.equals(v1, s2));
+ assertTrue(!CollectionUtils.equals(s2, v1));
+ s2.push("bar");
+ assertTrue(CollectionUtils.equals(v1, s2));
+ assertTrue(CollectionUtils.equals(s2, v1));
+ s2.push("baz");
+ assertTrue(!CollectionUtils.equals(v1, s2));
+ assertTrue(!CollectionUtils.equals(s2, v1));
+ v1.addElement("baz");
+ assertTrue(CollectionUtils.equals(v1, s2));
+ assertTrue(CollectionUtils.equals(s2, v1));
+ v1.addElement("zyzzy");
+ s2.push("zyzzy2");
+ assertTrue(!CollectionUtils.equals(v1, s2));
+ assertTrue(!CollectionUtils.equals(s2, v1));
+ }
+
+ public void testDictionaryEquals() {
+ assertTrue(!CollectionUtils.equals(null, new Hashtable()));
+ assertTrue(!CollectionUtils.equals(new Hashtable(), null));
+ assertTrue(CollectionUtils.equals(new Hashtable(), new Properties()));
+ Hashtable h1 = new Hashtable();
+ Properties p2 = new Properties();
+ h1.put("foo", "");
+ p2.put("foo", "");
+ assertTrue(CollectionUtils.equals(h1, p2));
+ assertTrue(CollectionUtils.equals(p2, h1));
+ h1.put("bar", "");
+ assertTrue(!CollectionUtils.equals(h1, p2));
+ assertTrue(!CollectionUtils.equals(p2, h1));
+ p2.put("bar", "");
+ assertTrue(CollectionUtils.equals(h1, p2));
+ assertTrue(CollectionUtils.equals(p2, h1));
+ p2.put("baz", "");
+ assertTrue(!CollectionUtils.equals(h1, p2));
+ assertTrue(!CollectionUtils.equals(p2, h1));
+ h1.put("baz", "");
+ assertTrue(CollectionUtils.equals(h1, p2));
+ assertTrue(CollectionUtils.equals(p2, h1));
+ h1.put("zyzzy", "");
+ p2.put("zyzzy2", "");
+ assertTrue(!CollectionUtils.equals(h1, p2));
+ assertTrue(!CollectionUtils.equals(p2, h1));
+ p2.put("zyzzy", "");
+ h1.put("zyzzy2", "");
+ assertTrue(CollectionUtils.equals(h1, p2));
+ assertTrue(CollectionUtils.equals(p2, h1));
+ h1.put("dada", "1");
+ p2.put("dada", "2");
+ assertTrue(!CollectionUtils.equals(h1, p2));
+ assertTrue(!CollectionUtils.equals(p2, h1));
+ }
+}
diff --git a/welcome.html b/welcome.html
new file mode 100644
index 000000000..33f6a2a05
--- /dev/null
+++ b/welcome.html
@@ -0,0 +1,124 @@
+<html>
+<head>
+<title>Welcome to Ant1.5</title>
+</head>
+<body bgcolor="#ffffff">
+<h1>Welcome to Ant1.5</h1>
+Hello, and welcome to Ant1.5
+<p>
+For new users to Ant, welcome to a new way to build your software.
+<p>
+For veteran Ant users, its been, what nine months since Ant 1.4.1
+shipped, and we've been as busy enhancing it as you've been using it.
+<p>
+
+We know you've been using Ant, not just from the all the bug reports we
+see, but from the awards we've been getting from JavaWorld and SD Magazine
+and from the fact that it is now clearly a mainstream product. Every quality IDE,
+from the Open Source projects: Emacs, NetBeans, Eclipse, JEdit, to the
+commercial offerings such as IntelliJ IDEA and JBuilder now have high
+quality Ant integration either built in or available as a
+download. And they do that not just because it improves their products,
+giving users the best of both worlds -great editors and a great build
+process, but because Java developers are starting to expect Ant (and
+JUnit) everywhere.
+<p>
+Even in mid-2001, if you said you were using Ant in your project, people
+would stare at you. Now, as long as you are talking with Java developers
+and not management or your family and friends, people will nod, shrug
+and maybe ask you questions about build file and Ant configurations. The good
+news: Ant 1.5 includes more helpful error messages and a new
+<tt>-diagnostics</tt> command to look at your Ant installation and help work out why
+things arent working.
+<p>
+Now, when you tell people you work on Ant in your spare time,
+people used to give you very funny stares; now they ask you about how to
+set up automated build processes, or deploy to some random app server.
+The good news: Ant 1.5 makes it easier to answer those questions.
+
+The other sign of mainstream is that there are also books on the
+subject, first Java Tools for Extreme Programming, then Ant: The
+Definitive Guide, and the first Ant1.5 book, Java Development with Ant,
+due to ship at the end of the month. (Steve says: I prefer the one with
+my name on the cover as co-author, but I'm biased).
+As usual, the manual has improved too:
+regardless of whether you need a book to work with Ant or not, you need
+that on-line documentation. And as usual, any extra contributions to the
+docs are welcome indeed.
+<p>
+Ant has also influenced how projects are built. Now when you download
+any open source project, or work with a closed source team, you expect
+to see a file called build.xml there. Equally important, you expect that
+build file to compile and run a set of tests using JUnit or a derivative
+thereof; if they are missing, you worry.
+<p>
+Together, Ant and JUnit have transformed the mainstream process for
+building and deploying Java projects. And that's pretty profound, when
+you think about it. What is equally impressive is that this was all done
+as a co-operative effort. Nobody works on Ant full-time; everybody uses
+it to solve their problems, to address their build crises and generally
+get something done in a hurry. It just so happens that the architectural
+model of Java classes bound via introspection to the XML build file
+makes it easy for people to add new tasks, extend existing ones and
+generally ease their way into developing and extending Ant. It is the
+users that have helped Ant become the success it is today, and will keep
+it that way tomorrow.
+<p>
+<h2>What has changed</h2>
+<p>
+So, what is new in Ant1.5? Lots of stuff. You will have to look at the
+<a href="WHATSNEW">whatsnew</a> file to see, but basically the changes
+fall into a number of categories
+<ol>
+<li>Bug fixes. We know, some things were broken in 1.4. In ant1.5 we
+have moved the bugs, fixing the ones we could, and no doubt adding
+different ones. Hopefully the total bug count has decreased.
+<li>Scalability. Changes in &lt;ant&gt; and a few other tasks should
+make it easier to write large, scalable build files.
+<li>Deployment. Take a look at the new &lt;serverdeploy&gt; task, add support
+for your server if it isnt there. Tomcat 4.1 has its own deployment
+tasks incidentally -fetch them from the tomcat pages.
+<li>Ease of use. We have added new attributes to make the archive tasks
+consistent with each other, new error messages for common problems (you
+get a screenful of help when a task wont instantiate, for example), and
+generally try and be helpful. As usual, we will accept contributions to
+the documentation or the code for even more helpfulness. Hey, in ant1.5
+you dont need to double escape the $ sign to preserve it in a string!
+<li>Java 1.4 support. We build and test fine on Java 1.4, and have the
+extensions to javac needed to build code with assertions in. We should
+point out that we have more work to do in this area: if someone wants to
+write an &lt;assertionset&gt; datatype to give users control of which assertions
+to enable, and patch this in to things like the &lt;junit&gt; and
+&lt;java&gt; tasks, things would get very interesting.
+<li>Continuous builds. Automated build tools are becoming more widely
+used; fork options on &lt;javac&gt; and &lt;javadoc&gt; are there to
+stop memory use growth on a continuous process.
+<li>New platforms: MacOS X for owners of those cute little laptops,
+Novell Netware servers, and even z/OS and OS/390 for mainframe
+developers who write their build files on their virtual card punches.
+<li>Conditions. Take a look at the &lt;condition&gt; tag to see what you can
+look for, then at &lt;waitfor&gt; to use the same tests in deployment.
+Finally, notice the <tt>if</tt> and <tt>unless</tt> attributes on
+&lt;fail&gt; for easy halting of the build on a condition, without
+having to resort to conditional targets.
+</ol>
+
+There are many more enhancements, so we hope you will find your build
+projects easier. We have, as usual, jumped through hoops to keep
+existing builds working, even those build files that went out their way
+to not work on Java 1.4 (hint: dont ask for the classic compiler, it has
+gone away). If your build file stops working, and it isnt something listed
+on the 'changes that may break your build' part of the WHATSNEW file, or
+something we know about on bugzilla, please dont hesitate to file a new
+bug report, preferably one with a replicable test and a patch to fix the
+problem.
+<p>
+Thanks,
+<p>
+The Ant development team.
+<p>
+PS: many thanks for Magesh to being the build manager for this release!
+He has been busy since Feb/March organizing it. Magesh -you are so good
+at this you should do it next time too :)
+</body></html>
+