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.