ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krats <>
Subject Providing multiple jars for a given manifestclasspath
Date Sat, 20 Feb 2010 00:19:56 GMT

I have a build.xml that has multiple jar targets which share a common
classpath. For putting the classpath into the manifests of these jars
without repeating the list of files in the classpath, I am trying to use the
manifestclasspath as follows 

<path id="my-classpath.ref">
     <fileset dir="jarlib" includes="*.jar"/>

<manifestclasspath property="jar-lib.list" jarfile="app.jar">
     <classpath refid="my-classpath.ref" />

<target name="build-app">
        <javac destdir="lib" source="${source}" target="${target}">
            <src path="${srcroot}"/>
            <classpath refid="my-classpath.ref"/>
	<jar destfile="app.jar" >
	          <attribute name="Main-Class" value="com.xx.yy.class" />  
	          <attribute name="Class-path" value="${jar-lib.list}" />  

My question is, if I want to use the same manifestclasspath  for multiple
jars, how do I specify multiple jars in the jarfile attribute of
manifestclasspath .

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message