Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does eclipse look in the 'workspace' directory for sources instead of those in the ant script?
    text
    copied!<p>I have an ant script with the following header:</p> <p><code>&lt;project name="Simple ActiveJDBC Example" default="clean" basedir="."&gt;</code></p> <p>And then somewhere below:</p> <pre><code>&lt;target name="compile" depends="clean"&gt; &lt;javac srcdir="src" destdir="${classes}" debug="on" optimize="off" deprecation="off" includeantruntime="false"&gt; &lt;classpath refid="compile_classpath"/&gt; &lt;/javac&gt; &lt;/target&gt; </code></pre> <p>Eclipse it seems searches for the <code>src</code> directory in the 'wrong' location! Since this script works perfectly fine when running the ant build from the command prompt. I am no ant expert but this thing is just driving me nuts :) Any ideas? Here's the error that I get for the above code where <code>src</code> is specified:</p> <pre><code>C:\Users\Nupul\Documents\MyProject\ActiveJDBC\ant-example\build.xml:50: srcdir "C:\Users\Nupul\workspace\Simple ActiveJDBC Example\src" does not exist! </code></pre> <p>As you can see the build.xml file is located in the upper path but eclipse seems to somehow search in the workspace directory and that too with the <code>project name</code> in the xml file and NOT in the directory where it's located!! I have absolutely no idea how to override this behavior. </p> <p>All paths are correctly handled in the xml (as observed if you hover over the <code>&lt;pathelement&gt;</code> elements). However, I have no idea why this works from the command prompt but fails in eclipse.</p> <p>The Ant Builder options for eclipse is configured to 'run in the same JRE as the workspace' but not sure if that's the culprit.</p> <p>Even if I change the it to <code>src = ${basedir}/src</code> I get the same error for files referred in the 'other' path element tags!</p> <p>Any ideas?</p> <p>PS: I'm trying to compile the simple-ant example for the ActiveJDBC project - but via eclipse :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload