ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Fleet <arefl...@comcast.net>
Subject Javadoc : File not found
Date Fri, 30 May 2003 18:01:03 GMT
Hi,
   I have a build.xml file in C:\JavaTest, the part relavent to javadoc
follows,

<project name="JavaTest" default="all" basedir="c:\JavaBuild">

<target name="javadocs" depends="application">
  <mkdir dir="${doc.dir}/api"/>
  <javadoc
      sourcepath="${src.dir}"
      sourcefiles="MyTest.java"
      destdir="${doc.dir}/api"
      author="true"
      version="true"
      use="true">
    <classpath refid="classpath"/>
  </javadoc>
</target>

</project>

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



Mime
View raw message