This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Junit and ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Junit and ant " Watch "Junit and ant " New topic
Author

Junit and ant

pradeep selvaraj
Ranch Hand

Joined: Nov 29, 2005
Posts: 62
I want to integrate JUnit into my ant. This is my dir structure.

home
-src (all my source files)
-lib (contains junit and other jar files)
-test (all my test files)
-dist (where all the class files are placed by ant)

This is what i had done, but i get a big error saying that it cannot recognise <Junit> tag itself(i think it has something to do with classpath).


I am not sure where i go wrong. Please help.

thanks
serish


[<a href="http://cyvis.sourceforge.net" target="_blank" rel="nofollow">CyVis - Software Complexity Visualiser</a>] [<a href="http://pradeepselvaraj.blogspot.com" target="_blank" rel="nofollow">Pradeep's Blog</a>]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

If 'junit' is not known it sounds like you need to downloas and install (ie drop in the ant/lib dir) the optional junit tasks. I'm not exactly sure, but it should be included in the downloads from www.junit.org

Dave
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Junit and ant