• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant build failed: Reference application not found

 
Ranch Hand
Posts: 430
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I'm following this tutorial: http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html

The problem I get when integrating with JUnit.


ant works, but ant junit doesn't work.
The test class:

Could you help me? Thank you!
 
Leandro Coutinho
Ranch Hand
Posts: 430
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I saw an example here: http://www.roseindia.net/tutorials/ant/ant-and-junit.shtml
Then was able to fix this problem.
I created:
 
Greenhorn
Posts: 1
Mac OS X Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thank you both Leandro and Roland!
It really did help someone else who ran into the same issue...

 
reply
    Bookmark Topic Watch Topic
  • New Topic