ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <>
Subject RE: classpath question
Date Fri, 07 Dec 2001 23:25:35 GMT
> However, if instead we run ant with -classpath (the same
> classpath with some
> java source dirs), the compile fails on an import on one of the
> dependencies
> on one of the source files in the classpath. We also tried setting the
> classpath inside the build.xml file. That didn't work either.

Here is part of my build file... classpath is working great for me.

<path id="project.classpath">
	<pathelement path="${classpath}"/><!-- system classpath... in my case it's
empty -->
	<fileset dir="${lib.home}">
		<include name="**/*.jar"/><!-- This are external jar files -->
	<pathelement location="${src.home}"/> <!-- src.home points to the directory
under 				which all my java files are arranged in directories according to
			standard package naming -->

	<!-- this is the portion that compiles the sources -->
		<classpath refid="project.classpath"/>

Hope this example helps. Otherwise I would suggest posting the appropiate
parts of your buils file and I'll take a look and see what is going on.
You should note that the path element is not under a target, but declared
before any target so that it can be reused in other parts. The javac part IS
declared inside a target.

Good Luck.

Ylan Segal.

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

View raw message