You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by nicolas de loof <ni...@gmail.com> on 2007/09/19 20:18:38 UTC

[configuration] accessing emvironment variable (not java system)

Hello,

Did anyone allready ask for support in commons-configuration to acces
environement variables, the same way it is available with ant
<property> ?

I'll need it and can contribute for this.

Nico.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by nicolas de loof <ni...@gmail.com>.
It is currently tied to the ant Execution task infrastructure, but the
idea of detecting the platform to build the process invocation may be
moved to lang. This would simply require to find a way in lang to
cleanly invoke a process... Maybe with a dependency on commons-exec ?

2007/9/21, sebb <se...@gmail.com>:
> On 21/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> > Copying ant code requires many classes to be duplicated (
> > Execute, Os, CommandLauncher and it's implementations, Process,
> > ExecuteStreamHandler, ExecuteWatchdog ...)
> >
> > I've attached a simplier implementation to
> > http://issues.apache.org/jira/browse/CONFIGURATION-284
> > that delegates to ant, addidn an optional dependency.
> >
>
> Maybe the code should be added to Commons Lang instead?
> Or as well?
>
> Seems to me it would be useful outside Configuration and Ant.
>
> > I also notice dependencies on commons-jxpath and commons-codec should
> > be optional in the POM.
> >
> > Nico.
> >
> >
> >
> >
> > 2007/9/20, nicolas de loof <ni...@gmail.com>:
> > > I'll look at this and attach a patch to Jira.
> > > thanks.
> > >
> > > 2007/9/20, Oliver Heger <ol...@oliver-heger.de>:
> > > > nicolas de loof wrote:
> > > > > Could you please tell me what would be better :
> > > > >
> > > > > - copy/paste code from ANT to avoid a new dependency just for some methods
> > > > > - use the ant code as a new (optional) dependency
> > > > >
> > > > > Nico.
> > > >
> > > > I would prefer not to add an additional dependency. If we talk about one
> > > > or two classes, simply copying them seems to be alright. Or are there
> > > > more classes involved?
> > > >
> > > > Oliver
> > > >
> > > > >
> > > > > 2007/9/20, nicolas de loof <ni...@gmail.com>:
> > > > >> Your right, I was reading javadoc to fast
> > > > >>
> > > > >> 2007/9/19, sebb <se...@gmail.com>:
> > > > >>> On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> > > > >>>> Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
> > > > >>>> procEnvironment()
> > > > >>>>
> > > > >>>> Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
> > > > >>>> MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
> > > > >>>> environment variable at all !
> > > > >>> Huh?
> > > > >>> OpenVMS does seem to be supported - by parsing the output of "Show logical".
> > > > >>>
> > > > >>>> This method also has been "un deprecated" on Java 5 and can be used on
> > > > >>>> such a runtime. We can invoke it if System.getProprty("java.version")
> > > > >>>> returns > 1.5.
> > > > >>>>
> > > > >>>> Nico.
> > > > >>>>
> > > > >>>>
> > > > >>>> 2007/9/19, nicolas de loof <ni...@gmail.com>:
> > > > >>>>> My idea was simply to copy/paste code from the ant Property class.
> > > > >>>>> AFAIK this one has been largely tested and works on many (if not all
> > > > >>>>> ?) platforms.
> > > > >>>>>
> > > > >>>>> Nico.
> > > > >>>>>
> > > > >>>>> 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> > > > >>>>>> nicolas de loof wrote:
> > > > >>>>>>> Hello,
> > > > >>>>>>>
> > > > >>>>>>> Did anyone allready ask for support in commons-configuration to acces
> > > > >>>>>>> environement variables, the same way it is available with ant
> > > > >>>>>>> <property> ?
> > > > >>>>>>>
> > > > >>>>>>> I'll need it and can contribute for this.
> > > > >>>>>>>
> > > > >>>>>>> Nico.
> > > > >>>>>>>
> > > > >>>>>> There is an enhancement ticket about this topic [1] with a longer
> > > > >>>>>> discussion. There was also a thread on the mailing list at this time.
> > > > >>>>>>
> > > > >>>>>> How would you implement access to OS environment variables in a portable
> > > > >>>>>> way?
> > > > >>>>>>
> > > > >>>>>> Oliver
> > > > >>>>>>
> > > > >>>>>> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> > > > >>>>>>
> > > > >>>>>> ---------------------------------------------------------------------
> > > > >>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > >>>>>> For additional commands, e-mail: dev-help@commons.apache.org
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>> ---------------------------------------------------------------------
> > > > >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > >>>> For additional commands, e-mail: dev-help@commons.apache.org
> > > > >>>>
> > > > >>>>
> > > > >>> ---------------------------------------------------------------------
> > > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > >>> For additional commands, e-mail: dev-help@commons.apache.org
> > > > >>>
> > > > >>>
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by sebb <se...@gmail.com>.
On 21/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> Copying ant code requires many classes to be duplicated (
> Execute, Os, CommandLauncher and it's implementations, Process,
> ExecuteStreamHandler, ExecuteWatchdog ...)
>
> I've attached a simplier implementation to
> http://issues.apache.org/jira/browse/CONFIGURATION-284
> that delegates to ant, addidn an optional dependency.
>

Maybe the code should be added to Commons Lang instead?
Or as well?

Seems to me it would be useful outside Configuration and Ant.

> I also notice dependencies on commons-jxpath and commons-codec should
> be optional in the POM.
>
> Nico.
>
>
>
>
> 2007/9/20, nicolas de loof <ni...@gmail.com>:
> > I'll look at this and attach a patch to Jira.
> > thanks.
> >
> > 2007/9/20, Oliver Heger <ol...@oliver-heger.de>:
> > > nicolas de loof wrote:
> > > > Could you please tell me what would be better :
> > > >
> > > > - copy/paste code from ANT to avoid a new dependency just for some methods
> > > > - use the ant code as a new (optional) dependency
> > > >
> > > > Nico.
> > >
> > > I would prefer not to add an additional dependency. If we talk about one
> > > or two classes, simply copying them seems to be alright. Or are there
> > > more classes involved?
> > >
> > > Oliver
> > >
> > > >
> > > > 2007/9/20, nicolas de loof <ni...@gmail.com>:
> > > >> Your right, I was reading javadoc to fast
> > > >>
> > > >> 2007/9/19, sebb <se...@gmail.com>:
> > > >>> On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> > > >>>> Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
> > > >>>> procEnvironment()
> > > >>>>
> > > >>>> Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
> > > >>>> MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
> > > >>>> environment variable at all !
> > > >>> Huh?
> > > >>> OpenVMS does seem to be supported - by parsing the output of "Show logical".
> > > >>>
> > > >>>> This method also has been "un deprecated" on Java 5 and can be used on
> > > >>>> such a runtime. We can invoke it if System.getProprty("java.version")
> > > >>>> returns > 1.5.
> > > >>>>
> > > >>>> Nico.
> > > >>>>
> > > >>>>
> > > >>>> 2007/9/19, nicolas de loof <ni...@gmail.com>:
> > > >>>>> My idea was simply to copy/paste code from the ant Property class.
> > > >>>>> AFAIK this one has been largely tested and works on many (if not all
> > > >>>>> ?) platforms.
> > > >>>>>
> > > >>>>> Nico.
> > > >>>>>
> > > >>>>> 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> > > >>>>>> nicolas de loof wrote:
> > > >>>>>>> Hello,
> > > >>>>>>>
> > > >>>>>>> Did anyone allready ask for support in commons-configuration to acces
> > > >>>>>>> environement variables, the same way it is available with ant
> > > >>>>>>> <property> ?
> > > >>>>>>>
> > > >>>>>>> I'll need it and can contribute for this.
> > > >>>>>>>
> > > >>>>>>> Nico.
> > > >>>>>>>
> > > >>>>>> There is an enhancement ticket about this topic [1] with a longer
> > > >>>>>> discussion. There was also a thread on the mailing list at this time.
> > > >>>>>>
> > > >>>>>> How would you implement access to OS environment variables in a portable
> > > >>>>>> way?
> > > >>>>>>
> > > >>>>>> Oliver
> > > >>>>>>
> > > >>>>>> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> > > >>>>>>
> > > >>>>>> ---------------------------------------------------------------------
> > > >>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >>>>>> For additional commands, e-mail: dev-help@commons.apache.org
> > > >>>>>>
> > > >>>>>>
> > > >>>> ---------------------------------------------------------------------
> > > >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >>>> For additional commands, e-mail: dev-help@commons.apache.org
> > > >>>>
> > > >>>>
> > > >>> ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >>> For additional commands, e-mail: dev-help@commons.apache.org
> > > >>>
> > > >>>
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by nicolas de loof <ni...@gmail.com>.
Copying ant code requires many classes to be duplicated (
Execute, Os, CommandLauncher and it's implementations, Process,
ExecuteStreamHandler, ExecuteWatchdog ...)

I've attached a simplier implementation to
http://issues.apache.org/jira/browse/CONFIGURATION-284
that delegates to ant, addidn an optional dependency.


I also notice dependencies on commons-jxpath and commons-codec should
be optional in the POM.

Nico.




2007/9/20, nicolas de loof <ni...@gmail.com>:
> I'll look at this and attach a patch to Jira.
> thanks.
>
> 2007/9/20, Oliver Heger <ol...@oliver-heger.de>:
> > nicolas de loof wrote:
> > > Could you please tell me what would be better :
> > >
> > > - copy/paste code from ANT to avoid a new dependency just for some methods
> > > - use the ant code as a new (optional) dependency
> > >
> > > Nico.
> >
> > I would prefer not to add an additional dependency. If we talk about one
> > or two classes, simply copying them seems to be alright. Or are there
> > more classes involved?
> >
> > Oliver
> >
> > >
> > > 2007/9/20, nicolas de loof <ni...@gmail.com>:
> > >> Your right, I was reading javadoc to fast
> > >>
> > >> 2007/9/19, sebb <se...@gmail.com>:
> > >>> On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> > >>>> Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
> > >>>> procEnvironment()
> > >>>>
> > >>>> Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
> > >>>> MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
> > >>>> environment variable at all !
> > >>> Huh?
> > >>> OpenVMS does seem to be supported - by parsing the output of "Show logical".
> > >>>
> > >>>> This method also has been "un deprecated" on Java 5 and can be used on
> > >>>> such a runtime. We can invoke it if System.getProprty("java.version")
> > >>>> returns > 1.5.
> > >>>>
> > >>>> Nico.
> > >>>>
> > >>>>
> > >>>> 2007/9/19, nicolas de loof <ni...@gmail.com>:
> > >>>>> My idea was simply to copy/paste code from the ant Property class.
> > >>>>> AFAIK this one has been largely tested and works on many (if not all
> > >>>>> ?) platforms.
> > >>>>>
> > >>>>> Nico.
> > >>>>>
> > >>>>> 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> > >>>>>> nicolas de loof wrote:
> > >>>>>>> Hello,
> > >>>>>>>
> > >>>>>>> Did anyone allready ask for support in commons-configuration to acces
> > >>>>>>> environement variables, the same way it is available with ant
> > >>>>>>> <property> ?
> > >>>>>>>
> > >>>>>>> I'll need it and can contribute for this.
> > >>>>>>>
> > >>>>>>> Nico.
> > >>>>>>>
> > >>>>>> There is an enhancement ticket about this topic [1] with a longer
> > >>>>>> discussion. There was also a thread on the mailing list at this time.
> > >>>>>>
> > >>>>>> How would you implement access to OS environment variables in a portable
> > >>>>>> way?
> > >>>>>>
> > >>>>>> Oliver
> > >>>>>>
> > >>>>>> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> > >>>>>>
> > >>>>>> ---------------------------------------------------------------------
> > >>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >>>>>> For additional commands, e-mail: dev-help@commons.apache.org
> > >>>>>>
> > >>>>>>
> > >>>> ---------------------------------------------------------------------
> > >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >>>> For additional commands, e-mail: dev-help@commons.apache.org
> > >>>>
> > >>>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >>> For additional commands, e-mail: dev-help@commons.apache.org
> > >>>
> > >>>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by nicolas de loof <ni...@gmail.com>.
I'll look at this and attach a patch to Jira.
thanks.

2007/9/20, Oliver Heger <ol...@oliver-heger.de>:
> nicolas de loof wrote:
> > Could you please tell me what would be better :
> >
> > - copy/paste code from ANT to avoid a new dependency just for some methods
> > - use the ant code as a new (optional) dependency
> >
> > Nico.
>
> I would prefer not to add an additional dependency. If we talk about one
> or two classes, simply copying them seems to be alright. Or are there
> more classes involved?
>
> Oliver
>
> >
> > 2007/9/20, nicolas de loof <ni...@gmail.com>:
> >> Your right, I was reading javadoc to fast
> >>
> >> 2007/9/19, sebb <se...@gmail.com>:
> >>> On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> >>>> Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
> >>>> procEnvironment()
> >>>>
> >>>> Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
> >>>> MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
> >>>> environment variable at all !
> >>> Huh?
> >>> OpenVMS does seem to be supported - by parsing the output of "Show logical".
> >>>
> >>>> This method also has been "un deprecated" on Java 5 and can be used on
> >>>> such a runtime. We can invoke it if System.getProprty("java.version")
> >>>> returns > 1.5.
> >>>>
> >>>> Nico.
> >>>>
> >>>>
> >>>> 2007/9/19, nicolas de loof <ni...@gmail.com>:
> >>>>> My idea was simply to copy/paste code from the ant Property class.
> >>>>> AFAIK this one has been largely tested and works on many (if not all
> >>>>> ?) platforms.
> >>>>>
> >>>>> Nico.
> >>>>>
> >>>>> 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> >>>>>> nicolas de loof wrote:
> >>>>>>> Hello,
> >>>>>>>
> >>>>>>> Did anyone allready ask for support in commons-configuration to acces
> >>>>>>> environement variables, the same way it is available with ant
> >>>>>>> <property> ?
> >>>>>>>
> >>>>>>> I'll need it and can contribute for this.
> >>>>>>>
> >>>>>>> Nico.
> >>>>>>>
> >>>>>> There is an enhancement ticket about this topic [1] with a longer
> >>>>>> discussion. There was also a thread on the mailing list at this time.
> >>>>>>
> >>>>>> How would you implement access to OS environment variables in a portable
> >>>>>> way?
> >>>>>>
> >>>>>> Oliver
> >>>>>>
> >>>>>> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> >>>>>>
> >>>>>> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>>>>> For additional commands, e-mail: dev-help@commons.apache.org
> >>>>>>
> >>>>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>>> For additional commands, e-mail: dev-help@commons.apache.org
> >>>>
> >>>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>> For additional commands, e-mail: dev-help@commons.apache.org
> >>>
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by Oliver Heger <ol...@oliver-heger.de>.
nicolas de loof wrote:
> Could you please tell me what would be better :
> 
> - copy/paste code from ANT to avoid a new dependency just for some methods
> - use the ant code as a new (optional) dependency
> 
> Nico.

I would prefer not to add an additional dependency. If we talk about one 
or two classes, simply copying them seems to be alright. Or are there 
more classes involved?

Oliver

> 
> 2007/9/20, nicolas de loof <ni...@gmail.com>:
>> Your right, I was reading javadoc to fast
>>
>> 2007/9/19, sebb <se...@gmail.com>:
>>> On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
>>>> Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
>>>> procEnvironment()
>>>>
>>>> Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
>>>> MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
>>>> environment variable at all !
>>> Huh?
>>> OpenVMS does seem to be supported - by parsing the output of "Show logical".
>>>
>>>> This method also has been "un deprecated" on Java 5 and can be used on
>>>> such a runtime. We can invoke it if System.getProprty("java.version")
>>>> returns > 1.5.
>>>>
>>>> Nico.
>>>>
>>>>
>>>> 2007/9/19, nicolas de loof <ni...@gmail.com>:
>>>>> My idea was simply to copy/paste code from the ant Property class.
>>>>> AFAIK this one has been largely tested and works on many (if not all
>>>>> ?) platforms.
>>>>>
>>>>> Nico.
>>>>>
>>>>> 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
>>>>>> nicolas de loof wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> Did anyone allready ask for support in commons-configuration to acces
>>>>>>> environement variables, the same way it is available with ant
>>>>>>> <property> ?
>>>>>>>
>>>>>>> I'll need it and can contribute for this.
>>>>>>>
>>>>>>> Nico.
>>>>>>>
>>>>>> There is an enhancement ticket about this topic [1] with a longer
>>>>>> discussion. There was also a thread on the mailing list at this time.
>>>>>>
>>>>>> How would you implement access to OS environment variables in a portable
>>>>>> way?
>>>>>>
>>>>>> Oliver
>>>>>>
>>>>>> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by nicolas de loof <ni...@gmail.com>.
Could you please tell me what would be better :

- copy/paste code from ANT to avoid a new dependency just for some methods
- use the ant code as a new (optional) dependency

Nico.

2007/9/20, nicolas de loof <ni...@gmail.com>:
> Your right, I was reading javadoc to fast
>
> 2007/9/19, sebb <se...@gmail.com>:
> > On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> > > Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
> > > procEnvironment()
> > >
> > > Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
> > > MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
> > > environment variable at all !
> >
> > Huh?
> > OpenVMS does seem to be supported - by parsing the output of "Show logical".
> >
> > > This method also has been "un deprecated" on Java 5 and can be used on
> > > such a runtime. We can invoke it if System.getProprty("java.version")
> > > returns > 1.5.
> > >
> > > Nico.
> > >
> > >
> > > 2007/9/19, nicolas de loof <ni...@gmail.com>:
> > > > My idea was simply to copy/paste code from the ant Property class.
> > > > AFAIK this one has been largely tested and works on many (if not all
> > > > ?) platforms.
> > > >
> > > > Nico.
> > > >
> > > > 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> > > > > nicolas de loof wrote:
> > > > > > Hello,
> > > > > >
> > > > > > Did anyone allready ask for support in commons-configuration to acces
> > > > > > environement variables, the same way it is available with ant
> > > > > > <property> ?
> > > > > >
> > > > > > I'll need it and can contribute for this.
> > > > > >
> > > > > > Nico.
> > > > > >
> > > > >
> > > > > There is an enhancement ticket about this topic [1] with a longer
> > > > > discussion. There was also a thread on the mailing list at this time.
> > > > >
> > > > > How would you implement access to OS environment variables in a portable
> > > > > way?
> > > > >
> > > > > Oliver
> > > > >
> > > > > [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > >
> > > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by nicolas de loof <ni...@gmail.com>.
Your right, I was reading javadoc to fast

2007/9/19, sebb <se...@gmail.com>:
> On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> > Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
> > procEnvironment()
> >
> > Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
> > MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
> > environment variable at all !
>
> Huh?
> OpenVMS does seem to be supported - by parsing the output of "Show logical".
>
> > This method also has been "un deprecated" on Java 5 and can be used on
> > such a runtime. We can invoke it if System.getProprty("java.version")
> > returns > 1.5.
> >
> > Nico.
> >
> >
> > 2007/9/19, nicolas de loof <ni...@gmail.com>:
> > > My idea was simply to copy/paste code from the ant Property class.
> > > AFAIK this one has been largely tested and works on many (if not all
> > > ?) platforms.
> > >
> > > Nico.
> > >
> > > 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> > > > nicolas de loof wrote:
> > > > > Hello,
> > > > >
> > > > > Did anyone allready ask for support in commons-configuration to acces
> > > > > environement variables, the same way it is available with ant
> > > > > <property> ?
> > > > >
> > > > > I'll need it and can contribute for this.
> > > > >
> > > > > Nico.
> > > > >
> > > >
> > > > There is an enhancement ticket about this topic [1] with a longer
> > > > discussion. There was also a thread on the mailing list at this time.
> > > >
> > > > How would you implement access to OS environment variables in a portable
> > > > way?
> > > >
> > > > Oliver
> > > >
> > > > [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by sebb <se...@gmail.com>.
On 19/09/2007, nicolas de loof <ni...@gmail.com> wrote:
> Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
> procEnvironment()
>
> Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
> MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
> environment variable at all !

Huh?
OpenVMS does seem to be supported - by parsing the output of "Show logical".

> This method also has been "un deprecated" on Java 5 and can be used on
> such a runtime. We can invoke it if System.getProprty("java.version")
> returns > 1.5.
>
> Nico.
>
>
> 2007/9/19, nicolas de loof <ni...@gmail.com>:
> > My idea was simply to copy/paste code from the ant Property class.
> > AFAIK this one has been largely tested and works on many (if not all
> > ?) platforms.
> >
> > Nico.
> >
> > 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> > > nicolas de loof wrote:
> > > > Hello,
> > > >
> > > > Did anyone allready ask for support in commons-configuration to acces
> > > > environement variables, the same way it is available with ant
> > > > <property> ?
> > > >
> > > > I'll need it and can contribute for this.
> > > >
> > > > Nico.
> > > >
> > >
> > > There is an enhancement ticket about this topic [1] with a longer
> > > discussion. There was also a thread on the mailing list at this time.
> > >
> > > How would you implement access to OS environment variables in a portable
> > > way?
> > >
> > > Oliver
> > >
> > > [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by nicolas de loof <ni...@gmail.com>.
Looking at http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?view=markup
procEnvironment()

Netware, os/2, z/os, unixes and windows are supported. OpenVMS and
MacOS <= 9 seems to be unsupported platforms. MacOS <=9 has no
environment variable at all !

This method also has been "un deprecated" on Java 5 and can be used on
such a runtime. We can invoke it if System.getProprty("java.version")
returns > 1.5.

Nico.


2007/9/19, nicolas de loof <ni...@gmail.com>:
> My idea was simply to copy/paste code from the ant Property class.
> AFAIK this one has been largely tested and works on many (if not all
> ?) platforms.
>
> Nico.
>
> 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> > nicolas de loof wrote:
> > > Hello,
> > >
> > > Did anyone allready ask for support in commons-configuration to acces
> > > environement variables, the same way it is available with ant
> > > <property> ?
> > >
> > > I'll need it and can contribute for this.
> > >
> > > Nico.
> > >
> >
> > There is an enhancement ticket about this topic [1] with a longer
> > discussion. There was also a thread on the mailing list at this time.
> >
> > How would you implement access to OS environment variables in a portable
> > way?
> >
> > Oliver
> >
> > [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by Oliver Heger <ol...@oliver-heger.de>.
nicolas de loof wrote:
> My idea was simply to copy/paste code from the ant Property class.
> AFAIK this one has been largely tested and works on many (if not all
> ?) platforms.
> 
> Nico.

This sounds reasonable. We should only ensure that nothing of this code 
for accessing environment variables leaks into the public API, so that 
we can later replace it by something else (e.g. when we switch to JDK 
1.5 or if [lang] decides to provide this feature, too).

I am glad to review and apply patches :-)

Oliver

> 
> 2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
>> nicolas de loof wrote:
>>> Hello,
>>>
>>> Did anyone allready ask for support in commons-configuration to acces
>>> environement variables, the same way it is available with ant
>>> <property> ?
>>>
>>> I'll need it and can contribute for this.
>>>
>>> Nico.
>>>
>> There is an enhancement ticket about this topic [1] with a longer
>> discussion. There was also a thread on the mailing list at this time.
>>
>> How would you implement access to OS environment variables in a portable
>> way?
>>
>> Oliver
>>
>> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by nicolas de loof <ni...@gmail.com>.
My idea was simply to copy/paste code from the ant Property class.
AFAIK this one has been largely tested and works on many (if not all
?) platforms.

Nico.

2007/9/19, Oliver Heger <ol...@oliver-heger.de>:
> nicolas de loof wrote:
> > Hello,
> >
> > Did anyone allready ask for support in commons-configuration to acces
> > environement variables, the same way it is available with ant
> > <property> ?
> >
> > I'll need it and can contribute for this.
> >
> > Nico.
> >
>
> There is an enhancement ticket about this topic [1] with a longer
> discussion. There was also a thread on the mailing list at this time.
>
> How would you implement access to OS environment variables in a portable
> way?
>
> Oliver
>
> [1] http://issues.apache.org/jira/browse/CONFIGURATION-284
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [configuration] accessing emvironment variable (not java system)

Posted by Oliver Heger <ol...@oliver-heger.de>.
nicolas de loof wrote:
> Hello,
> 
> Did anyone allready ask for support in commons-configuration to acces
> environement variables, the same way it is available with ant
> <property> ?
> 
> I'll need it and can contribute for this.
> 
> Nico.
> 

There is an enhancement ticket about this topic [1] with a longer 
discussion. There was also a thread on the mailing list at this time.

How would you implement access to OS environment variables in a portable 
way?

Oliver

[1] http://issues.apache.org/jira/browse/CONFIGURATION-284

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org