The problem is that, presumably, you want the classes beneath the
class.dirs elements to be added to the jar relative to each element. Off
the top of my head it occurs to me that you could iterate using antcontrib
<for> and update the jar for each directory.

HTH,
Matt
On Feb 13, 2014 3:27 PM, "Edwin Castro" <0ptikgh...@gmx.us> wrote:

> I have a handful of paths defined as
>
> <path id="class.libs">
>     <pathelement location="blah/blah.jar"/>
>     ...
> </path>
>
> <path id="class.dirs">
>     <pathelement location="blah/blah"/>
>     ...
> </path>
>
> <path id="class.path">
>     <pathelement refid="class.libs"/>
>     <pathelement refid="class.dirs"/>
> </path>
>
> I have a need to merge the .class files in the jars and directories
> specified by class.libs and class.dirs into a single jar. I can merge
> the jars using
>
> <pathconvert property="class.libs" refid="class.libs"/>
>
> <jar destfile="${jar.file}">
>     <fileset dir="${classes.dir}" includes="*.class"/>
>     <restrict>
>         <name name="**/*.class"/>
>         <archives>
>             <zips>
>                 <path path="${class.libs}"/>
>             </zips>
>         </archives>
>     </restrict>
> </jar>
>
> How do I include all of the .class files in the directories specified in
> class.dirs in ${jar.file} as well?
>
> --
> Edwin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>
>

Reply via email to