Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 36595 invoked from network); 14 Jun 2002 15:49:42 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 14 Jun 2002 15:49:42 -0000 Received: (qmail 4192 invoked by uid 97); 14 Jun 2002 15:49:37 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 4173 invoked by uid 97); 14 Jun 2002 15:49:36 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 4157 invoked by uid 98); 14 Jun 2002 15:49:36 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <00a801c213bb$15c50240$0202a8c0@nevis> From: "Steve Loughran" To: "Ant Users List" References: <5.1.0.14.0.20020614160227.009f4db0@nera.dbk.laus.hr> Subject: Re: junit task not working Date: Fri, 14 Jun 2002 08:49:35 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Domagoj Jugovic" To: Sent: Friday, June 14, 2002 07:03 Subject: junit task not working > > I am running ant (1.4 and 1.5b2) on win98 , the build did'n work on 1.4 so > I reached out for 1.5 and it's not working either. > > I have a target called "junit" : > .................... > > on that target I get printout like : > .................. > junit: > BUILD FAILED > C:\java\ojb9\build.xml:407: Could not create task or type of type: junit. > Ant could not find the task or a class this task relies upon. > This is common and has a number of causes; the usual > solutions are to read the manual pages then download and > install needed JAR files, or fix the build file: > - You have misspelt 'junit'. > Fix: check your spelling. > - The task needs an external JAR file to execute > and this is not found at the right place in the classpath. > Fix: check the documentation for dependencies. > Fix: declare the task. > - The task is an Ant optional task and optional.jar is absent > Fix: look for optional.jar in ANT_HOME/lib, download if needed > - The task was not built into optional.jar as dependent > libraries were not found at build time. > Fix: look in the JAR to verify, then rebuild with the needed > libraries, or download a release version from apache.org > - The build file was written for a later version of Ant > Fix: upgrade to at least the latest release version of Ant > - The task is not an Ant core or optional task > and needs to be declared using . We put that message in to reduce confusion; seems ok to me > So I tried to fix things by manualy defining taskdef for "junit" task. > At the beginning of the build.xml I added : > classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" > classpathref="runtime-classpath"/> > Then I got this printout (Failing at my taskdef) : > .................. > BUILD FAILED > C:\java\ojb9\build.xml:36: taskdef class > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be found That wont work because of this: - The task is not an Ant core or optional task and needs to be declared using . you cannot redeclare stuff that is already declared; classpath issues:. > .......................... > So it can't find junit/framework/TestListener. OK > But this IS on the classpath ??? How this i possible ? > So I removed taskdef and added this : > (to see does VM sees that classes with the same classpath : " refid="runtime-classpath"/>" ) > ................... > > > fork="no"> > > > > > This was a brave effort, but it aint going to work. > > So the VM can find these classes , but the "junit" task still does'n work > (without or with my try to make new taskdef for it). > SO PLEASE HELP, I AM GOING MAD ! What was wrong with following this advice : > - The task needs an external JAR file to execute > and this is not found at the right place in the classpath. > Fix: check the documentation for dependencies. -- To unsubscribe, e-mail: For additional commands, e-mail: