I created a "src/foo/Foo.java" in addition to my "src/Foo.java". Neither of them is attempted to be compiled. My basedir was previously "." and I was executing ant in the dir above src. That's when I emailed the list. However, I've tried hardcoding in both my basedir for the project ("/home/jeb/projects/ordermgmt") and the srcdir for the compile target ("/home/jeb/projects/ordermgmt/src") and neither changes anything. with those set as above, here is some output from my shell: $ ls src/foo/ Foo.java $ less src/foo/Foo.java public class Foo{ this should break the compiler } $ build Buildfile: build.xml Project base dir set to: C:\home\jeb\projects\ordermgmt Executing Target: prepare Executing Target: compile Compiling 18 source files to \jdk1.3\jakarta-tomcat\webapps\nnt\WEB-INF\classes Performing a Modern Compile Completed in 1 seconds If I go into build.xml and change srcdir in the compile target to be nonsense, ant exits with a "dir does not exist!" error, so it's finding the directory, it's just not taking a shot at the .java files contained therein. jeb. > -----Original Message----- > From: Diane Holt [mailto:holtdl@yahoo.com] > Sent: Tuesday, January 09, 2001 1:00 PM > To: ant-user@jakarta.apache.org > Subject: Re: ant and I have a failure to communicate (on compile > targets/javac tasks) > > > Jeb, > > I just tested this, and it worked fine for me (although I did > change a few > things in the target, to make it match my dirs/classpath): > > classpath="${compile.classpath}" > debug="on" optimize="off" deprecation="off"/> > > I created "src/foo" under my basedir, then put your Foo.java > in src/foo, > ran 'ant', and it resulted in: > Buildfile: test.xml > Target: compile > [javac] Compiling 1 source file to D:\dianeh\src\main\classes > [javac] D:\dianeh\src\main\src\foo\Foo.java(1): Type expected > [javac] 1 error(s), 0 warning(s) > > BUILD FAILED > test.xml:200: Compile failed, messages should have been provided. > Total time: 1 second > > Are you sure that the "src" dir that's relative to your > "basedir" is the > one that contains your java source? If there aren't any .java > files in the > srcdir pointed to, won't complain about not finding > any. You might > want to try explicitly 'ing Foo.java and see what > happens that > way. > > Diane > > --- "Boniakowski,Jeb" wrote: > > Hi. Sorry for this admittedly annoying type of question, > but I can't > > figure > > out the answer, after reading everything else I could find. > > > > I'm using basically the included build.xml. Here's the > compile target: > > > > > > > classpath="${deploy.home}/WEB-INF/classes" > > debug="on" optimize="off" deprecation="off"/> > > > > > > Haven't changed it all. All of my directories are set up > as suggested > > by > > the docs. > > > > The comment in build.xml says that the "javac" task should > recurse down > > the > > dir tree compiling classes that don't exist or are newer than their > > .class > > files. Well, mine doesn't even go down one level. If I > put a file in > > src > > that looks like this: > > > > Foo.java: > > public class Foo{ break compiler } > > > > Ant marches on ahead without complaint. There is no Foo.class in my > > {deploy.home}/WEB-INF/classes directory. It copies > non-.java files from > > my > > src/ dir fine. If I do "build clean", my webapps/nnt (name > of my app) > > is > > deleted. If I do build all, it is deleted and then all of > the classes > > are > > copied back to the same place and work fine and all, but > only if I go > > through the src/ try and manually compile them first. > > > > Does anyone have any idea what I am missing here? > > > > jeb. > > > > > ===== > (holtdl@yahoo.com) > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Photos - Share your holiday photos online! > http://photos.yahoo.com/ >