Jörn Nettingsmeier wrote:
hi everyone!


it seems that the "javadocs" build target only builds docs for the java code under src/java. since most of the interesting stuff happens in modules nowadays, that's a problem.

in order to force javadocs generation all over the source tree, i edited src/targets/docs-build.xml:
<sourcepath>
- <pathelement path="${src.java.api.dir}"/>
+ <pathelement path="src/"/>

now the javadoc compiler is very very unhappy with our module names (i guess it's the hyphen):

javadocs:
Generating Javadoc
Javadoc execution
javadoc: error - Illegal package name: "modules-core.ac-impl.java.src.org.apache.lenya.ac.cifs"
... the same for all other modules with hyphens ...
Loading source files for package impl.java.org.apache.lenya.cms.metadata...
... the same for all other modules whose names do not contain hyphens
pubs.default.modules.defaultusecases.java.src.org.apache.lenya.defaultpub.cms.usecases...
50 errors

ouch.

are we outside the java specs with our hyphens?
i don't think so, because package names are meant to be mapped on inverted URLs, and hyphens are legal in domain names. but if we are, the stuff needs to be renamed. which is a pity since it can easily lead to all kinds of bugs and will royally screw up our svn history with nonfunctional changes.

is there a way to make the javadoc generator more lenient?


I think you're okay. It is thinking that modules-core.ac-impl.java.src.org.apache.lenya.ac.cifs is the package name and in reality org.apache.lenya.ac.cifs is the package name. It is just the name of the directories that the files are in that are causing a problem. But you don't want javadoc taking the file path anyway, because that would mess up package viewing. I think using a DirSet or FileSet you might be able to use wild cards to specify directory patterns to specify the base of the package source.

Javadoc task: http://ant.apache.org/manual/CoreTasks/javadoc.html
DirSet docs: http://ant.apache.org/manual/CoreTypes/dirset.html
FileSet docs: http://ant.apache.org/manual/CoreTypes/fileset.html

I've never done this and don't have a chance to test it right now unfortunately. But I think this is the path that is needed.

Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to