title: Ant build failed with error "SAXParseException: Open quote is expected for attribute"
body: <pre><code>D:\Test&gt;ant -v
  Apache Ant(TM) version 1.8.2 compiled on December 20 2010
  Trying the default build file: build.xml
  Buildfile: D:\Test\build.xml
  Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_22\jre
  Detected OS: Windows XP
  parsing buildfile D:\Test\build.xml with URI = file:/D:/Test/build.xml
  Project base dir set to: D:\Test
  
  BUILD FAILED
  D:\Test\build.xml:6: Open quote is expected for attribute "dir" associated with an  elemen
  t type  "mkdir".
          at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:320)
          at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
          at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
          at org.apache.tools.ant.Main.runBuild(Main.java:793)
          at org.apache.tools.ant.Main.startAnt(Main.java:217)
          at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
          at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
  Caused by: org.xml.sax.SAXParseException: Open quote is expected for attribute "dir" assoc
  iated with an  element type  "mkdir".
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseExcep
  tion(ErrorHandlerWrapper.java:236)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHan
  dlerWrapper.java:215)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorRe
  porter.java:386)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorRe
  porter.java:316)
          at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.
  java:1441)
          at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanne
  r.java:802)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(
  XMLNSDocumentScannerImpl.java:578)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartEleme
  nt(XMLNSDocumentScannerImpl.java:222)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragment
  ContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocu
  ment(XMLDocumentFragmentScannerImpl.java:368)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Config
  uration.java:834)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Config
  uration.java:764)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXP
  arser.java:1242)
          at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:307)
          ... 6 more
  
  Total time: 0 seconds
  
  D:\Test&gt;
  </code></pre>
  
  <p>When I run the ant-v command instead of creating the build I got the above message and everything regarding variables was done correctly. I was unable to correct it and create the build. Can any one rectify the mistake?</p>
  
  <p>build.xml:</p>
  
  <pre><code>&lt;?xml version = "1.0"?&gt;
  &lt;project name="test" default="compile" basedir="."&gt;
      &lt;property name="src" value="."/&gt;
      &lt;property name="build" value="build"/&gt;
      &lt;target name="init"&gt;
          &lt;mkdir dir="${build}"/&gt;
      &lt;/target&gt;
      &lt;target name="compile" depends="init"&gt;
          &lt;javac srcdir="${src}" destdir="${build}"/&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>