Hi Stefan,

Thanks for your answer.
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.
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.
I tried to put the exclude as sub-task of archives, but archives only supports zips and tars as sub-tasks.

Like before, your help is greatly appreciated.

Regards,
Christian


Stefan Bodewig schrieb:
On 2010-03-01, Christian Beil <[email protected]> wrote:

But what if I want to filter the files in the dependency jars somehow,
and not the jar files themself.
I thought I could use <archives> and <zips>,

Likely.

but they don't seem to be supported as sub-tasks of <jar>.

<archives> should be, as long as you are using Ant 1.8.0.  Taking your
example

<jar jarfile="${jar.file}">
   <fileset dir="${classes.dir}"/>
   <fileset file="UnicodeCharacters.ini"/>
     <archives>
       <zips>
         <fileset dir="${lib.dir}">
           <include .../>
         </fileset>
       </zips>
     </archives>
   <manifest>
       ...
   </manifest>
</jar>

Should work.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to