You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by T Master <tm...@iknowledgeinc.com> on 2001/08/07 23:54:27 UTC

path task error output

I have Target init which sets the classpath.  However I am getting an error
on the path task.
I've received this using netbeans and the commandline.  I have ant1.3.

Error excerpt:
Could not create task of type: classpath Common solutions are adding the
task to defaults.properties and executing bin/bootstrap
javadoccing.xml [35] Could not create task of type: classpath. 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).

Complete Output is below.

Code excerpt:
    <classpath>
        <path id="project.class.path">
            <pathelement location="${build.dir}"/>
            <pathelement path="${java.class.path}/"/>
            <!--pathelement path="${pending.additional.path}"/-->
            <!--pathelement location="C:\dev\junit\junit.jar"/ -->
            <!--pathelement location="C:\dev\ant\lib\optional.jar"/ -->
        </path>
    </classpath>

Ideas?  I have optional.jar and everything installed in my classpath or in
the ant/lib correctly. AFAIK.

T Master


OUTPUT
=======
parsing buildfile C:\dev\build\javadoccing.xml with URI =
file:C:/dev/build/javadoccing.xml
Setting ro project property: ant.project.name -> 20
Setting project property: basedir -> C:\dev\
Project base dir set to: C:\dev\
 +Target: init
   +Task: tstamp
   +Task: property
   +Task: property
   +Task: property
   +Task: property
   +Task: property
   +Task: property
   +Task: property
   +Task: mkdir
   +Task: mkdir
   +Task: mkdir
   +Task: mkdir
 +Target: javadocs
   +Task: echo
   +Task: javadoc
Build sequence for target `javadocs' is [init, javadocs]
Complete build sequence is [init, javadocs]
init:
Setting project property: DSTAMP -> 20010807
Setting project property: TSTAMP -> 1533
Setting project property: TODAY -> August 7 2001
Setting project property: src.dir -> src
Setting project property: build.dir -> class
Setting project property: dist.dir -> jar
Setting project property: javadoc.dir -> docs/api
Setting project property: test.path -> com/unittests
Setting project property: vss.userid -> mylogin
Override ignored for vss.userid
Could not create task of type: classpath Common solutions are adding the
task to defaults.properties and executing bin/bootstrap
javadoccing.xml [35] Could not create task of type: classpath. 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).


Re: path task error output

Posted by Ed Mangual <ed...@carolina.rr.com>.
T,

You could also define it this way:

Excerpt from property file

borland=c\:/vbroker411
borland.lib=${borland}/lib


Excerpt from Build.xml

  <!-- set global properties for this build -->
  <property file="./src/smallbiz.properties"></property>

  <path id="core.library.classpath">
    <fileset dir="${smallbiz.release}">
      <include name="*.jar"></include>
    </fileset>
  </path>

  <path id="orb.library.classpath">
    <fileset dir="${borland.lib}">
      <include name="vbjorb.jar"></include>
    </fileset>
  </path>

Then,

      <javac srcdir="${smallbiz.source}" destdir="${smallbiz.release}">
         <include name="${smallbiz.pattern.folder}"></include>
       <include name="${smallbiz.pattern.idlgen.folder}"></include>
             <classpath refid="core.library.classpath"></classpath>
             <classpath refid="orb.library.classpath"></classpath>
      </javac>

     <javadoc packagenames="${smallbiz.javadoc.pattern.package}"
           sourcepath="${smallbiz.source}"
           destdir="${smallbiz.doc}"
           author="true"
           version="true"
           use="true"
           windowtitle="Dummy API"
           doctitle="Dummy"
           bottom="Copyright 2000 Dummy Corporation All Rights Reserved.">
    <classpath refid="core.library.classpath"></classpath>
    <classpath refid="orb.library.classpath"></classpath>
    </javadoc>
  </target>

Hope this helps,

Ed
----- Original Message -----
From: "T Master" <tm...@iknowledgeinc.com>
To: "ant user mailist" <an...@jakarta.apache.org>
Sent: Tuesday, August 07, 2001 5:54 PM
Subject: path task error output


> I have Target init which sets the classpath.  However I am getting an
error
> on the path task.
> I've received this using netbeans and the commandline.  I have ant1.3.
>
> Error excerpt:
> Could not create task of type: classpath Common solutions are adding the
> task to defaults.properties and executing bin/bootstrap
> javadoccing.xml [35] Could not create task of type: classpath. 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).
>
> Complete Output is below.
>
> Code excerpt:
>     <classpath>
>         <path id="project.class.path">
>             <pathelement location="${build.dir}"/>
>             <pathelement path="${java.class.path}/"/>
>             <!--pathelement path="${pending.additional.path}"/-->
>             <!--pathelement location="C:\dev\junit\junit.jar"/ -->
>             <!--pathelement location="C:\dev\ant\lib\optional.jar"/ -->
>         </path>
>     </classpath>
>
> Ideas?  I have optional.jar and everything installed in my classpath or in
> the ant/lib correctly. AFAIK.
>
> T Master
>
>
> OUTPUT
> =======
> parsing buildfile C:\dev\build\javadoccing.xml with URI =
> file:C:/dev/build/javadoccing.xml
> Setting ro project property: ant.project.name -> 20
> Setting project property: basedir -> C:\dev\
> Project base dir set to: C:\dev\
>  +Target: init
>    +Task: tstamp
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: mkdir
>    +Task: mkdir
>    +Task: mkdir
>    +Task: mkdir
>  +Target: javadocs
>    +Task: echo
>    +Task: javadoc
> Build sequence for target `javadocs' is [init, javadocs]
> Complete build sequence is [init, javadocs]
> init:
> Setting project property: DSTAMP -> 20010807
> Setting project property: TSTAMP -> 1533
> Setting project property: TODAY -> August 7 2001
> Setting project property: src.dir -> src
> Setting project property: build.dir -> class
> Setting project property: dist.dir -> jar
> Setting project property: javadoc.dir -> docs/api
> Setting project property: test.path -> com/unittests
> Setting project property: vss.userid -> mylogin
> Override ignored for vss.userid
> Could not create task of type: classpath Common solutions are adding the
> task to defaults.properties and executing bin/bootstrap
> javadoccing.xml [35] Could not create task of type: classpath. 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).
>


RE: path task error output

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
<classpath> is not an Ant type. It is a nested element on some tasks.

Just define the path as you have done below, without the <classpath>
elements and then you can refer to this when you need a classpath. For
example, to use this in a compile you would use

<javac ...>
   <classpath refid="project.class.path"/>
</javac>

Conor




> -----Original Message-----
> From: T Master [mailto:tmaster@iknowledgeinc.com]
> Sent: Wednesday, 8 August 2001 7:54 AM
> To: ant user mailist
> Subject: path task error output
>
>
> I have Target init which sets the classpath.  However I am
> getting an error
> on the path task.
> I've received this using netbeans and the commandline.  I have ant1.3.
>
> Error excerpt:
> Could not create task of type: classpath Common solutions are adding the
> task to defaults.properties and executing bin/bootstrap
> javadoccing.xml [35] Could not create task of type: classpath. 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).
>
> Complete Output is below.
>
> Code excerpt:
>     <classpath>
>         <path id="project.class.path">
>             <pathelement location="${build.dir}"/>
>             <pathelement path="${java.class.path}/"/>
>             <!--pathelement path="${pending.additional.path}"/-->
>             <!--pathelement location="C:\dev\junit\junit.jar"/ -->
>             <!--pathelement location="C:\dev\ant\lib\optional.jar"/ -->
>         </path>
>     </classpath>
>
> Ideas?  I have optional.jar and everything installed in my classpath or in
> the ant/lib correctly. AFAIK.
>
> T Master
>
>
> OUTPUT
> =======
> parsing buildfile C:\dev\build\javadoccing.xml with URI =
> file:C:/dev/build/javadoccing.xml
> Setting ro project property: ant.project.name -> 20
> Setting project property: basedir -> C:\dev\
> Project base dir set to: C:\dev\
>  +Target: init
>    +Task: tstamp
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: property
>    +Task: mkdir
>    +Task: mkdir
>    +Task: mkdir
>    +Task: mkdir
>  +Target: javadocs
>    +Task: echo
>    +Task: javadoc
> Build sequence for target `javadocs' is [init, javadocs]
> Complete build sequence is [init, javadocs]
> init:
> Setting project property: DSTAMP -> 20010807
> Setting project property: TSTAMP -> 1533
> Setting project property: TODAY -> August 7 2001
> Setting project property: src.dir -> src
> Setting project property: build.dir -> class
> Setting project property: dist.dir -> jar
> Setting project property: javadoc.dir -> docs/api
> Setting project property: test.path -> com/unittests
> Setting project property: vss.userid -> mylogin
> Override ignored for vss.userid
> Could not create task of type: classpath Common solutions are adding the
> task to defaults.properties and executing bin/bootstrap
> javadoccing.xml [35] Could not create task of type: classpath. 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).
>
>