Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How do I set environment variable in a build definition properties tab before running my build?

I went to the properties tab in the build definiton and set five enviornment variables here.  My build failed because it could not find my JAVA_HOME environment variable.  However, I thought I had set that correctoly in the properties tab.  Here is what I did:

Name:  JAVA_HOME

Value: C:\projectA\spin16\java7\jdkl1.7.0_25

Any suggestions as to how to set an enviornment variable using the build definition properties tab?

Thanks.

0 votes


Accepted answer

Permanent link
 Just because the property is passed to the build engine does not mean that the command will pick it up.  Did you explicitly add that variable to the command you are running?  The JBE will automatically add properties to an Ant script, but it sounds like you need it to be part of the initial program execution which would have to be done explicitly.

~Spencer
Frank Brewer selected this answer as the correct answer

0 votes

Comments

Basically, I cd to where the build.xml is located and run an "ant target" command.  I expected the environment variables that I defined in the properties tab to be used by my build initiated by the "ant target" command.  That apparently does not happen.  I am not sure how to use an Ant script.  Is there a way to enter environment variables into such a script that the build uses when it kicks off?

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 563

Question asked: Mar 30 '14, 2:24 p.m.

Question was seen: 5,249 times

Last updated: Mar 31 '14, 4:37 p.m.

Confirmation Cancel Confirm