Browse Source

Make documentation of <project>'s attributes reflect reality (and vice

versa).


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268353 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
12509319df
2 changed files with 12 additions and 5 deletions
  1. +6
    -5
      docs/index.html
  2. +6
    -0
      src/main/org/apache/tools/ant/ProjectHelper.java

+ 6
- 5
docs/index.html View File

@@ -261,8 +261,8 @@ to be unique.</p>
</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 @@ to be unique.</p>
<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 &quot;basedir&quot;
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


+ 6
- 0
src/main/org/apache/tools/ant/ProjectHelper.java View File

@@ -257,6 +257,12 @@ public class ProjectHelper {
}
}

if (def == null) {
throw new SAXParseException("The default attribute of project is required",
locator);
}

project.setDefaultTarget(def);

if (name != null) {


Loading…
Cancel
Save