ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mika Moilanen <>
Subject (javac task): Compiling depedencies doesn't work...
Date Mon, 28 Oct 2002 09:17:28 GMT

This is a very novice question, since I've been playing with Ant only
few days now.

I'm interested to find out how Ant works, what is the fundamendal
relationship with javac? In order to find this out, I set up a dummy
project with two classes:

Foo calls a method of thus has a dependency towards it.

I set up a project with directories



Here's my primitive build.xml:

<project name="Dummy project" default="compile">
  <property name="build.sysclasspath" value="ignore"/>
  <path id="project.class.path">
    <pathelement location="/vob/tms-os/experimental/java/dep"/>

  <target name="init" description="ultimate dependency of all other targets">

  <target name="compile" description="ultimate Javac compilation target" 

Now, when I say "ant" on .../com/foo, it let javac to compile both
classes. But to my surprise, when I change .../com/bar/,
Bar.class is not reproduced....Of course, if I use plain javac

	  javac -classpath /vob/tms-os/experimental/java/dep

Bar.class get correctly recompiled. 

This way of using Ant would be in line with the way my project works
-- one developer is working with one package. One way to achieve
correct recompilation would be to add .../dep/com/bar also to javac
task's "srcdir", but it would cause lots of unnecessary

Are there any other ways to achieve correct compilation of Foo/Bar

Best Regards, 
----------------------------------------------------------  phone: +358-0-511-23587
Nokia Networks, PO box 320, FIN-00045 NOKIA GROUP, Finland

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

View raw message