Jens,
Just change the packagenames attribute to use the '**' pattern, so that
it matches multiple directory levels. My JavaDoc target reads as:
<!-- javadoc -->
<target name="javadoc"
depends="init, info"
description="generate the JavaDoc">
<javadoc packagenames="**/*.*"
sourcepath="${src}"
destdir="${docs}/api"
author="true"
version="true"
protected="true"
bottom="Copyright 2001 ${build.vendor.name}. All Rights
Reserved.">
<classpath refid="path.classpath.build"/>
</javadoc>
</target>
This will produce JavaDoc for any package/directory tree that it finds
in the ${src} directory.
I have just run some tests and it seems that if you try to use just
"**", "**/*.java" or "**/*.class", Ant just passes the packagenames
value straight to javadoc, but if you use either "**.*" or "**/*.*" it
does some package name building first and then passes the resultant
package names to javadoc (try running the above javadoc target with
-verbose set, "ant -verbose javadoc")
Strange... ;)
Andy.
--
Andrew Beacock
Senior Software Engineer/Project Lead
Nokia Mobile Phones
NMP/MSW/SSP/AG
> I'm looking for a way to call javadoc wihtput specifiying any package.
> Ant's javadoc task support wildcard in the packagenames attribute,
> like packagenames="com.*".
>
> But I don't want to specify any packagenames, even not the root
> one. I've got a common project directory structure with one source
> directory. What I want is javadoc to generate the API help for all of
> my source files. And - how can I specify classes which are not part of
> any package? Is there a special root-package symbol I can use?
>
> The problem is that the javadoc task doesn't support a
> packagename="*"
> attribute setting.
>
> My xml looks like this:
>
> <target name="javadoc" description="generates javadoc in
> ${doc}/javadoc">
> <mkdir dir="${javadoc}"/>
> <javadoc packagenames="*" sourcepath="${src}" destdir="${javadoc}">
> <classpath>
> <pathelement path="${classes}"/>
> <path refid="lib.classpath" />
> </classpath>
> </javadoc>
> </target>
>
> This doesn't work. Could anyone help me? The goal is to create a very
> generic build.xml which is working on a default file structure.
>
>
>
> jens
>
>
> --
> Best regards,
> Jens mailto:[EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>