ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Stevens <insomniacpeng...@googlemail.com>
Subject Re: Copy arbitrary files into jar (generation)
Date Fri, 14 Aug 2009 22:31:25 GMT
2009/8/14 Mike Baranczak <mbaranczak@gmail.com>:
>2009/8/14 supareno <reno.rkcrew@free.fr>:
>>           <fileset dir="/dv/ws/javasources">
>>        <include name="**/*.java"/>
>>            </fileset>
>
> 2. What this fileset specifies is "all Java files in directory
> /dv/ws/javasources/". It doesn't say anything about creating a "javasources"
> directory in the jar.
>
> You probably want something like this:
>
> <fileset dir="${basedir}/dv/ws">
>   <include name="javasources"/>
> </fileset>

Or, given that http://ant.apache.org/manual/CoreTasks/jar.html states
"The extended fileset and groupfileset child elements from the zip
task are also available in the jar task",

<zipfileset dir="${basedir}/dv/ws/javasources" includes="**/*.java"
prefix="srcfiles"/>

could work too, and allows for using a different directory name for
those files in the zip.


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java sudoku creator

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


Mime
View raw message