Hey,
Quoting Rickard Öberg <[email protected]>:
> Basically, whereas before the directories could be parameterized using
> the MessageFormat patterns ("{1}/.{0}/mydir") it now instead uses a
> parameter evaluation algorithm based on names. Here's some examples:
> # Get HOME from environment variables
> configuration={environment.HOME}/Library/Preferences/{application}
>
> # Get user.home from system properties
> data={system.user.home}/Library/Application Support/{application}
> temporary={temp}/{application}
> cache={user}/Library/Caches/{application}
> log={user}/Library/Logs/{application}
>
> You get access to "user","temp","application", and then all environment
> variables and all system properties. Resolution is done recursively, so
> if you for example do this in the FileConfiguration properties bundle:
> data={environment.MY_APP_HOME}/data
>
> and then set the environment variable MY_APP_HOME to
> "{user}/{application}" then the data directory ends up being e.g.
> "/Users/rickard/MyApp/data".
>
> I think this makes it a whole lot easier to use, and opens up for the
> popular XYZ_HOME style of defining where the install dir is. Marc's
> example of getting "Qi4j" into all install dir names should also be
> possible this way, if so desired, either by putting it into the bundle,
> or into a XYZ_HOME style environment variable that is evaluated.
So if my app is installed in /opt/myapp I could layout the data as:
/opt/myapp/var/data
/opt/myapp/var/tmp
/opt/myapp/var/cache
/opt/myapp/var/log
.. by setting an environment property INSTALL_ROOT = /opt/myapp
(how?) and then in the properties bundle:
data={environment.INSTALL_ROOT}/var/data
temporary={environment.INSTALL_ROOT}/var/tmp
cache={environment.INSTALL_ROOT}/var/cache
log={environment.INSTALL_ROOT}/var/log
Am I right ?
Plus, I'm wondering about the support in other libraries/extensions like
entitystore-* and indexing-*. Will we add it for the 1.3 release ?
Ideally in my example above I would like to be able to add thoses:
/opt/myapp/var/store
/opt/myapp/var/index
/Paul
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev