Obtained from: Larry Shatzer git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278015 13f79535-47bb-0310-9956-ffa450edef68master
@@ -878,7 +878,7 @@ should contain a number of top level targets | |||||
<li>fetch - get the latest source from the cvs tree | <li>fetch - get the latest source from the cvs tree | ||||
<li>docs/javadocs - do the documentation | <li>docs/javadocs - do the documentation | ||||
<li>all - clean, fetch, build, test, docs, deploy | <li>all - clean, fetch, build, test, docs, deploy | ||||
<li>main - the default build process (usually build or build & test) | |||||
<li>main - the default build process (usually build or build & test) | |||||
</ul> | </ul> | ||||
Sub projects "web", "bean-1", "bean-2" can be given their own build | Sub projects "web", "bean-1", "bean-2" can be given their own build | ||||
files - <tt>web.xml</tt>, <tt>bean-1.xml</tt>, <tt>bean-2.xml</tt> - with the same entry points. | files - <tt>web.xml</tt>, <tt>bean-1.xml</tt>, <tt>bean-2.xml</tt> - with the same entry points. | ||||
@@ -38,10 +38,10 @@ unpredictable results depending on the internals of the cloned class.</b> | |||||
<p> | <p> | ||||
Given a fileset <i>foo</i>: | Given a fileset <i>foo</i>: | ||||
<pre> <clone id="foo.txt" cloneref="foo"> | <pre> <clone id="foo.txt" cloneref="foo"> | ||||
<filename name="**/*.txt" /> | |||||
<filename name="**/*.txt"/> | |||||
</clone> | </clone> | ||||
<clone id="foo.nontxt" cloneref="foo"> | <clone id="foo.nontxt" cloneref="foo"> | ||||
<filename name="**/*.txt" negate="true" /> | |||||
<filename name="**/*.txt" negate="true"/> | |||||
</clone> | </clone> | ||||
</pre> | </pre> | ||||
Creates filesets <i>foo.txt</i> and <i>foo.nontxt</i>, which could be | Creates filesets <i>foo.txt</i> and <i>foo.nontxt</i>, which could be | ||||
@@ -23,7 +23,7 @@ | |||||
<a href="antexternal.html">Using Ant Tasks Outside of Ant</a><br> | <a href="antexternal.html">Using Ant Tasks Outside of Ant</a><br> | ||||
<br> | <br> | ||||
<a href="tutorial-writing-tasks.html">Tutorial: Writing Tasks</a><br> | <a href="tutorial-writing-tasks.html">Tutorial: Writing Tasks</a><br> | ||||
<a href="tutorial-tasks-filesets-properties.html">Tutorial: Tasks using Properties, Filesets & Paths</a><br> | |||||
<a href="tutorial-tasks-filesets-properties.html">Tutorial: Tasks using Properties, Filesets & Paths</a><br> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -1,7 +1,7 @@ | |||||
<html> | <html> | ||||
<head> | <head> | ||||
<link rel="stylesheet" type="text/css" href="stylesheets/style.css"/> | <link rel="stylesheet" type="text/css" href="stylesheets/style.css"/> | ||||
<title>Tutorial: Tasks using Properties, Filesets & Paths</title> | |||||
<title>Tutorial: Tasks using Properties, Filesets & Paths</title> | |||||
<meta name="author" content="Jan Matèrne"> | <meta name="author" content="Jan Matèrne"> | ||||
<style type="text/css"> | <style type="text/css"> | ||||
<!-- | <!-- | ||||
@@ -11,7 +11,7 @@ | |||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<h1>Tutorial: Tasks using Properties, Filesets & Paths</h1> | |||||
<h1>Tutorial: Tasks using Properties, Filesets & Paths</h1> | |||||
<p>After reading the tutorial about <a href="tutorial-writing-tasks.html">writing | <p>After reading the tutorial about <a href="tutorial-writing-tasks.html">writing | ||||
tasks [1]</a> this tutorial explains how to get and set properties and how to use | tasks [1]</a> this tutorial explains how to get and set properties and how to use | ||||
@@ -280,7 +280,7 @@ can implement our task, so that these test cases will pass.</p> | |||||
for(int i=0; i<includedFiles.length; i++) { | for(int i=0; i<includedFiles.length; i++) { | ||||
String filename = includedFiles[i].replace('\\','/'); // 4 | String filename = includedFiles[i].replace('\\','/'); // 4 | ||||
filename = filename.substring(filename.lastIndexOf("/")+1); | filename = filename.substring(filename.lastIndexOf("/")+1); | ||||
if (foundLocation==null && file.equals(filename)) { | |||||
if (foundLocation==null && file.equals(filename)) { | |||||
File base = ds.getBasedir(); // 5 | File base = ds.getBasedir(); // 5 | ||||
File found = new File(base, includedFiles[i]); | File found = new File(base, includedFiles[i]); | ||||
foundLocation = found.getAbsolutePath(); | foundLocation = found.getAbsolutePath(); | ||||
@@ -392,7 +392,7 @@ and creating-absolute-paths stuff for us. So the execute method is just:</p> | |||||
for(int i=0; i<includedFiles.length; i++) { | for(int i=0; i<includedFiles.length; i++) { | ||||
String filename = includedFiles[i].replace('\\','/'); | String filename = includedFiles[i].replace('\\','/'); | ||||
filename = filename.substring(filename.lastIndexOf("/")+1); | filename = filename.substring(filename.lastIndexOf("/")+1); | ||||
if (foundLocation==null && file.equals(filename)) { | |||||
if (foundLocation==null && file.equals(filename)) { | |||||
<b>foundLocation = includedFiles[i];</b> // 3 | <b>foundLocation = includedFiles[i];</b> // 3 | ||||
} | } | ||||
} | } | ||||
@@ -502,7 +502,7 @@ for reuse later (<b>*3</b>). | |||||
for(int i=0; i<includedFiles.length; i++) { | for(int i=0; i<includedFiles.length; i++) { | ||||
String filename = includedFiles[i].replace('\\','/'); | String filename = includedFiles[i].replace('\\','/'); | ||||
filename = filename.substring(filename.lastIndexOf("/")+1); | filename = filename.substring(filename.lastIndexOf("/")+1); | ||||
if (file.equals(filename) && <b>!foundFiles.contains(includedFiles[i]</b>)) { // 1 | |||||
if (file.equals(filename) && <b>!foundFiles.contains(includedFiles[i]</b>)) { // 1 | |||||
foundFiles.add(includedFiles[i]); | foundFiles.add(includedFiles[i]); | ||||
} | } | ||||
} | } | ||||
@@ -83,7 +83,7 @@ import org.apache.tools.ant.util.FileUtils; | |||||
* component is created - and may provide runtime wrapping for components | * component is created - and may provide runtime wrapping for components | ||||
* not implementing the Task/DataType interfaces. | * not implementing the Task/DataType interfaces. | ||||
* It works in close relation with TaskAdapter and RuntimeConfigurable | * It works in close relation with TaskAdapter and RuntimeConfigurable | ||||
* to handle delayed evaluation of tasks or custom attribute->task mapping. | |||||
* to handle delayed evaluation of tasks or custom attribute->task mapping. | |||||
* If it returns a wrapper for Task, the wrapper is required to extend | * If it returns a wrapper for Task, the wrapper is required to extend | ||||
* TaskAdapter. | * TaskAdapter. | ||||
* | * | ||||
@@ -77,7 +77,7 @@ import org.apache.tools.ant.util.FileUtils; | |||||
* component is created - and may provide runtime wrapping for components | * component is created - and may provide runtime wrapping for components | ||||
* not implementing the Task/DataType interfaces. | * not implementing the Task/DataType interfaces. | ||||
* It works in close relation with TaskAdapter and RuntimeConfigurable | * It works in close relation with TaskAdapter and RuntimeConfigurable | ||||
* to handle delayed evaluation of tasks or custom attribute->task mapping. | |||||
* to handle delayed evaluation of tasks or custom attribute->task mapping. | |||||
* If it returns a wrapper for Task, the wrapper is required to extend | * If it returns a wrapper for Task, the wrapper is required to extend | ||||
* TaskAdapter. | * TaskAdapter. | ||||
* | * | ||||
@@ -70,7 +70,7 @@ import org.xml.sax.helpers.AttributesImpl; | |||||
to support generic Objects ( the property remains imutable - you can't change | to support generic Objects ( the property remains imutable - you can't change | ||||
the associated object ). This will also allow JSP-EL style setting using the | the associated object ). This will also allow JSP-EL style setting using the | ||||
Object if an attribute contains only the property ( name="${property}" could | Object if an attribute contains only the property ( name="${property}" could | ||||
avoid Object->String->Object conversion ) | |||||
avoid Object->String->Object conversion ) | |||||
- Currently we "chain" only for get and set property ( probably most users | - Currently we "chain" only for get and set property ( probably most users | ||||
will only need that - if they need more they can replace the top helper ). | will only need that - if they need more they can replace the top helper ). | ||||
Need to discuss this and find if we need more. | Need to discuss this and find if we need more. | ||||
@@ -100,7 +100,7 @@ public class ProjectHelperImpl2 extends ProjectHelper { | |||||
static AntHandler projectHandler=new ProjectHandler(); | static AntHandler projectHandler=new ProjectHandler(); | ||||
/** | /** | ||||
* helper for path -> URI and URI -> path conversions. | |||||
* helper for path -> URI and URI -> path conversions. | |||||
*/ | */ | ||||
private static FileUtils fu = FileUtils.newFileUtils(); | private static FileUtils fu = FileUtils.newFileUtils(); | ||||
@@ -83,7 +83,7 @@ BASEURL | |||||
destfile="diff.xml" | destfile="diff.xml" | ||||
tag1="initial" | tag1="initial" | ||||
tag2="BCEL_5_0" | tag2="BCEL_5_0" | ||||
/> | |||||
/> | |||||
</pre> | </pre> | ||||
<p>Generates a tagdiff report for all the changes that have been | <p>Generates a tagdiff report for all the changes that have been | ||||
@@ -97,7 +97,7 @@ into the file <code>diff.xml</code>.</p> | |||||
destfile="diff.xml" | destfile="diff.xml" | ||||
tag1="BCEL_5_0" | tag1="BCEL_5_0" | ||||
tag2="trunk" | tag2="trunk" | ||||
/> | |||||
/> | |||||
</pre> | </pre> | ||||
<p>Generates a tagdiff report for all the changes that have been made | <p>Generates a tagdiff report for all the changes that have been made | ||||
@@ -110,7 +110,7 @@ changes into the file <code>diff.xml</code>.</p> | |||||
baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/" | baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/" | ||||
destfile="diff.xml" | destfile="diff.xml" | ||||
tag1="BCEL_5_0" | tag1="BCEL_5_0" | ||||
/> | |||||
/> | |||||
</pre> | </pre> | ||||
<p>Does the same, using <code>trunk</code> as <code>tag2</code> | <p>Does the same, using <code>trunk</code> as <code>tag2</code> | ||||