buildr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <ar...@intalio.com>
Subject Re: question about code
Date Mon, 14 Jul 2008 03:48:40 GMT
On Sun, Jul 13, 2008 at 8:04 PM, Ittay Dror <ittay.dror@gmail.com> wrote:

>
>
> Assaf Arkin wrote:
>
>> On Sun, Jul 13, 2008 at 8:11 AM, Ittay Dror <ittay.dror@gmail.com> wrote:
>>
>>
>>
>>> Hi,
>>>
>>> I'm looking at buildr code and I see that the 'package' task depends on
>>> the
>>> 'build' task (package.rb), and that 'build' is the default (rake) task
>>> (build.rb).  But when I run buildr, the 'package' task is called (since
>>> jars
>>> are created). Where is this task called?
>>>
>>>
>>
>>
>> Each project has a package task that also runs that project's build task,
>> and each sub-project's package task, and all the packaging tasks for that
>> project: one for each package created by calling package(type). The later
>> would have names like target/foo-bar-1.2.jar.
>>
>> Each of these packages (i.e. foo-bar-1.2.jar) also have a dependency on
>> the
>> project's build task. So if one project depends on another project's
>> package, that other project would run its build task.
>>
>>
> yes, but from what i see, the default task for rake is 'build', so
> shouldn't 'build' be the task that is called when buildr (rake) is called
> with no arguments?


That's true. If your buildfile has one project and you run buildr with no
arguments, it builds that project but doesn't package anything.

If you have foo and bar, and foo depends on a jar generated by bar, than now
you have a dependency: foo depends on bar.jar, so when foo builds, it
invokes that task which builds bar and packages bar.jar.

That's opportunistic. Since you're not running buildr package, foo will not
package itself, neither will any other package defined by bar but never
referenced. Only foo's dependency gets packaged.

Assaf


> or put it another way, where in the code is 'package' called explicitly to
> start the build?
>
>> Assaf
>>
>>
>>
>>
>>> Thanks,
>>> Ittay
>>>
>>> --
>>> --
>>> Ittay Dror <ittay.dror@gmail.com>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
> --
> --
>
> Ittay Dror <ittay.dror@gmail.com>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message