-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: HELP! "ant junitreport" fails
PostPosted: Tue Mar 02, 2004 6:30 pm 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
I have ANT 1.6.1 installed with Hibernate 2.1. "ant junitreport" returns the following message. Does anyone have any ideas?


---- beginning of transaction ----
Buildfile: build.xml
[taskdef] Could not load definitions from resource clovertasks. It could not b
e found.

splash:

cleantestdb:

init:
[echo] Build Hibernate-2.1 (2004-03-02 05:30:10)

compile:

compiletest:

junit:

BUILD FAILED
C:\Program Files\hibernate-2.1\build.xml:406: Could not create task or type of t
ype: 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 <taskdef>.

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.

Total time: 2 seconds
---- end of transaction ----

Gili


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 5:40 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try putting the junit.jar into the lib directory of your ant install. Or try to run with "build.bat junitreport" on windows.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 9:13 am 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
michael wrote:
Try putting the junit.jar into the lib directory of your ant install. Or try to run with "build.bat junitreport" on windows.


Hi Michael,

Are you saying Hibernate isn't ANT 1.6.1 compatible? It already ships with ant-junit.jar in its lib directory. Isn't this enough?

Thanks,
Gili


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 9:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well according to your message ant can't find the junit task. Don't know what you are doing there, perhaps you don't have ANT_HOME defined or something?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 12:38 pm 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
michael wrote:
Well according to your message ant can't find the junit task. Don't know what you are doing there, perhaps you don't have ANT_HOME defined or something?


ANT_HOME is properly defined. Are you actually using ANT 1.6.1 on your end?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 3:40 pm 
Newbie

Joined: Tue May 18, 2004 11:57 am
Posts: 7
Location: Mountain View, CA
Hmm, was there a resolution to this?

I'm using:
Hibernate 2.1.3
RedHat WS 3
ant 1.5.2-20

I tried ant 1.6.1 as well, but get the same problem with that ant.

There is a junit.jar file in hibernate's lib directory. I've been able to build other things (e.g., the hibernate system and the auction demo). But not (so far) the junit tests.

Thanks for any help,

-- Sherry.

========== ant output ============
$ ant junit
Buildfile: build.xml
[taskdef] Could not load definitions from resource clovertasks. It could not be found.

cleantestdb:

init:
[echo] Build Hibernate-2.1 (2004-05-19 12:32:43)

compile:

compiletest:

junit:

BUILD FAILED
/opt/hibernate_distribs/hibernate-2.1/build.xml:343: Could not create task or type of type: junit.

Ant could not find the task or a class this task relies upon.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 3:57 pm 
Newbie

Joined: Tue May 18, 2004 11:57 am
Posts: 7
Location: Mountain View, CA
Okay, to answer my own question again... It seems that copying junit.jar into $ANT_HOME/lib does the trick. There is an ant-junit.jar already there, but it's quite different.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


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

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.