ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <y...@digiworks.tv>
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"/>
	</fileset>
	<pathelement location="${src.home}"/>
</path>
....
This will add all .jar files in {lib.home} to project.classpath path. Then
you can use it like:

...
<target name="compile" depends="prepare">
	<javac
		srcdir="${src.home}"
		destdir="${compile.to}\"
		debug="on"
		optimize="on" >
		<classpath refid="project.classpath"/>
	</javac>
</target>
...

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.

Ylan.

> -----Original Message-----
> From: Jesse Vitrone [mailto:jvitrone@GiantBear.com]
> Sent: Monday, October 15, 2001 12:35 PM
> To: ant-user@jakarta.apache.org
> Subject: Windows cmd line length problems
>
>
> I'm sure people have run into this problem before...is 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
>
>


Mime
View raw message