ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: The new archives task
Date Wed, 03 Mar 2010 04:46:34 GMT
On 2010-03-02, Christian Beil <christian.beil@web.de> 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message