First some background. I inherited a project where the build file was already written for me, so I'm looking for an easier way than to re-write the whole build.xml file. I'm running into an issue with ANT and specifying relative paths but the relative path should be relative to the project folder, not where my build.xml file is. I know this isn't how ANT works, build.xml's basedir is by default where the build.xml file is. The structure of the project is more or less as follows.
SampleProject
src
bld
build.xml
lib
log4j.jar
dist
SampleProject.jar
lib(with all the project folder lib contents)
So here's my issue. In my build file, I specify the lib folder as ../lib/*.jar and use that as my class path however, that relative path gets translated into the MANIFEST.MF of the jar file so my jar file is looking for ../lib as well. Is there a way, other than moving the location of the build file, to tell SampleProject.jar that its lib folder is in the same directory?
Note: One work around I found was to place the lib folder in the bld folder, and then make the build file look for ./lib but I don't want to have to copy the lib folder every time I change it. I want it to stay where it is. Any ideas would be helpful, thanks!