You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Robert Stevenson <ro...@gmail.com> on 2008/06/19 21:45:39 UTC
Anything Ruby Can Do?
Hey everyone! I am going through the Buildr documentation and am
stuck on the following section:
Anything Ruby Can Do
http://incubator.apache.org/buildr/more_stuff.html#anything_ruby_can_do
Where exactly in the buildfile should the "distro" method go in order
to be able to call it from the "distro-axis2" project as in the Buildr
manual?
Now, what if I had a method, ex "distro" that I wanted to call and
wanted it called as the last thing in the "distro-axis2" project's
build flow?
Thanks for the help!
-Rob
Re: Anything Ruby Can Do?
Posted by Alex Boisvert <bo...@intalio.com>.
On Thu, Jun 19, 2008 at 12:45 PM, Robert Stevenson <
robert.stevenson@gmail.com> wrote:
> Hey everyone! I am going through the Buildr documentation and am
> stuck on the following section:
>
> Anything Ruby Can Do
> http://incubator.apache.org/buildr/more_stuff.html#anything_ruby_can_do
>
> Where exactly in the buildfile should the "distro" method go in order
> to be able to call it from the "distro-axis2" project as in the Buildr
> manual?
The method can go in any parent scope or before the top-level project.
> Now, what if I had a method, ex "distro" that I wanted to call and
> wanted it called as the last thing in the "distro-axis2" project's
> build flow?
With Rake you can add processing to any task by using the "enhance" method,
such as:
project("foo").compile.enhance do
# whatever you want to do
end
where "compile" can be any kind of project task, including "build",
"package", "test", etc.
alex