I know it's come up a few times on this list before, so I'd like to share
how I ended up being able to access environment variables via blueprint.
If you build and deploy the fabric8-karaf bundle [1] into Karaf, then you
can configure the blueprint property-placeholder as follows:
<ext:property-placeholder evaluator="camel"/>
With that in place you will be able to reference ${env:*} properties
directly in your blueprint.
<bean id="home" class="java.lang.String">
<argument value="${env:HOME}"/>
</bean>
Make sure the following xmlns is configured:
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.5.0"
Note that I called it camel because it supports all the same property
prefix functions that Apache Camel supports. See:
http://camel.apache.org/using-propertyplaceholder.html#UsingPropertyPlaceholder-Usingoutoftheboxfunctions
[1]:
https://github.com/fabric8io/fabric8/tree/master/components/fabric8-karaf
--
Hiram Chirino
Engineering | Red Hat, Inc.
[email protected] | fusesource.com | redhat.com
skype: hiramchirino | twitter: @hiramchirino