buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: How to make a task default task
Date Thu, 19 Nov 2009 17:38:00 GMT
On Thu, Nov 19, 2009 at 8:10 AM, Babu Naidu <pbnaidu@gmail.com> wrote:

> Hi,
>
> I have a sub project with following definition.
>
>    define "test-client" do
>      compile.with
>      package(:war).with
>      package(:war).explode(:target => path_to("target/testClient"))
>   end
>
> to run explode task I would have to run buildr
> aproject:test-client:explode,
> even when I cd to test-client directory. How do I make a change to this
> task
> so that I can just say explode in test-client directory?
>

Two ways,

1) Declare 'explode' to be a local task,

Project.local_task('explode')   # Put this at the top of your Buildfile

This allows you to just run "buildr explode" in the project directory.

2) Add the 'explode' task as a dependency on 'build' so it's run by default

build.enhance ['explode']  # Put this after package(:war).explode

And then a simple "buildr" command will run the explode task.

alex

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