buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: poms generated by upload task
Date Tue, 08 Dec 2009 20:34:14 GMT
On Tue, Dec 8, 2009 at 12:00 PM, Jeremy Huiskamp <> wrote:

> I've noticed that the pom.xml generated by the upload task and placed in
> the target maven repository doesn't include dependency information, which is
> kind of a pain when my maven-using colleagues want to use libraries I've
> built with buildr and they have to go and list all of my dependencies
> explicitly.  Can the pom generation include a list of artifacts and, if so,
> how can I specify it?  I'd be fine with handcrafting a pom.xml and having
> the task use that instead of a generated one but doing it in the buildfile
> would be nicer.

To provide your own pom.xml:

package(:jar).pom.from _("pom.xml")

If you want to craft a pom from within your buildfile, do can do something
along the lines of

  file("target/pom.xml") do |file|
    pkg = package(:jar), 'w') do |file|
      xml =>file, :indent=>2)
      xml.project do
        xml.modelVersion '4.0.0'
        xml.version pkg.version
        # add more information ...
  package(:jar).pom.from _("target/pom.xml")

Hope this helps,

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