IDEA and Ant don't know about the junit task

I'm sorry for this FAQ, but none of the answers I've found have helped me.

I have Idea 4.5.4, build 2253 (30 day trial). I'm trying to use ant to run my unit tests, but it isn't working in two ways. First in Idea, when I type "<junit " in my ant file idea colors "junit" red, implying that it doesn't know about that task. It does, however, know about "junitreport" which it colors like all the other recognized tasks.

Second, if I try to run ant it gives the "Could not create task or type of type: junit" error.

The usual response to this problem is to add optional.jar to the ant classpath. I think that with ant 1.6 the optional.jar has been broken up into smaller jars. At any rate, I added all the ant libs, including ant-junit.jar to the ant classpath, but I still get this message.

I must be missing something simple, but don't know what it is.

Thanks,

Michael

I've tried adding all the

2 comments
Comment actions Permalink

Hello Michael,

I'm sorry for this FAQ, but none of the answers I've found have helped
me.


Add IDEA_HOME\lib\junit.jar to the Ant's Additional Classpath.

--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

That did it. Thanks.

Michael

0

Please sign in to leave a comment.