buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam George <>
Subject Re: Correct Use of the 'tap' Method
Date Thu, 23 May 2013 16:10:00 GMT
Antoine Toulme <antoine@...> writes:

> This is more of a Rake question actually. Rake provides ways for you to
> define tasks.
> So when you type task(:compile) do |task| ... you are actually redefining
> the compile task. That's why it's doing nothing.
> Rake provides a way to define task dependencies as tasks. Buildr builds on
> this by adding the tap method which lets you add a dependent task directly
> on the compile task. tap inserts the dependency as the first item in the
> list, so if you tap twice, the second time will execute before the first
> time.
> I hope this helps.

Hi Antoine,

Thanks, that does make some sense, and it's useful to know about the
double-tapping!  However, I am now confused about how the compile task
worked at all if I was redefining it.

In example 1 (without .tap) the compilation was still working with the
default behaviour (compiling from src/main/java).  How is this possible if
the task has been redefined to be something else by my code?



View raw message