ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Harp" <mh...@seapine.com>
Subject RE: Jar ...
Date Wed, 17 Dec 2003 19:52:27 GMT
You have to use the Fileset element to force it to respect paths.

Here's how I include some iamges in my jar and force it to maintain the path
structure

      <jar jarfile="${dist}/${jar.filename}" compress="false"
manifest="${src}/build.manifest">
         <fileset dir="${build}" />
         <fileset dir="${src}" includes="com/harpm/**/*.png" />
         <fileset dir="${src}" includes="com/harpm/**/*.mng" />
         <fileset dir="${src}" includes="com/harpm/**/*.gif" />
      </jar>

HTH,

matt
mharp@seapine.com

> -----Original Message-----
> From: Martín Mauri [mailto:mmauri@profesi.com.ar]
> Sent: Wednesday, December 17, 2003 2:46 PM
> To: user@ant.apache.org
> Subject: Jar ...
>
>
>
> Hi users!
>
> I'd like to generate a set of jars files and it turns out to be that the
> build.xml file has the folowing as a sample:
>
> <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
>
> now suppose I have the following dir: "sellers" and the following sellers:
> Tom, Paul and John, now the structure would be like:
>
> sellers
>    |
>    ---- Tom
>    ---- Paul
>    ---- John
>
> but the problem is that I want to generate a jar file for each seller with
> the classes that are inside each directory ie: a Tom.jar for
> Tom's classes,
> a Paul.jar for Paul's and so on...That can't be possible with the
> jar tag as
> if I put something like
>
> <jar jarfile="${dist}/lib/Tom.jar" basedir="${build}/Tom"/>
>
> it will include all Tom's files but won't respect the path for
> the classes,
> instead of including sellers/Tom/class1.class it will add
> class1.class...is
> there any property for the jar tag that can do that?
>
> thanks,
>
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message