PATH problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PATH problem

Guillaume Boucherie
Hi,

I have some problem to get a correct PATH in hudson.
I'm using the version 1.230 in a tomcat-5.5.26.
I have an init script that initialize some variable like this :

MVN_HOME=value
JAVA_HOME=value
PATH=$MVN_HOME/bin:$JAVA_HOME/bin:$PATH
export MVN_HOME JAVA_HOME PATH

When I look in the Hudson System Properties page I can see my JAVA_HOME ans MVN_HOME properties but the PATH is not correct.
How can I do to have a good PATH in hudson ?
Thanks a lot.

Guillaume Boucherie
Reply | Threaded
Open this post in threaded view
|

Re: PATH problem

Gav-9


On Fri, Jul 4, 2008 at 5:53 PM, Guillaume Boucherie <[hidden email]> wrote:
Hi,

I have some problem to get a correct PATH in hudson.
I'm using the version 1.230 in a tomcat-5.5.26.
I have an init script that initialize some variable like this :

MVN_HOME=value
JAVA_HOME=value
PATH=$MVN_HOME/bin:$JAVA_HOME/bin:$PATH
export MVN_HOME JAVA_HOME PATH

Shouldnt that be export $path ?

Gav...



When I look in the Hudson System Properties page I can see my JAVA_HOME ans MVN_HOME properties but the PATH is not correct.
How can I do to have a good PATH in hudson ?
Thanks a lot.

Guillaume Boucherie



--
Gav...

www.minitutorials.com | www.brightoncomputers.com | www.iwdp.co.uk
Reply | Threaded
Open this post in threaded view
|

Re: PATH problem

Kohsuke Kawaguchi
Administrator
In reply to this post by Guillaume Boucherie
Guillaume Boucherie wrote:

> Hi,
>
> I have some problem to get a correct PATH in hudson.
> I'm using the version 1.230 in a tomcat-5.5.26.
> I have an init script that initialize some variable like this :
>
> MVN_HOME=value
> JAVA_HOME=value
> PATH=$MVN_HOME/bin:$JAVA_HOME/bin:$PATH
> export MVN_HOME JAVA_HOME PATH
>
> When I look in the Hudson System Properties page I can see my JAVA_HOME
> ans MVN_HOME properties but the PATH is not correct.
If you are setting it as a part of your shell script, that only affects
the environment variables of the shell and not that of Hudson. So your
build should see the PATH that you set, but you wouldn't see the value
in Hudson's system properties / env variable pages.

I've never tried to export multiple variables once, so if you are having
a problem with that, try more standard syntax like this:

export PATH=...

(assuming you are using bash)


> How can I do to have a good PATH in hudson ?

You can set it before launching Tomcat.

When you choose JDK in job configuration, Hudson will add $JAVA_HOME/bin
to your PATH. Similarly if you use Maven2 builder, it gets $MVN_HOME and
etc all set. So normally you wouldn't have to worry about this sort of
stuff.

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment