You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Sakari Isoniemi <sa...@gmail.com> on 2009/03/15 09:53:25 UTC

How to call rake task from builds invocation ?

How a rake task is called inside a buildr project from buildr coomand line ?

In the buildr buildfile must be defined

   require "rake"

and the task definiton is

  define "doSomething" do
    puts 'task doSomething called'
  end

=> This won't work and the solution is ?

Re: How to call rake task from builds invocation ?

Posted by Daniel Spiewak <dj...@gmail.com>.
Use the normal 'task' and 'file' syntax standard with Rake.  The  
define method is only for projects.  Oh, and there is no need to  
require rake, Buildr already brings it into every buildfile.

One thing you should be aware of is the fact that every project  
defines a Rake namespace, so tasks defined within a define block must  
be fully-quallified when invoked.

Daniel

On Mar 15, 2009, at 3:53 AM, Sakari Isoniemi  
<sa...@gmail.com> wrote:

> How a rake task is called inside a buildr project from buildr  
> coomand line ?
>
> In the buildr buildfile must be defined
>
>   require "rake"
>
> and the task definiton is
>
>  define "doSomething" do
>    puts 'task doSomething called'
>  end
>
> => This won't work and the solution is ?