From 12509319df17c386ff5c333c08904d7d2680cfe9 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Thu, 14 Dec 2000 14:54:36 +0000
Subject: [PATCH] Make documentation of '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
---
docs/index.html | 11 ++++++-----
src/main/org/apache/tools/ant/ProjectHelper.java | 6 ++++++
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/docs/index.html b/docs/index.html
index cebf64d8d..7a5b88e3f 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -261,8 +261,8 @@ to be unique.
name |
- the name of the target. |
- Yes |
+ the name of the project. |
+ No |
default |
@@ -273,9 +273,10 @@ to be unique.
basedir |
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. |
- Yes |
+ 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.
+ No |
Each project defines one or more targets. A target is a set of tasks you want
diff --git a/src/main/org/apache/tools/ant/ProjectHelper.java b/src/main/org/apache/tools/ant/ProjectHelper.java
index 13f04939e..5194fd124 100644
--- a/src/main/org/apache/tools/ant/ProjectHelper.java
+++ b/src/main/org/apache/tools/ant/ProjectHelper.java
@@ -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) {