[Junitdoclet-users] RE: Problems running JUnitDoclet as Ant task
Brought to you by:
sgemkow
|
From: Matt R. <ma...@ra...> - 2002-12-10 04:46:57
|
I got this fixed by using the docletpathref attribute to point to a
classpath with junitdoclet.jar in it. I also found that using
docletpath to point to the junitdoclet.jar file works as well. There
doesn't seem to be a need to put junitdoclet.jar into $ANT_HOME/lib.
Now I'm getting an error on -source='1.4' - I tried it with and without
the quotes, and I get:
javadoc: invalid flag: -source=1.4
I tool the equals out so my additionalparam attribute looks like this:
additionalparam = "-d test/${module} -buildall -source 1.4">
And it seems to work fine - is this the correct syntax?
Thanks,
Matt
> -----Original Message-----
> From: Matt Raible [mailto:ma...@ra...]
> Sent: Monday, December 09, 2002 4:29 PM
> To: 'jun...@li...'
> Subject: Problems running JUnitDoclet as Ant task
>
> I'm trying to run JUnitDoclet as an Ant task and it can't
> seem to find it in my classpath. I've tried referencing it
> in my classpath, as well as placing it in $ANT_HOME/lib, but
> no luck. Any ideas? Here's my task:
>
> <target name="junitdoclet" depends="compile-web">
>
> <javadoc
> packagenames = "org.*"
> sourcepath = "src/web"
> defaultexcludes = "yes"
> doclet = "com.objectfab.tools.junitdoclet.JUnitDoclet"
> additionalparam = "-d test/web -buildall -source='1.4'">
>
> <classpath refid = "web.test.classpath" />
>
> </javadoc>
> </target>
>
>
> When it runs, it says:
>
> junitdoclet:
> [javadoc] Generating Javadoc
> [javadoc] Javadoc execution
> [javadoc] javadoc: Cannot find doclet class
> com.objectfab.tools.junitdoclet.JUnitDoclet
> [javadoc] 1 error
>
> So I added this to my task, and it always comes up:
>
> <available property="junitdoclet.jar.present"
> classname="com.objectfab.tools.junitdoclet.JUnitDoclet"/>
> <fail unless="junitdoclet.jar.present">
> You must place JUnitDoclet.jar in ${env.ANT_HOME}/lib.
> This file is located at ${junitdoclet.jar}.
> </fail>
>
> Thanks,
>
> Matt
>
> P.S. I'm using 1.0.2 on Windows XP, JDK 1.4.1, Ant 1.5.1 and Cygwin.
>
>
>
>
>
|