Maybe you could , instead of the sourcefiles attribute, nest a fileset in your javadoc task Otherwise, you could try sourcefiles="${src.dir}/MyTest.java" Does this help ? Antoine ----- Original Message ----- From: "Andrew Fleet" To: Sent: Friday, May 30, 2003 8:01 PM Subject: Javadoc : File not found > Hi, > I have a build.xml file in C:\JavaTest, the part relavent to javadoc > follows, > > > > > > sourcepath="${src.dir}" > sourcefiles="MyTest.java" > destdir="${doc.dir}/api" > author="true" > version="true" > use="true"> > > > > > > > src.dir equates to "src", and doc.dir to "doc". My single source file is in > c:\JavaBuild\src. However the target gives me the follwoing error, > > javadoc: File not found: "C:\JavaBuild\MyTest.java" > > runing ant -v gives me this, > > javadocs: > [javadoc] Generating Javadoc > [javadoc] Executing 'C:\j2sdk1.4.1_02\bin\javadoc.exe' with arguments: > [javadoc] '-d' > [javadoc] 'C:\JavaBuild\doc\api' > [javadoc] '-use' > [javadoc] '-sourcepath' > [javadoc] 'C:\JavaBuild\src' > [javadoc] '-version' > [javadoc] '-author' > [javadoc] 'C:\JavaBuild\MyTest.java' > [javadoc] > [javadoc] The ' characters around the executable and arguments are > [javadoc] not part of the command. > [javadoc] Javadoc execution > [javadoc] javadoc: File not found: "C:\JavaBuild\MyTest.java" > [javadoc] 1 error > > > So it appears 'C:\JavaBuild\MyTest.java' is passed to javadoc as the source > file. Since > -sourcepath is correct, should not just "MyTest.java" be passed in as the > last parameter (it seems > the build root is being incorrectly added to the filename. I'm using ant > 1.5.3.1, jdk Version 1.3.1_04 > on windows 2000 > > Thanks, > > Andy > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > >