How to complete a task in buildr

I could have done something wrong, because I have been using buildr for not so long, so all comments are welcome.

My project structure:

define :proj do
    define :web do
        task :run do
            # runs the web part of the project in a jetty
        end
    end
end

now if i want to start my project i have to enter

buildr proj:web:run

I would just like to dial

buildr run

instead of this. How do I achieve this?

+3
source share
2 answers

At the top level of your build file (i.e. outside of any defines) add

task :run => 'proj:web:run'

This defines a task with a name runwhose only condition is the task proj:web:run.

+5
source

You can also make the task a "local task",

Project.local_task 'run'

, , web, buildr run .

, Buildr 1.4.3 ​​ run, run ; . http://buildr.apache.org/more_stuff.html#run.

+3

All Articles