Hi Jean Philippe,

Just pass your Unix env variable as VM arguments when you start your
VM/Karaf!

./karaf -DmyVMKey=$MyUnixENVVar

There's also a Karaf file in the bin folder where you can put your VM args
(env file).

Regards,

2015-04-13 13:56 GMT+02:00 CLEMENT Jean-Philippe <
[email protected]>:

> 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:[email protected]]
> Envoyé : lundi 13 avril 2015 13:38
> À : [email protected]
> 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:[email protected]] Envoyé : lundi 13
> > avril 2015 10:28 À : [email protected] 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é
> > [email protected]
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
> --
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent

Reply via email to