Turns out (I had no idea that this kind of feature was implemented) that properties may be provided in WEB-INF/cocoon/properties or per sitemap basis in config/properties directory. Unfortunatelly this second approach is buggy:

    <map:components use-defaults-dir="true">
    </map:components>

will not work as expected. You have to do something like this:

    <map:components use-defaults-dir="true"
                    property-dir="does-not-matter">
    </map:components>

which will attempt to load properties from config/properties/ and does-not-matter/

It is an easy fix but a question arises if we should load properties from default location when a property-dir is provided.

    <map:components property-dir="additional">
    </map:components>

currently will load properties from both additional and default location because use-defaults-dir defaults to 'true'

    <map:components property-dir="additional" use-defaults-dir="false">
    </map:components>

will load from additional/ directory

I propose to change the behaviour:
- make use-defaults-dir default to true when property-dir is NOT
  provided
- make use-defaults-dir default to false when a property-dir is provided

and of course fix the bug mentioned at the top of this message.

WDYT?

If noone objects I will change the code tomorrow.

--
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Reply via email to