ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r1592650 - in /ant/site/ant/production/manual: ./ Tasks/ Types/
Date Tue, 06 May 2014 02:08:50 GMT
Author: antoine
Date: Tue May  6 02:08:50 2014
New Revision: 1592650

URL: http://svn.apache.org/r1592650
Log:
release of Apache Ant 1.9.4

Added:
    ant/site/ant/production/manual/Types/multirootfileset.html
      - copied unchanged from r1591179, ant/core/trunk/manual/Types/multirootfileset.html
Modified:
    ant/site/ant/production/manual/   (props changed)
    ant/site/ant/production/manual/Tasks/conditions.html
    ant/site/ant/production/manual/Tasks/get.html
    ant/site/ant/production/manual/Tasks/include.html   (props changed)
    ant/site/ant/production/manual/Tasks/javadoc.html
    ant/site/ant/production/manual/Tasks/junit.html
    ant/site/ant/production/manual/Tasks/local.html
    ant/site/ant/production/manual/Tasks/mail.html
    ant/site/ant/production/manual/Tasks/sql.html
    ant/site/ant/production/manual/Tasks/sshexec.html
    ant/site/ant/production/manual/Tasks/style.html
    ant/site/ant/production/manual/Types/patternset.html
    ant/site/ant/production/manual/Types/redirector.html
    ant/site/ant/production/manual/Types/resources.html
    ant/site/ant/production/manual/Types/selectors-program.html
    ant/site/ant/production/manual/conceptstypeslist.html
    ant/site/ant/production/manual/cover.html   (contents, props changed)
    ant/site/ant/production/manual/credits.html
    ant/site/ant/production/manual/install.html
    ant/site/ant/production/manual/targets.html
    ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html
    ant/site/ant/production/manual/tutorial-writing-tasks.html

Propchange: ant/site/ant/production/manual/
------------------------------------------------------------------------------
  Merged /ant/core/tags/ANT_194/manual:r1591180-1592649
  Merged /ant/core/trunk/manual:r1553123-1554405,1554407-1554807,1554809-1591179

Modified: ant/site/ant/production/manual/Tasks/conditions.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/conditions.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/conditions.html (original)
+++ ant/site/ant/production/manual/Tasks/conditions.html Tue May  6 02:08:50 2014
@@ -255,7 +255,7 @@ TCP/IP listener at the specified host an
 <h4><a name="filesmatch">filesmatch</a></h4>
 <p>Test two files for matching. Nonexistence of one file results in "false",
 although if neither exists they are considered equal in terms of content.
-This test does a byte for byte comparision, so test time scales with
+This test does a byte for byte comparison, so test time scales with
 byte size. NB: if the files are different sizes, one of them is missing
 or the filenames match the answer is so obvious the detailed test is omitted.
 
@@ -306,7 +306,7 @@ or the filenames match the answer is so 
   </tr>
   <tr>
     <td valign="top">casesensitive</td>
-    <td valign="top">Perform a case sensitive comparision.  Default is
+    <td valign="top">Perform a case sensitive comparison.  Default is
         true.</td>
     <td valign="top" align="center">No</td>
   </tr>
@@ -753,7 +753,7 @@ Probe for the maven repository being rea
 <h4><a name="resourcesmatch">resourcesmatch</a></h4>
 <p>Test resources for matching. Nonexistence of one or more resources results in
 "false", although if none exists they are considered equal in terms of content.
-By default this test does a byte for byte comparision, so test time scales with
+By default this test does a byte for byte comparison, so test time scales with
 byte size. NB: if the files are different sizes, one of them is missing
 or the filenames match the answer is so obvious the detailed test is omitted.
 The resources to check are specified as nested
@@ -805,7 +805,7 @@ must match. <b>Since Ant 1.7</b>
   </tr>
   <tr>
     <td valign="top">casesensitive</td>
-    <td valign="top">Perform a case sensitive comparision.  Default is
+    <td valign="top">Perform a case sensitive comparison.  Default is
         true.</td>
     <td valign="top" align="center">No</td>
   </tr>
@@ -1071,7 +1071,7 @@ is redundant and will be ignored.</p>
 
 <h4><a name="resourceexists">resourceexists</a></h4>
 
-<p>Tests a resource for existance.  <em>since Ant 1.8.0</em></p>
+<p>Tests a resource for existence.  <em>since Ant 1.8.0</em></p>
 
 <p>The actual resource to test is specified as a nested element.</p>
 

Modified: ant/site/ant/production/manual/Tasks/get.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/get.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/get.html (original)
+++ ant/site/ant/production/manual/Tasks/get.html Tue May  6 02:08:50 2014
@@ -72,6 +72,11 @@ plain text' authentication is used. This
     <td align="center" valign="top">No; default "false"</td>
   </tr>
   <tr>
+    <td valign="top">quiet</td>
+    <td valign="top">Log errors only.(&quot;true&quot;/&quot;false&quot;).</td>
+    <td align="center" valign="top">No; default "false"</td>
+  </tr>
+  <tr>
     <td valign="top">ignoreerrors</td>
     <td valign="top">Log errors but don't treat as fatal.</td>
     <td align="center" valign="top">No; default "false"</td>

Propchange: ant/site/ant/production/manual/Tasks/include.html
------------------------------------------------------------------------------
  Merged /ant/core/tags/ANT_194/manual/Tasks/include.html:r1591180-1592649
  Merged /ant/core/trunk/manual/Tasks/include.html:r1553123-1591179

Modified: ant/site/ant/production/manual/Tasks/javadoc.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/javadoc.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/javadoc.html (original)
+++ ant/site/ant/production/manual/Tasks/javadoc.html Tue May  6 02:08:50 2014
@@ -428,6 +428,14 @@ to &lt;javadoc&gt; using <tt>classpath</
     <td align="center" valign="top">No</td>
   </tr>
   <tr>
+    <td valign="top">failonwarning</td>
+    <td valign="top">Stop the buildprocess if a warning is emitted -
+    i.e. if javadoc's output contains the word "warning".  <em>since
+    Ant 1.9.4</em></td>
+    <td align="center" valign="top">all</td>
+    <td align="center" valign="top">No</td>
+  </tr>
+  <tr>
     <td valign="top">excludepackagenames</td>
     <td valign="top">comma separated list of packages you don't want
       docs for -- see also the nested <code>excludepackage</code> element.</td>

Modified: ant/site/ant/production/manual/Tasks/junit.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/junit.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/junit.html (original)
+++ ant/site/ant/production/manual/Tasks/junit.html Tue May  6 02:08:50 2014
@@ -247,7 +247,16 @@ elements</a>).</p>
       <em>since Ant 1.8.2</em> - <strong>Ant 1.7.0 to 1.8.1 behave as
         if this attribute was true by default.</strong></td>
     <td align="center" valign="top">No</td>
-  </tr>    
+  </tr>
+  <tr>
+    <td valign="top">threads</td>
+    <td valign="top">a number of threads to run the tests in.<br/>
+      When this attribute is specified the tests will be split arbitrarily among the threads.<br/>
+      requires that the tests be forked with the <code>perTest</code>
+      option to be operative.<br/>
+      <em>since Ant 1.9.4</em></td>
+    <td align="center" valign="top">No</td>
+  </tr>
 </table>
 
 <p>By using the <code>errorproperty</code> and <code>failureproperty</code>

Modified: ant/site/ant/production/manual/Tasks/local.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/local.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/local.html (original)
+++ ant/site/ant/production/manual/Tasks/local.html Tue May  6 02:08:50 2014
@@ -37,7 +37,7 @@ top-level operations are carried out; it
 in the buildfile. <b>Since Ant 1.8</b></p>
 
 <p>A property is made local if the <code>&lt;local&gt;</code> task
-  preceedes its definition.  See the examples section.</p>
+  precedes its definition.  See the examples section.</p>
 
 <h3>Parameters</h3>
 <table border="1" cellpadding="2" cellspacing="0"> 

Modified: ant/site/ant/production/manual/Tasks/mail.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/mail.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/mail.html (original)
+++ ant/site/ant/production/manual/Tasks/mail.html Tue May  6 02:08:50 2014
@@ -98,7 +98,19 @@
     <td valign="top">File to send as the body of the email. Property
     values in the file will be expanded.</td>
   </tr>
-      <td valign="top">messagemimetype</td>
+  <tr>
+    <td valign="top">messagefileinputencoding</td>
+    <td valign="top">
+      Specifies the encoding of the input file. Please see
+      <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html">
+        Supported Encodings</a> for a list of possible
+      values. Defaults to the platform's default character
+      encoding. <em>Since Ant 1.9.4</em>
+    </td>
+    <td valign="top" align="center">No</td>
+  </tr>
+  <tr>
+    <td valign="top">messagemimetype</td>
     <td valign="top">The content type of the message.  The default is
     <code>text/plain</code>.</td>
     <td align="center" valign="top">No</td>
@@ -253,6 +265,17 @@ attributes:</p>
     These options are mutually exclusive.</td>
     <td align="center" valign="top">No</td>
   </tr>
+  <tr>
+    <td valign="top">inputencoding</td>
+    <td valign="top">
+      Specifies the encoding of the input file. Please see
+      <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html">
+        Supported Encodings</a> for a list of possible
+      values. Defaults to the platform's default character
+      encoding. <em>Since Ant 1.9.4</em>
+    </td>
+    <td valign="top" align="center">No</td>
+  </tr>
 </table>
 
 <p>If the <code>src</code> attribute is not specified, then text can be
added

Modified: ant/site/ant/production/manual/Tasks/sql.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/sql.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/sql.html (original)
+++ ant/site/ant/production/manual/Tasks/sql.html Tue May  6 02:08:50 2014
@@ -91,6 +91,12 @@ and <b>abort</b> execution and transacti
   <td align="center">No - defaults to default JVM encoding</td>
 </tr>
 <tr>
+  <td valign="top">outputencoding</td>
+  <td valign="top">The encoding of the files holding
+    results.  <em>since 1.9.4</em</td>
+  <td align="center">No - defaults to default JVM encoding</td>
+</tr>
+<tr>
   <td width="12%" valign="top">delimiter</td>
   <td width="78%" valign="top">String that separates SQL statements</td>
   <td width="10%" valign="top">No, default &quot;;&quot;</td>

Modified: ant/site/ant/production/manual/Tasks/sshexec.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/sshexec.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/sshexec.html (original)
+++ ant/site/ant/production/manual/Tasks/sshexec.html Tue May  6 02:08:50 2014
@@ -122,16 +122,35 @@ and won't work with versions of jsch ear
     <td align="center" valign="top">No, defaults to false</td>
   </tr>
   <tr>
+    <td valign="top">suppresssystemerr</td>
+    <td valign="top">Whether to suppress system err.
+      <em>since Ant 1.9.4</em></td>
+    <td align="center" valign="top">No, defaults to false</td>
+  </tr>
+  <tr>
     <td valign="top">output</td>
     <td valign="top">Name of a file to which to write the output.</td>
     <td align="center" valign="top">No</td>
   </tr>
   <tr>
+    <td valign="top">errorOutput</td>
+    <td valign="top">The file to which the standard error of the
+    command should be redirected.  <em>since Ant 1.9.4</em></td>
+    <td align="center" valign="top">No</td>
+  </tr>
+  <tr>
     <td valign="top">append</td>
     <td valign="top">Whether output file should be appended to or overwritten. Defaults
to false, meaning overwrite any existing file.</td>
     <td align="center" valign="top">No</td>
   </tr>
   <tr>
+    <td valign="top">errAppend</td>
+    <td valign="top">Whether errorOutput file should be appended to or
+    overwritten. Defaults to false, meaning overwrite any existing
+    file.  <em>since Ant 1.9.4</em></td>
+    <td align="center" valign="top">No</td>
+  </tr>
+  <tr>
     <td valign="top">outputproperty</td>
     <td valign="top">The name of a property in which the output of the 
       command should be stored.  If you use the commandResource
@@ -140,6 +159,19 @@ and won't work with versions of jsch ear
     <td align="center" valign="top">No</td>
   </tr>
   <tr>
+    <td valign="top">errorproperty</td>
+    <td valign="top">The name of a property in which the standard error of the
+      command should be stored.  <em>since Ant 1.9.4</em></td>
+    <td align="center" valign="top">No</td>
+  </tr>
+  <tr>
+    <td valign="top">resultproperty</td>
+    <td valign="top">the name of a property in which the return code
+      of the command should be stored. Only of interest if
+      failonerror=false.  <em>since Ant 1.9.4</em></td>
+    <td align="center" valign="top">No</td>
+  </tr>
+  <tr>
     <td valign="top">timeout</td>
     <td valign="top">Stop the command if it doesn't finish within the
       specified time (given in milliseconds <b>unlike telnet, which
@@ -191,6 +223,13 @@ and won't work with versions of jsch ear
       <em>since Ant 1.8.3</em></td>
     <td align="center" valign="top">No, defaults to false</td>
   </tr>
+  <tr>
+    <td valign="top">useSystemIn</td>
+    <td valign="top">Whether to pass the current standard input to the
+      remote process.
+      <em>since Ant 1.9.4</em></td>
+    <td align="center" valign="top">No, defaults to false</td>
+  </tr>
 </table>
 
 <h3>Examples</h3>

Modified: ant/site/ant/production/manual/Tasks/style.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/style.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/style.html (original)
+++ ant/site/ant/production/manual/Tasks/style.html Tue May  6 02:08:50 2014
@@ -225,7 +225,7 @@ element which is used to perform Entity 
     <td valign="top" align="center">No</td>
   </tr>
   <tr>
-    <td valign="top">supressWarnings</td>
+    <td valign="top">suppressWarnings</td>
     <td valign="top">Whether processor warnings shall be suppressed.
     This option requires support by the processor, it is supported by
     the trax processor bundled with Ant. 

Modified: ant/site/ant/production/manual/Types/patternset.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Types/patternset.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Types/patternset.html (original)
+++ ant/site/ant/production/manual/Types/patternset.html Tue May  6 02:08:50 2014
@@ -98,7 +98,7 @@ your build file, you should use the incl
 attributes or elements.  Using the attribute, you can only specify a
 single file of each type, while the nested elements can be specified
 more than once - the nested elements also support if/unless attributes
-you can use to test the existance of a property.</p>
+you can use to test the existence of a property.</p>
 <table border="1" cellpadding="2" cellspacing="0">
   <tr>
     <td valign="top"><b>Attribute</b></td>

Modified: ant/site/ant/production/manual/Types/redirector.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Types/redirector.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Types/redirector.html (original)
+++ ant/site/ant/production/manual/Types/redirector.html Tue May  6 02:08:50 2014
@@ -136,6 +136,16 @@ source (input) and destination (output/e
     </td>
     <td align="center" valign="top">No, default is <code>true</code></td>
   </tr>
+  <tr>
+    <td valign="top">binaryOutput</td>
+    <td valign="top">When set to true Ant will not try to split the
+      output into lines - which it will usually do in order to separate
+      error from normal output.  This setting will not prevent binary
+      output from getting corrupted if you also specify filter chains.
+      <i>Since Ant 1.9.4</i>.
+    </td>
+    <td align="center" valign="top">No, default is <code>false</code></td>
+  </tr>
 </table>
 <h3>Parameters specified as nested elements</h3>
 <h4>inputmapper</h4>

Modified: ant/site/ant/production/manual/Types/resources.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Types/resources.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Types/resources.html (original)
+++ ant/site/ant/production/manual/Types/resources.html Tue May  6 02:08:50 2014
@@ -320,6 +320,7 @@ Ant's "legacy" datatypes have been modif
 <ul>
   <li><a href="fileset.html">fileset</a>,
     <a href="dirset.html">dirset</a>,
+    <a href="multirootfileset.html">multirootfileset</a>,
     <a href="filelist.html">filelist</a>, and
     <a href="../using.html#path">path</a>
     (and derivative types) expose <a href="#file">file</a> resources

Modified: ant/site/ant/production/manual/Types/selectors-program.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Types/selectors-program.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/Types/selectors-program.html (original)
+++ ant/site/ant/production/manual/Types/selectors-program.html Tue May  6 02:08:50 2014
@@ -140,78 +140,58 @@
 
     <p>For a robust component (and selectors are (Project)Components) tests are
     necessary. For testing Tasks we use JUnit TestCases - more specific
-    <tt>org.apache.tools.ant.BuildFileTest extends junit.framework.TestCase</tt>.
+    <tt>org.apache.tools.ant.BuildFileRule extends org.junit.rules.ExternalResource</tt>.
     Some of its features like configure the (test) project by reading its buildfile and
-    execute targets we need for selector tests also. Therefore we use that BuildFileTest.
+    execute targets we need for selector tests also. Therefore we use that BuildFileRule.
     But testing selectors requires some more work: having a set of files, instantiate
     and configure the selector, check the selection work and more. Because we usually
     extend <tt>BaseExtendSelector</tt> its features have to be tested also (e.g.
setError()).
     </p>
 
-    <p>That's why we have a base class for doing our selector tests:
-    <tt>org.apache.tools.ant.types.selectors.BaseSelectorTest</tt>.</p>
+    <p>That's why we have a test rule for doing our selector tests:
+    <tt>org.apache.tools.ant.types.selectors.BaseSelectorRule</tt>.</p>
 
-    <p>This class extends TestCase and therefore can included in the set of Ant's
-    unit tests. It holds an instance of preconfigured BuildFileTest. Configuration
-    is done by parsing the src/etc/testcases/types/selectors.xml. BaseSelectorTest
+    <p>This class extends ExternalResource and therefore can included in the set of
Ant's
+    unit tests. It holds an instance of preconfigured BuildFileRule. Configuration
+    is done by parsing the src/etc/testcases/types/selectors.xml. BaseSelectorRule
     then gives us helper methods for handling multiple selections. </p>
 
     <p>Because the term "testcase" or "testenvironment" are so often used, this
-    special testenvironment got a new name: <i>bed</i>. Like you initialize the
-    test environment by calling setUp() and cleaning by calling tearDown() (<i>or like
-    to make your bed before go sleeping</i>) you have to do that work with your
-    <i>bed</i> by calling <tt>makeBed()</tt> respective <tt>cleanupBed()</tt>.</p>
+    special testenvironment got a new name: <i>bed</i>. The setup and cleanup
of
+    the bed is all handled by the BaseSelectorRule so any test only has to handle
+    the actual test scenarios</p>
 
-    <p>A usual test scenario is<ol>
-       <li>make the bed</li>
+    <p>A usual test scenario is:</p>
+    <ol>
        <li>instantiate the selector</li>
        <li>configure the selector</li>
        <li>let the selector do some work</li>
        <li>verify the work</li>
-       <li>clean the bed</li>
-       </ol>
-    </p>
+    </ol>
+
 
-    <p>For common way of instantiation you have to override the <tt>getInstance()</tt>
-    simply by returning a new object of your selector. For easier "selection and verification
work"
-    BaseSelectorTest provides the method <tt>performTests()</tt> which
-    iterates over all files (and directories) in the String array <tt>filenames</tt>
-    and checks whether the given selector returns the expected result. If an error
-    occurred (especially the selector does not return the expected result) the test
-    fails and the failing filenames are logged.</p>
 
     <p>An example test would be:<pre>
 package org.apache.tools.ant.types.selectors;
 
-public class MySelectorTest extends BaseSelectorTest {
-
-    public MySelectorTest(String name) {
-        super(name);
-    }
+public class MySelectorTest {
 
-    public BaseSelector getInstance() {
-        return new MySelector();
-    }
+    @Rule
+    public final BaseSelectorRule selectorRule = new BaseSelectorRule();
 
+    @Test
     public void testCase1() {
-        try {
-            // initialize test environment 'bed'
-            makeBed();
-
-            // Configure the selector
-            MySelector s = (MySelector)getSelector();
-            s.addParam("key1", "value1");
-            s.addParam("key2", "value2");
-            s.setXX(true);
-            s.setYY("a value");
-
-            // do the tests
-            performTests(s, "FTTTTTTTTTTT");  // First is not selected - rest is
-
-        } finally {
-            // cleanup the environment
-            cleanupBed();
-        }
+
+
+        // Configure the selector
+        MySelector s = new MySelector();
+        s.addParam("key1", "value1");
+        s.addParam("key2", "value2");
+        s.setXX(true);
+        s.setYY("a value");
+
+        // do the tests
+        assertEquals("FTTTTTTTT", selectorRule.selectionString(s));
     }
 }
     </pre>

Modified: ant/site/ant/production/manual/conceptstypeslist.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/conceptstypeslist.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/conceptstypeslist.html (original)
+++ ant/site/ant/production/manual/conceptstypeslist.html Tue May  6 02:08:50 2014
@@ -51,6 +51,7 @@
 <li><a href="Types/mapper.html">File Mappers</a></li>
 <li><a href="Types/filterchain.html">FilterChains and FilterReaders</a></li>
 <li><a href="Types/filterset.html">FilterSet</a></li>
+<li><a href="Types/multirootfileset.html">MultiRootFileSet</a></li>
 <li><a href="Types/patternset.html">PatternSet</a></li>
 <li><a href="using.html#path">Path-like Structures</a></li>
 <li><a href="Types/permissions.html">Permissions</a></li>

Modified: ant/site/ant/production/manual/cover.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/cover.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/cover.html (original)
+++ ant/site/ant/production/manual/cover.html Tue May  6 02:08:50 2014
@@ -19,14 +19,14 @@
 <head>
 <meta http-equiv="Content-Language" content="en-us">
 <link rel="stylesheet" type="text/css" href="stylesheets/style.css">
-<title>Apache Ant 1.9.3 User Manual</title>
+<title>Apache Ant 1.9.4 User Manual</title>
 </head>
 
 <body bgcolor="#FFFFFF">
 <div align="center"> 
   <h1><img src="images/ant_logo_large.gif" width="190" height="120"></h1>
-  <h1>Apache Ant&trade; 1.9.3 Manual</h1>
-  <p align="left">This is the manual for version 1.9.3 of 
+  <h1>Apache Ant&trade; 1.9.4 Manual</h1>
+  <p align="left">This is the manual for version 1.9.4 of
   <a target="_top" href="http://ant.apache.org/index.html">Apache Ant</a>. 
     If your version 
     of Ant (as verified with <tt>ant -version</tt>) is older or newer than this


Propchange: ant/site/ant/production/manual/cover.html
------------------------------------------------------------------------------
  Merged /ant/core/trunk/manual/cover.html:r1553123-1591179
  Merged /ant/core/tags/ANT_194/manual/cover.html:r1591180-1592649

Modified: ant/site/ant/production/manual/credits.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/credits.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/credits.html (original)
+++ ant/site/ant/production/manual/credits.html Tue May  6 02:08:50 2014
@@ -62,7 +62,7 @@
 </ul>
 
 <center>
-<p>Version: 1.9.3</p>
+<p>Version: 1.9.4</p>
 </center>
 
 

Modified: ant/site/ant/production/manual/install.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/install.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/install.html (original)
+++ ant/site/ant/production/manual/install.html Tue May  6 02:08:50 2014
@@ -105,7 +105,7 @@ Choose the format that is best supported
     runtime. Such distributions are usually unsupported by everyone. Particularly
     troublesome are those products that not only ship with their own Ant release,
     they add their own version of ANT.BAT or ant.sh to the PATH. If Ant starts
-    behaving wierdly after installing something, try the
+    behaving weirdly after installing something, try the
     <a href="#diagnostics">diagnostics</a> advice.
 </p>
 

Modified: ant/site/ant/production/manual/targets.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/targets.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/targets.html (original)
+++ ant/site/ant/production/manual/targets.html Tue May  6 02:08:50 2014
@@ -94,7 +94,7 @@
 
   <p>Only one propertyname can be specified in the if/unless
     clause. If you want to check multiple conditions, you can use a
-    dependend target for computing the result for the check:</p>
+    dependent target for computing the result for the check:</p>
 
 <blockquote><pre>
 &lt;target name="myTarget" depends="myTarget.check" if="myTarget.run"&gt;

Modified: ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html (original)
+++ ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html Tue May  6 02:08:50
2014
@@ -135,20 +135,28 @@ to them, sorry :-)</p>
 we can call that from our testcase:
 
 <pre class="code">
-import org.apache.tools.ant.BuildFileTest;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.Before;
+import org.junit.Assert;
+import org.apache.tools.ant.BuildFileRule;
 
-public class FindTest extends BuildFileTest {
 
-    public FindTest(String name) {
-        super(name);
-    }
+public class FindTest {
+
+    @Rule
+    public final BuildFileRule buildRule = new BuildFileRule();
 
+
+    @Before
     public void setUp() {
         configureProject("build.xml");
     }
 
+    @Test
     public void testSimple() {
-        <b>expectLog("use.simple", "test-value");</b>
+        buildRule.executeTarget("useSimgle");
+        <b>Assert.assertEquals("test-value", buildRule.getLog());</b>
     }
 }
 </pre>
@@ -211,10 +219,14 @@ Maybe you find some more testcases. But 
 For each of these points we create a <tt>testXX</tt> method.</p>
 
 <pre class="code">
-public class FindTest extends BuildFileTest {
+public class FindTest {
+
+    @Rule
+    public final BuildFileRule buildRule = new BuildFileRule();
 
     ... // constructor, setUp as above
 
+    @Test
     public void testMissingFile() {
         <b>Find find = new Find();</b>
         try {
@@ -227,6 +239,7 @@ public class FindTest extends BuildFileT
         }
     }
 
+    @Test
     public void testMissingLocation() {
         Find find = new Find();
         <b>find.setFile("ant.jar");</b>
@@ -238,6 +251,7 @@ public class FindTest extends BuildFileT
         }
     }
 
+    @Test
     public void testMissingFileset() {
         Find find = new Find();
         find.setFile("ant.jar");
@@ -250,15 +264,17 @@ public class FindTest extends BuildFileT
         }
     }
 
+    @Test
     public void testFileNotPresent() {
-        executeTarget("testFileNotPresent");
-        String result = getProject().getProperty("location.ant-jar");
+        buildRule.executeTarget("testFileNotPresent");
+        String result = buildRule.getProject().getProperty("location.ant-jar");
         assertNull("Property set to wrong value.", result);
     }
 
+    @Test
     public void testFilePresent() {
-        executeTarget("testFilePresent");
-        String result = getProject().getProperty("location.ant-jar");
+        buildRule.executeTarget("testFilePresent");
+        String result = buildRule.getProject().getProperty("location.ant-jar");
         assertNotNull("Property not set.", result);
         assertTrue("Wrong file found.", result.endsWith("ant.jar"));
     }
@@ -301,9 +317,9 @@ can implement our task, so that these te
 is a common way, because we separate the prerequisites from the real work. On <b>//2</b>
we iterate
 over all nested filesets. If we don't want to handle multiple filesets, the <tt>addFileset()</tt>
 method has to reject the further calls. We can get the result of a fileset via its DirectoryScanner
-like done in <b>//3</b>. After that we create a platform independend String representation
of
+like done in <b>//3</b>. After that we create a platform independent String representation
of
 the file path (<b>//4</b>, can be done in other ways of course). We have to do
the <tt>replace()</tt>,
-because we work with a simple string comparison. Ant itself is platform independant and can
+because we work with a simple string comparison. Ant itself is platform independent and can
 therefore run on filesystems with slash (/, e.g. Linux) or backslash (\, e.g. Windows) as
 path separator. Therefore we have to unify that. If we found our file we create an absolute
 path representation on <b>//5</b>, so that we can use that information without
knowing the basedir.
@@ -906,7 +922,7 @@ entry. For both we need some information
 </tr>
 <tr>
   <th>attachments</th>
-  <td><i>all files needed to apply the path</td>
+  <td><i>all files needed to apply the path</i></td>
   <td>Archive containing a patch with the new and modified resources</td>
 </tr>
 </table>

Modified: ant/site/ant/production/manual/tutorial-writing-tasks.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/tutorial-writing-tasks.html?rev=1592650&r1=1592649&r2=1592650&view=diff
==============================================================================
--- ant/site/ant/production/manual/tutorial-writing-tasks.html (original)
+++ ant/site/ant/production/manual/tutorial-writing-tasks.html Tue May  6 02:08:50 2014
@@ -17,8 +17,7 @@
 <html>
 <head>
   <title>Tutorial: Writing Tasks</title>
-  <link rel="stylesheet" type="text/css" href="stylesheets/style.css">
-  </link>
+  <link rel="stylesheet" type="text/css" href="stylesheets/style.css" />
 </head>
 <body>
 <h1>Tutorial: Writing Tasks</h1>
@@ -596,12 +595,9 @@ Next step: test ...
 <h2>Test the Task</h2>
 <p>We have written a test already: the use.* tasks in the buildfile. But its
 difficult to test that automatically. Common (and in Ant) used is JUnit for
-that. For testing tasks Ant provides a baseclass <tt>org.apache.tools.ant.BuildFileTest</tt>.
-This class extends <tt>junit.framework.TestCase</tt> and can therefore be integrated
-into the unit tests. But this class provides some for testing tasks useful methods:
-initialize Ant, load a buildfile, execute targets,
-expecting BuildExceptions with a specified text, expect a special text
-in the output log ... </p>
+that. For testing tasks Ant provides a JUnit Rule <tt>org.apache.tools.ant.BuildFileRule</tt>.
+This class provides some for testing tasks useful methods:
+initialize Ant, load a buildfile, execute targets, capturing debug and run logs ...</p>
 
 <p>In Ant it is usual that the testcase has the same name as the task with a prepending
 <i>Test</i>, therefore we will create a file <i>HelloWorldTest.java</i>.
Because we
@@ -677,49 +673,68 @@ and <code>&lt;junitreport&gt;</code>. So
 ...
 </pre>
 
-<p>Back to the <i>src/HelloWorldTest.java</i>. We create a class extending
-<i>BuildFileTest</i> with String-constructor (JUnit-standard), a <i>setUp()</i>
-method initializing Ant and for each testcase (targets use.*) a <i>testXX()</i>
-method invoking that target.</p>
-<pre class="code">
-import org.apache.tools.ant.BuildFileTest;
+<p>Back to the <i>src/HelloWorldTest.java</i>. We create a class with a
public
+<i>BuildFileRule</i> field annotated with JUnit's <i>@Rule</i> annotation.
As per
+conventional JUnit4 tests, this class should have no constructors, or a default no-args
+constructor, setup methods should be annotated with <i>@Before</i>, tear down
methods
+annotated with <i>@After</i> and any test method annotated with <i>@Test</i>.
+<pre class="code">
+import org.apache.tools.ant.BuildFileRule;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.Before;
+import org.junit.Rule;
+import org.apache.tools.ant.AntAssert;
+import org.apache.tools.ant.BuildException;
 
-public class HelloWorldTest extends BuildFileTest {
+public class HelloWorldTest {
 
-    public HelloWorldTest(String s) {
-        super(s);
-    }
+    @Rule
+    public final BuildFileRule buildRule = new BuildFileRule();
 
+    @Before
     public void setUp() {
         // initialize Ant
-        configureProject("build.xml");
+        buildRule.configureProject("build.xml");
     }
 
+    @Test
     public void testWithout() {
-        executeTarget("use.without");
-        assertEquals("Message was logged but should not.", getLog(), "");
+        buildRule.executeTarget("use.without");
+        assertEquals("Message was logged but should not.", buildRule.getLog(), "");
     }
 
     public void testMessage() {
         // execute target 'use.nestedText' and expect a message
         // 'attribute-text' in the log
-        expectLog("use.message", "attribute-text");
+        buildRule.executeTarget("use.message");
+        Assert.assertEquals("attribute-text", buildRule.getLog());
     }
 
+    @Test
     public void testFail() {
         // execute target 'use.fail' and expect a BuildException
         // with text 'Fail requested.'
-        expectBuildException("use.fail", "Fail requested.");
+        try {
+           buildRule.executeTarget("use.fail");
+           fail("BuildException should have been thrown as task was set to fail");
+        } catch (BuildException ex) {
+            Assert.assertEquals("fail requested", ex.getMessage());
+        }
+
     }
 
+    @Test
     public void testNestedText() {
-        expectLog("use.nestedText", "nested-text");
+        buildRule.executeTarget("use.nestedText");
+        Assert.assertEquals("nested-text", buildRule.getLog());
     }
 
+    @Test
     public void testNestedElement() {
-        executeTarget("use.nestedElement");
-        assertLogContaining("Nested Element 1");
-        assertLogContaining("Nested Element 2");
+        buildRule.executeTarget("use.nestedElement");
+        AntAssert.assertContains("Nested Element 1", buildRule.getLog());
+        AntAssert.assertContains("Nested Element 2", buildRule.getLog());
     }
 }
 </pre>
@@ -790,14 +805,14 @@ The ZIP provided there contains</p><ul>
 <a href="tutorial-writing-tasks-src.zip">here [7]</a> inside the manual.
 </p>
 
-<p>Used Links:<br></br>
-&nbsp;&nbsp;[1] <a href="http://ant.apache.org/manual/properties.html#built-in-props">http://ant.apache.org/manual/properties.html#built-in-props</a><br></br>
-&nbsp;&nbsp;[2] <a href="http://ant.apache.org/manual/Tasks/taskdef.html">http://ant.apache.org/manual/Tasks/taskdef.html</a><br></br>
-&nbsp;&nbsp;[3] <a href="http://ant.apache.org/manual/develop.html#set-magic">http://ant.apache.org/manual/develop.html#set-magic</a><br></br>
-&nbsp;&nbsp;[4] <a href="http://ant.apache.org/manual/develop.html#nested-elements">http://ant.apache.org/manual/develop.html#nested-elements</a><br></br>
-&nbsp;&nbsp;[5] <a href="http://gump.covalent.net/jars/latest/ant/ant-testutil.jar">http://gump.covalent.net/jars/latest/ant/ant-testutil.jar</a><br></br>
-&nbsp;&nbsp;[6] <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=22570">http://issues.apache.org/bugzilla/show_bug.cgi?id=22570</a><br></br>
-&nbsp;&nbsp;[7] <a href="tutorial-writing-tasks-src.zip">tutorial-writing-tasks-src.zip</a><br></br>
+<p>Used Links:<br />
+&nbsp;&nbsp;[1] <a href="http://ant.apache.org/manual/properties.html#built-in-props">http://ant.apache.org/manual/properties.html#built-in-props</a><br
/>
+&nbsp;&nbsp;[2] <a href="http://ant.apache.org/manual/Tasks/taskdef.html">http://ant.apache.org/manual/Tasks/taskdef.html</a><br
/>
+&nbsp;&nbsp;[3] <a href="http://ant.apache.org/manual/develop.html#set-magic">http://ant.apache.org/manual/develop.html#set-magic</a><br
/>
+&nbsp;&nbsp;[4] <a href="http://ant.apache.org/manual/develop.html#nested-elements">http://ant.apache.org/manual/develop.html#nested-elements</a><br
/>
+&nbsp;&nbsp;[5] <a href="http://gump.covalent.net/jars/latest/ant/ant-testutil.jar">http://gump.covalent.net/jars/latest/ant/ant-testutil.jar</a><br
/>
+&nbsp;&nbsp;[6] <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=22570">http://issues.apache.org/bugzilla/show_bug.cgi?id=22570</a><br
/>
+&nbsp;&nbsp;[7] <a href="tutorial-writing-tasks-src.zip">tutorial-writing-tasks-src.zip</a><br
/>
 </p>
 
 </body>



Mime
View raw message