title: Ant in Eclipse Luna seems not to work... why?
body: <p>I'm using Eclipse Luna for the first time and trying to run an Ant script (for javacc). However, there are some strange things happening:
  * The "generate" part of the script is run twice when I start the script,
  * The script contains "eclipse.refreshLocal ..." but I get an error message "Problem: failed to create task or type eclipse.refreshLocal".
  The script is the following:</p>
  
  <pre><code>&lt;project name="javacc"&gt;
    &lt;target name="generate"&gt;
      &lt;javacc target="src/grammar.jj"
        outputdirectory="src/of/project"
        javacchome="c:/Programme/JavaCC/bin/lib"
      /&gt;
    &lt;/target&gt;
    &lt;target name="refresh" depends="generate"&gt;
      &lt;eclipse.refreshLocal
        resource="D:/src/of/project" depth="infinite"/&gt;
    &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I have tried to find out if there is something wrong about the Ant integration but apparently I didn't see the reason. At least, the "plugins" folder of Eclipse contains "org.apache.ant...", and I did cross "Always run new Ant configurations in the same JRE...". Right clicking on the script shows the context menu containing "Run As..." and then "Ant Script", and if I hit that item, it starts running... but with the above errors. 
  Does anyone see what's going wrong?</p>