git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273163 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -30,7 +30,7 @@ to be unique. (For additional information, see the | |||||
| <tr> | <tr> | ||||
| <td valign="top">default</td> | <td valign="top">default</td> | ||||
| <td valign="top">the default target to use when no target is supplied.</td> | <td valign="top">the default target to use when no target is supplied.</td> | ||||
| <td align="center" valign="top">No. No target will be run if omitted.</td> | |||||
| <td align="center" valign="top"><!-- No. No target will be run if omitted.--> Yes.</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td valign="top">basedir</td> | <td valign="top">basedir</td> | ||||
| @@ -1,3 +1,4 @@ | |||||
| <project> | |||||
| <project default="foo"> | |||||
| <echo message="Called" /> | <echo message="Called" /> | ||||
| <target name="foo" /> | |||||
| </project> | </project> | ||||
| @@ -1,3 +1,4 @@ | |||||
| <project basedir="."> | |||||
| <project basedir="." default="foo"> | |||||
| <ant antfile="notarget.xml" /> | <ant antfile="notarget.xml" /> | ||||
| <target name="foo" /> | |||||
| </project> | </project> | ||||
| @@ -1,6 +1,6 @@ | |||||
| <?xml version="1.0"?> | <?xml version="1.0"?> | ||||
| <project name="java-test" basedir="." default=""> | |||||
| <project name="java-test" basedir="." default="foo"> | |||||
| <property name="app" | <property name="app" | ||||
| value="org.apache.tools.ant.taskdefs.JavaTest$$EntryPoint" /> | value="org.apache.tools.ant.taskdefs.JavaTest$$EntryPoint" /> | ||||
| @@ -89,4 +89,5 @@ | |||||
| </java> | </java> | ||||
| </target> | </target> | ||||
| <target name="foo" /> | |||||
| </project> | </project> | ||||
| @@ -454,6 +454,8 @@ public class ProjectHelperImpl extends ProjectHelper { | |||||
| if (def != null && !def.equals("")) { | if (def != null && !def.equals("")) { | ||||
| helperImpl.project.setDefaultTarget(def); | helperImpl.project.setDefaultTarget(def); | ||||
| } else { | |||||
| throw new BuildException("The default attribute is required"); | |||||
| } | } | ||||
| if (name != null) { | if (name != null) { | ||||