You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Peter Reilly <pe...@gmail.com> on 2007/09/12 15:37:27 UTC

Re: javadoc task does not pick up package-info.java from included filesets

On 9/12/07, Prashant Reddy <pr...@pramati.com> wrote:
> Hello ANT Users,
>
> I have a lot of files from which javadoc needs to be generated.
>
> Not all java files from a package need to be published in javadoc.
>
> To enable this i use a number of <fileset>s that provide input to
> javadoc task.
>
> Something like :
>
> <javadoc>
> <fileset dir="module1/src">
>  <include name="A1.java"/>
>  <include name="B1.java"/>
>  <include name="C1.java"/>
> </fileset>
> <fileset dir="module2/src">
>  <include name="A2.java"/>
>  <include name="B2.java"/>
>  <include name="C2.java"/>
> </fileset>
> .... //More filesets
>
> </javadoc>
>
> However to my surprise package-info.java which i placed in packages is
> not included as input to javadoc task. I had to modify the fileset
> include to put in package-info.java
>
> <fileset dir="module1/src">
>  <include name="**/package-info.java"/>
>
> And i had to do this for every file set, violating "DRY".
>
> Shouldn't javadoc task pick this artifact (package-info.java) given that
> this file is meant only for the javadoc tool ? Why should the user have
> to explicitly include it ?
1) the fileset is not only used in <javadoc>
2) package-info.java is used by other things than javadoc.

>
> Do ANT-experts think including the package-info.java where ever its
> found too much magic ?
yes

Peter


>
> Thank you
> -Prashant
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: javadoc task does not pick up package-info.java from included filesets

Posted by Peter Reilly <pe...@gmail.com>.
On 9/12/07, Prashant Reddy <pr...@pramati.com> wrote:
>
> On Wed, 2007-09-12 at 14:37 +0100, Peter Reilly wrote:
> > > Shouldn't javadoc task pick this artifact (package-info.java) given
> > that
> > > this file is meant only for the javadoc tool ? Why should the user
> > have
> > > to explicitly include it ?
> > 1) the fileset is not only used in <javadoc>
>
> I was thinking may be Javadoc task can pick up the package-info.java
> while it is processing the input filesets. I am not familiar with
> Javadoc task's code, may be this not possible.
The Javadoc task does not have code to process the fileset itself,
it used org.apache.tools.ant.DirectoryScanner and others.

>
> > 2) package-info.java is used by other things than javadoc.
>
> Really, Like what other things ?
JAXB
> I read that javadoc tool starting JDK
> 1.5 chose the name package-info.java precisely because it was invalid
> and couldn't have existed before.

It is used for package level annotations.
The annotations can be compile time or run time.
JAXB uses run-time annotations to specify the
mapping of package to URI, and other
package level mapping defaults for the classes in the package.

Peter


>
> Thank you for taking time to respond.
>
> -Prashant
> >
> > >
> > > Do ANT-experts think including the package-info.java where ever its
> > > found too much magic ?
> > yes
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: javadoc task does not pick up package-info.java from included filesets

Posted by Prashant Reddy <pr...@pramati.com>.
On Wed, 2007-09-12 at 14:37 +0100, Peter Reilly wrote:
> > Shouldn't javadoc task pick this artifact (package-info.java) given
> that
> > this file is meant only for the javadoc tool ? Why should the user
> have
> > to explicitly include it ?
> 1) the fileset is not only used in <javadoc>

I was thinking may be Javadoc task can pick up the package-info.java
while it is processing the input filesets. I am not familiar with
Javadoc task's code, may be this not possible.

> 2) package-info.java is used by other things than javadoc.

Really, Like what other things ? I read that javadoc tool starting JDK
1.5 chose the name package-info.java precisely because it was invalid
and couldn't have existed before. 

Thank you for taking time to respond.

-Prashant
> 
> >
> > Do ANT-experts think including the package-info.java where ever its
> > found too much magic ?
> yes



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org