dcsimg
Junit and Ant integration in intellij
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Leigh_Singer
Posted On:   Wednesday, November 13, 2002 04:52 AM

I want to run my junit tests from an ant script from within intellij. I have the following target in my build.xml However, despite having junit.jar, ant.jar, and optional.jar all in the lib directory of the IDEA installation, ant fails to recognise the tag and gives the following error: could not create task or type of type: junit I have proved my build file works with ant outside intellij. I have even tried replacing the jar files in the lib directory of my intellij installation with different versions of ant.jar, optional.jar and junit.jar. I am using build   More>>

I want to run my junit tests from an ant script from within intellij.


I have the following target in my build.xml



			



















However, despite having junit.jar, ant.jar, and optional.jar all in the lib directory of the IDEA installation, ant fails to recognise the tag and gives the following error:


could not create task or type of type: junit


I have proved my build file works with ant outside intellij. I have even tried replacing the jar files in the lib directory of my intellij installation with different versions of ant.jar, optional.jar and junit.jar. I am using build 672 of intellij.



Can anyone please advise me as to how I can get my ant script with junit tags to work from within intellij?



Thank you in anticipation!
Leigh :)

   <<Less

Re: Junit and Ant integration in intellij

Posted By:   Kevin_Jones  
Posted On:   Monday, December 2, 2002 02:37 AM

I've just come across the same problem. The way I got it to work was to go to the 'Build File Properties' (right click on the Ant build file in the 'Ant' window and select properties), and under the 'additional classpath tab' select 'Include Project Classpath' (making sure I already had JUnit.jar in my IDEA project classpath)

Re: Junit and Ant integration in intellij

Posted By:   Alex_Kobyakov  
Posted On:   Thursday, November 14, 2002 01:33 AM

I can't say nothing wrong about your xml file. So I can suppose only two possibilities:



1. You're using old Ant version. Try to add following before your target:

2. Use built-in IDEA Junit feature: - 'Run' - 'JUnit tests'


Hope this helps.
About | Sitemap | Contact