buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Spiewak <>
Subject Re: How to define a task for all subprojects
Date Fri, 12 Jun 2009 15:36:36 GMT
In order to define a project-aware task which affects more than one project,
you will need to use the extension API.  Effectively, you will be triggering
the re-definition of that same task every time a new project is created.
You can embed the extension within your buildfile, so it really isn't a real
hardship.  To eliminate the project-name prefix (e.g. `buildr
myproject:checkstyle` as opposed to `buildr checkstyle` in the appropriate
directory), you must use the following invocation:

  Project.local_task :checkstyle

That should do the trick!


On Fri, Jun 12, 2009 at 10:00 AM, Martin Grotzke <> wrote:

> Hi,
> is it possible to define a task project wide, so that it's available to
> each submodule?
> In my case I want to define checkstyle once and have it available in
> each submodule. It would be great if I could invoke
>  buildr checkstyle
> directly in the submodule.
> Is this possible without creating an extension?
> I'm already trying to create a Checkstyle extension that uses ant
> internally (ant('checkstyle') do |ant| ant.taskdef ...), but with this
> buildr complains about "undefined method `ant'"...
> Thanx for your help,
> cheers,
> Martin

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