aspose file tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant build failed: Reference application not found Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Ant build failed: Reference application not found" Watch "Ant build failed: Reference application not found" New topic
Author

Ant build failed: Reference application not found

Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 414
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

Joined: Mar 04, 2009
Posts: 414
I saw an example here: http://www.roseindia.net/tutorials/ant/ant-and-junit.shtml
Then was able to fix this problem.
I created:
Roland Young
Greenhorn

Joined: Feb 07, 2012
Posts: 1

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.
 
 
subject: Ant build failed: Reference application not found
 
Threads others viewed
ANT issues - Unable to create JUnit Reports- Please help
Testing using ANT
Ant Junit integration .
Junit and ant
email junit test result
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture