View previous topic :: View next topic |
Author |
Message |
f_stefansen n00b
Joined: 09 Jan 2003 Posts: 2
|
Posted: Thu Jan 09, 2003 2:53 pm Post subject: Problem using Junit with Ant |
|
|
Hi,
I can't get Junit to work with Ant.
I have ant 1.5.1-r2, and Junit 3.7-r1, but Ant doesn't seem to recognize that Junit is installed, so I cannot run any junit tests from inside Ant.
I can compile my Junit tests, but when it comes down to running the actual test, Ant gives this error :
Could not create task or type of type: junit.
I have checked that junit.jar is present in $ANT_HOME/lib,
and if I run this command "ant -diagnostics" it informs me of the following:
------- Ant diagnostics report -------
Apache Ant version 1.5.1 compiled on January 9 2003
-------------------------------------------
Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks : 1.5.1
optional tasks : 1.5.1
-------------------------------------------
ANT_HOME/lib jar listing
-------------------------------------------
ant.jar (720319 bytes)
optional.jar (424794 bytes)
xercesImpl.jar (831473 bytes)
xml-apis.jar (108484 bytes)
junit.jar (117522 bytes)
-------------------------------------------
Tasks availability
-------------------------------------------
p4reopen : Not Available
wlrun : Not Available
p4label : Not Available
p4revert : Not Available
icontract : Not Available
...
junit : Not Available
...
I can see that junit.jar is found in ANT_HOME, and the optional.jar is also found, so as far as I know, it have the required libraries.
I have also tried to add junit.jar to the CLASSPATH variable, but still no luck.
If anybody have some ideas of what I am doing wrong, I would very much appreciate some input
Thanks |
|
Back to top |
|
|
jamieo n00b
Joined: 13 Jul 2002 Posts: 38 Location: Reading, UK
|
Posted: Sat Jan 11, 2003 4:29 pm Post subject: |
|
|
I've got the same problem as this, did you find a solution?
Cheers,
Jamie |
|
Back to top |
|
|
jamieo n00b
Joined: 13 Jul 2002 Posts: 38 Location: Reading, UK
|
Posted: Sat Jan 11, 2003 4:34 pm Post subject: |
|
|
Just to note, in my make.conf I do have 'java' and 'junit' in my USE. I have tried emerge'ing ant again, but still the same |
|
Back to top |
|
|
f_stefansen n00b
Joined: 09 Jan 2003 Posts: 2
|
Posted: Sun Jan 12, 2003 9:30 pm Post subject: |
|
|
I tried to emerge Ant and Junit with the following command, and then it actually works
ACCEPT_KEYWORDS="~x86" emerge ant junit
Yeaahhh!!! |
|
Back to top |
|
|
jamieo n00b
Joined: 13 Jul 2002 Posts: 38 Location: Reading, UK
|
Posted: Mon Jan 13, 2003 7:56 am Post subject: |
|
|
Yes this worked for me too
Thanks,
Jamie |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|