This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm posting this reply because this topic was the top hit in my Google search. I have found what may be a better solution.
The problem seems to be that the refid at line 14 in your original example references a definition (at line 05) that is nested inside another target (the run target).
It seems reasonable that Ant won't look for the definition in that scope.
My solution was to move the definition to the project scope (as a peer of the path definition that does work) and replace the original definition with a reference:
I hope this may help someone else who runs into the same issue.