- This topic has 2 replies, 2 voices, and was last updated 17 years, 8 months ago by Walter Stovall.
-
AuthorPosts
-
Walter StovallMemberIn some cases it is important to me that external resources be referenced by my projects. I have a project with a ThirdParty linked folder that contains several jars our code needs to compile and run. I created this folder by selecting the project and picking new->folder->advanced->link to folder. But when I then export an Ant build script, the build script references the contents of my ThirdParty folder as if it were a real folder rather than reference the linked location. The end result is that my compiles fail to resolve symbols in the jar(s).
Anybody know of a solution to this problem? I don’t want to edit the script because it will be overwritten each time I export it.
Riyad KallaMemberMoving to OT > Soft Dev
I’m not aware of a workaround…the problem is spawned as a result of Eclipse using an Eclipse-only constructed (linked resources) and you trying to make use of them in a completely separate technology stack and VM space (inside the Ant script).
I don’t know that there is an automated way around this.
Walter StovallMemberWell, I think I can see what belongs in the Ant script. When I ask Eclipse to export the script, it already defines properties that identify the location of various resources. For example, I also have a linked source folder, where certain source code is outside of the workspace directory tree. When eclipse generates the script it includes the following reference to that directory.
<property name=”src.link” value=”../../../../../apps/SpatialAge/src”/>
Then when compiling, copying to the bin folder, etc. the script intelligently uses ${src.link} to reference the source files.
The same approach should be used for references to my ThirdParty folder. The script need only define a property like:
<property name=”ThirdParty.location” value=”../../../../../apps/SpatialAge/ThirdParty”/>
and then when it references the jars, include references such as {ThirdParty.location}/servlet.jar.
If the product can correctly handle linked source folders, why not handle regular folders with the same mechanism?
-
AuthorPosts