| «« Blogging Might Get You Fired | RSS is doesn't scale? Numbers please. »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
<junit> Ant task doesn't work in Eclipse
Here's another solution to a problem I'm hoping to get Googled: If you're running an Ant
The <junit> Ant task is an optional task and this is the standard Ant error message when Ant cannot find the supporting code for an optional task. Ant includes support for the tasks themselves, but not the internal code that actually does the work. So you need to find a copy of Eclipse already has a copy of JUnit, so in the dialog find your Eclipse plugins directory ( Last updated September 08, 2004 at 08:27 AM EST Comments
Great!! This was just the information I was looking for! » Posted by: Oliver at October 8, 2004 12:50 PMArgh. Been struggling with an 'annoyance' since yesterday. I managed to figure this part out myself (I used an external Ant instead and pointed Eclipse to that). What's royally annoying me now is this: my JUnit test code runs fine when run in Eclipse ("Run as... JUnit"). It also runs fine when ran through the Ant from the command-line. It screws up when Ant is ran from within Eclipse. But just the test suite - the "compile-all" targets run fine either way. I've somewhat narrowed it down to a classpath difference when running Ant one way or the other, but was wondering if you or anyone else reading this has had a similar experience and knows what's going on? » Posted by: Alistair Israel at October 18, 2004 11:26 PMI've had the same problems with the classpath as above but again managed to figure it out. One annoying thing i also found, was that i had to add the junit.jar and the ant-junit.jar to the eclipse preferences for them to get picked up. Adding them to the classpath for the taskdef or junit tasks simply did not work. » Posted by: Sunjay at October 20, 2004 01:12 PMTo quote Austin Powers: "Yeah, baby!" I read the Ant FAQ (see URL), or at least tried to. This particular entry screams for an editor. » Posted by: Jeff Lowery at November 1, 2004 02:10 PMThanks ! This way works ! » Posted by: fx at November 12, 2004 04:01 AMThanks! Real annoying problem! » Posted by: Jonas at November 12, 2004 06:39 AMListen, you just HAVE to add this to the official ant docs! That's such a pain in the ass! I thought I could add junit.jar to the classpath using some tag like <project... classpath="/someshere/junit.jar"/> but I couldn't make it through! Your article was of great help for me! Thanks! That is great !but i have even not know how to use ant ,what a poor man! » Posted by: qingyanLiu at November 18, 2004 09:06 PMTwo months old and this post is still helping people -- saved me just tonight. ;) Thanks ... Thanks mate, your article got me out of a jam. » Posted by: Damian Sutton at January 10, 2005 05:53 PMThanks! This way works ! » Posted by: bulain at January 10, 2005 09:09 PMPraise be to Google and bloggers like you! » Posted by: Wikus Hartzenberg at January 19, 2005 04:39 PMthanks a lot, a lot!!!... you just saved a poor french womanwho was trying to make Eclipse work with this .... » Posted by: Mariani Patricia at January 21, 2005 11:51 AMi will name my first child after you!!!!! thanks! » Posted by: mike sandman at January 31, 2005 11:20 PMI am screaming!Great!! » Posted by: darren at February 17, 2005 08:48 AMbut what's the use of ant-junit.jar in ANT HOME entries as to Gloabal Entires? » Posted by: darren at February 17, 2005 08:54 AMAww yes! problem solved, thanks for the post » Posted by: Fraser at February 21, 2005 07:31 AMI have the same problem, but no solution. I'm using Ant 1.6. ANT_HOME is defined, and I put junit.jar in the ANT_HOME/lib, and the file, ant-junit.jar, is already there. It still doesn't work! What a pain! » Posted by: Jim at February 21, 2005 11:17 AMJim, please read this blog post again. Eclipse ignores ANT_HOME. You need to get junit.jar on the runtime classpath of Ant that Eclipse uses --> the Ant plugin. Don't set ANT_HOME. Don't move junit.jar. Eclipse won't care. Just follow the instructions I have here. :) » Posted by: Ryan at February 21, 2005 11:23 AMSorry, I should've been more specific. I'm running Ant from the command line, not Eclipse. I know, I know...not exactly what this forum is about, but hey, I gotta ask somebody. This is taking too much company time to figure out. » Posted by: Jim at February 21, 2005 11:56 AMOf course, as soon as I ask... It seems our ant-junit.jar doesn't contain any class files. I'm not sure why this is...perhaps an installation flag that builds them with classes or leaves them (nearly) empty. Hopefully posting wasn't a complete waste. Perhaps another Googler with the same problem will stumble upon this. » Posted by: jim at February 21, 2005 12:36 PMJust for reference, the ant-junit.jar file in the version of Ant I use (1.6.2) has 30 class files, 2 XSL files and an MF file for a total of 33 files. » Posted by: Ryan at February 21, 2005 12:40 PMbrilliant. cheers for that! » Posted by: powlow at February 22, 2005 10:50 AMThanks for the help. Ant's documentation, as pointed out earlier, is very unclear. » Posted by: jer at February 22, 2005 04:36 PMBrilliant! Thank you! » Posted by: RJ at February 23, 2005 01:41 PMi've been looking for this all day!! thanx » Posted by: rocksteady at March 4, 2005 07:08 AMThank you!!! Thank you!!! Thank you!!! » Posted by: Mike De Haan at March 10, 2005 02:07 PMThank you ! Works fine ! » Posted by: Danny at March 11, 2005 12:09 PMThanks a lot Sadly, I have the same problem on the ant command line. On our build machine, I have put the junit-3.8.1.jar in the ANT_HOME/lib dir, ANT_HOME is defined, and so forth. But for some reason, ant STILL can not find this!! Is there some reason this may occur at runtime from the command line? I look in the ENV and ANT_HOME, JAVA_HOME, etc are all defined. IS there another file that junit depends on that I am missing? What about junitreport task? You'd think by now since its used so widely this would be defaulted when you get ant. Junit is open-source, so it can be distributed with ant. Not sure why they don't just bundle it directly. Thanks for the great post. Graphics would make it even easier for us "slow" types. » Posted by: SteSkilz at March 30, 2005 03:45 PMChalk up another satisfied customer. Fortunately I've gotten in the habit of Googling first when I come upon a problem, so it took me but moments to fix this. Thanks! Thanks!! Thanks !! Thanks!! » Posted by: Alvin at April 13, 2005 07:03 AMFirst class, Ryan. This is one of those weird goofs that can *really* slow one down. Nice job. » Posted by: El Guapo at April 20, 2005 07:32 PMthanks for the help man! » Posted by: Edans Sandes at April 21, 2005 12:58 PMGah! This was causing me serious grief. Thanks for the good pointer. » Posted by: Evan Prodromou at April 22, 2005 12:20 PMThanks! It solved my problem. » Posted by: Jorge at April 27, 2005 10:51 AMThanks a lot! this solved an issue I have been struggling with for several hours! » Posted by: carlo at April 27, 2005 11:17 AM |