buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc-André Laverdière <>
Subject Generating dependencies in pom file
Date Thu, 10 Mar 2011 12:07:23 GMT
Hello everyone,

I am not strong enough in Ruby to create an extension, but I thought
it would be trivial for someone on the mailing list

Here is the code that converts artifacts into a pom file:

    Mustache.template_file = 'pomtemplate.mustard'
    pom =
    pom[:group] =
    pom[:artifact] =
    pom[:version] = project.version
    pom[:dependencies] ={|x| Artifact.to_hash(x)}, "rw").write pom.render
    puts "Generated POM file in " + pom_file

The mustache template is as follows

<?xml version="1.0" encoding="UTF-8"?>


I think it would be very useful to have POMs with the deps. I am
working with a in-house lib, and it breaks a lot of buildr files
whenever we update one dependency.
When could we have it in production?


"Perseverance must finish its work so that you may be mature and
complete, not lacking anything." -James 1:4

View raw message