This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 11160 - build.xml [82] Could not create task of type: junit. Common solutions are to use taskdef to declare your task, or, if this is an optional task, to put the optional.jar in the lib directory of your ant installation (ANT_HOME).
Summary: build.xml [82] Could not create task of type: junit. Common solutions are to ...
Status: CLOSED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@projects
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-04-06 22:36 UTC by RefuX
Modified: 2003-06-30 14:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RefuX 2001-04-06 22:36:25 UTC
Build 21

The error:
build.xml [82] Could not create task of type: junit. Common solutions are to use taskdef to declare your task, or, if this is an optional task, to put the optional.jar in the lib directory of your ant installation (ANT_HOME).

HOW:
This happens if I try to run an ant script target that contains a JUNIT test.
I looked under Tools->Options->ANT Settings
There under properties the netbeans.library.path contains modules\\ext\\ant-optional.jar
This jar file does contain JUNIT classes.

Wazzup with it? I dunno!
Comment 1 Jesse Glick 2001-04-09 11:37:03 UTC
ant-optional.jar *does* contain the definition for the JUnit task. However the
junit.jar itself is not there. If you wish to use optional tasks like JUnit, you
must place the extension JAR (e.g. junit.jar) into the IDE's lib/ext/ directory
and restart. Then it ought to work. The documentation for the Ant integration
does mention this, I believe, though possibly not clearly enough.
Comment 2 Milan Kubec 2001-06-29 11:34:34 UTC
Verified.
Comment 3 Quality Engineering 2003-06-30 14:47:27 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.