ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: Use of zipfileset
Date Thu, 19 May 2005 15:23:25 GMT
Hello Archit,

> --- Urspr√ľngliche Nachricht ---
> Von: <ArchitP@mastek.com>
> An: <user@ant.apache.org>
> Betreff: Use of zipfileset
> Datum: Thu, 19 May 2005 18:15:59 +0530
> 
> Hi 
> 
> I have to create a jar that includes other external jars. I want those
> external jars to be present in the classpath.
> For this I am using the <zipfileset> task. 

<zipfileset> is a type, not a task.

> But the problem with the
> 'src' attribute of <zipfileset> is that I can mention just one jar in
> the src attribute. But I have to include jars from a "lib" directory,
> and src attribute does not take **/*.jar.
> 
If you want to repackage in a new jar all the classes present in a number of
jars, then you need to nest one <zipfileset/> element per jar you want to
include.
> The script I have written is
> 
> <project name="myProject" default="main" basedir=".">
>     <target name="main">
>         <jar destfile="myProject.jar">
> 		<!--PROBLEM HERE :: In the src attribute I want to
> include multiple jars-->
>             <zipfileset src="myOwnJar.jar"/>
>             <manifest>
>                 <attribute name="Built-By" value="${user.name}"/>
>                 <attribute name="Main-Class"
> value="com.mycompany.gui.Main"/>
>             </manifest>
>         </jar>
>     </target>
> </project>
> 
> The lib folder has all the jars and I want to include those jars. Is
> there any other way of doing this.
> I tried with the <zipfileset> dir attribute but that includes the jar
> and the jar is not present in the classpath.
> 
> 
> Regards,
> 
> Archit
> 
> given enough eyeballs, all bugs are shallow
> 
> 
> 
> 
Antoine

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


Mime
View raw message