antoine 2003/05/22 00:27:51
Modified: src/main/org/apache/tools/ant/taskdefs SubAnt.java
docs/manual/CoreTasks subant.html
proposal/xdocs/src/org/apache/tools/ant/taskdefs SubAnt.xml
Log:
Removed ignoremissingbuildfile, following a remark of DD (Dominique Devienne)
in bugzilla.
fileset(s) should be used in the case where some directories do not contain a
build file.
PR: 18715
Revision Changes Path
1.4 +1 -21 ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java
Index: SubAnt.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SubAnt.java 21 May 2003 07:27:25 -0000 1.3
+++ SubAnt.java 22 May 2003 07:27:50 -0000 1.4
@@ -112,7 +112,6 @@
private boolean inheritAll = false;
private boolean inheritRefs = false;
private boolean failOnError = true;
- private boolean ignoreMissingBuildFile = false;
private String output = null;
private Vector properties = new Vector();
@@ -140,7 +139,6 @@
}
*/
for (int i=0; i<count; ++i) {
- boolean doit=true;
File directory=null;
File file = new File(filenames[i]);
if (file.isDirectory()) {
@@ -150,17 +148,9 @@
}
else {
file = new File(file, antfile);
- boolean fileFound=file.exists();
- if(ignoreMissingBuildFile && !fileFound) {
- log("Build file '" + file + "' not found.",
Project.MSG_INFO);
- doit=false;
- }
-
}
}
- if (doit) {
- execute(file, directory);
- }
+ execute(file, directory);
}
}
@@ -235,16 +225,6 @@
*/
public void setFailonerror(boolean failOnError) {
this.failOnError = failOnError;
- }
-
- /**
- * Sets whether to continue or fail with a build exception if the build
- * file is missing, false by default.
- *
- * @param ignoreMissingBuildFile the new value for this boolean flag.
- */
- public void setIgnoreMissingBuildFile(boolean ignoreMissingBuildFile) {
- this.ignoreMissingBuildFile = ignoreMissingBuildFile;
}
/**
1.6 +13 -15 ant/docs/manual/CoreTasks/subant.html
Index: subant.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/CoreTasks/subant.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- subant.html 21 May 2003 07:27:25 -0000 1.5
+++ subant.html 22 May 2003 07:27:50 -0000 1.6
@@ -123,7 +123,7 @@
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1"
face="arial,helvetica,sanserif">String</font>
</td>
- <td bgcolor="#eeeeee" valign="top" align="left" rowspan="10">
+ <td bgcolor="#eeeeee" valign="top" align="left" rowspan="9">
<font color="#000000" size="-1"
face="arial,helvetica,sanserif">Optional</font>
</td>
</tr>
@@ -178,18 +178,6 @@
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
- <font color="#000000" size="-1"
face="arial,helvetica,sanserif">ignoremissingbuildfile</font>
- </td>
- <td bgcolor="#eeeeee" valign="top" align="left">
- <font color="#000000" size="-1"
face="arial,helvetica,sanserif">Sets whether to continue or fail with a build
exception if the build file is missing, false by default.</font>
- </td>
- <td bgcolor="#eeeeee" valign="top" align="left">
- <font color="#000000" size="-1"
face="arial,helvetica,sanserif">boolean</font>
- </td>
- </tr>
- <!-- Attribute -->
- <tr>
- <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1"
face="arial,helvetica,sanserif">inheritall</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
@@ -299,7 +287,7 @@
Adds a file set to the implicit build path. <p> <em>Note that the
directories will be added to the build path in no particular order, so if order
is significant, one should use a file list instead!</em>
<short-description><![CDATA[Adds a file set to the implicit build
path.]]></short-description>
<description>
- <![CDATA[Adds a file set to the implicit build path. <p>
<em>Note that the directories will be added to the build path in no particular
order, so if order is significant, one should use a file list instead!</em>]]>
+ <![CDATA[Adds a file set to the implicit]]><![CDATA[ build path.
<p> <em>Note that the directories will be added to the build path in no
particular order, so if order is significant, one should use a file list
instead!</em>]]>
</description>
</blockquote></td></tr>
@@ -402,7 +390,7 @@
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="examples">
- <strong>Example</strong></a></font>
+ <strong>Examples</strong></a></font>
</td></tr>
<tr><td><blockquote>
@@ -436,6 +424,16 @@
this snippet build file will run ant in each subdirectory of the
project directory,
where a file called build.xml can be found.
All properties whose name starts with "foo" are passed, their
names are changed to start with "bar" instead
+ </p>
+<pre>
+ <subant target="compile"
genericantfile="/opt/project/build1.xml">
+ <dirset dir="." includes="projects*"/>
+ </subant>
+ </pre>
+<p>
+ assuming the subdirs of the project dir are called projects1,
projects2, projects3
+ this snippet will execute the compile target of
/opt/project/build1.xml,
+ setting the basedir to projects1, projects2, projects3
</p>
</blockquote></td></tr>
1.5 +1 -1
ant/proposal/xdocs/src/org/apache/tools/ant/taskdefs/SubAnt.xml
Index: SubAnt.xml
===================================================================
RCS file:
/home/cvs/ant/proposal/xdocs/src/org/apache/tools/ant/taskdefs/SubAnt.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SubAnt.xml 21 May 2003 07:27:25 -0000 1.4
+++ SubAnt.xml 22 May 2003 07:27:51 -0000 1.5
@@ -24,7 +24,7 @@
</ul>
</subsection>
</description>
- <section anchor="examples" name="Example">
+ <section anchor="examples" name="Examples">
<pre>
<project name="subant" default="subant1">
<property name="build.dir" value="subant.build"/>