Problem
I'm running mvn javadoc:javadoc
to generate JavaDoc, and I am pleased with the results, except for one thing: it gives the fully qualified class names for any class coming from a third-party library or our own codebase. For example,
It gives a return type of com.project.beans.BeanA , com.project.beans.BeanB for methods that return one of these classes.
It gives a param type of org.codehaus.jettison.json.JSONObject for a method that takes a JSON object. (Whereas it gives a param type of Integer for a method that takes a java.lang.Integer.)
Question
Is there any way to generate the shorthand names for these classes, for readability purposes? ie BeanA, BeanB, JSONObject.
And is there a way to do this without any XML configuration?
Thanks in advance :-)
I believe that what you want is the -noqualifier
javadoc option which can be set directly from the maven javadoc:javadoc
command.
Usually to pass the parameter to a maven plugin you just do like for other Java programs using -D
, in this case it would be mvn -Dnoqualifier=all javadoc:javadoc
but as far as I can tell the noqualifier
does not seems to ben set as an expression in the plugin source so I don't really know if you can pass it via the command line.
If it does not work, you can either modify your pom.xml
and add the <noqualifier>all</noqualifier>
to the config of the javadoc
plugin. Or you could create a property in your pom that will be given as a value for the <noqualifier>
tag, but this time the property can be overridden using the command line.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.