ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: MORE:javac fails inside ANT Compilation of dependent files
Date Sat, 18 Aug 2001 13:16:09 GMT

You need to provide a source path with both the proj1 and proj2
directories. You can either do that by using a path construction in the
srcdir attribute or by using a <src> nested element with multiple path
elements - so

<javac srcdir="proj1:proj2">


     <pathelement location="proj1"/>
     <pathelement location="proj2"/>

I haven't tried the above - just from memory so may need some adjustment.
Check the manual.

I am curious however how javac is working from the commandline. I am
guessing it is something to do with classpaths. You can run ant
with -verbose to see the equivalent command line Ant is generating for
javac. Check that out and see where it is different from your manual


----- Original Message -----
From: "Michael Quinn" <>
To: <>
Sent: Saturday, August 18, 2001 3:57 PM
Subject: MORE:javac fails inside ANT Compilation of dependent files

Hello all, have sort of resolved the issue, but not quite


          proj1          proj2  (build.xml in here)
            |              |
           com            com
            |              |
            a              c
            |              |
            b              d
            |              |

    If classpath points to proj1, and I build from command
line, all
    is fine as the javac compiler finds via classpath, and
builds callee.class
    as needed

    From ANT this fails, even if I set classpath and srcdir correctly

    Ant works fine when I have the following, with srcdir set at proj2, but
this is not what I want,
    I want the same behaviour as javac from the command line (above)

                             proj2 (build.xml here, only building
                     ____ com _____
         |               |
         a               c
         |               |
         b               d
         |               |

Can somebody help ??

cheers Michael Quinn

View raw message