ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mads...@att.net
Subject Re: Adding output
Date Sat, 27 Jan 2001 15:50:00 GMT
Actually, that was extremely helpful. Maybe I can attach 
to the logfile, as Nese has described. Thanks for the 
explanation, it was quite good. :)

~A!
> ----- Original Message -----
> From: <madscie@att.net>
> To: <ant-dev@jakarta.apache.org>
> Sent: Friday, January 26, 2001 9:10 PM
> Subject: Re: Adding output
> 
> 
> > Thanks for the input Nico, but I think I might need to
> > clarify a little bit. I am looking for the files ant is
> > going to build. It has to know this. If it didn't know
> > which files it was going to build, how would it work? It
> > seems to me that ant is doing something completely
> > different from what I am trying to do, so it looks like
> > I'll have to parse the files manually, and run through
> > all of the files I find that match the build file.
> >
> 
> I'm not sure I understood it now. Do you want to know what files running ant
> on your buildfile will create before you do it, or do you want to know what
> files got created by the last build?
> 
> For the last one see the reply from Nese Myles.
> 
> If you want to know it before running the build I will try to explain why
> ant does not (and does not need to) know exactly what you want to know.
> 
> You compile sources with ant if you use a javac-task inside your buildfile.
> With this task you specifiy a source-directory and a destination-directory.
> Ant now scans the source and destination and calls the java-compiler with
> all the sources which are newer than a class in the destination or where the
> classfile is missing. It will not look at inner classes, it will not look at
> non-public classes which may occur together with a public class inside one
> file and it will have no influence on the compiler while it is running. If
> the compiler decides it needs to compile some more classes than it get
> passed it will do so (dependency-flags may result in such things).
> 
> To make things more complicated you may have a buildfile that looks like
> (not buildfile-syntax)
> 
> target1:
>   compile from src1 to classes1
>   set property "foo" to true if there is a file
> classes1/com/company/Foo.class
> 
> main (depends target1, only run if "foo" is defined):
>   compile from src2 to classes2
> 
> Dependencies are run before the if/unless arguments are checked for.
> 
> So what do you expect ant to do if you run "ant -listclasses main" (execute
> target "main", but don't do anything, just list classes)? Ant would need to
> emulate a compiler (or four compilers since they may behave differently) to
> decide if the Foo.class would be generated (get's more complicated if it's a
> non-public class, since it may not have it's own source-file). This needs to
> be done to decide if main would really be run afterwards and if the classes
> from the javac in main would be generated or not.
> 
> Sorry if I have explained something (if this explained something) you didn't
> want to know :-)
> 
> Nico
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org
> 

Mime
View raw message