ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <>
Subject RE: Windows cmd line length problems
Date Mon, 15 Oct 2001 19:13:26 GMT
You can set your classpath dinamycally in ant to include all your jars...
[Parts of my own build.file]
<path id="project.classpath">
	<pathelement path="${classpath}"/>
	<fileset dir="${lib.home}">
		<include name="**/*.jar"/>
	<pathelement location="${src.home}"/>
This will add all .jar files in {lib.home} to project.classpath path. Then
you can use it like:

<target name="compile" depends="prepare">
		optimize="on" >
		<classpath refid="project.classpath"/>

Pretty cool, don't you think? This is a great way to do it, because if new
jars are added you just put them into your lib.home (or whatever you wish to
call it) and that is it.. they will be in your classpath.

Good Luck.


> -----Original Message-----
> From: Jesse Vitrone []
> Sent: Monday, October 15, 2001 12:35 PM
> To:
> Subject: Windows cmd line length problems
> I'm sure people have run into this problem there a good
> solution?
> We have a build.bat file which creates the needed classpath, then passes
> that on to Ant to do the build.  We have a lot of jars that need to be
> in the classpath.  Recently, we needed to add another jar, and now the
> build.bat fails because the line length is too long.
> Are we not using Ant right?  Is there a way around this problem that
> we're having?  I would think that people have run into this problem
> before.
> Thanks in advance,
> 	Jesse

View raw message