bodewig 00/12/14 06:54:39
Modified: docs index.html
src/main/org/apache/tools/ant ProjectHelper.java
Log:
Make documentation of <project>'s attributes reflect reality (and vice
versa).
Revision Changes Path
1.174 +7 -6 jakarta-ant/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/index.html,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -r1.173 -r1.174
--- index.html 2000/12/14 00:27:37 1.173
+++ index.html 2000/12/14 14:54:23 1.174
@@ -29,7 +29,7 @@
</ul>
<p>Version: @VERSION@</p>
-<p>$Id: index.html,v 1.173 2000/12/14 00:27:37 donaldp Exp $</p>
+<p>$Id: index.html,v 1.174 2000/12/14 14:54:23 bodewig Exp $</p>
<hr>
<h2>Table of Contents</h2>
@@ -261,8 +261,8 @@
</tr>
<tr>
<td valign="top">name</td>
- <td valign="top">the name of the target.</td>
- <td align="center" valign="top">Yes</td>
+ <td valign="top">the name of the project.</td>
+ <td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">default</td>
@@ -273,9 +273,10 @@
<td valign="top">basedir</td>
<td valign="top">the base directory from which all path calculations are
done. This attribute might be overridden by setting the
"basedir"
- property on forehand. When this is done, it might be omitted in the
- project tag.</td>
- <td align="center" valign="top">Yes</td>
+ property on forehand. When this is done, it must be omitted in the
+ project tag. If neither the attribute not the property have
+ been set, the parent directory of the build file will be used.</td>
+ <td align="center" valign="top">No</td>
</tr>
</table>
<p>Each project defines one or more targets. A target is a set of tasks you
want
1.42 +6 -0
jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
Index: ProjectHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- ProjectHelper.java 2000/12/06 14:12:25 1.41
+++ ProjectHelper.java 2000/12/14 14:54:36 1.42
@@ -257,6 +257,12 @@
}
}
+ if (def == null) {
+ throw new SAXParseException("The default attribute of
project is required",
+ locator);
+ }
+
+
project.setDefaultTarget(def);
if (name != null) {