ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Henriksson <d95...@dtek.chalmers.se>
Subject Yet another missing junit task...
Date Wed, 04 Apr 2001 14:18:20 GMT
I have yet another version of the infamous "Could not create task
of type: junit" problem. 

So far the story goes:
  1. I'm using Sun JDK1.3.0_02, Ant 1.3 [1], and JUnit 3.5 [2],
     running on Debian Linux.
  2. I have both optional.jar and junit.jar in the class path,
     and have verified this with "ant -debug".
     (They are in $ANT_HOME/lib)
  3. I have verified that optional.jar contains the JUnit classes.
  4. I have checked the default.properties in ant.jar, and it
     contains a row for junit. The corresponding class exists in
     optional.jar.

Note in the debug output below that ant doesn't seem to find the
junit task. (junitreport, however, is found.) Thus, the target
unit.server does not get any tasks.

Tha last message from [null] makes me wonder if the binary release
is misconfigured, but the default.properties seems ok. Besides, there's
no bin/bootstrap for me to run.

What is it that I have missed?

Regards,
  Anders


[1] Binary release including optional.jar from
http://jakarta.apache.org/builds/jakarta-ant/release/v1.3/bin/jakarta-ant-1.3-bin.tar.gz
http://jakarta.apache.org/builds/jakarta-ant/release/v1.3/bin/jakarta-ant-1.3-optional.jar
[2] Binary release from
http://download.sourceforge.net/junit/junit3.5.zip


The relevant target definition:
-----
  <target name="unit.server"> <!-- depends="build.server" -->
    <junit>
      <classpath>
	<pathelement refid="coresrc.class.path.server"/>
      </classpath>
      <formatter type="plain"/>
      <batchtest todir="tests">
	<fileset dir="src">
	  <include name="**/Test*.java"/>
	  <exclude name="**/client/**"/>
	</fileset>
      </batchtest>
    </junit>
  </target>


Build debug output:
-----
Ant version 1.3 compiled on March 2 2001

Buildfile: corebuild.xml
Setting project property: ant.java.version -> 1.3
Detected Java Version: 1.3
Detected OS: Linux
 +User task: tar     org.apache.tools.ant.taskdefs.Tar
 +User task: fail     org.apache.tools.ant.taskdefs.Exit
 +User task: uptodate     org.apache.tools.ant.taskdefs.UpToDate
 +User task: java     org.apache.tools.ant.taskdefs.Java
 +User task: execon     org.apache.tools.ant.taskdefs.ExecuteOn
 +User task: echo     org.apache.tools.ant.taskdefs.Echo
 +User task: native2ascii
org.apache.tools.ant.taskdefs.optional.Native2Ascii
 +User task: jjtree
org.apache.tools.ant.taskdefs.optional.javacc.JJTree
 +User task: compileTask     org.apache.tools.ant.taskdefs.CompileTask
 +User task: chmod     org.apache.tools.ant.taskdefs.Chmod
 +User task: javadoc2     org.apache.tools.ant.taskdefs.Javadoc
 +User task: deltree     org.apache.tools.ant.taskdefs.Deltree
 +User task: cvs     org.apache.tools.ant.taskdefs.Cvs
 +User task: jlink
org.apache.tools.ant.taskdefs.optional.jlink.JlinkTask
 +User task: tstamp     org.apache.tools.ant.taskdefs.Tstamp
 +User task: unjar     org.apache.tools.ant.taskdefs.Expand
 +User task: patch     org.apache.tools.ant.taskdefs.Patch
 +User task: sound
org.apache.tools.ant.taskdefs.optional.sound.SoundTask
 +User task: cccheckout
org.apache.tools.ant.taskdefs.optional.clearcase.CCCheckout
 +User task: mail     org.apache.tools.ant.taskdefs.SendEmail
 +User task: gzip     org.apache.tools.ant.taskdefs.GZip
 +User task: p4label
org.apache.tools.ant.taskdefs.optional.perforce.P4Label
 +User task: wlrun     org.apache.tools.ant.taskdefs.optional.ejb.WLRun
 +User task: copy     org.apache.tools.ant.taskdefs.Copy
 +User task: filter     org.apache.tools.ant.taskdefs.Filter
 +User task: jar     org.apache.tools.ant.taskdefs.Jar
 +User task: unzip     org.apache.tools.ant.taskdefs.Expand
 +User task: rename     org.apache.tools.ant.taskdefs.Rename
 +User task: propertyfile
org.apache.tools.ant.taskdefs.optional.PropertyFile
 +User task: copyfile     org.apache.tools.ant.taskdefs.Copyfile
 +User task: p4submit
org.apache.tools.ant.taskdefs.optional.perforce.P4Submit
 +User task: gunzip     org.apache.tools.ant.taskdefs.GUnzip
 +User task: antcall     org.apache.tools.ant.taskdefs.CallTarget
 +User task: taskdef     org.apache.tools.ant.taskdefs.Taskdef
 +User task: mkdir     org.apache.tools.ant.taskdefs.Mkdir
 +User task: sql     org.apache.tools.ant.taskdefs.SQLExec
 +User task: replace     org.apache.tools.ant.taskdefs.Replace
 +User task: ant     org.apache.tools.ant.taskdefs.Ant
 +User task: style     org.apache.tools.ant.taskdefs.XSLTProcess
 +User task: p4sync
org.apache.tools.ant.taskdefs.optional.perforce.P4Sync
 +User task: fixcrlf     org.apache.tools.ant.taskdefs.FixCRLF
 +User task: vssget
org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET
 +User task: genkey     org.apache.tools.ant.taskdefs.GenerateKey
 +User task: p4edit
org.apache.tools.ant.taskdefs.optional.perforce.P4Edit
 +User task: zip     org.apache.tools.ant.taskdefs.Zip
 +User task: antstructure     org.apache.tools.ant.taskdefs.AntStructure
 +User task: javah     org.apache.tools.ant.taskdefs.optional.Javah
 +User task: javac     org.apache.tools.ant.taskdefs.Javac
 +User task: test     org.apache.tools.ant.taskdefs.optional.Test
 +User task: cab     org.apache.tools.ant.taskdefs.optional.Cab
 +User task: mparse
org.apache.tools.ant.taskdefs.optional.metamata.MParse
 +User task: ccuncheckout
org.apache.tools.ant.taskdefs.optional.clearcase.CCUnCheckout
 +User task: ejbjar     org.apache.tools.ant.taskdefs.optional.ejb.EjbJar
 +User task: available     org.apache.tools.ant.taskdefs.Available
 +User task: p4have
org.apache.tools.ant.taskdefs.optional.perforce.P4Have
 +User task: vsslabel
org.apache.tools.ant.taskdefs.optional.vss.MSVSSLABEL
 +User task: wljspc     org.apache.tools.ant.taskdefs.optional.jsp.WLJspc
 +User task: move     org.apache.tools.ant.taskdefs.Move
 +User task: junitreport
org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator
 +User task: csc     org.apache.tools.ant.taskdefs.optional.dotnet.CSharp
 +User task: p4change
org.apache.tools.ant.taskdefs.optional.perforce.P4Change
 +User task: signjar     org.apache.tools.ant.taskdefs.SignJar
 +User task: javacc
org.apache.tools.ant.taskdefs.optional.javacc.JavaCC
 +User task: cccheckin
org.apache.tools.ant.taskdefs.optional.clearcase.CCCheckin
 +User task: property     org.apache.tools.ant.taskdefs.Property
 +User task: unwar     org.apache.tools.ant.taskdefs.Expand
 +User task: touch     org.apache.tools.ant.taskdefs.Touch
 +User task: ilasm     org.apache.tools.ant.taskdefs.optional.dotnet.Ilasm
 +User task: get     org.apache.tools.ant.taskdefs.Get
 +User task: stylebook
org.apache.tools.ant.taskdefs.optional.StyleBook
 +User task: javadoc     org.apache.tools.ant.taskdefs.Javadoc
 +User task: netrexxc     org.apache.tools.ant.taskdefs.optional.NetRexxC
 +User task: antlr     org.apache.tools.ant.taskdefs.optional.ANTLR
 +User task: untar     org.apache.tools.ant.taskdefs.Untar
 +User task: delete     org.apache.tools.ant.taskdefs.Delete
 +User task: ejbc     org.apache.tools.ant.taskdefs.optional.ejb.Ejbc
 +User task: ddcreator
org.apache.tools.ant.taskdefs.optional.ejb.DDCreator
 +User task: copydir     org.apache.tools.ant.taskdefs.Copydir
 +User task: war     org.apache.tools.ant.taskdefs.War
 +User task: ccupdate
org.apache.tools.ant.taskdefs.optional.clearcase.CCUpdate
 +User task: depend
org.apache.tools.ant.taskdefs.optional.depend.Depend
 +User task: renameext
org.apache.tools.ant.taskdefs.optional.RenameExtensions
 +User task: exec     org.apache.tools.ant.taskdefs.ExecTask
 +User task: apply     org.apache.tools.ant.taskdefs.Transform
 +User task: wlstop     org.apache.tools.ant.taskdefs.optional.ejb.WLStop
 +User task: rmic     org.apache.tools.ant.taskdefs.Rmic
 +User datatype: fileset     org.apache.tools.ant.types.FileSet
 +User datatype: patternset     org.apache.tools.ant.types.PatternSet
 +User datatype: path     org.apache.tools.ant.types.Path
 +User datatype: mapper     org.apache.tools.ant.types.Mapper
Setting project property: java.runtime.name -> Java(TM) 2 Runtime
Environment, Standard Edition
Setting project property: sun.boot.library.path ->
/usr/local/jdk1.3.0_02/jre/lib/i386
Setting project property: java.vm.version -> 1.3.0_02
Setting project property: java.vm.vendor -> Sun Microsystems Inc.
Setting project property: java.vendor.url -> http://java.sun.com/
Setting project property: path.separator -> :
Setting project property: java.vm.name -> Java HotSpot(TM) Client VM
Setting project property: file.encoding.pkg -> sun.io
Setting project property: java.vm.specification.name -> Java Virtual
Machine Specification
Setting project property: user.dir -> /home/ah/work/main/corebuild
Setting project property: java.runtime.version -> 1.3.0_02
Setting project property: java.awt.graphicsenv ->
sun.awt.X11GraphicsEnvironment
Setting project property: os.arch -> i386
Setting project property: java.io.tmpdir -> /tmp
Setting project property: line.separator -> 

Setting project property: java.vm.specification.vendor -> Sun Microsystems
Inc.
Setting project property: java.awt.fonts -> 
Setting project property: os.name -> Linux
Setting project property: ant.home -> /usr/local/jakarta-ant-1.3
Setting project property: java.library.path -> 
/usr/local/jdk1.3.0_02/jre/lib/i386:/usr/local/jdk1.3.0_02/jre
/lib/i386/native_threads/:/usr/local/jdk1.3.0_02/jre/lib/i386/client:/usr/local/jdk1.3.0_02/jre/../lib/i386
Setting project property: java.specification.name -> Java Platform API
Specification
Setting project property: java.class.version -> 47.0
Setting project property: os.version -> 2.4.2-rfs
Setting project property: user.home -> /home/ah
Setting project property: user.timezone -> 
Setting project property: java.awt.printerjob ->
sun.awt.motif.PSPrinterJob
Setting project property: file.encoding -> ISO-8859-1
Setting project property: java.specification.version -> 1.3
Setting project property: java.class.path ->
/usr/local/jakarta-ant-1.3/lib/ant.jar:/usr/local/jakarta-ant-1.
3/lib/jaxp.jar:/usr/local/jakarta-ant-1.3/lib/junit.jar:/usr/local/jakarta-ant-1.3/lib/optional.jar:/usr/loca
l/jakarta-ant-1.3/lib/parser.jar:/usr/local/jdk1.3.0_02/lib/tools.jar:/usr/local/junit3.5/junit.jar
Setting project property: user.name -> ah
Setting project property: java.vm.specification.version -> 1.0
Setting project property: java.home -> /usr/local/jdk1.3.0_02/jre
Setting project property: user.language -> en
Setting project property: java.specification.vendor -> Sun Microsystems
Inc.
Setting project property: java.vm.info -> mixed mode
Setting project property: java.version -> 1.3.0_02
Setting project property: java.ext.dirs ->
/usr/local/jdk1.3.0_02/jre/lib/ext
Setting project property: sun.boot.class.path ->
/usr/local/jdk1.3.0_02/jre/lib/rt.jar:/usr/local/jdk1.3.0_02
/jre/lib/i18n.jar:/usr/local/jdk1.3.0_02/jre/lib/sunrsasign.jar:/usr/local/jdk1.3.0_02/jre/classes
Setting project property: java.vendor -> Sun Microsystems Inc.
Setting project property: file.separator -> /
Setting project property: java.vendor.url.bug ->
http://java.sun.com/cgi-bin/bugreport.cgi
Setting project property: sun.io.unicode.encoding -> UnicodeLittle
Setting project property: sun.cpu.endian -> little
Setting project property: jikes.class.path -> /usr/local/bin
Setting project property: user.region -> US
Setting project property: sun.cpu.isalist -> 
Setting ro project property: ant.file ->
/home/ah/work/main/corebuild/corebuild.xml
parsing buildfile /home/ah/work/main/corebuild/corebuild.xml with URI =
file:/home/ah/work/main/corebuild/cor
ebuild.xml
Setting ro project property: ant.project.name -> coresrc
Setting project property: basedir -> /home/ah/work/main
Project base dir set to: /home/ah/work/main
   +Task: property
Setting project property: build.compiler -> jikes
   +Task: property
Setting project property: servlet.path ->
/usr/local/jakarta-tomcat-3.2.1/lib/servlet.jar
   +Task: property
Setting project property: junit.path -> /usr/local/junit3.5/junit.jar
   +DataType: path
   +DataType: path
 +Target: clean
   +Task: delete
 +Target: build
 +Target: build.server
   +Task: javac
 +Target: build.client
   +Task: javac
 +Target: unit_test
 +Target: unit.server
 +Target: unit.client
 +Target: perf_test
 +Target: deploy
 +Target: deploy.server
   +Task: jar
   +Task: war
 +Target: deploy.client
   +Task: jar
 +Target: javadoc
   +Task: javadoc
 +Target: all
 +Target: init
   +Task: mkdir
   +Task: mkdir
   +Task: mkdir
   +Task: mkdir
   +Task: mkdir
 +Target: clean_all
   +Task: delete
   +Task: delete
   +Task: delete
   +Task: delete
   +Task: delete
Build sequence for target `unit.server' is [unit.server]
Complete build sequence is [unit.server, build.client, deploy.client,
build.server, deploy.server, deploy, un
it.client, clean_all, javadoc, clean, unit_test, build, all, perf_test,
init]

unit.server:
     [null] Could not create task of type: junit Common solutions are
adding the task to defaults.properties and executing bin/bootstrap


BUILD FAILED

/home/ah/work/main/corebuild/corebuild.xml:72: 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).


Mime
View raw message