You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@buildr.apache.org by Yanko Ivanov <ya...@gmail.com> on 2007/12/03 23:25:48 UTC

Profiles

Hello there!

Today I ported some maven2 projects to buildr... What I do not see  
are the project profiles.

What about having a different set of properties in respect to the  
current Buildr.environment and including them automatically when  
filtering resources?

For example a profiles.(yml|properties|yaml) file (similar to Rails):

--- start profiles.yml
development: &development
     db.host: localhost
     javac.debug: enabled


test:
     <<: *development
     db.host: dev1

production:
     <<: *development
     db.host: idefix
     javac.debug: false
--- end profiles.yml

as you can see with YAML a profile can inherit properties from  
another profile thus saving us from duplication (as also in maven2).

So invoking 'buildr package -e test' will use the properties defined  
under test for filtering the resources.

I have already extended Buildr adding a basic implementation of this  
idea
   - Buildr.profiles
   - Buildr.profiles(:current).properties
   - Buildr.profiles(:test).name
which works... well for me :)

Finally my question is there a planned support for profiles or they  
are consciously ignored?

Regards,
Yanko