You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris <sh...@yahoo.com> on 2008/10/19 23:38:49 UTC

Select classes to Javadoc

How do I get the javadoc plugin to do only certain classes?

The Ant javadoc task does it by letting you pass in a <fileset>. I can't 
find the equivalent in Maven.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Re: Select classes to Javadoc

Posted by "Okken,Brett" <BO...@CERNER.COM>.
There are a couple of config options to control what javadoc is generated for.

Exclude packages names[1] allows the contents of packages to be excluded from javadoc.
Subpackages[2] allows the listing of packages to be included.

I am not aware of any config that allows individual classes to be selected. However, between the selection of packages and visibility[3], one should be able meet most needs for generating the "right" amount of javadoc.

[1] - http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#excludePackageNames 
[2] - http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#subpackages
[3] - http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#show


Brett Okken | MMF Archive | Software Architect | 816.201.6112 | www.cerner.com | bokken@cerner.com

-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Chris
Sent: Monday, October 20, 2008 1:53 PM
To: users@maven.apache.org
Subject: Re: Select classes to Javadoc


 >> How do I get the javadoc plugin to do only certain classes?
 >>
 >> The Ant javadoc task does it by letting you pass in a <fileset>. I can't  >> find the equivalent in Maven.

Martin Gainty wrote:
> take a look at
> maven-javadoc-plugin
> http://maven.apache.org/plugins/maven-javadoc-plugin/
> 
> Here is an example
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>      <artifactId>maven-javadoc-plugin</artifactId>
>          <configuration>
>                 <links>
>                         
> <link>http://java.sun.com/j2ee/1.4.2/docs/api</link>
> 
> and this mechanism for configuring offline links
> 
> if  http://java.sun.com/j2se/1.4.2/docs/api unreachable try 
> /opt/java-apidoc/j2sdk1.4.1/docs/api/
> maven.javadoc.offlineLinks= \
>   
> http://java.sun.com/j2se/1.4.2/docs/api/#/opt/java-apidoc/j2sdk1.4.1/d
> ocs/api/

Martin, I'm not sure how this helps. What I want to do is include certain classes in the javadoc and not others. I think the <links> tag just helps makes links between one set of javadoc and another.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Select classes to Javadoc

Posted by Chris <sh...@yahoo.com>.
 >> How do I get the javadoc plugin to do only certain classes?
 >>
 >> The Ant javadoc task does it by letting you pass in a <fileset>. I 
can't
 >> find the equivalent in Maven.

Martin Gainty wrote:
> take a look at 
> maven-javadoc-plugin
> http://maven.apache.org/plugins/maven-javadoc-plugin/
> 
> Here is an example
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>      <artifactId>maven-javadoc-plugin</artifactId>
>          <configuration>
>                 <links>
>                         <link>http://java.sun.com/j2ee/1.4.2/docs/api</link>
> 
> and this mechanism for configuring offline links
> 
> if  http://java.sun.com/j2se/1.4.2/docs/api unreachable try /opt/java-apidoc/j2sdk1.4.1/docs/api/
> maven.javadoc.offlineLinks= \
>   http://java.sun.com/j2se/1.4.2/docs/api/#/opt/java-apidoc/j2sdk1.4.1/docs/api/

Martin, I'm not sure how this helps. What I want to do is include 
certain classes in the javadoc and not others. I think the <links> tag 
just helps makes links between one set of javadoc and another.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Select classes to Javadoc

Posted by Martin Gainty <mg...@hotmail.com>.
take a look at 
maven-javadoc-plugin
http://maven.apache.org/plugins/maven-javadoc-plugin/

Here is an example
<plugin>
   <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-javadoc-plugin</artifactId>
         <configuration>
                <links>
                        <link>http://java.sun.com/j2ee/1.4.2/docs/api</link>

and this mechanism for configuring offline links

if  http://java.sun.com/j2se/1.4.2/docs/api unreachable try /opt/java-apidoc/j2sdk1.4.1/docs/api/
maven.javadoc.offlineLinks= \
  http://java.sun.com/j2se/1.4.2/docs/api/#/opt/java-apidoc/j2sdk1.4.1/docs/api/
HTH/
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> To: users@maven.apache.org
> From: shef31@yahoo.com
> Subject: Select classes to Javadoc
> Date: Sun, 19 Oct 2008 16:38:49 -0500
> 
> How do I get the javadoc plugin to do only certain classes?
> 
> The Ant javadoc task does it by letting you pass in a <fileset>. I can't 
> find the equivalent in Maven.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

_________________________________________________________________
You live life beyond your PC. So now Windows goes beyond your PC.
http://clk.atdmt.com/MRT/go/115298556/direct/01/

Re: Select classes to Javadoc

Posted by Chris <sh...@yahoo.com>.
The reason we need to do it is that this a closed-source, proprietary 
product and we'd prefer not to give away all of the internals of the 
system. It's not practical to remove all classes we don't want to 
document from the "public" packages. The other reason we don't want to 
document some classes is that they will change in the future, and we 
only want people writing to the interfaces that are stable. You can 
guarantee that if we document it, then people will use it, and then 
we've got a backward compatibility problem for future releases.

I found the solution to the problem: keep everything in Ant, and use the 
Ant Run plugin.


Wayne Fay wrote:
> As always with things like this, I have to ask, why do want to only
> run Javadoc on certain classes? Javadoc does not take *that* long to
> run unless you have a TON of classes in your project, and Maven works
> better with many small groups of classes than it does with one huge
> project. Unless perhaps you're building up an API and only want to
> produce docs on the public classes, but then I'd tell you to break
> that into 2 (or more) Maven projects.
> 
> If this is really desired functionality and it is not offered by the
> plugin, then an RFE in Jira may be called for.
> 
> Curious,
> Wayne
> 
> On Sun, Oct 19, 2008 at 2:38 PM, Chris <sh...@yahoo.com> wrote:
>> How do I get the javadoc plugin to do only certain classes?
>>
>> The Ant javadoc task does it by letting you pass in a <fileset>. I can't
>> find the equivalent in Maven.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Select classes to Javadoc

Posted by Wayne Fay <wa...@gmail.com>.
As always with things like this, I have to ask, why do want to only
run Javadoc on certain classes? Javadoc does not take *that* long to
run unless you have a TON of classes in your project, and Maven works
better with many small groups of classes than it does with one huge
project. Unless perhaps you're building up an API and only want to
produce docs on the public classes, but then I'd tell you to break
that into 2 (or more) Maven projects.

If this is really desired functionality and it is not offered by the
plugin, then an RFE in Jira may be called for.

Curious,
Wayne

On Sun, Oct 19, 2008 at 2:38 PM, Chris <sh...@yahoo.com> wrote:
> How do I get the javadoc plugin to do only certain classes?
>
> The Ant javadoc task does it by letting you pass in a <fileset>. I can't
> find the equivalent in Maven.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Select classes to Javadoc

Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Sun, Oct 19, 2008 at 5:38 PM, Chris <sh...@yahoo.com> wrote:

> How do I get the javadoc plugin to do only certain classes?
>
> The Ant javadoc task does it by letting you pass in a <fileset>. I can't
> find the equivalent in Maven.
>

The Javadoc plugin has pretty limited examples, but it looks like you can
control a fair bit using the configuration listed here:
http://maven.apache.org/plugins/maven-javadoc-plugin/apidocs/org/apache/maven/plugin/javadoc/package-summary.html

As referenced on this page:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html


-- 
Geoffrey Wiseman