On 2010-03-02, Christian Beil <[email protected]> wrote:
> I was really hoping that there was finally a solution, but it doesn't
> seem to work.
> Using excludes or includes inside the fileset
> <jar jarfile="${jar.file}">
> <fileset dir="${classes.dir}"/>
> <archives>
> <zips>
> <fileset dir="${lib.dir}">
> <exclude .../>
> </fileset>
> </zips>
> </archives>
> <manifest>
> ...
> </manifest>
> </jar>
> only filters the jar files in the ${lib.dir}, but not the files in the
> jar files.
That's right. To filter the contents of the <archives> wrap a
<restrict> around it with the selectors you need.
> So if I have the following jars and content
> a.jar
> a1.class
> a2.class
> b.jar
> b1.class
> b2.class
> and exclude name="a2.class", this filters nothing because the filter
> is applied to a.jar, b.jar.
> I could exclude name="a.jar" and have the whole a.jar excluded from
> the output.
> But I would like to only exclude a2.class.
> <jar jarfile="${jar.file}">
> <fileset dir="${classes.dir}"/>
<restrict>
> <archives>
> <zips>
> <fileset dir="${lib.dir}"/>
> </zips>
> </archives>
<not>
<name name="a2.class"/>
</not>
</restrict>
> <manifest>
> ...
> </manifest>
> </jar>
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]