ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: test environment variable and if statement
Date Tue, 05 Feb 2002 12:17:46 GMT
I think this is the wrong use of <condition> personally.  Such O/S-specific
paths should not be in a build file, even using conditional logic, IMHO.
This is what property files are for, and I highly recommend adding that kind
of indirection, and therefore more flexible control, over "variables".

I'm likening this to the difference between old school procedural
programming using 'switch' statements to using OO inheritance to accomplish
the same sort of thing.  Perhaps that analogy is a bit extreme, but why use
conditions when Ant's property mechanisms already provide that sort of
"switching" capability?

As for junit.jar - it really should live in ANT_HOME/lib (or system
classpath) since Ant's VM needs it for <junit>.

    Erik


----- Original Message -----
From: "Ray Tayek" <rtayek@mediaone.net>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Tuesday, February 05, 2002 3:40 AM
Subject: Re: test environment variable and if statement


> At 10:56 PM 2/4/02 -0800, you wrote:
>
> > > what i would like to do is to set a property called pathToMyJar to be
one
> > > thing or another depending on some boolean. ...
> >
> >look at <condition> more closely; you can set the value of the assignment
to
> >whatever you want.
> >
> >Also the way <property> works, the first assignment wins, so something
like
> >the following will act as an if/then/else assignment
> >
> ><condition property="path1" value="${dospath} > <osfamily="windows" />
> ></condition>
> ><property name="path1" value="${unixpath"} />
> >
> >[but with correct param names and things]
>
> yes, i got the following to work:
>
>      <property environment="env"/>
>      <property name="tmp" value="${env.TMP}"/>   <echo
message="$TMP=${tmp}"/>
>      <condition property="isDos"> <os family="dos" /> </condition>
<echo
> message="isDos=${isDos}"/>
>      <condition property="isUnix"> <os family="unix" /> </condition>
<echo
> message="isUnix=${isUnix}"/>
>      <condition property="junitPath" value="/usr/local"> <os family="unix"
> /> </condition>
>      <condition property="junitPath" value="d:/java/junit3.7"> <os
> family="dos" /> </condition>
>      <echo message="junitPath=${junitPath}"/>
>
> unfortunately, i broken the build. i now have the problem of requiring
that
> a copy of the junit.jar file be in the ant hole. i swear it worked on 6.2
> the other day. i now get the old: [junit] Could not create task of type:
> junit Common ...  i am using the same optional .jar. another mystery :(
>
> it seems that he only difference is in the classpath property (one has
> junit in it) - but this is done before the init step.
>
> 166c167
> < Setting project property: java.class.path ->
>
/usr/local/ant/lib/optional.jar:/usr/local/ant/lib/ant.jar:/usr/local/jdk/li
b/tools.jar
> ---
>  > Setting project property: java.class.path ->
>
/usr/local/ant/lib/optional.jar:/usr/local/ant/lib/junit.jar:/usr/local/ant/
lib/ant.jar:/usr/local/jdk/lib/tools.jar
>
> the successful script (>) also has:
>
> 203a205,208
>  >    +Task: junit
>  >     [junit] Implicitly adding /usr/local/ant/lib/junit.jar to classpath
>  >     [junit] Implicitly adding /usr/local/ant/lib/ant.jar to classpath
>  >     [junit] Implicitly adding /usr/local/ant/lib/optional.jar to
classpath
>
> and this is all done before the init step.
>
> thanks
>
> <project name="MyProject" default="dist" basedir=".">
>    <property name="src" value="."/>
>    <property name="build" value="build"/>
>    <property name="dist"  value="dist"/>
>    <property name="test"  value="test"/>
>    <target name="init">
>      <tstamp/> <mkdir dir="${build}"/>
>    </target>
>    <target name="compile" depends="init">
>      <javac srcdir="${src}" destdir="${build}">
>      <classpath>
>        <pathelement location="/usr/local/junit.jar"/>
>      </classpath>
>      </javac>
>    </target>
>    <target name="test" depends="compile">
>      <junit fork="yes" printsummary="on"  haltonfailure="true">
>        <classpath>
>          <pathelement location="/usr/local/junit.jar"/>
>          <pathelement path="build"/>
>        </classpath>
>        <test name="MainTest"/>
>        <formatter type="brief" usefile="false"/>
>      </junit>
>    </target>
>    <target name="dist" depends="test">
>      <mkdir dir="${dist}/lib"/>
>      <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar"
basedir="${build}"/>
>    </target>
>    <target name="clean">
>      <delete dir="${build}"/>
>      <delete dir="${dist}"/>
>    </target>
> </project>
>
> diffs between the script that fails and the script thatsucceeded:
>
> 1c1
> < Script started on Mon Feb  4 19:03:53 2002 (failure)
> ---
>  > Script started on Mon Feb  4 19:22:49 2002 (success)
> 120a121
>  >  +User task:
> junit     org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
> 166c167
> < Setting project property: java.class.path ->
>
/usr/local/ant/lib/optional.jar:/usr/local/ant/lib/ant.jar:/usr/local/jdk/li
b/tools.jar
> ---
>  > Setting project property: java.class.path ->
>
/usr/local/ant/lib/optional.jar:/usr/local/ant/lib/junit.jar:/usr/local/ant/
lib/ant.jar:/usr/local/jdk/lib/tools.jar
> 187c188
> < Adding reference: MyProject -> org.apache.tools.ant.Project@feca64
> ---
>  > Adding reference: MyProject -> org.apache.tools.ant.Project@48cc8c
> 203a205,208
>  >    +Task: junit
>  >     [junit] Implicitly adding /usr/local/ant/lib/junit.jar to classpath
>  >     [junit] Implicitly adding /usr/local/ant/lib/ant.jar to classpath
>  >     [junit] Implicitly adding /usr/local/ant/lib/optional.jar to
classpath
> 215c220
> < Setting project property: TSTAMP -> 1904
> ---
>  > Setting project property: TSTAMP -> 1923
> 227a233
>  >     [javac] dist/lib/MyProject-20020204.jar skipped - don't know how to
> handle it
> 232a239
>  >     [javac] type1 skipped - don't know how to handle it
> 236c243,250
> <     [junit] Could not create task of type: junit Common solutions are
> adding the task to defaults.properties and executing bin/bootstrap
> ---
>  >     [junit] Running MainTest
>  >     [junit] Executing: /usr/local/src/jdk/j2sdk1.4.0/jre/../bin/java
> -classpath
>
/usr/local/ant/lib/junit.jar:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/o
ptional.jar:/usr/local/junit.jar:/home/ray/junit/build
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner MainTest
> haltOnError=false haltOnFailure=true
>
formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFor
matter
>
formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultForma
tter
> propsfile=/home/ray/junit/junit2972512715312833275.properties
>  > Execute:Java13CommandLauncher:
> /usr/local/src/jdk/j2sdk1.4.0/jre/../bin/java -classpath
>
/usr/local/ant/lib/junit.jar:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/o
ptional.jar:/usr/local/junit.jar:/home/ray/junit/build
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner MainTest
> haltOnError=false haltOnFailure=true
>
formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFor
matter
>
formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultForma
tter
> propsfile=/home/ray/junit/junit2972512715312833275.properties
>  >     [junit] Main started at Mon Feb 04 19:23:04 EST 2002
>  >     [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.577
sec
>  >     [junit] Testsuite: MainTest
>  >     [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.577
sec
>  >     [junit]
> 238c252,256
> < BUILD FAILED
> ---
>  > dist:
>  > FileSet: Setup file scanner in dir /home/ray/junit/build with
> patternSet{ includes: [] excludes: [] }
>  >       [jar] Main.class omitted as
> /home/ray/junit/dist/lib/MyProject-20020204.jar is up to date.
>  >       [jar] MainTest.class omitted as
> /home/ray/junit/dist/lib/MyProject-20020204.jar is up to date.
>  >       [jar]  omitted as /home/ray/junit/dist/lib/MyProject-20020204.jar
> is up to date.
> 240,250c258
> < /home/ray/junit/build.xml:17: 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).
> <       at
> org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:153)
> <       at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:83)
> <       at org.apache.tools.ant.Task.perform(Task.java:216)
> <       at org.apache.tools.ant.Target.execute(Target.java:184)
> <       at org.apache.tools.ant.Target.performTasks(Target.java:202)
> <       at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> <       at org.apache.tools.ant.Project.executeTargets(Project.java:560)
> <       at org.apache.tools.ant.Main.runBuild(Main.java:454)
> <       at org.apache.tools.ant.Main.start(Main.java:153)
> <       at org.apache.tools.ant.Main.main(Main.java:176)
> ---
>  > BUILD SUCCESSFUL
> 252c260
> < Total time: 5 seconds
> ---
>  > Total time: 9 seconds
> 254c262
> < Script done on Mon Feb  4 19:04:11 2002
> ---
>  > Script done on Mon Feb  4 19:23:06 2002
>
>
> Script started on Mon Feb  4 19:03:53 2002 (this is the script that fails)
> [ray@k6 junit]$ ant -debug
> Ant version 1.4.1 compiled on February 1 2002
> Buildfile: build.xml
> Setting project property: ant.java.version -> 1.4
> Detected Java version: 1.4 in: /usr/local/src/jdk/j2sdk1.4.0/jre
> 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:
> jpcoverage     org.apache.tools.ant.taskdefs.optional.sitraka.Coverage
>   +User task: dependset     org.apache.tools.ant.taskdefs.DependSet
>   +User task:
> vsscheckin     org.apache.tools.ant.taskdefs.optional.vss.MSVSSCHECKIN
>   +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: 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:
> ccmcreatetask     org.apache.tools.ant.taskdefs.optional.ccm.CCMCreateTask
>   +User task: jlink
org.apache.tools.ant.taskdefs.optional.jlink.JlinkTask
>   +User task: tstamp     org.apache.tools.ant.taskdefs.Tstamp
>   +User task: icontract
org.apache.tools.ant.taskdefs.optional.IContract
>   +User task: pathconvert     org.apache.tools.ant.taskdefs.PathConvert
>   +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:
> p4reopen     org.apache.tools.ant.taskdefs.optional.perforce.P4Reopen
>   +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:
> jpcovreport     org.apache.tools.ant.taskdefs.optional.sitraka.CovReport
>   +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:
> mmetrics     org.apache.tools.ant.taskdefs.optional.metamata.MMetrics
>   +User task:
> propertyfile     org.apache.tools.ant.taskdefs.optional.PropertyFile
>   +User task: copyfile     org.apache.tools.ant.taskdefs.Copyfile
>   +User task:
> ccmcheckintask
org.apache.tools.ant.taskdefs.optional.ccm.CCMCheckinDefault
>   +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: ear     org.apache.tools.ant.taskdefs.Ear
>   +User task: ant     org.apache.tools.ant.taskdefs.Ant
>   +User task:
> vsshistory     org.apache.tools.ant.taskdefs.optional.vss.MSVSSHISTORY
>   +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: sequential     org.apache.tools.ant.taskdefs.Sequential
>   +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: condition     org.apache.tools.ant.taskdefs.ConditionTask
>   +User task: antstructure     org.apache.tools.ant.taskdefs.AntStructure
>   +User task: pvcs     org.apache.tools.ant.taskdefs.optional.pvcs.Pvcs
>   +User task: javah     org.apache.tools.ant.taskdefs.optional.Javah
>   +User task:
> p4counter     org.apache.tools.ant.taskdefs.optional.perforce.P4Counter
>   +User task: javac     org.apache.tools.ant.taskdefs.Javac
>   +User task: test     org.apache.tools.ant.taskdefs.optional.Test
>   +User task:
> p4revert     org.apache.tools.ant.taskdefs.optional.perforce.P4Revert
>   +User task:
> xmlvalidate     org.apache.tools.ant.taskdefs.optional.XMLValidateTask
>   +User task:
> ccmreconfigure
org.apache.tools.ant.taskdefs.optional.ccm.CCMReconfigure
>   +User task: cab     org.apache.tools.ant.taskdefs.optional.Cab
>   +User task: typedef     org.apache.tools.ant.taskdefs.Typedef
>   +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:
> jpcovmerge     org.apache.tools.ant.taskdefs.optional.sitraka.CovMerge
>   +User task: available     org.apache.tools.ant.taskdefs.Available
>   +User task: p4have
org.apache.tools.ant.taskdefs.optional.perforce.P4Have
>   +User task: rpm     org.apache.tools.ant.taskdefs.optional.Rpm
>   +User task:
> vsslabel     org.apache.tools.ant.taskdefs.optional.vss.MSVSSLABEL
>   +User task: cvspass     org.apache.tools.ant.taskdefs.CVSPass
>   +User task: move     org.apache.tools.ant.taskdefs.Move
>   +User task: wljspc     org.apache.tools.ant.taskdefs.optional.jsp.WLJspc
>   +User task:
> junitreport
> org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator
>   +User task: javacc
org.apache.tools.ant.taskdefs.optional.javacc.JavaCC
>   +User task: signjar     org.apache.tools.ant.taskdefs.SignJar
>   +User task: csc     org.apache.tools.ant.taskdefs.optional.dotnet.CSharp
>   +User task:
> p4change     org.apache.tools.ant.taskdefs.optional.perforce.P4Change
>   +User task:
> cccheckin     org.apache.tools.ant.taskdefs.optional.clearcase.CCCheckin
>   +User task: property     org.apache.tools.ant.taskdefs.Property
>   +User task:
> iplanet-ejbc
org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbcTask
>   +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:
> ccmcheckin     org.apache.tools.ant.taskdefs.optional.ccm.CCMCheckin
>   +User task: get     org.apache.tools.ant.taskdefs.Get
>   +User task:
> blgenclient
> org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient
>   +User task:
> vsscheckout     org.apache.tools.ant.taskdefs.optional.vss.MSVSSCHECKOUT
>   +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: record     org.apache.tools.ant.taskdefs.Recorder
>   +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: parallel     org.apache.tools.ant.taskdefs.Parallel
>   +User task:
> ccmcheckout     org.apache.tools.ant.taskdefs.optional.ccm.CCMCheckout
>   +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: maudit
org.apache.tools.ant.taskdefs.optional.metamata.MAudit
>   +User task:
> jdepend     org.apache.tools.ant.taskdefs.optional.jdepend.JDependTask
>   +User task: sleep     org.apache.tools.ant.taskdefs.Sleep
>   +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: filterset     org.apache.tools.ant.types.FilterSet
>   +User datatype: filelist     org.apache.tools.ant.types.FileList
>   +User datatype: description     org.apache.tools.ant.types.Description
>   +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/src/jdk/j2sdk1.4.0/jre/lib/i386
> Setting project property: java.vm.version -> 1.4.0-rc-b91
> 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: user.country -> US
> Setting project property: sun.os.patch.level -> unknown
> Setting project property: java.vm.specification.name -> Java Virtual
> Machine Specification
> Setting project property: user.dir -> /home/ray/junit
> Setting project property: java.runtime.version -> 1.4.0-rc-b91
> Setting project property: java.awt.graphicsenv ->
> sun.awt.X11GraphicsEnvironment
> Setting project property: java.endorsed.dirs ->
> /usr/local/src/jdk/j2sdk1.4.0/jre/lib/endorsed
> 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: os.name -> Linux
> Setting project property: ant.home -> /usr/local/ant
> Setting project property: sun.java2d.fontpath ->
> Setting project property: java.library.path ->
>
/usr/local/src/jdk/j2sdk1.4.0/jre/lib/i386/client:/usr/local/src/jdk/j2sdk1.
4.0/jre/lib/i386:/usr/local/src/jdk/j2sdk1.4.0/jre/../lib/i386
> Setting project property: java.specification.name -> Java Platform API
> Specification
> Setting project property: java.class.version -> 48.0
> Setting project property: java.util.prefs.PreferencesFactory ->
> java.util.prefs.FileSystemPreferencesFactory
> Setting project property: os.version -> 2.4.7-10
> Setting project property: user.home -> /home/ray
> Setting project property: user.timezone ->
> Setting project property: java.awt.printerjob -> sun.print.PSPrinterJob
> Setting project property: file.encoding -> ISO-8859-1
> Setting project property: java.specification.version -> 1.4
> Setting project property: java.class.path ->
>
/usr/local/ant/lib/optional.jar:/usr/local/ant/lib/ant.jar:/usr/local/jdk/li
b/tools.jar
> Setting project property: user.name -> ray
> Setting project property: java.vm.specification.version -> 1.0
> Setting project property: java.home -> /usr/local/src/jdk/j2sdk1.4.0/jre
> Setting project property: sun.arch.data.model -> 32
> 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.4.0-rc
> Setting project property: java.ext.dirs ->
> /usr/local/src/jdk/j2sdk1.4.0/jre/lib/ext
> Setting project property: sun.boot.class.path ->
>
/usr/local/src/jdk/j2sdk1.4.0/jre/lib/rt.jar:/usr/local/src/jdk/j2sdk1.4.0/j
re/lib/i18n.jar:/usr/local/src/jdk/j2sdk1.4.0/jre/lib/sunrsasign.jar:/usr/lo
cal/src/jdk/j2sdk1.4.0/jre/lib/jsse.jar:/usr/local/src/jdk/j2sdk1.4.0/jre/li
b/jce.jar:/usr/local/src/jdk/j2sdk1.4.0/jre/lib/charsets.jar:/usr/local/src/
jdk/j2sdk1.4.0/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: sun.cpu.isalist ->
> Setting ro project property: ant.version -> Ant version 1.4.1 compiled on
> February 1 2002
> Setting ro project property: ant.file -> /home/ray/junit/build.xml
> parsing buildfile /home/ray/junit/build.xml with URI =
> file:/home/ray/junit/build.xml
> Setting ro project property: ant.project.name -> MyProject
> Adding reference: MyProject -> org.apache.tools.ant.Project@feca64
> Setting project property: basedir -> /home/ray/junit
> Project base dir set to: /home/ray/junit
>     +Task: property
> Setting project property: src -> .
>     +Task: property
> Setting project property: build -> build
>     +Task: property
> Setting project property: dist -> dist
>     +Task: property
> Setting project property: test -> test
>   +Target: init
>     +Task: tstamp
>     +Task: mkdir
>   +Target: compile
>     +Task: javac
>   +Target: test
>   +Target: dist
>     +Task: mkdir
>     +Task: jar
>   +Target: clean
>     +Task: delete
>     +Task: delete
> Build sequence for target `dist' is [init, compile, test, dist]
> Complete build sequence is [init, compile, test, dist, clean]
>
> init:
> Setting project property: DSTAMP -> 20020204
> Setting project property: TSTAMP -> 1904
> Setting project property: TODAY -> February 4 2002
>
> compile:
> FileSet: Setup file scanner in dir /home/ray/junit with patternSet{
> includes: [] excludes: [] }
>      [javac] build/Main.class skipped - don't know how to handle it
>      [javac] build/MainTest.class skipped - don't know how to handle it
>      [javac] Main.java omitted as /home/ray/junit/build/Main.class is up
to
> date.
>      [javac] MainTest.java omitted as /home/ray/junit/build/MainTest.class
> is up to date.
>      [javac] typescript skipped - don't know how to handle it
>      [javac] bug skipped - don't know how to handle it
>      [javac] build.xml.old skipped - don't know how to handle it
>      [javac] junitTaskDef.txt skipped - don't know how to handle it
>      [javac] run skipped - don't know how to handle it
>      [javac] build.xml skipped - don't know how to handle it
>      [javac] compile skipped - don't know how to handle it
>      [javac] build.xml.unix skipped - don't know how to handle it
>      [javac] build.xml.dos skipped - don't know how to handle it
>      [javac] RCS/build.xml,v skipped - don't know how to handle it
>
> test:
>      [junit] Could not create task of type: junit Common solutions are
> adding the task to defaults.properties and executing bin/bootstrap
>
> BUILD FAILED
>
> /home/ray/junit/build.xml:17: 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).
>          at
> org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:153)
>          at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:83)
>          at org.apache.tools.ant.Task.perform(Task.java:216)
>          at org.apache.tools.ant.Target.execute(Target.java:184)
>          at org.apache.tools.ant.Target.performTasks(Target.java:202)
>          at org.apache.tools.ant.Project.executeTarget(Project.java:601)
>          at org.apache.tools.ant.Project.executeTargets(Project.java:560)
>          at org.apache.tools.ant.Main.runBuild(Main.java:454)
>          at org.apache.tools.ant.Main.start(Main.java:153)
>          at org.apache.tools.ant.Main.main(Main.java:176)
>
> Total time: 5 seconds
> [ray@k6 junit]$
> Script done on Mon Feb  4 19:04:11 2002
>
> thanks
>
> ---
> ray tayek http://home.earthlink.net/~rtayek/
> actively seeking telecommuting work
> orange county java users group http://www.ocjug.org/
> hate spam? http://samspade.org/ssw/
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message