Sunday, May 16, 2010

Maybe an Eclipse Bug - using a different version of Ant than the default

I decided to run 1.8.1 version of Ant outside of Eclipse and moved all the jars from lib/optional to lib as in my last post. I changed the version of Ant referenced by Eclipse but I still had Problems appearing Eclipse with replace-test.xml, replace-tokens-test.xml and propertyhelper-test.xml.

This was driving me crazy.

Running "ant test" from the command-line worked fine.

On a hunch, I tried running the test task in build.xml in Eclipse anyway. What do you know? It worked fine. I'm still seeing these errors, but it does not appear to harm anything.

My default version of Ant on my system is 1.6.5, but I think I need features only available in later releases to run these tests. I believe that Eclipse may simply have a problem starting up with one version of Ant, but being told to use a different one inside the application. Perhaps I could find a start-up switch for Eclipse to indicate a different version of Ant than the default.

Severity and Description Path Resource Location Creation Time Id
Default target antunit does not exist in this project ant-core/src/tests/antunit/filters replacetokens-test.xml line 18 1274075735070 137405
Default target antunit does not exist in this project ant-core/src/tests/antunit/taskdefs propertyhelper-test.xml line 18 1274075518365 137397
Default target antunit does not exist in this project ant-core/src/tests/antunit/taskdefs replace-test.xml line 18 1274073866514 135951
Target antunit-base.tearDown does not exist in this project ant-core/src/tests/antunit/filters replacetokens-test.xml line 23 1274075735070 137406
Target antunit-base.tearDown does not exist in this project ant-core/src/tests/antunit/taskdefs replace-test.xml line 23 1274073866514 135952
Target ph.defineHelpers does not exist in this project ant-core/src/tests/antunit/filters replacetokens-test.xml line 34 1274075735070 137407
Target ph.defineHelpers does not exist in this project ant-core/src/tests/antunit/taskdefs replace-test.xml line 91 1274073866514 135953

No comments:

Post a Comment