buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Pyatigorskiy <>
Subject downloading an external jar as an artifact
Date Fri, 03 Dec 2010 13:37:09 GMT

I'm extremely new to both ruby and buildr, so I'm pretty sure I'm asking a
stupid thing right now, but I wasn't able to google it.

My target is to be able to specify jar versions in a single place and I like
the build.yaml approach, but some of the libs do not exist in the maven
world, so I want buildr to download them. Taking the DOJO example from the
docs I was able to create the following config:

--- build.yaml ---
# This project requires the following ruby gems, buildr addons
  hamcrest: hamcrest:hamcrest:all:1.3.0RC2
--- /build.yaml ---

--- buildfile ---
hamcrestVer =['artifacts'][:hamcrest.to_s][/[^:]+$/]
hamcrestUrl = "{hamcrestVer}.jar"

desc "The project"
define "proj" do
  define "webui" do
    compile.with :hamcrest
--- /buildfile ---

that does work, but the way I was finally able to obtain the hamcrest
version seems quite ugly to me. What would be a better way to achieve the

Thank you!


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