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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
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: 417
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: 417
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.
Alex Dan Dodu
Greenhorn

Joined: Jun 23, 2012
Posts: 1

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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant build failed: Reference application not found
 
Similar Threads
email junit test result
ANT issues - Unable to create JUnit Reports- Please help
Testing using ANT
Ant Junit integration .
Junit and ant