2
votes

I have configured Eclipse to use ant for doing the builds by setting the builders in project properties to point to the ant build script. The build goes thru fine. However in my eclipse project I have not imported the required jars as a part of the project settings. All of this is done in ant's build.xml.

So in the java files, I get red squiglly lines for all the import packages which eclipse is not able to resolve.

How do I make these squiglly lines go away? One way is to import the required jars in eclipse, but then I am maintaining the project at two places, ant build.xml and eclipse

2
Can you show us the part of build.xml that does this? - skaffman
<property name="THIRD_PARTY" location="../ThirdParty"/> <path id="Toolkit.classpath"> <fileset dir="${THIRD_PARTY}/jars"> <include name = "*/.jar"/> </fileset> </path> The thirdparty jars are outside of the folder managed by eclipse, this is because the thirdparty jars are shared with other projects. - mihirg

2 Answers

2
votes

go to Project Properties/Build Path and enter the jars you rely on there.

1
votes

You could use Ivy to manage your dependencies. If you configure it properly, you will only be defining the jars in one place but both Eclipse and Ant will be able to see them. The eclipse plug-in is IvyDE.