[ 
https://issues.apache.org/jira/browse/IVY-608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537581
 ] 

Maarten Coene commented on IVY-608:
-----------------------------------

Another possibility would maybe be to change the getVariable(String) method on 
IvyVariableContainer to use the System.getenv(String) method if the variable 
hasn't been specified manually, for instance to something like this:

{code:java}
    public String getVariable(String name) {
        String val = (String) variables.get(name);
        if (val == null) {
            val = System.getenv(name);
        }
        return val == null ? val : substitute(val);
    }
{code}

> Add support for importing environment variables
> -----------------------------------------------
>
>                 Key: IVY-608
>                 URL: https://issues.apache.org/jira/browse/IVY-608
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0.0-alpha-2
>            Reporter: Jing Xue
>            Priority: Minor
>         Attachments: import-env-1.patch, import-env-v2.patch
>
>
> Ant supports importing environment variables into properties via the 
> <properties environment="env" /> task.  If an ivysettings.xml relies on an 
> environment variable, the lack of support for this feature in Ivy makes it 
> difficult to reuse the same ivysettings.xml in a non-Ant environment, such as 
> in IvyDE.  I'm submitting a patch to add the support for JDK 1.5+. This 
> implementation will throw an exception when running in lesser JVMs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to