ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Rooney <roo...@rpi.edu>
Subject stupid newbie questions
Date Fri, 16 Jun 2000 15:57:20 GMT
so in an attempt to free my project from the hell that is make, i'm trying
to get a build system setup using ant.

first problem:  we use jdk1.3, and in the 3.1 release of ant, the
doModernCompile method in Javac.java is empty except for a logging message
that leads you to believe that more is being done than actually is.  as a
stopgap measure, i copied the doClassicCompile method into the
doModernCompile method, and it seems to function.  is there any good
reason not to do this?  in retrospect, i'm assuming this is probably fixed
in the cvs version, but that didn't occur to me at the time.

second problem.  now that i'm able to get ant to compile things, the
srcdir and destdir portions of the <javac/> tag seem to be acting weird.

srcdir is pointing to the root of our development tree (a directory called
rcn), and destdir is pointing to the build directory.  when i run ant, it
places all the compiled classes in build/rcn (rcn is the name of the
project, and the name of the srcdir), and then copies all non .java files
into build.  so the class files end up in a different directory structure
than the other files. 

is there any way to simply have ant compile the .java files in place, and
refrain from copying anything anywhere?  that's how our current makefile
system works, and we're fine with that.

here's the build.xml file i've been playing with...  (you know, i've got
this feeling i'll figure out my stupid mistake as soon as i send this
mail, but oh well)

<project name="rcn" default="compile" basedir=".">

  <property name="src" value="rcn"/>
  <property name="dst" value="build"/>

  <target name="compile">

    <fixcrlf srcdir="${src}"
        includes="*.java"/>
    
    <javac srcdir="${src}"
           destdir="${dst}"
           debug="on"
           deprecation="on"
           optimize="on" >
    </javac>

  </target>

</project>

thanks,

-garrett

x----------------------------------------------------------------------x
| rooneg@rpi.edu                                        garrett rooney |
| http://www.rpi.edu/~rooneg                                 unix geek |
|----------------------------------------------------------------------|
|  unrequited love is neat because it lasts so much longer - w. t. c.  |
x----------------------------------------------------------------------x


Mime
View raw message