|
From: Trevor H. <tr...@vo...> - 2004-09-26 20:00:31
|
Hi all, For some time now, I've been getting "Unexpected element 'import'" errors in my Ant build files. They would pop up in the ErrorList all the time, which got pretty annoying. After all, <import> is a perfectly valid tag ever since Ant 1.6. I knew the problem, then, was that jEdit (or rather, a jEdit plugin) was parsing my build files based on an old version of Ant, because only the new Ant 1.6 elements were being flagged. I figured that there must have been an old version of Ant 1.5 floating around in my system somewhere. And yet, after checking that my only copy of Ant was 1.6.2, I was still getting the errors. Eventually, I discovered the problem: When the AntFarm plugin is installed, it downloads its own copy of ant.jar from Ant 1.5.4 and places it into jEdit's plugin directory. AntFarm then uses this older jar no matter what you have installed elsewhere on your system. The quick-and-dirty fix is to replace ant.jar with a new one from Ant 1.6. Actually, it's not quite that simple because AntFarm also tries to load the old ant-optional.jar from Ant 1.5. To fix that, you have to extract AntFarm.props from the AntFarm.jar, remove the ant-optional.jar reference from the plugin.antfarm.AntFarmPlugin.jars line, and put AntFarm.props back into the jar. Anyway, I hadn't seen any discussion of this problem before, so I figured I should post the workaround in case somebody else runs into it. Trevor |