Package name ending with .java
Hi,
I have some trouble with a package name ending with "fragments.java". When I use 'packagenames' javadoc complains when it reaches that package.
I'm guessing javadoc thinks it's a source file and tries to parse it as such.
I have found a workaround by using 'subpackages' instead of 'packagenames' but I want it work with ant, which doesn't support the subpackages flag.
Is there a way to get around this?
- Henrik
[463 byte] By [
henla189] at [2007-9-27 18:49:59]

Yeah, I found that bug after I posted this.
With the -subpackages flag everything works alright so there's
no problem with 1.4.*, but I guess it's still a problem in earlier
versions.
The problem I had was that I didn't get it to work with ant. But
I found a solution to that as well by using the additionalparam
attribute for the javadoc task to set the subpackages option.
In other words, I don't have a problem anymore.
Thanks for your replies though.
Not at all.
Assume that there is a package called something.smthing.java
Then this won't work:
<javadoc sourcepath="${src_dir}" destdir="${doc_dir}"
packagenames="something.*"/>
It will give the following error message because it thinks it is a source file:
[javadoc] Loading source file something.smthing.java...
[javadoc] error: cannot read: something.smthing.java
So, you can get around that by doing like this instead:
<javadoc sourcepath="${src_dir}" destdir="${doc_dir}"
packagenames="something"
additionalparam="-subpackages something"/>
Which gives the -subpackages option to javadoc.