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

Using ANT_OPTS in an Ant-type build definition?

Hello,

We are using RTC 3.0.1. We are launching builds with a build definition that uses Ant. We need specific Ant options to avoid OutOfMemoryExceptions.

On the build server, the JBE process has an ANT_OPTS environment variable (we see it in the java process environment with the command ps e www -C java). However, when we submit a build request, the ANT_OPTS env var is overwritten by the value of the "Java VM arguments" field set in the build defintion's Ant tab.

This is true even if this field is empty.

My question is: Is there a way to force the JBE-launched Ant to use a ANT_OPTS value other than what's passed in the build definition?


Thank you,

--Fred Mora

1

0 votes



2 answers

Permanent link
Hello,

We are using RTC 3.0.1. We are launching builds with a build definition that uses Ant. We need specific Ant options to avoid OutOfMemoryExceptions.

On the build server, the JBE process has an ANT_OPTS environment variable (we see it in the java process environment with the command ps e www -C java). However, when we submit a build request, the ANT_OPTS env var is overwritten by the value of the "Java VM arguments" field set in the build defintion's Ant tab.

This is true even if this field is empty.

My question is: Is there a way to force the JBE-launched Ant to use a ANT_OPTS value other than what's passed in the build definition?


Thank you,

--Fred Mora


Hi,

You need to put the values of your ANT_OPTS in the 'Java VM arguments' field in the build definition (ex. enter '-Xms64m -Xmx256m' in the input field). ANT_OPTS is an environment variable used by Ant's bat/shell scripts. The JBE does not use the bat/shell script to invoke Ant, but rather invokes it by executing java with the Ant launcher.

Brent Ulbricht
RTC Build Lead

1 vote


Permanent link

Hi,

You need to put the values of your ANT_OPTS in the 'Java VM arguments' field in the build definition (ex. enter '-Xms64m -Xmx256m' in the input field). ANT_OPTS is an environment variable used by Ant's bat/shell scripts. The JBE does not use the bat/shell script to invoke Ant, but rather invokes it by executing java with the Ant launcher.

Brent Ulbricht
RTC Build Lead


Brent,

Thank you, what you describe is consistent with what we see. I solved our current OoME problem by adding the requisite options to each of the impacted build definitions.

From a design standpoint, this is not very good. People who maintain build definitions don't necessarily have the build system skills needed to decide on Ant options.

I suggest a more flexible feature: if the 'Java VM arguments' field is empty, the JBE should read the value of the system-defined ANT_OPTS (or some other documented variable or property defined on the machine running JBE) and pass it to Ant when it is invoked.

I'd like to see this in an upcoming version of RTC.

Unless you see a strong argument against this suggestion, please kindly create a work item to this effect and subscribe me to it.

Thank you,

--Fred Mora

0 votes

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

Question asked: Sep 20 '11, 7:44 p.m.

Question was seen: 8,473 times

Last updated: Sep 20 '11, 7:44 p.m.

Confirmation Cancel Confirm