ANT_OPTS ignored by ant runner?

TeamCity Version 3.0 EAP (build 5725)

I have some tests that require a .dll -- which means I've got to get the
java.library.path set not only in Ant, but make sure I configure my
junit task with clonevm to make sure that setting makes it across that
chasm (using fork as well).

So ... I finally got it working in isolation, but now trying to set it
up on TeamCity, I can't get my java.library.path setting into the
java.exe that's running Ant. (I verify this by getting the command line
from Process Explorer).

Setting ANT_OPTS is effective when I'm using ant.bat in the bin folder
of apache ant 1.7.0 in isolation. But either using "Additional Ant
command line parameters:"** or setting ANT_OPTS in "6 Properties and
environment variables" or setting ANT_OPTS on the build agent machine
itself (which I've verified in tab=agentEnvVariables) has any effect.
The java.library.path is not being overridden to the value I need.



    • Either the Additional Ant command line parameters isn't working at

all, or these are sent to the Ant.jar, not the java.exe process itself,
which ANT_OPTS is (see how ant.bat works -- it has both ANT_OPTS and
ANT_ARGS -- ANT_OPTS are passed to java.exe, ANT_ARGS are passed to
org.apache.tools.ant.launch.Launcher).

1 comment

FYI - added this to JIRA: http://www.jetbrains.net/jira/browse/TW-3654

Chris Morris wrote:

TeamCity Version 3.0 EAP (build 5725)

I have some tests that require a .dll -- which means I've got to get the
java.library.path set not only in Ant, but make sure I configure my
junit task with clonevm to make sure that setting makes it across that
chasm (using fork as well).

So ... I finally got it working in isolation, but now trying to set it
up on TeamCity, I can't get my java.library.path setting into the
java.exe that's running Ant. (I verify this by getting the command line
from Process Explorer).

Setting ANT_OPTS is effective when I'm using ant.bat in the bin folder
of apache ant 1.7.0 in isolation. But either using "Additional Ant
command line parameters:"** or setting ANT_OPTS in "6 Properties and
environment variables" or setting ANT_OPTS on the build agent machine
itself (which I've verified in tab=agentEnvVariables) has any effect.
The java.library.path is not being overridden to the value I need.



    • Either the Additional Ant command line parameters isn't working at

all, or these are sent to the Ant.jar, not the java.exe process itself,
which ANT_OPTS is (see how ant.bat works -- it has both ANT_OPTS and
ANT_ARGS -- ANT_OPTS are passed to java.exe, ANT_ARGS are passed to
org.apache.tools.ant.launch.Launcher).

0

Please sign in to leave a comment.