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

Reply via email to