tags:

views:

315

answers:

1

I have a fileset which contains a number of jars of which I only want a subset. I'm currently doing this:

<target name="work-around">
    <delete dir="${dir.deps}" failonerror="false" />
    <copy todir="${dir.deps}" flatten="true">
      <restrict>
        <fileset refid="mvn.deps.fileset" />
        <rsel:name name="**/mycompany-core*.jar" />
      </restrict>
    </copy>
</target>

<target name="dist" depends="work-around">
    <zip destfile="${dir.dist}/whizbang.zip">
        <zipfileset dir="${dir.deps}" prefix="deps" />        
    </zip>
</target>

Is there a way to do this without the copy? I'm thinking that I can create some type of virtual fileset which has the restriction, then refer to it as a refid in . Note I'm also flattening things, which may make it harder/impossible.

A: 

< zipfileset exclude="excludeddir or file..."

Silence
I didn't see a flatten arg to zipfileset. Note that's also happening in my copy. I could be blind here. I feel like I've hit a wall on this whole thing.
trenton
I'm not sure I'm following. Is the exclude argument working for you ? - What do you mean by flatten argument ?- "that's also happening in my copy" what's also happening... Id be glad to help but I don't understand what you're saying...
Silence