buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: Using buildr artifact download from ruby
Date Fri, 18 Feb 2011 17:46:19 GMT
On Fri, Feb 18, 2011 at 8:13 AM, Carlos Sanchez <> wrote:

> I was wondering if buildr could be used to download artifacts from a
> Maven repository from any ruby script. I need to download them using
> ruby and thought about giving a try to buildr before going for jruby
> or something more complicated.
> Something along the lines of
> require 'rubygems'
> require 'buildr'
> artifact('org.apache.openjpa:openjpa:jar:1.2.1').invoke
> which of course doesn't work.
> Any suggestions?

If you don't mind a little hack, the following works on recent versions of

require 'rubygems'
require 'buildr'

class << Buildr.application
  def rakefile; __FILE__; end

Buildr.repositories.remote << ""


I think it was possible to use buildr as a library without this little hack
at some point... and I wouldn't mind explicitly supporting this since it's
pretty convenient to do things outside the scope of a buildfile for certain


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