ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: javac task to include properties file
Date Tue, 01 Mar 2005 18:04:46 GMT

--- Jeffrey E Care <> wrote:

> AFAIK javac ignores non-Java files (you can see this
> in verbose or debug 
> mode). If you need to have copies of other file
> types in your "classes" 
> directory then the obvious solution would be to copy
> them. 
> Implementation left as an exercise for the reader.

<target name="compile" depends="copyProps, -init">
  <javac srcdir="${project.src}"
     destdir="${project.classes}" classpath="...">

<target name="copyProps" depends="-init">
  <copy todir="${project.classes}">
     <fileset dir="${project.src}">
        <include name="**/*.properties">

It is a useful exercise :)) One of my very first
errors when I started mastering Ant was that in
compile target I did an <antcall> to copyProps instead
of depending on it. As the build xml grew bigger, it
ended to copying the properties file several times due
to poor design and lots of <antcall>s.
It is also worth noting that when an i18n'ed
application is developed copyProps target is a possble
place for doing <native2ascii> transformation.

Regards Ivan

> -- 
> Jeffrey E. Care (
> WebSphere Build SWAT Team Lead
> WebSphere Build Tooling Lead (Project Mantis)
> "Michael Wang \(IT\)" <>
> wrote on 03/01/2005 
> 11:15:33 AM:
> > any arg to include those properties which will
> copy them from srcdir
> > to targetdir? thanks.

Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.

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

View raw message