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]
# 1
Which version are you working with?This rings a bell, but I cannot seem to locate the bug report against this.-Doug KramerJavadoc team
dkramer at 2007-7-6 20:15:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Obviously, you're using 1.4.0 or 1.4.1, because you'reusing -subpackages. What's the error message?-Doug KramerJavadoc team
dkramer at 2007-7-6 20:15:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
This is 4507380, and has been fixed in 1.4.1
gafter at 2007-7-6 20:15:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4

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.

henla189 at 2007-7-6 20:15:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 5
Would you mind posting the additionalparam solution here for us to see? -Doug Kramer
dkramer at 2007-7-6 20:15:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 6

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.

henla189 at 2007-7-6 20:15:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...