ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: ANT Capability
Date Thu, 28 Feb 2002 18:09:50 GMT
--- "Atluri, Vamsi                NYC" <> wrote:
> I am having a bit of trouble understanding how to put the code together
> for javac to read in
> I have not tried the below yet - Obviously it wont work - But i dont
> understand how to parse the file into - or how to let javac know that it
> should compile from the bean.txt
>     <target name="compile" depends="init">
>             <!-- Compile the java code from ${src} into ${build} -->
>             <javac srcdir="${cfnCoreDB}" destdir="${buildCfn}" 
>             <patternset>
>       		<includesfile name="d:\scripts\cfn\bean.txt" /> 
>       	    <patternset/>
>     </target>

Get rid of the <patternset> -- <includesfile> nests under <javac> (or just
use the simple 'includesfile' attribute).

> Also - What should my bean.txt look like - At the moment i have each
> java file listed on every line

You can do that, or you can use wildcards, or a combination of both. The
filenames should start with the next directory down from your 'srcdir'.
For example:

> Even this example - Looks closer to what i want but - when you tell
> javac src path - Would it compile everything in src and src2 then 
>     <javac destdir="${buildcfn}"
>                  debug="on">
>         <src path="${src}"/>
>         <src path="${src2}"/>
>         <includesfile name="d:\scripts\cfn\bean.txt"/>
>   </javac>

No -- it'll compile (when necessary) all the files specified in the
bean.txt file, looking for them relative to ${src} or ${src2} (if not
found in ${src}).

(Just as a side note: You might want to reconsider that hard-coded
full-path for the includes file -- better to define the directory in a
property, along with the other directory properties you're defining.)



Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!

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

View raw message