ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Toomey <>
Subject Problem with javac task using -sourcepath
Date Thu, 06 Jul 2000 15:05:04 GMT
I've run into a problem using the javac task and the
way it creates the -sourcepath parameter. I've just
started using Ant (which is great, by the way), so the
problem could very well be mine :p. Any help would be
greatly appreciated.

The javac task passes the srcdir attribute as the
-sourcepath. If the -sourcepath attribute is passed to, only the -sourcepath is searched
for source files during compilation as opposed to the

So if my directory structure looks like this:

     \testa (package testa)
     \testb (package testb)

and contains:

package testa;
import testb.classb;

public class classa {

	classb bb;

	public classa(){
		bb = new classb();

and my build.xml looks like:

<?xml version="1.0"?>

<project name="foo" default="all" base="/test">
  <target name="init">
    <property name="in" value="${base}/java" />
    <property name="out" value="${base}/classes" />
  <target name="all" depends="init"> 
    <javac srcdir="${in}/testa" destdir="${out}"/>

the build fails, because only /test/java/testa is
searched, for 

Am I missing something?

Thanks for any help,


Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.

View raw message