First thing I would suggest is to:

1) Get rid of the "includes" attribute since the <javac> task is smart
enough to know to pick up *.java -- or,
2) Set the "includes" and "excludes" attributes as follows:

        ....
        includes="**/${build.includedFiles}"
        excludes="**/${build.excludedFiles}"

I'd also suggest (but not certain that it's even the problem) to use
"*.java" instead of "**.java".  I believe one asterisk is enough to specify
the pattern match 'everything with a .java extension'.



-----Original Message-----
From: Scott Ellsworth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 4:58 PM
To: Ant List
Subject: Any way to echo a fileset?


Hi, all.

I am trying to figure out why none of my files are getting compiled in 
one of my projects.  I presume it is something very easy, but that I am 
not seeing it because I have been staring at it all day.  If I could 
find out exactly what path on the filesystem it was looking at, I might 
be able to spot it.

I have provided below the grungy details of what I cannot find, so if 
someone does see an obvious boo-boo, I would really appreciate a pointer.

I recently reorganized the world into:

build
   standardProperties.properties
   standardTargets.targets
node_model
   build.xml
   source
     org
       metagraph
         node
           model
             Action.java

For the next few tasks, the following defines have been read.

build.basedir=ant_build
compile.source=source
compile.classes=${build.basedir}/classes
compile.classpath=""
build.includedFiles="**.java"
build.excludedFiles=""

My depend task contains:

     <mkdir dir="${compile.classes}"/>

My javac task is:

<target name="compile">
   <echo message="building ${compile.source} with 
${build.includedFiles}"/>
   <echo message="building ${build.includedFiles}"/>
   <javac
     srcdir="${compile.source}"
     destdir="${compile.classes}"
     classpath="${compile.classpath}"
     excludes="${build.excludedFiles}"
     includes="${build.includedFiles}"
     verbose="true"
   />
</target>

In my output, I see:

Project base dir set to: 
/Users/work/Documents/coding/isis/source/node_model
parsing buildfile 
/Users/work/Documents/coding/isis/source/node_model/build.xml with URI = 
file:/Users/work/Documents/coding/isis/source/node_model/build.xml
Override ignored for user property basedir
Project base dir set to: 
/Users/work/Documents/coding/isis/source/node_model

(NB - this base dir is correct - I want the build based out of 
node_model)

  [property] Loading 
/Users/work/Documents/coding/isis/source/build/standardProperties.properties
resolving systemId: file:../build/standardTargets.xml

(NB - This file is, indeed, in ../build, so it looks like am I based in 
node_model just like it says.)

depend:
     [mkdir] Created dir: 
/Users/work/Documents/coding/isis/source/node_model/ant_build/classes

(NB - from the depend task, we now know that ${compile.classes} is 
node_model/ant_build/classes )

compile:
      [echo] building source with **.java

(NB - this is from "building ${compile.source} with 
${build.includedFiles}", so we see that it should be looking for **.java 
files in source.  Given that the basedir is stuff/node_model, the source 
should be sought in stuff/node_model/source.)

      [echo] building **.java

(NB - this one is from "building ${build.includedFiles}")

And that is it.  No other messages from javac, and no other 
information.  Also, no class files found in the output.

 From the shell:

ls 
/Users/work/Documents/coding/isis/source/node_model/source/org/metagraph/nod
e/
model
Action.java

So, if it is looking in node_model/source for my source, it will find 
org, and under org, it will find Action.java.  Why is it not compiling?

Scott


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to