It's all about the answers!

Ask a question

Using ANT_OPTS in an Ant-type build definition?


0
1
Frederic Mora (13811518) | asked Sep 20 '11, 7:44 p.m.
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

2 answers



permanent link
Brent Ulbricht (2.5k11) | answered Sep 21 '11, 10:38 p.m.
JAZZ DEVELOPER
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

permanent link
Frederic Mora (13811518) | answered Sep 22 '11, 11:11 a.m.

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

Your answer


Register or 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.