TeamCity command line build -> cygwin -> ant - could not find JavaMake

Hi!

My project use cygwin for compile.
I start cygwin, then run script that set all environment variables (CLASSPATH, ANT_HOME ... etc) after that script calls ant to compile project and that is all.
I tryed to compile my project with TeamCity -> Build from command line. I wrote a script, that calls cygwin and run there commands to compile project as usuall.
But after setting environment variables and trying to run build target, I receive error on the begining of build.xml parsing:

BUILD FAILED

[09:42:26]: C:\p4\phoenix\branch04\build\build.xml:64: taskdef class com.sun.tools.javamake.ant.JavaMake cannot be found
[09:42:26]: Total time: 0 seconds
[09:42:26]: ]0;/p4/phoenix/2011.04/build
[09:42:26]: [32mSYSTEM@SFO-3VDZOBA-V [33m/p4/phoenix/2011.04/build [0m
[09:42:26]: $ logout
[09:42:26]: Process exited with code 1
build.xml:
63:    <!-- same as antcall but without the overhead nor the weird property manipulation -->
64:    <taskdef name="javamake" classname="com.sun.tools.javamake.ant.JavaMake"/>
65:    <taskdef name="call" classname="ise.antelope.tasks.Call"/>

When it runs not with TeamCity all is fine. But when I use TeamCity I get this error.
Also, when I run ant in debug mode, in cygwin I get this message:
Class com.sun.tools.javamake.ant.JavaMake loaded from parent loader (parentFirst)
So, I supose, that TeamCity try's to load JavaMake from his environment, but not from my (that was set in set environments script).
I don't know what should I do, or how to add JavaMake to TeamCity environment (adding JavaMake's librarys in c:\BuildAgent\lib\ didn't help).
Please help.

Windows XP SP2, TeamCity Professional Version 6.0.3 (build 15925)
5 comments
Comment actions Permalink

I would not use CLASSPATH environment variable, as it is deprecated. Could you please provide the whole script?

0
Comment actions Permalink

What variable I should to use? I can show you only debug information. See attach.



Attachment(s):
2011.04_default_54.log.zip
0
Comment actions Permalink

Try to specify classpath for JavaMake task right in the taskdef. And I believe this is not TeamCity issue, TeamCity just starts your cmd with some environment. It seems environment differs when cmd is started by agent or manually. Probably because agent runs under different user.

0
Comment actions Permalink

I tried it, but still have an error.
When I open cygwin I see cygwin window, but when TteamCity runs cmd (and it's runs Cygwin) I don't see any windows or changes.
In what way TeamCity starts cmd ?
This error for is not understandable and unbelievable %)

0
Comment actions Permalink

I think I find problem. BuildAgent use ant 1.8.0 but my project use 1.6.5.
How do you think, that stuff can be source of cygwin problems?

0

Please sign in to leave a comment.