ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33428] New: - Build fails with "Could not create task or type of type: junit."
Date Mon, 07 Feb 2005 17:11:48 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33428>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33428

           Summary: Build fails with "Could not create task or type of type:
                    junit."
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: mjac@gmx.net


I've tried to not copy junit.jar to $ANT_HOME/lib nor to put it in the 
CLASSPATH. $ANT_HOME/lib contains good ant-junit.jar, build.xml contains all 
necessary (IMHO) classpath entries, however it does not work.

jacykm@leopard:/tmp/antjunit> ant
Buildfile: build.xml

init:
   [delete] Deleting 4 files from /tmp/antjunit/build
   [delete] Deleted 4 directories from /tmp/antjunit/build
    [mkdir] Created dir: /tmp/antjunit/build/src
    [mkdir] Created dir: /tmp/antjunit/build/bin
    [mkdir] Created dir: /tmp/antjunit/build/junit-reports
    [mkdir] Created dir: /tmp/antjunit/build/docs

compile:
     [copy] Copying 2 files to /tmp/antjunit/build/src
    [javac] Compiling 2 source files to /tmp/antjunit/build/bin

junit-tests:

BUILD FAILED
/tmp/antjunit/build.xml:67: 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 the JAR file and/or libraries
     implementing the functionality were not found at the time you
     yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
     task and make sure it contains more than merely a META-INF/MANIFEST.MF.
     If all it contains is the manifest, then rebuild Ant with the needed
     libraries present in ${ant.home}/lib/optional/ , or alternatively,
     download a pre-built 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>.
 - You are attempting to use a task defined using
    <presetdef> or <macrodef> but have spelt wrong or not
   defined it at the point of use

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
jacykm@leopard:/tmp/antjunit>

jacykm@leopard:/tmp/antjunit> ant -version
Apache Ant version 1.7alpha compiled on January 30 2005

jacykm@leopard:/tmp/antjunit>
jacykm@leopard:/tmp/antjunit> ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.7alpha compiled on January 30 2005

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.7
optional tasks : 1.7

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha
ant-antlr.jar (5759 bytes)
ant-apache-bcel.jar (8573 bytes)
ant-apache-bsf.jar (14615 bytes)
ant-apache-log4j.jar (3024 bytes)
ant-apache-oro.jar (47733 bytes)
ant-apache-regexp.jar (3723 bytes)
ant-apache-resolver.jar (4066 bytes)
ant-commons-logging.jar (3861 bytes)
ant-commons-net.jar (34880 bytes)
ant-icontract.jar (450 bytes)
ant-jai.jar (450 bytes)
ant-javamail.jar (6735 bytes)
ant-jdepend.jar (8103 bytes)
ant-jmf.jar (6588 bytes)
ant-jsch.jar (22442 bytes)
ant-junit.jar (74241 bytes)
ant-launcher.jar (9115 bytes)
ant-netrexx.jar (450 bytes)
ant-nodeps.jar (411889 bytes)
ant-starteam.jar (450 bytes)
ant-stylebook.jar (450 bytes)
ant-swing.jar (6686 bytes)
ant-trax.jar (68597 bytes)
ant-vaj.jar (450 bytes)
ant-weblogic.jar (450 bytes)
ant-xalan1.jar (450 bytes)
ant-xslp.jar (450 bytes)
ant.jar (1053872 bytes)
xercesImpl.jar (1010675 bytes)
xml-apis.jar (108484 bytes)

-------------------------------------------
 USER_HOME/.ant/lib jar listing
-------------------------------------------
user.home: /phoebe_home/jacykm
No such directory.

-------------------------------------------
 Tasks availability
-------------------------------------------
image : Not Available
sshexec : Missing dependency com.jcraft.jsch.UserInfo
wlrun : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
vajload : Not Available
stlist : Not Available
libraries : Not Available
netrexxc : Not Available
starteam : Not Available
stylebook : Not Available
stlabel : Not Available
jdepend : Missing dependency jdepend.xmlui.JDepend
junit : Missing dependency junit.framework.Test
stcheckin : Not Available
vajexport : Not Available
stcheckout : Not Available
ejbc : Not Available
vajimport : Not Available
wlstop : Not Available
ddcreator : Not Available

-------------------------------------------
 org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/

-------------------------------------------
 XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location: /phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/
xercesImpl.jar

-------------------------------------------
 System properties
-------------------------------------------
java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path : /phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/i386
java.vm.version : 1.4.2_06-b03
ant.library.dir : /phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib
java.vm.vendor : Sun Microsystems Inc.
java.vendor.url : http://java.sun.com/
path.separator : :
java.vm.name : Java HotSpot(TM) Client VM
file.encoding.pkg : sun.io
user.country : GB
sun.os.patch.level : unknown
java.vm.specification.name : Java Virtual Machine Specification
user.dir : /tmp/antjunit
java.runtime.version : 1.4.2_06-b03
java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment
java.endorsed.dirs : /phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/
endorsed
os.arch : i386
java.io.tmpdir : /tmp
line.separator :

java.vm.specification.vendor : Sun Microsystems Inc.
os.name : Linux
ant.home : /phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha
sun.java2d.fontpath :
java.library.path : /phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/i386/
client:/phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/i386:/phoebe_home/
jacykm/bin/Linux/j2sdk1.4.2_06/jre/../lib/i386:/usr/oracle/8.1.7/lib
java.specification.name : Java Platform API Specification
java.class.version : 48.0
java.util.prefs.PreferencesFactory : java.util.prefs.
FileSystemPreferencesFactory
os.version : 2.4.18-3bigmem
user.home : /phoebe_home/jacykm
user.timezone :
java.awt.printerjob : sun.print.PSPrinterJob
file.encoding : ISO-8859-15
java.specification.version : 1.4
user.name : jacykm
java.class.path : /phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-
launcher.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-antlr.
jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-apache-bcel.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-apache-bsf.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-apache-log4j.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-apache-oro.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-apache-regexp.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-apache-resolver.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-commons-logging.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-commons-net.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-icontract.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-jai.jar:/phoebe_home/
jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-javamail.jar:/phoebe_home/jacykm/
bin/tools/apache-ant-1.7alpha/lib/ant-jdepend.jar:/phoebe_home/jacykm/bin/tools/
apache-ant-1.7alpha/lib/ant-jmf.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.
7alpha/lib/ant-jsch.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/
ant-junit.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-
launcher.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-netrexx.
jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-nodeps.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-starteam.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-stylebook.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-swing.jar:/phoebe_home/
jacykm/bin/tools/apache-ant-1.7alpha/lib/ant-trax.jar:/phoebe_home/jacykm/bin/
tools/apache-ant-1.7alpha/lib/ant-vaj.jar:/phoebe_home/jacykm/bin/tools/apache-
ant-1.7alpha/lib/ant-weblogic.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.
7alpha/lib/ant-xalan1.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/
ant-xslp.jar:/phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/ant.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/xercesImpl.jar:/
phoebe_home/jacykm/bin/tools/apache-ant-1.7alpha/lib/xml-apis.jar:/phoebe_home/
jacykm/bin/Linux/j2sdk1.4.2_06/lib/tools.jar
java.vm.specification.version : 1.0
sun.arch.data.model : 32
java.home : /phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre
java.specification.vendor : Sun Microsystems Inc.
user.language : en
java.vm.info : mixed mode
java.version : 1.4.2_06
java.ext.dirs : /phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/ext
sun.boot.class.path : /phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/rt.
jar:/phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/i18n.jar:/phoebe_home/
jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/sunrsasign.jar:/phoebe_home/jacykm/bin/
Linux/j2sdk1.4.2_06/jre/lib/jsse.jar:/phoebe_home/jacykm/bin/Linux/j2sdk1.4.
2_06/jre/lib/jce.jar:/phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/lib/
charsets.jar:/phoebe_home/jacykm/bin/Linux/j2sdk1.4.2_06/jre/classes
java.vendor : Sun Microsystems Inc.
file.separator : /
java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
sun.cpu.endian : little
sun.io.unicode.encoding : UnicodeLittle
sun.cpu.isalist :

jacykm@leopard:/tmp/antjunit>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message