buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: How to make Buildr make with subprojects
Date Wed, 12 Oct 2011 19:20:51 GMT
On Sun, Oct 9, 2011 at 2:30 PM, Sprog : Weyert de Boer <>wrote:

> I would like to separate the packaging of the main project (has a special
> set) from
> the other projects. The main project should be zipped. That's simple but
> the other projects need to
> be packed in a zip file and metafile alongside this zip file needs to be
> created. At the end it should
> result the following:
>   index_subprojects_01.01.csv
> What's the best way to get this working? Any ideas? Do I need to make a new
> package type to generate an extra file?

To package things as zip, you simply do package(:zip) and then call
include() to add stuff in it.

If you need to generate several zips, each needs a different id.  By
default, the id is the project's name.  You can change the id by doing,

package(:zip, :id => 'subprojects').tap do |zip|
  zip.include project('foo')
  zip.include project('bar')

For your csv file, you can either create a new packaging type as describe

Or you can simply add a file task to your project's packages.

packages << file('index_subprojects_01.01.csv')

p.s. is it normal that it tries to compile all projects when you use
> main:project:build ?

Yes, buildr assumes parent projects are dependent on all their subprojects.
 (And there is no easy way to change that)


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