You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Nicolas Modrzyk <he...@gmail.com> on 2008/09/12 07:57:46 UTC

javadoc

Hi List,

I was trying to generate the javadoc for the whole set of projects,
where all the projects are children of a single parent project.
Typing
buildr javadoc
at the root of the parent project, did not create anything:

========================================
(~/projects/tempo53)>buildr javadoc
(in /Users/niko/projects/tempo53, development)
Completed in 1.352s
========================================

What would be the proper way to get the javadoc for all the projects
aggregated in the same place ?

Niko,

Re: javadoc

Posted by Assaf Arkin <ar...@intalio.com>.
On Fri, Sep 12, 2008 at 10:37 AM, Victor Hugo Borja <vi...@gmail.com> wrote:
> I see..., and what you comment makes sense.
> So in order to generate javadoc for some projects all in the same target
> directory:
>
>   define 'foo'
>
>       define 'bar-api' do
>            # just interfaces
>       end
>       define 'bar-impl' do
>            # the impl, private classes, etc
>       end
>       define 'baz' do
>           # another project
>       end
>
>       javadoc projects('bar_api', 'baz')
>   end
>
> # buildr javadoc

Yep.  It doesn't work the same way as compile or test, but given that
javadoc is javadoc, I don't think we can do better.

Assaf

>
> On Fri, Sep 12, 2008 at 12:15 PM, Assaf Arkin <ar...@intalio.com> wrote:
>
>> On Fri, Sep 12, 2008 at 10:00 AM, Victor Hugo Borja <vi...@gmail.com>
>> wrote:
>> > I think some users may expect the javadoc task to be recursive just like
>> > compile task, so that executing
>> >
>> >   > buildr javadoc
>> >
>> > would generate javadoc for all projects defined.
>> >
>> > Should it be made recursive? If so, all it takes is adding
>> > project.recursive_task('javadoc') at java/compilers.rb:363
>>
>> We can add that, but result is that it will recursively run all the
>> javadoc tasks which will recursively do nothing interesting.
>>
>> Javadoc tasks by default don't do anything, you need to tell each task
>> which source directories it should operate on.  The reason for that:
>> if the default behavior was for javadoc to run with the same paths as
>> compile.sources, and run recursively, you will get a lot of javadoc
>> output directories (one per project).  That's not what people want.
>> Most often, it's consolidated output from several different sources
>> (typically just the APIs), that way you get the package list, indexes,
>> cross reference working across the entire documentation.
>>
>> To accommodate for that, javadoc expects that you'll tell it exactly
>> which sources you want to document (typically projects), and you only
>> need one task to do that.
>>
>> Assaf
>>
>> >
>> >
>> > On Fri, Sep 12, 2008 at 11:55 AM, Assaf Arkin <ar...@intalio.com> wrote:
>> >
>> >> On Thu, Sep 11, 2008 at 10:57 PM, Nicolas Modrzyk <he...@gmail.com>
>> >> wrote:
>> >> > Hi List,
>> >> >
>> >> > I was trying to generate the javadoc for the whole set of projects,
>> >> > where all the projects are children of a single parent project.
>> >> > Typing
>> >> > buildr javadoc
>> >> > at the root of the parent project, did not create anything:
>> >> >
>> >> > ========================================
>> >> > (~/projects/tempo53)>buildr javadoc
>> >> > (in /Users/niko/projects/tempo53, development)
>> >> > Completed in 1.352s
>> >> > ========================================
>> >> >
>> >> > What would be the proper way to get the javadoc for all the projects
>> >> > aggregated in the same place ?
>> >>
>> >> javadoc projects('foo', 'bar', etc)
>> >>
>> >> http://incubator.apache.org/buildr/rdoc/classes/Buildr/Javadoc.html
>> >>
>> >> >
>> >> > Niko,
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > vic
>> >
>> > Quaerendo invenietis.
>> >
>>
>
>
>
> --
> vic
>
> Quaerendo invenietis.
>

Re: javadoc

Posted by Victor Hugo Borja <vi...@gmail.com>.
I see..., and what you comment makes sense.
So in order to generate javadoc for some projects all in the same target
directory:

   define 'foo'

       define 'bar-api' do
            # just interfaces
       end
       define 'bar-impl' do
            # the impl, private classes, etc
       end
       define 'baz' do
           # another project
       end

       javadoc projects('bar_api', 'baz')
   end

# buildr javadoc

On Fri, Sep 12, 2008 at 12:15 PM, Assaf Arkin <ar...@intalio.com> wrote:

> On Fri, Sep 12, 2008 at 10:00 AM, Victor Hugo Borja <vi...@gmail.com>
> wrote:
> > I think some users may expect the javadoc task to be recursive just like
> > compile task, so that executing
> >
> >   > buildr javadoc
> >
> > would generate javadoc for all projects defined.
> >
> > Should it be made recursive? If so, all it takes is adding
> > project.recursive_task('javadoc') at java/compilers.rb:363
>
> We can add that, but result is that it will recursively run all the
> javadoc tasks which will recursively do nothing interesting.
>
> Javadoc tasks by default don't do anything, you need to tell each task
> which source directories it should operate on.  The reason for that:
> if the default behavior was for javadoc to run with the same paths as
> compile.sources, and run recursively, you will get a lot of javadoc
> output directories (one per project).  That's not what people want.
> Most often, it's consolidated output from several different sources
> (typically just the APIs), that way you get the package list, indexes,
> cross reference working across the entire documentation.
>
> To accommodate for that, javadoc expects that you'll tell it exactly
> which sources you want to document (typically projects), and you only
> need one task to do that.
>
> Assaf
>
> >
> >
> > On Fri, Sep 12, 2008 at 11:55 AM, Assaf Arkin <ar...@intalio.com> wrote:
> >
> >> On Thu, Sep 11, 2008 at 10:57 PM, Nicolas Modrzyk <he...@gmail.com>
> >> wrote:
> >> > Hi List,
> >> >
> >> > I was trying to generate the javadoc for the whole set of projects,
> >> > where all the projects are children of a single parent project.
> >> > Typing
> >> > buildr javadoc
> >> > at the root of the parent project, did not create anything:
> >> >
> >> > ========================================
> >> > (~/projects/tempo53)>buildr javadoc
> >> > (in /Users/niko/projects/tempo53, development)
> >> > Completed in 1.352s
> >> > ========================================
> >> >
> >> > What would be the proper way to get the javadoc for all the projects
> >> > aggregated in the same place ?
> >>
> >> javadoc projects('foo', 'bar', etc)
> >>
> >> http://incubator.apache.org/buildr/rdoc/classes/Buildr/Javadoc.html
> >>
> >> >
> >> > Niko,
> >> >
> >>
> >
> >
> >
> > --
> > vic
> >
> > Quaerendo invenietis.
> >
>



-- 
vic

Quaerendo invenietis.

Re: javadoc

Posted by Assaf Arkin <ar...@intalio.com>.
On Fri, Sep 12, 2008 at 10:00 AM, Victor Hugo Borja <vi...@gmail.com> wrote:
> I think some users may expect the javadoc task to be recursive just like
> compile task, so that executing
>
>   > buildr javadoc
>
> would generate javadoc for all projects defined.
>
> Should it be made recursive? If so, all it takes is adding
> project.recursive_task('javadoc') at java/compilers.rb:363

We can add that, but result is that it will recursively run all the
javadoc tasks which will recursively do nothing interesting.

Javadoc tasks by default don't do anything, you need to tell each task
which source directories it should operate on.  The reason for that:
if the default behavior was for javadoc to run with the same paths as
compile.sources, and run recursively, you will get a lot of javadoc
output directories (one per project).  That's not what people want.
Most often, it's consolidated output from several different sources
(typically just the APIs), that way you get the package list, indexes,
cross reference working across the entire documentation.

To accommodate for that, javadoc expects that you'll tell it exactly
which sources you want to document (typically projects), and you only
need one task to do that.

Assaf

>
>
> On Fri, Sep 12, 2008 at 11:55 AM, Assaf Arkin <ar...@intalio.com> wrote:
>
>> On Thu, Sep 11, 2008 at 10:57 PM, Nicolas Modrzyk <he...@gmail.com>
>> wrote:
>> > Hi List,
>> >
>> > I was trying to generate the javadoc for the whole set of projects,
>> > where all the projects are children of a single parent project.
>> > Typing
>> > buildr javadoc
>> > at the root of the parent project, did not create anything:
>> >
>> > ========================================
>> > (~/projects/tempo53)>buildr javadoc
>> > (in /Users/niko/projects/tempo53, development)
>> > Completed in 1.352s
>> > ========================================
>> >
>> > What would be the proper way to get the javadoc for all the projects
>> > aggregated in the same place ?
>>
>> javadoc projects('foo', 'bar', etc)
>>
>> http://incubator.apache.org/buildr/rdoc/classes/Buildr/Javadoc.html
>>
>> >
>> > Niko,
>> >
>>
>
>
>
> --
> vic
>
> Quaerendo invenietis.
>

Re: javadoc

Posted by Victor Hugo Borja <vi...@gmail.com>.
I think some users may expect the javadoc task to be recursive just like
compile task, so that executing

   > buildr javadoc

would generate javadoc for all projects defined.

Should it be made recursive? If so, all it takes is adding
project.recursive_task('javadoc') at java/compilers.rb:363


On Fri, Sep 12, 2008 at 11:55 AM, Assaf Arkin <ar...@intalio.com> wrote:

> On Thu, Sep 11, 2008 at 10:57 PM, Nicolas Modrzyk <he...@gmail.com>
> wrote:
> > Hi List,
> >
> > I was trying to generate the javadoc for the whole set of projects,
> > where all the projects are children of a single parent project.
> > Typing
> > buildr javadoc
> > at the root of the parent project, did not create anything:
> >
> > ========================================
> > (~/projects/tempo53)>buildr javadoc
> > (in /Users/niko/projects/tempo53, development)
> > Completed in 1.352s
> > ========================================
> >
> > What would be the proper way to get the javadoc for all the projects
> > aggregated in the same place ?
>
> javadoc projects('foo', 'bar', etc)
>
> http://incubator.apache.org/buildr/rdoc/classes/Buildr/Javadoc.html
>
> >
> > Niko,
> >
>



-- 
vic

Quaerendo invenietis.

Re: javadoc

Posted by Assaf Arkin <ar...@intalio.com>.
On Thu, Sep 11, 2008 at 10:57 PM, Nicolas Modrzyk <he...@gmail.com> wrote:
> Hi List,
>
> I was trying to generate the javadoc for the whole set of projects,
> where all the projects are children of a single parent project.
> Typing
> buildr javadoc
> at the root of the parent project, did not create anything:
>
> ========================================
> (~/projects/tempo53)>buildr javadoc
> (in /Users/niko/projects/tempo53, development)
> Completed in 1.352s
> ========================================
>
> What would be the proper way to get the javadoc for all the projects
> aggregated in the same place ?

javadoc projects('foo', 'bar', etc)

http://incubator.apache.org/buildr/rdoc/classes/Buildr/Javadoc.html

>
> Niko,
>