List Info

Thread: javadoc problem with module names...




javadoc problem with module names...
user name
2006-10-28 18:40:14
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.len
ya.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: h
ttp://ant.apache.org/manual/CoreTasks/javadoc.html
DirSet docs: ht
tp://ant.apache.org/manual/CoreTypes/dirset.html
FileSet docs: h
ttp://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: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )