buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: Generated resources
Date Sun, 10 Oct 2010 03:20:49 GMT
On Saturday, October 9, 2010, Peter Donald <> wrote:
> Hi,
>> Yeah, resources.from only works for static resources.   If I generate
>> resources, I would typically do it like:
>> define 'my-project' do
>>  project.version = '0.1-SNAPSHOT'
>> = 'myProject'
>>  clean do
>>    rm_rf _(:generated, :resources)
>>  end
>>  resources do
>>    mkdir_p  _(:generated, :resources)
>>    touch _(:generated, :resources, :foo)
>>  end
>>  package(:jar).include _(:generated, :resources)
>> end
> Dang.
> This works in practice but as you add more plugins to the system that
> inspect the project model to do magic it gets nasty and a lot more
> work. i.e. The buildr-iidea plugin will need to be customized to make
> the set of resources included in .iml as well as build-bnd plugin for
> including resources in bundle, aswell as a few other plugins I am
> working on.

Agreed, magic usually doesn't compose well.

Hmm, ok, I'll see if I can make resource.from more lazy.  But we don"t
have a lot of room here since resources are assumed to exist by the
time the compile task runs, and Buildr also assumes there's only one
resource dIr so there's defimitely going to be cases where
resourxe.from won't be suitable.


View raw message