Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem using Junit with Ant
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
f_stefansen
n00b
n00b


Joined: 09 Jan 2003
Posts: 2

PostPosted: Thu Jan 09, 2003 2:53 pm    Post subject: Problem using Junit with Ant Reply with quote

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
View user's profile Send private message
jamieo
n00b
n00b


Joined: 13 Jul 2002
Posts: 38
Location: Reading, UK

PostPosted: Sat Jan 11, 2003 4:29 pm    Post subject: Reply with quote

I've got the same problem as this, did you find a solution?

Cheers,
Jamie
Back to top
View user's profile Send private message
jamieo
n00b
n00b


Joined: 13 Jul 2002
Posts: 38
Location: Reading, UK

PostPosted: Sat Jan 11, 2003 4:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
f_stefansen
n00b
n00b


Joined: 09 Jan 2003
Posts: 2

PostPosted: Sun Jan 12, 2003 9:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
jamieo
n00b
n00b


Joined: 13 Jul 2002
Posts: 38
Location: Reading, UK

PostPosted: Mon Jan 13, 2003 7:56 am    Post subject: Reply with quote

Yes this worked for me too :)

Thanks,
Jamie
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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