Configure Ant to include libraries

I downloaded a simple Java application using Spring, which
works in Eclipse if I manually add the needed jar libraries. However, I would rather use the existing build.xml, which includes the libraries via

<fileset dir=...>

and

<include...>

nodes.
If I rightclick the build.xml and click on Run As->Ant Build, the project compiles, too. Nevertheless, when I view the Java files in Eclipse, there are still errors marked, e.g. "The import org.springframework cannot be resolved", so maybe the automatic compilation doesn't work.
If I run ant in the terminal in the project directory the project runs, too.

Hm, I tried it in Netbeans, but although the project now compiles without further settings, you still have to add the JARs in the project properties, . There it's stated: "This classpath is used by the IDE features like code completion and refactoring while editing the Java sources. These settings do not modify the build script." So I don't think Netbeans has a real advantage in this respect or am I missing something?

Ah, if you are using a Free-form Project then yeah, you'll have to specify them in both places separately. I guess it's only Standard Projects that synchronize some of that for you. Sorry for the misdirect.