ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: Javadoc : File not found
Date Fri, 30 May 2003 22:23:24 GMT
Maybe you could , instead of the sourcefiles attribute, nest a fileset in
your javadoc task
Otherwise, you could try sourcefiles="${src.dir}/MyTest.java"

   <javadoc
       destdir="${doc.dir}/api"
       author="true"
       version="true"
       use="true">
     <classpath refid="classpath"/>
    <fileset dir="${src.dir}" includes="MyTest.java"/>
   </javadoc>

Does this help ?

Antoine
----- Original Message -----
From: "Andrew Fleet" <arefleet@comcast.net>
To: <user@ant.apache.org>
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,
>
> <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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



Mime
View raw message