buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Toulme <>
Subject Re: New buildr user questions
Date Wed, 10 Feb 2010 01:10:12 GMT
On Tue, Feb 9, 2010 at 17:05, Kevin Smith <> wrote:

> Greetings all,
> First, let me say that I am generally happy with buildr. I'm a long-time
> ruby user and XML hater, so having an alternative to ant/maven is great.
> I have managed to get most of my build system working, but have several
> problems/questions. If any of these are answered in the online docs,
> wiki, jira, or mailing list archives, feel free to just point me in that
> direction.
> 1. How to extract a file from an artifact?
> I need to extract the license file out of some third-party jar
> artifacts. I can't find any easy way to do that. The best I have come up
> with is to create a zip task that includes the artifact. Then, turn
> around and unzip the zip, then unzip the jar. Yuck.
You can declare a unzip task, and build it:
build unzip(_("target/jetty")=>artifact(JETTY))

> 2. How to copy artifact files?
> This is closely related to #1. My script creates an ISO image. I would
> like to simply copy some artifacts into the ISO directory, but don't see
> any way to do it. My workaround is to create a zip containing the full
> directory structure I want, and then unzipping it into the ISO image.
> Seems like it should be easier.
Well, that's pure Ruby, off the top of my head:
cp a z

> 3. How to specify a dependency for a package task?
> Several times, I have wanted to specify that the package task for a
> project should depend on some other task. In one case, I had a master
> project and several related projects (which were not buildr subprojects
> because I couldn't get those to work the way I wanted). I simply wanted
> to create a 'package' target in the master project, which depends on the
> package targets of the other projects. I can see how to do this for
> 'build', but not for 'package'.
You use the enhance method that takes an array as argument:

package(:zip).enhance [task1, task2]

> Kevin

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