RE: Trying to run Ant to build a woapplication

From: JR Ruggentaler (j..pv.com)
Date: Wed Aug 27 2003 - 13:15:57 EDT

  • Next message: Ulrich Köster: "Re: Trying to run Ant to build a woapplication"

    No, I did not define task(s) but after I added your example to the build.xml
    file I got and error regarding classpath, where do I specify class path, and
    what is it uesd for?
     
    C:\jr\Source5\WebApps\Phynance>java -classpath
    "C:\j2sdk1.4.1_01\lib\tools.jar;C
    :\Ant\bin\..\lib\xml-apis.jar;C:\Ant\bin\..\lib\xercesImpl.jar;C:\Ant\bin\..
    \lib
    \optional.jar;C:\Ant\bin\..\lib\ant.jar;C:\eclipse\plugins\org.objectstyle.w
    olip
    s.woproject.ant_1.0.4\lib\woproject.jar;C:\eclipse\plugins\org.objectstyle.w
    olip
    s.woproject.ant_1.0.4\lib\cayenne.jar" "-Dant.home=C:\Ant\bin\.."
    org.apache.to
    ols.ant.Main -v
    Apache Ant version 1.5.1 compiled on October 2 2002
    Buildfile: build.xml
    Detected Java version: 1.4 in: C:\Program Files\Java\j2re1.4.1_01
    Detected OS: Windows 2000
    parsing buildfile build.xml with URI =
    file:C:/jr/Source5/WebApps/Phynance/build
    .xml
    Project base dir set to: C:\jr\Source5\WebApps\Phynance
     
    BUILD FAILED
    Reference classpath not found.
            at
    org.apache.tools.ant.types.Reference.getReferencedObject(Reference.ja
    va:93)
            at
    org.apache.tools.ant.types.Path.dieOnCircularReference(Path.java:464)
     
            at
    org.apache.tools.ant.types.Path.dieOnCircularReference(Path.java:472)
     
            at org.apache.tools.ant.types.Path.list(Path.java:287)
            at org.apache.tools.ant.types.Path.addExisting(Path.java:260)
            at
    org.apache.tools.ant.types.Path.concatSystemClasspath(Path.java:551)
            at
    org.apache.tools.ant.AntClassLoader.<init>(AntClassLoader.java:286)
            at
    org.apache.tools.ant.AntClassLoader.<init>(AntClassLoader.java:317)
            at
    org.apache.tools.ant.AntClassLoader.<init>(AntClassLoader.java:343)
            at
    org.apache.tools.ant.taskdefs.Definer.createLoader(Definer.java:275)
            at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:151)
            at
    org.apache.tools.ant.helper.ProjectHelperImpl$TaskHandler.finished(Pr
    ojectHelperImpl.java:821)
            at
    org.apache.tools.ant.helper.ProjectHelperImpl$AbstractHandler.endElem
    ent(ProjectHelperImpl.java:300)
            at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
    Source
    )
            at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
    Unknown Source)
            at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
    Dispatcher.dispatch(Unknown Source)
            at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
    known Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at
    org.apache.tools.ant.helper.ProjectHelperImpl.parse(ProjectHelperImpl
    .java:155)
            at
    org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
    a:117)
            at org.apache.tools.ant.Main.runBuild(Main.java:597)
            at org.apache.tools.ant.Main.start(Main.java:196)
            at org.apache.tools.ant.Main.main(Main.java:235)
     
    Total time: 1 second
     
    C:\jr\Source5\WebApps\Phynance>

    -----Original Message-----
    From: Ulrich Köster [mailto:ulric..bjectstyle.org]
    Sent: Wednesday, August 27, 2003 11:20 AM
    To: JR Ruggentaler
    Cc: woproject-de..bjectstyle.org
    Subject: Re: Trying to run Ant to build a woapplication

    Hi JR,

    you have to define the task(s).

    <taskdef name="woapplication"
    classname="org.objectstyle.woproject.ant.WOApplication">

    <classpath refid="classpath"/>

    </taskdef>

    Ulrich

    On Wednesday, 27. August 2003, at 16:47PM, JR Ruggentaler wrote:

    Hi,

            I am trying to run ant with WOProject to build a woapplication from

    the command line. The error indicates that ant cannot find task

    woapplication or some class associated with woapplication. I added

    woproject.jar and cayenne.jar to my ant batch script but no luck any ideas?

    Below is the output from my build attempt:

    C:\jr\Source5\WebApps\Phynance>java -classpath

    "C:\j2sdk1.4.1_01\lib\tools.jar;C

    :\Ant\bin\..\lib\xml-apis.jar;C:\Ant\bin\..\lib\xercesImpl.jar;C:\Ant\bin\..

    \lib

    \optional.jar;C:\Ant\bin\..\lib\ant.jar;C:\eclipse\plugins\org.objectstyle.w

    olip

    s.woproject.ant_1.0.4\lib\woproject.jar;C:\eclipse\plugins\org.objectstyle.w

    olip

    s.woproject.ant_1.0.4\lib\cayenne.jar" "-Dant.home=C:\Ant\bin\.."

    org.apache.to

    ols.ant.Main -v

    Apache Ant version 1.5.1 compiled on October 2 2002

    Buildfile: build.xml

    Detected Java version: 1.4 in: C:\Program Files\Java\j2re1.4.1_01

    Detected OS: Windows 2000

    parsing buildfile build.xml with URI =

    file:C:/jr/Source5/WebApps/Phynance/build

    .xml

    Project base dir set to: C:\jr\Source5\WebApps\Phynance

    Build sequence for target `build' is [setProps, init.build, build.woapp,

    build]

    Complete build sequence is [setProps, init.build, build.woapp, build,

    init.insta

    ll, clean, install, copy.strings]

    setProps:

    [property] Loading C:\jr\Source5\WebApps\Phynance\build.properties

    [property] Loading C:\Documents and Settings\jr\Library\wobuild.properties

    init.build:

    build.woapp:

    BUILD FAILED

    file:C:/jr/Source5/WebApps/Phynance/build.xml:42: Could not create task or

    type

    of type: woapplication.

    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 'woapplication'.

    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 optional.jar is absent

    Fix: look for optional.jar in ANT_HOME/lib, download if needed

    - The task was not built into optional.jar as dependent

    libraries were not found at build time.

    Fix: look in the JAR to verify, then rebuild with the needed

    libraries, or download a 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>.

    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.

    at

    org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownEleme

    nt.java:324)

    at

    org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:24

    0)

    at

    org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav

    a:115)

    at org.apache.tools.ant.Task.perform(Task.java:318)

    at org.apache.tools.ant.Target.execute(Target.java:309)

    at org.apache.tools.ant.Target.performTasks(Target.java:336)

    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)

    at org.apache.tools.ant.Project.executeTargets(Project.java:1250)

    at org.apache.tools.ant.Main.runBuild(Main.java:610)

    at org.apache.tools.ant.Main.start(Main.java:196)

    at org.apache.tools.ant.Main.main(Main.java:235)

    Total time: 1 second

    C:\jr\Source5\WebApps\Phynance>

    J.R.



    This archive was generated by hypermail 2.0.0 : Wed Aug 27 2003 - 13:04:59 EDT