buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Toulme <>
Subject Re: Dumb packaging question
Date Fri, 22 Jul 2011 01:38:28 GMT
There's a dozen ways to spread the butter on the bread here. Here is my
humble take:

You can use the union construct: |

package(:war).libs |= [LIB_A, LIB_B]

If you have arrays of arrays, you can flatten:

package(:war).libs |= [LIB_A, LIB_B, [LIB_C, LIB_D]].flatten

To remove stuff selectively, use the delete method ?


The array class in Ruby is very interesting. I recommend keeping this page

Arrays are Enumerable (think java.util.Collection) so this is a good read

On Thu, Jul 21, 2011 at 23:51, Christopher Tiwald <>wrote:

> This thing's driving me nuts, so I'm hoping for a little group wisdom. I'm
> trying to package a WAR with some run-time libraries (i.e. unused in
> compilation), but without other libraries (that throw tomcat errors because
> tomcat already has them).
> i.e. I'm trying to do the following simultaneously:
> package(:war).libs += (LIBRARY_A, LIBRARY_B)
> package(:war).libs -= (LIBRARY_C)
> The easiest way, of course, would be to just be write an array
> (PACKAGE_THESE_LIBRARIES) that comprises all the correct libraries, and then
> use the 'with' method. On the other hand I've got something like 100
> libraries and this doesn't strike me as terribly elegant. I'm trying to
> maximize understandability, readability, and repeatability, because our
> maven pom.xml's had none of those qualities.
> Is there an obvious way to do this I'm missing here?
> --
> Christopher

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