ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r1554091 - in /ant/site/ant/production/manual: ./ Tasks/apt.html Tasks/include.html Tasks/junit.html Tasks/macrodef.html Tasks/style.html Tasks/zip.html Types/filterset.html ifunless.html properties.html tutorial-tasks-filesets-properties.html
Date Sun, 29 Dec 2013 23:23:03 GMT
Author: antoine
Date: Sun Dec 29 23:23:02 2013
New Revision: 1554091

URL: http://svn.apache.org/r1554091
Log:
upgrade online manual to 1.9.3

Modified:
    ant/site/ant/production/manual/   (props changed)
    ant/site/ant/production/manual/Tasks/apt.html
    ant/site/ant/production/manual/Tasks/include.html   (props changed)
    ant/site/ant/production/manual/Tasks/junit.html
    ant/site/ant/production/manual/Tasks/macrodef.html
    ant/site/ant/production/manual/Tasks/style.html
    ant/site/ant/production/manual/Tasks/zip.html
    ant/site/ant/production/manual/Types/filterset.html
    ant/site/ant/production/manual/ifunless.html
    ant/site/ant/production/manual/properties.html
    ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html

Propchange: ant/site/ant/production/manual/
------------------------------------------------------------------------------
  Merged /ant/core/trunk/manual:r1502514-1521726,1521728-1522923,1522925-1538044,1538046-1539546,1539548-1553122
  Merged /ant/core/tags/ANT_193/manual:r1553123-1554089

Modified: ant/site/ant/production/manual/Tasks/apt.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/apt.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/apt.html (original)
+++ ant/site/ant/production/manual/Tasks/apt.html Sun Dec 29 23:23:02 2013
@@ -23,15 +23,11 @@
 <h2><a name="Apt">Apt</a></h2>
 <h3>Description</h3>
 <p>Runs the annotation processor tool (apt), and then optionally compiles
-   the original code, and any generated source code. This task requires Java 1.5.
-   It may work on later versions, but this cannot be confirmed until those
-   versions ship. Be advised that the Apt tool does appear to be an unstable
-   part of the JDK framework, so may change radically in future versions. 
-   In particular it is likely to be obsolete in JDK 6, which can run annotation
-   processors as part of javac.
-   If the &lt;apt&gt; task does break when upgrading JVM, please
-   check to see if there is a more recent version of Apache Ant that tracks
-   any changes.</p>
+   the original code, and any generated source code.
+   <p>This task runs on Java 1.5 to Java 1.7.</p>
+   <p>Apt is deprecated in Java 1.6, which can run annotation
+   processors as part of javac, and removed from the distribution in Java 1.8.
+   The task will fire an exception when attempting to run under Java 1.8.</p>
 
 
 <p>This task inherits from the <a href="javac.html">Javac Task</a>, and
thus

Propchange: ant/site/ant/production/manual/Tasks/include.html
------------------------------------------------------------------------------
  Merged /ant/core/tags/ANT_193/manual/Tasks/include.html:r1553123-1554089
  Merged /ant/core/trunk/manual/Tasks/include.html:r1483159-1521726,1521728-1553122

Modified: ant/site/ant/production/manual/Tasks/junit.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/junit.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/junit.html (original)
+++ ant/site/ant/production/manual/Tasks/junit.html Sun Dec 29 23:23:02 2013
@@ -526,6 +526,18 @@ the name of the resulting class (without
     <td valign="top">Only run test <a href="../properties.html#if+unless">if
the named property is <b>not</b> set</a>.</td>
     <td align="center" valign="top">No</td>
   </tr>
+  <tr>
+    <td valign="top">skipNonTests</td>
+    <td valign="top">Do not pass any classes that do not contain JUnit tests to the
test runner.
+          This prevents non tests from appearing as test errors in test results.<br />
+          Tests are identified by looking for the <code>@Test</code> annotation
on any methods in concrete classes
+          that don't extend <code>junit.framework.TestCase</code>, or for public/protected
methods with
+          names starting with 'test' in concrete classes that extend <code>junit.framework.TestCase</code>.
+          Classes marked with the JUnit4 <code>org.junit.runner.RunWith</code>
or
+          <code>org.junit.runner.Suite.SuiteClasses</code> annotations are also
passed to JUnit for execution,
+          as is any class with a public/protected no-argument <code>suite</code>
method.</td>
+    <td align="center" valign="top">No. Default is false.</td>
+  </tr>
 </table>
 
 <p>Tests can define their own formatters via nested
@@ -604,6 +616,18 @@ supported.</p>
     <td valign="top">Only run tests <a href="../properties.html#if+unless">if
the named property is <strong>not</strong> set</a>.</td>
     <td align="center" valign="top">No</td>
   </tr>
+  <tr>
+      <td valign="top">skipNonTests</td>
+      <td valign="top">Do not pass any classes that do not contain JUnit tests to the
test runner.
+                          This prevents non tests from appearing as test errors in test results.<br
/>
+                          Tests are identified by looking for the <code>@Test</code>
annotation on any methods in concrete classes
+                          that don't extend <code>junit.framework.TestCase</code>,
or for public/protected methods with
+                          names starting with 'test' in concrete classes that extend <code>junit.framework.TestCase</code>.
+                          Classes marked with the JUnit4 <code>org.junit.runner.RunWith</code>
or
+                          <code>org.junit.runner.Suite.SuiteClasses</code> annotations
are also passed to JUnit for execution,
+                          as is any class with a public/protected no-argument <code>suite</code>
method.</td>
+      <td align="center" valign="top">No. Default is false.</td>
+  </tr>
 </table>
 
 <p>Batchtests can define their own formatters via nested
@@ -649,7 +673,7 @@ supported.</p>
 
 <p>to your <code>junit</code> task.</p>
 
-<h3><a name="enabletestlistenerevents"><code>ant.junit.enabletestlistenerevents</a>
+<h3><a name="enabletestlistenerevents"><code>ant.junit.enabletestlistenerevents</code></a>
   magic property</h3>
 
 <p><em>Since Ant 1.8.2</em> the <code>enableTestListenerEvents</code>

Modified: ant/site/ant/production/manual/Tasks/macrodef.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/macrodef.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/macrodef.html (original)
+++ ant/site/ant/production/manual/Tasks/macrodef.html Sun Dec 29 23:23:02 2013
@@ -70,7 +70,7 @@
       <tr>
         <td valign="top">backtrace</td>
         <td valign="top">
-          This controls the error traceback if they is an
+          This controls the error traceback if there is an
           error detected when running the macro. If this is
           set to true, there will be an error trackback, if false
           there will not be one. <em>Since Ant 1.7</em>.

Modified: ant/site/ant/production/manual/Tasks/style.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/style.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/style.html (original)
+++ ant/site/ant/production/manual/Tasks/style.html Sun Dec 29 23:23:02 2013
@@ -295,11 +295,33 @@ element is used to perform Entity and UR
   </tr>
   <tr>
     <td valign="top">expression</td>
-    <td valign="top">Text value to be placed into the param.<br>
-    Was originally intended to be an XSL expression.</td>
+    <td valign="top">
+        The value to be placed into the param or an XPath expression
+        (depending on <code>type</code>).
+    </td>
     <td align="center" valign="top">Yes</td>
   </tr>
   <tr>
+    <td valign="top">type</td>
+    <td valign="top">
+        Data type of the parameter. Possible values are:
+        <ul>
+            <li><code>STRING</code></li>
+            <li><code>BOOLEAN</code></li>
+            <li><code>INT</code></li>
+            <li><code>LONG</code></li>
+            <li><code>DOUBLE</code></li>
+            <li><code>XPATH_STRING</code></li>
+            <li><code>XPATH_BOOLEAN</code></li>
+            <li><code>XPATH_NUMBER</code></li>
+            <li><code>XPATH_NODE</code></li>
+            <li><code>XPATH_NODESET</code></li>
+        </ul>
+        <em>since Ant 1.9.3</em>
+    </td>
+    <td align="center" valign="top">No; default is <code>STRING</code></td>
+  </tr>
+  <tr>
     <td valign="top">if</td>
     <td valign="top">The param will only be passed <a href="../properties.html#if+unless">if
this property is set</a>.</td>
     <td align="center" valign="top">No</td>
@@ -313,6 +335,18 @@ element is used to perform Entity and UR
 </table>
 </blockquote>
 
+  <p>      
+      The <code>XPATH_*</code> types says that the <code>expression</code>
is not just a primitive-type value but an XPath expression.
+      This expression will be evaluated on an empty XML document and the result will be passed
to the XSLT transformer as a parameter of given type.
+      In these expressions the declared Ant properties can be used as XPath variables e.g.
<code>$someProperty</code>.
+      So you can compute something using standard XPath functions and operators.
+  </p>
+  <p>
+      If you write <code>${someProperty}</code> instead of <code>$someProperty</code>,
+      the value will be simply substituted by Ant before evaluating the XPath expression
+      (this substitution works also for primitive types).
+  </p>
+
 <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">
@@ -459,6 +493,7 @@ with <a href="../Types/propertyset.html"
 &lt;/xslt&gt;
 </pre>
   <h4>Using XSL parameters</h4>
+  <p>Simple String parameter:</p>
 <pre>
 &lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
       extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt;
@@ -469,6 +504,55 @@ with <a href="../Types/propertyset.html"
   element &lt;xsl:param name=&quot;date&quot;/&gt;, the variable
   <code>$date</code> will subsequently have the value 07-01-2000.
   </p>
+  
+  <p>Various data types and XPath expressions:</p>
+  
+  <pre>&lt;property name="antProperty1" value="ANT_PROPERTY_1"/&gt;
+&lt;property name="antProperty2" value="ANT_PROPERTY_2"/&gt;
+&lt;property name="antProperty3" value="3"/&gt;
+&lt;property name="antProperty4" value="substring-before"/&gt;
+
+&lt;!--
+  ${this} is substituted by Ant itself
+  and $this is evaluated by XPath as a variable
+--&gt;
+
+&lt;xslt in="in.xml" out="out.xml" style="template.xsl"&gt;
+  
+  &lt;!-- Simple String parameter: --&gt;
+  &lt;param name="p0" expression="some nice string" type="STRING"/&gt;
+  
+  &lt;!-- A value substituted by Ant --&gt;
+  &lt;param name="p1" expression="some string with ${antProperty1} constructed by Ant"
type="STRING"/&gt;
+  
+  &lt;!-- XPath resulting in: and this is done in XPath: ANT_PROPERTY_2 --&gt;
+  &lt;param name="p2" expression="concat('and this is done in XPath: ', $antProperty2)"
type="XPATH_STRING"/&gt;
+  
+  &lt;!-- Some XPath math, result: 42 --&gt;
+  &lt;param name="p3" expression="64 * 64 div 128 + 10" type="XPATH_NUMBER"/&gt;
+  
+  &lt;!-- Some numeric parameter: --&gt;
+  &lt;param name="p4" expression="123.45" type="DOUBLE"/&gt;
+  
+  &lt;!-- XPath expression, result: true boolean --&gt;
+  &lt;param name="p5" expression="$antProperty1 = 'ANT_PROPERTY_1'" type="XPATH_BOOLEAN"/&gt;
+  
+  &lt;!-- First one is an XPath variable, second one is a text substituted by Ant, result:
true boolean --&gt;
+  &lt;param name="p6" expression="$antProperty2 = '${antProperty2}'" type="XPATH_BOOLEAN"/&gt;
+  
+  &lt;!-- Some XPath math with a variable, result: 64 --&gt;
+  &lt;param name="p7" expression="$antProperty3 * 4 * 5 + 4" type="XPATH_NUMBER"/&gt;
+  
+  &lt;!-- 
+    XPath expression with substituted function name and a variable:
+    substring-before($antProperty2, '_')
+    result: ANT
+  --&gt;
+  &lt;param name="p8" expression="${antProperty4}($antProperty2, '_')" type="XPATH_STRING"/&gt;
+  
+  &lt;!-- Without type attribute: --&gt;
+  &lt;param name="p9" expression="default type is String"/&gt;
+&lt;/xslt&gt;</pre>
 
   <h4>Using output properties</h4>
 <pre>

Modified: ant/site/ant/production/manual/Tasks/zip.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Tasks/zip.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/Tasks/zip.html (original)
+++ ant/site/ant/production/manual/Tasks/zip.html Sun Dec 29 23:23:02 2013
@@ -535,7 +535,7 @@ The same can be achieved with
 The next example
 
 <pre>
-&lt;zip dest="release.zip"&gt;
+&lt;zip destfile="release.zip"&gt;
   &lt;tarfileset src="release.tar"/&gt;
 &lt;/zip&gt;
 </pre>

Modified: ant/site/ant/production/manual/Types/filterset.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/Types/filterset.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/Types/filterset.html (original)
+++ ant/site/ant/production/manual/Types/filterset.html Sun Dec 29 23:23:02 2013
@@ -45,6 +45,9 @@ filters.</p>
 <p>Filtersets are used for doing 
 replacements in tasks such as <code>&lt;copy&gt;</code>, etc.</p>
 
+<p>Filters can also by specified by one or more nested propertysets, the
+  contents of which are applied when the filterset is created.</p>
+
 <p>If you specify multiple values for the same token, the last one
   defined within a filterset will be used.</p>
 
@@ -181,4 +184,17 @@ but wish to replace the token <code>%DAT
   &lt;filterset refid=&quot;myFilterSet&quot;/&gt;
 &lt;/copy&gt;
 </pre></blockquote>
+
+<p>You are copying the <code>version.txt</code> file to the <code>dist</code>
+directory from the <code>build</code> directory 
+but wish to replace the token <code>&#64;project.date&#64;</code> with
the property of the same name.</p>
+<blockquote><pre>
+&lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt;
+  &lt;filterset&gt;
+    &lt;propertyset&gt;
+      &lt;propertyref name=&quot;project.date&quot;/&gt;
+    &lt;/propertyset&gt;
+  &lt;/filterset&gt;
+&lt;/copy&gt;
+</pre></blockquote>
 </body></html>

Modified: ant/site/ant/production/manual/ifunless.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/ifunless.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/ifunless.html (original)
+++ ant/site/ant/production/manual/ifunless.html Sun Dec 29 23:23:02 2013
@@ -36,9 +36,9 @@
 
   <p>The if and unless namespaces support the following 3 conditions :
   <ul>
-    <li>true</li>true if the value of the property evaluates to true
-    <li>blank</li>true if the value of the property is null or empty
-    <li>set</li>true if the property is set
+    <li>true</li>true if the value of the attribute evaluates to true
+    <li>blank</li>true if the value of the attribute is null or empty
+    <li>set</li>true if the specified property is set
   </ul></p>
 
 <blockquote>
@@ -48,8 +48,8 @@
  xmlns:unless=&quot;ant:unless&quot;
 &gt;
  &lt;exec executable=&quot;java&quot;&gt;
-   &lt;arg line=&quot;-X&quot; if:true=&quot;showextendedparams&quot;/&gt;
-   &lt;arg line=&quot;-version&quot; unless:true=&quot;showextendedparams&quot;/&gt;
+   &lt;arg line=&quot;-X&quot; if:true=&quot;${showextendedparams}&quot;/&gt;
+   &lt;arg line=&quot;-version&quot; unless:true=&quot;${showextendedparams}&quot;/&gt;
  &lt;/exec&gt;
  &lt;condition property=&quot;onmac&quot;&gt;
    &lt;os family=&quot;mac&quot;/&gt;

Modified: ant/site/ant/production/manual/properties.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/manual/properties.html?rev=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/properties.html (original)
+++ ant/site/ant/production/manual/properties.html Sun Dec 29 23:23:02 2013
@@ -61,7 +61,7 @@
   </p>
 
   <p>In addition, Ant has some built-in properties:</p>
-<pre><!-- XXX use <dl><dt><code>...</code></dt><dd>...</dd></dl>
instead -->
+<pre><!-- TODO use <dl><dt><code>...</code></dt><dd>...</dd></dl>
instead -->
 basedir             the absolute path of the project's basedir (as set
                     with the basedir attribute of <a href="using.html#projects">&lt;project&gt;</a>).
 ant.file            the absolute path of the buildfile.

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=1554091&r1=1554090&r2=1554091&view=diff
==============================================================================
--- ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html (original)
+++ ant/site/ant/production/manual/tutorial-tasks-filesets-properties.html Sun Dec 29 23:23:02
2013
@@ -883,7 +883,7 @@ do a second checkstyle run. Now our task
 <h3>Creating the diff</h3>
 <p>Creating a diff for Ant is very easy: just start <tt>ant -f patch.xml</tt>
and all is done
 automatically. This step requires a cvs executable in your path and internet access (more
precise:
-cvs access). As a result we get a file <i> XXX </i>.</p>
+cvs access). As a result we get a file <i> TODO </i>.</p>
 -->
 
 



Mime
View raw message