Afaik, blueprint does not yet support that.
However, latest file install should support ${env:xxx} substitution, so you
could load those from a configuration file, have file install write them to
configadmin and use blueprint for injection.
Though, it should not be very difficult to enhance blueprint to support
that directly : I've just raised
https://issues.apache.org/jira/browse/ARIES-1311 for that.

2015-04-13 13:56 GMT+02:00 CLEMENT Jean-Philippe <
jean-philippe.clem...@fr.thalesgroup.com>:

> I wasn't clear, sorry. I'm talking about Unix env variables.
>
> Is there a way to get them?
>
> JP
>
> [@@ OPEN @@]
>
>
> -----Message d'origine-----
> De : Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
> Envoyé : lundi 13 avril 2015 13:38
> À : user@karaf.apache.org
> Objet : Re: Environment variables and Blueprint
>
> Did you try:
>
> <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
>
> ?
>
> By system variables, do you mean JVM -Dkey=value or directly Unix env
> variables ?
>
> When I talk about system variables, it's -D args to the JVM. The later is
> env variable.
>
> Regards
> JB
>
> On 04/13/2015 01:17 PM, CLEMENT Jean-Philippe wrote:
> > Hi JB,
> >
> > We did try with ext but it did not work: ${TOTO} to retrieve the $TOTO
> variable.
> >
> > What is the naming convention?
> >
> > JP
> >
> > [@@ OPEN @@]
> >
> >
> > -----Message d'origine-----
> > De : Jean-Baptiste Onofré [mailto:j...@nanthrax.net] Envoyé : lundi 13
> > avril 2015 10:28 À : user@karaf.apache.org Objet : Re: Environment
> > variables and Blueprint
> >
> > Hi JP,
> >
> > you can use Aries blueprint-ext and directly use ${} where the key is
> the system variable.
> >
> > Regards
> > JB
> >
> > On 04/13/2015 10:14 AM, CLEMENT Jean-Philippe wrote:
> >> Dear Karaf-ers,
> >>
> >> I would like to retrieve environment variables via Blueprint.
> >> Placeholder “persistent-id” is mandatory so it must point to a
> >> .properties file, so maybe it’s not through cm-placeholders.
> >>
> >> Also, is there a way to replace expressions in .properties files?
> >>
> >> Regards,
> >>
> >> JP
> >>
> >> [@@ OPEN @@]
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbono...@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Reply via email to