ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Path, refid, <src>
Date Fri, 26 Apr 2002 18:40:19 GMT
As Diane pointed out, <path> is normally a collection of ordered
directories, not of individual files. <classpath> conceptually is also a
<path> which can contain JAR and ZIP files. In your example, your <path
id="framework.src"> should be a <fileset>, since it appears to be the files
you want to compile. By the way, your second <include> for looks suspicious. If the class name if
client.AbstractAppServer instead of eshop.src.client.AbstractAppServer, then
your include is probably wrong...

Assuming you have sources in:
${base.dir}			for your "framework" package
				(should be "com.versant.framework"?!)
${base.dir}/eshop/src	for the "client" package of the eshop module

Your <javac> task should look something like this:

<javac destdir="${out.classes.dir}"
  <classpath path="${project.class.path}"/>
  <src path="${base.dir}" />
  <src path="${base.dir}/eshop/src" />
  <include name="framework/**" />
  <include name="client/**" />

What people normally do is compile all the sources under a single "src" or
"sources" directory. Also, the <classpath> inside the <javac> task usually
refers to another one defined elsewhere with an id, and it's refid'd.

Anyways, I hope this helps. --DD

-----Original Message-----
From: Gurdev Parmar [] 
Sent: Friday, April 26, 2002 12:42 PM
To: Ant Users List
Subject: Path, refid, <src>

my build.xml has something like this:

<project ......>

<path id="framework.src">
    <fileset dir="${base.dir}">
    <include name="framework/*.java"/>
     <include name="eshop/src/client/"/>

    <target name="framework"
            description="Creates framework.jar in install directory">
        <javac destdir="${out.classes.dir}" failonerror="true"
               debug="${debug}" deprecation="${deprecation}"
            <src refid="framework.src"/>
            <classpath path="${project.class.path}"/>

Now, I get the following error 
N:\gsp_v\test\syseng\java\framework\ is not a

Isn't path id supposed to be used to have a template of a set of files?
Or is it for a template of directories? If it is for directories, why was it
like that?

Is this a bug? I am using: Ant version 1.4.1 compiled on October 11 2001.

Thanks in advance,

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

View raw message