ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: auto dependency generation?
Date Thu, 11 Apr 2002 18:07:52 GMT

On 04/10/2002 11:59:50 PM, "Conor MacNeill" wrote:
> Javac compiler will handle this issue. If a class, which is required,
> does not yet exist, javac will attempt to find a source file by looking
> at the source path.

After digging into the various options including <depend>, it does
seem like javac should be magically taking care of this.  Here are a
few snippets of build.xml (BTW, I couldn't find a good example in the
Ant manual...some simple generic build.xml should probably be in there
and you're welcome to use the one I have below if there aren't any
problems with it) and the results from debug/compile:

<project name="TransMedia" default="compile" basedir=".">
      <property name=""   value="transmedia" />
      <property name="build.dir"  value="build/classes" />
      <property name="jar.dir"  value="build/lib" />

      <target name="compile">
          <mkdir dir="${build.dir}"/>
          <javac srcdir="src/" destdir="${build.dir}" >
              <include name="**/*.java"/>
                  <pathelement path="${classpath}"/>
                  <fileset dir="lib">
                      <include name="**/*.jar"/>

      <target name="jar" depends="compile">
          <mkdir dir="${jar.dir}"/>
          <jar jarfile="${jar.dir}/${}.jar"
               basedir="${build.dir}" includes="**/*"/>

      <target name="clean">
          <delete dir="build"/>


========== relevant ant -debug info:
    [javac] Files to be compiled:

===========javac error:
    [javac] F:
\work\Transcend\TransMedia2\src\com\transcend\utils\MultiContentSe cannot resolve symbol
    [javac] symbol  : class ProgressListener
    [javac] location: class MultiContentSender
    [javac]                                     private ProgressListener


The ProgressListener Interface is in in the
same directory (com/transcend/utils) as
The only thing I could think of is javac isn't including "." in the
sourcepath, but couldn't see a way of setting it (only the javadoc
tag in build.xml has a sourcepath value).


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message