You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Luca Morandini <lm...@ieee.org> on 2006/12/15 00:10:23 UTC

Order of properties files loading in 2.2 (yes, again !)

I inherited from a legacy project a file named core.proprties, which I 
put into .../classes/META-INF/... but, to my surprise, it didn't work as 
it was supposed to... a quick debug session revealed that the loading 
order was:

1) URL 
[jar:file:/C:/projects/analytics/blocks/cocoon-trunk/build/webapp/WEB-INF/lib/cocoon-core-2.2.0-M3-SNAPSHOT.jar!/META-INF/cocoon/properties/cocoon-core-store.properties]
2) file 
[C:\projects\analytics\blocks\cocoon-trunk\build\webapp\WEB-INF\classes\META-INF\cocoon\properties\core.properties]
3) URL 
[jar:file:/C:/projects/analytics/blocks/cocoon-trunk/build/webapp/WEB-INF/lib/cocoon-core-2.2.0-M3-SNAPSHOT.jar!/META-INF/cocoon/properties/core.properties]

As you may notice, the loading gives precedence to files over JARs, but 
taking *only the file name* into account (I expected JAR names to be 
part of the sort key as well).

So, if two or more blocks (JARs) have the same properties file name, 
what happens ?

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------