ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Renaud <rren...@eden.rutgers.edu>
Subject Trouble with the depend task
Date Tue, 22 Feb 2005 06:26:58 GMT
I am trying to use the depend task to automatically find dependencies in
a small ~10 file java project.  It seems that the task isn't picking up
all the dependencies though.  Starting from a clean build, I can do a full
rebuild, touch a file, and then try to build again, and the build fails.

It seems that the task correctly finds the dependencies, but then the
project isn't rebuilt in the correct order.

I am using Kaffe version 1.1 running a Debian system.

Also, I'd like to conditionally set the compiler (use sun javac, if
available, otherwise fallback to kjc) but right now I just have two nearly
identical build files which I invoke differently depending on the system.

The build file and output follow.  I used -v in an attempt to see why ant
was rebuilding the files in the wrong order.

rob:~/cs431$ cat kaffe.xml
<?xml version="1.0"?>

<project name="tutorial" default="build" basedir=".">
    <target name="build">
        <depend srcdir="." destdir="." cache="depcache" closure="yes">
             <include name="**/*.java"/>
        </depend>
        <javac srcdir="." compiler="kjc" />
    </target>
    <target name="clean">
        <delete>
            <fileset dir="." defaultexcludes="no">
                <include name="**/*.class" />
                <include name="depcache" />
            </fileset>
        </delete>
    </target>
</project>

rob:~/cs431$ ant -f kaffe.xml clean
Unable to locate tools.jar. Expected to find it in
/usr/lib/kaffe/pthreads/lib/tools.jar
Buildfile: kaffe.xml

clean:
   [delete] Deleting 14 files from /home/rob/cs431

BUILD SUCCESSFUL
Total time: 0 seconds
rob:~/cs431$ ant -f kaffe.xml
Unable to locate tools.jar. Expected to find it in
/usr/lib/kaffe/pthreads/lib/tools.jar
Buildfile: kaffe.xml

build:
    [javac] Compiling 14 source files

BUILD SUCCESSFUL
Total time: 2 seconds
rob:~/cs431$ touch Message/MessageParser.java
rob:~/cs431$ ant -v -f kaffe.xml
Unable to locate tools.jar. Expected to find it in
/usr/lib/kaffe/pthreads/lib/tools.jar
Apache Ant version 1.6.2 compiled on September 28 2004
Buildfile: kaffe.xml
Detected Java version: 1.4 in: /usr/lib/kaffe/pthreads
Detected OS: Linux
parsing buildfile /home/rob/cs431/kaffe.xml with URI =
file:///home/rob/cs431/kaffe.xml
Project base dir set to: /home/rob/cs431
Build sequence for target `build' is [build]
Complete build sequence is [build, clean, ]
build:
   [depend] Deleting file /home/rob/cs431/Message/MessagePipe.class since
Message.MessageParser out of date
   [depend] Deleting file /home/rob/cs431/Message/Tests.class since
Message.MessagePipe out of date
   [depend] Deleting file /home/rob/cs431/Gate.class since
Message.MessagePipe out of date
   [depend] Deleting file /home/rob/cs431/Gate$Channel.class since Gate
out of date
   [depend] Deleting file /home/rob/cs431/Gate$IncomingConnections.class
since Gate$Channel out of date
   [depend] Deleting file /home/rob/cs431/Master.class since
Message.MessagePipe out of date
   [depend] Deleting file /home/rob/cs431/Master$GateThread.class since
Master out of date
   [depend] Deleting file /home/rob/cs431/Message/MessageParser.class
since Message.MessageParser out of date
   [depend] Deleted 8 out of date files in 0 seconds
    [javac] Gate.java added as Gate.class doesn't exist.
    [javac] Master.java added as Master.class doesn't exist.
    [javac] Message/GateListMessage$1.class skipped - don't know how to
handle it
    [javac] Message/GateListMessage.class skipped - don't know how to
handle it
    [javac] Message/GateListMessage.java omitted as
Message/GateListMessage.class is up to date.
    [javac] Message/InetUtil.class skipped - don't know how to handle it
    [javac] Message/InetUtil.java omitted as Message/InetUtil.class is up
to date.
    [javac] Message/Message.class skipped - don't know how to handle it
    [javac] Message/Message.java omitted as Message/Message.class is up to
date.
    [javac] Message/MessageDecoder.class skipped - don't know how to
handle it
    [javac] Message/MessageDecoder.java omitted as
Message/MessageDecoder.class is up to date.
    [javac] Message/MessageParser.java added as
Message/MessageParser.class doesn't exist.
    [javac] Message/MessagePipe.java added as Message/MessagePipe.class
doesn't exist.
    [javac] Message/ParseException.class skipped - don't know how to
handle it
    [javac] Message/ParseException.java omitted as
Message/ParseException.class is up to date.
    [javac] Message/Tests.java added as Message/Tests.class doesn't exist.
    [javac] Message/TokenGrantMessage$1.class skipped - don't know how to
handle it
    [javac] Message/TokenGrantMessage.class skipped - don't know how to
handle it
    [javac] Message/TokenGrantMessage.java omitted as
Message/TokenGrantMessage.class is up to date.
    [javac] Message/TokenQuantityMessage$1.class skipped - don't know how
to handle it
    [javac] Message/TokenQuantityMessage.class skipped - don't know how to
handle it
    [javac] Message/TokenQuantityMessage.java omitted as
Message/TokenQuantityMessage.class is up to date.
    [javac] Message/TokenQueryMessage$1.class skipped - don't know how to
handle it
    [javac] Message/TokenQueryMessage.class skipped - don't know how to
handle it
    [javac] Message/TokenQueryMessage.java omitted as
Message/TokenQueryMessage.class is up to date.
    [javac] Message/TokenRequestMessage$1.class skipped - don't know how
to handle it
    [javac] Message/TokenRequestMessage.class skipped - don't know how to
handle it
    [javac] Message/TokenRequestMessage.java omitted as
Message/TokenRequestMessage.class is up to date.
    [javac] build.xml skipped - don't know how to handle it
    [javac] depcache/dependencies.txt skipped - don't know how to handle
it
    [javac] kaffe.xml skipped - don't know how to handle it
    [javac] stuff skipped - don't know how to handle it
    [javac] stuff2 skipped - don't know how to handle it
    [javac] Compiling 5 source files
    [javac] Using kjc compiler
    [javac] Compilation arguments:
    [javac] '-classpath'
    [javac]
'/home/rob/cs431:/home/rob/cs431/Message:/home/rob/junit3.8.1/junit.jar:/home/rob/junit3.8.1:/usr/shar
e/ant/lib/ant-launcher.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar:/home/rob/junit3.8.1/s
rc.jar:/usr/share/ant/lib/ant-junit.jar:/usr/share/ant/lib/ant-commons-net.jar:/usr/share/ant/lib/ant-bootstrap.ja
r:/usr/share/ant/lib/ant-apache-resolver.jar:/usr/share/ant/lib/ant-swing.jar:/usr/share/ant/lib/ant-nodeps.jar:/u
sr/share/ant/lib/ant-jdepend.jar:/usr/share/ant/lib/ant-javamail.jar:/usr/share/ant/lib/ant-commons-logging.jar:/u
sr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-trax.jar:/usr/share/ant/lib/ant-apache-oro.jar:/usr/share/ant/lib/
ant-apache-regexp.jar:/usr/share/ant/lib/ant-apache-bsf.jar:/usr/share/ant/lib/ant-apache-log4j.jar:/usr/share/ant
/lib/ant-antlr.jar:/usr/share/ant/lib/ant-apache-bcel.jar'
    [javac]
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.
    [javac] Files to be compiled:
    [javac]     /home/rob/cs431/Gate.java
    [javac]     /home/rob/cs431/Master.java
    [javac]     /home/rob/cs431/Message/MessageParser.java
    [javac]     /home/rob/cs431/Message/MessagePipe.java
    [javac]     /home/rob/cs431/Message/Tests.java
    [javac] /home/rob/cs431/Master.java:32: error:Cannot find class
"MessagePipe" [JLS 8]
    [javac] /home/rob/cs431/Master.java:38: error:Cannot find class
"MessagePipe" [JLS 8]

BUILD FAILED
/home/rob/cs431/kaffe.xml:9: Compile failed; see the compiler error output
for details.
   at org.apache.tools.ant.taskdefs.Javac.compile (Javac.java:938)
   at org.apache.tools.ant.taskdefs.Javac.execute (Javac.java:758)
   at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform (Task.java:364)
   at org.apache.tools.ant.Target.execute (Target.java:341)
   at org.apache.tools.ant.Target.performTasks (Target.java:369)
   at org.apache.tools.ant.Project.executeTarget (Project.java:1214)
   at org.apache.tools.ant.Project.executeTargets (Project.java:1062)
   at org.apache.tools.ant.Main.runBuild (Main.java:673)
   at org.apache.tools.ant.Main.startAnt (Main.java:188)
   at org.apache.tools.ant.launch.Launcher.run (Launcher.java:196)
   at org.apache.tools.ant.launch.Launcher.main (Launcher.java:55)

Total time: 1 second


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


Mime
View raw message