You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ja...@rzf.fin-nrw.de on 2004/03/08 09:37:09 UTC
RE: Creating different jar files for each package in source direc
tory
Using AntContribs iterators (<for>,<foreach>) if you want to handle that
dynamically or using <macrodef> if you can hardcode your packages.
Ant´s buildfile (1.6) uses the second for the optional jar´s.
Jan
0196: <selector id="needs.apache-resolver">
0197: <filename name="${apache.resolver.type.package}/**"/>
0198: </selector>
0199:
0200: <selector id="needs.junit">
0201: <filename name="${optional.package}/junit/**"/>
0202: </selector>
0203:
0204: <selector id="needs.jakarta-regexp">
0205: <filename name="${regexp.package}/JakartaRegexp*"/>
0206: </selector>
0833: <macrodef name="optional-jar">
0834: <attribute name="dep"/>
0835: <sequential>
0836: <jar destfile="${build.lib}/${optional.jars.prefix}-@{dep}.jar"
0837: basedir="${build.classes}"
0838: manifest="${manifest.tmp}">
0839: <selector refid="needs.@{dep}"/>
0840: </jar>
0841: </sequential>
0842: </macrodef>
0848: <optional-jar dep="apache-resolver"/>
0849: <optional-jar dep="junit"/>
0850: <optional-jar dep="jakarta-regexp"/>
> -----Original Message-----
> From: Prasad Iyer [mailto:Prasad.Iyer@lntinfotech.com]
> Sent: Monday, March 08, 2004 9:23 AM
> To: user@ant.apache.org
> Subject: Creating different jar files for each package in source
> directory
>
>
> Hi,
> Is there a way to create a different jar files for each
> package using only
> one target.
> I have got this ejbs package I want to bundle this whole thing into
> different jar files and then add it to ear file
> regards
> prasad chandrasekaran
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> This email may contain confidential or privileged information for the
> intended recipient(s). If you are not the intended recipient,
> please do not
> use or disseminate the information, notify the sender and
> delete it from
> your system. Thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>