ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Adding multiple external JARS using Ant
Date Wed, 30 Sep 2009 11:33:30 GMT
 

-----Original Message-----
From: not4google [mailto:kapil.x.johri@jpmorgan.com] 
Sent: Wednesday, September 30, 2009 1:22 PM
To: user@ant.apache.org
Subject: Adding multiple external JARS using Ant

/*

Hi all

I have the following target:

	<target name="CreateExecutableJarFile">
		<jar destfile="XXX.jar">
			<zipfileset dir="build/classes" prefix="" />
			<zipfileset dir="lib" />
			<manifest>
				<attribute name="Main-Class" value="com.x.y.z.Hello" />
			</manifest>
		</jar>
	</target>

When I run the JAR from the command line I get ClassNotFoundExceptions and
this is because some external JARS are not accessible. How can I add
numerous external JARS e.g. Spring.jar so this all works?

*/

<manifest>
  ...
  <attribute name="Class-Path" value="jar1-name jar2-name directory-name/jar3-name" />
...
</manifest>

see =
http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html


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


Mime
View raw message