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) {