[ 
https://issues.apache.org/jira/browse/ARIES-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14170826#comment-14170826
 ] 

Jean-Marc Reymond commented on ARIES-1264:
------------------------------------------

Just for the sake of correctness, I have to say that you can access the $USER 
env variable via $[user.name] since the JVM fetches it from the OS and adds it 
automatically to the java property.

But the new feature could still be very useful for any OS env variable not 
being picked up by the JVM :)

> blueprint-ext could support ${env:USER} notation (for OS env variables)
> -----------------------------------------------------------------------
>
>                 Key: ARIES-1264
>                 URL: https://issues.apache.org/jira/browse/ARIES-1264
>             Project: Aries
>          Issue Type: Improvement
>          Components: Blueprint
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>
> In a blueprint descriptor, it's possible to use blueprint-ext to use Java 
> System variable (the ones passed as argument using -Duser=$USER) and used 
> with something like:
> {code}
> <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
> ...
> <bean ...><property name="user" value="$[user]"/></bean>
> {code}
> In the org.apache.aries.blueprint.ext.PropertyPlaceholder, we do:
> {code}
> v = System.getProperty(val);
> {code}
> Additionnaly, it would be great to do System.getenv() to access the OS env 
> variables, and so being able to do:
> {code}
> <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
> ...
> <bean ...><property name="user" value="$[USER]"/></bean>
> {code} 
> where USER has been set with something like this, for instance:
> {code}
> export USER=my
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to