I never found a really clean way to do this, but one “hacky” way to do this is to manipulate the .classpath file that eclipse uses (this contains the build path).
So .classpath will have stuff in it like this:
<classpathentry kind="lib" path="C:/jboss-4.2.3.GA/client/jboss-system-client.jar"/>
So you could, for example, write some kind of batch version of a script, etc. that would read your ant file dependencies and put them in the eclipse.classpath file (in the correct format, of course).
But personally, I’m never deceived by such things. What I am doing is just putting all the jars that I need in the same directory, and then in my ant file I have a path similar to this:
<path id="all_libs"> <fileset dir="test_reflib"> <include name="**/*.jar"/> </fileset> </path>
test_reflib needs to be defined only where this folder containing all banks is located.
Then on the eclipse side you can simply add “Add banks” and go to the same folder and just select all banks. What's even colder is that when you drop new jars into this folder, just click on the root level in the eclipse project and do "Update", then edit the build path and click add jar again and it will show you the jar that you have not yet been added to the build path (i.e. the new jar that you just put in the folder).
This obviously does not work too well if you share the jars in a central place, but works well for small projects, where you can simply copy all the jars to a central folder for the project.
dcp
source share