If you look in config.properties you will see an example of this:
# The following property explicitly specifies the location of the
bundle
# cache, which defaults to "felix-cache" in the current working
directory.
# If this value is not absolute, then the felix.cache.rootdir controls
# how the absolute location is calculated. (See next property)
#org.osgi.framework.storage=${felix.cache.rootdir}/felix-cache
# The following property is used to convert a relative bundle cache
# location into an absolute one by specifying the root to prepend to
# the relative cache path. The default for this property is the
# current working directory.
#felix.cache.rootdir=${user.dir}
Granted, it is commented out, but the example does work if you uncomment
it. We actually use this mechanism to set the system bundle exports in
default.properties:
org.osgi.framework.system.packages=org.osgi.framework; version=1.5.0, \
org.osgi.framework.launch; version=1.0.0, \
org.osgi.framework.hooks.service; version=1.0.0, \
org.osgi.service.packageadmin; version=1.2.0, \
org.osgi.service.startlevel; version=1.1.0, \
org.osgi.service.url; version=1.0.0, \
org.osgi.util.tracker; version=1.4.0 \
${jre-${java.specification.version}}
jre-1.5=, \
...
You can see here we ${jre-${java.specification.version}} to ${jre-1.5}
(assuming we are running on 1.5) which will then get substituted for the
value of the jre-1.5 property.
So, it should work. :-)
-> richard
On 9/1/09 9:51, Patrick Forhan wrote:
I know that you can use system properties in a felix configuration...
does any version of felix let me substitute other properties in the
same file into a felix property? For example, this would be cool&
handy:
# config snippet:
myapp.base.url=http://mywebserver/bundles
myapp.version=1.13.0-SNAPSHOT
felix.auto.start.3= \
${myapp.base.url}/org.happyplace.common-${myapp.version}.jar \
${myapp.base.url}/org.bjc.osgi.foundation.cache-${myapp.version}.jar
# end config snippet
I know it's wrong but it feels so right! It would reduce the amount
of searches and replaces we'd have to do.
Pat.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]