ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: properties files aren't getting included
Date Tue, 22 Jan 2002 20:12:58 GMT

----- Original Message -----
From: "Nick Bauman" <nick@cortexity.com>
To: <ant-user@jakarta.apache.org>
Sent: Tuesday, January 22, 2002 09:50
Subject: Re: properties files aren't getting included



> > I would add a copy task in the compile target which copies
> > **/*properties from src to build
>
> Yes, I did that and that has solved the problem. Thanks. I added the
> entity to the "compile" target in my build.xml and it's now working fine.
> In particular, I added:
>
> <copy todir="${build}/org/foo/messages">
>   <fileset dir="${src}/org/foo/messages">
>     <patternset id="props" >
>       <include name="**/*.properties"/>
>     </patternset>
>   </fileset>
> </copy>
>
> I guess I was making a stupid assumption that compiling would
> automatically do this for me.


It did a long time ago, but now only java files get pulled over. The reason
was that too much other cruft kept getting into the JAR file; random text
files, the odd bit of binary, etc. Now you have to be explicit about
bringing stuff in.

NB, you could do a tree copy in a way which is easier to re-use in followup
builds:

 <copy todir="${build}">
   <fileset dir="${src}" includes="**/*.properties,**/*.xml,**/*.dtd"/>
 </copy>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message