TC 2.1 custom Ant home not working

We're evaluating TeamCity Version 2.1.1(build 4261) (we're current users of TC 1), and when we specify a custom Ant home in the project settings and build agent properties files (exactly the same way we did with TC 1), we get errors when the project runs. Using the build-in Ant works, but not our custom Ant installations (our architects are fussy)

We specify the Ant home in the configuration page like so:
%system.ANT_HOME_1_6_5%

In the build agent properties file, we define it:
system.ANT_HOME_1_6_5=C\:
snapshots
java3rdpartylib
ant
1.6.5 (yes, this dir exists)

When we run, we get the output shown below. Any ideas? The .NET guys are having a similar problem with NAnt.

C:/BuildAgent/lib/buildServerMessages.jar
C:/BuildAgent/plugins/coveragePlugin/lib/emma.jar
C:/BuildAgent/lib/xstream-1.2.1.jar
C:/BuildAgent/plugins/coveragePlugin/lib/buildServerCoverageAgent.jar
C:/BuildAgent/lib/xmlrpc-2.0.1.jar
C:/BuildAgent/plugins/antPlugin/lib/buildServerAntServerLogging.jar
C:/BuildAgent/lib/nanocontainer-1.0-RC-1.jar
INFO - erver.agent.ant.AntBuildRunner - Use Ant home: C:\snapshots\java3rdpartylib\ant\1.6.5
INFO - nt.runner.GenericProgramRunner - C:\snapshots\java3rdpartylib\jdk\1.5.0_04\bin\java.exe "-Dteamcity.buildConfName=Test In-container" -DDotNetFramework1.1_Path=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -Dbuild.working.dir=c:\BuildAgent\work\Agent\OrderUploadService -Dagent.name=DBULLAW1 "-Demma.instrumentation.parameters=-ix -Test" -Dbuild.number=7 -DANT_HOME_1_6_5=C:\snapshots\java3rdpartylib\ant\1.6.5 -DJAVA_HOME_1_5_0_04=C:\snapshots\java3rdpartylib\jdk\1.5.0_04 -DDotNetFramework1.1= -Dbuild.number.format= -Duser.language=en -Duser.country=US -Dos.version=5.1 -Duser.timezone=America/Los_Angeles -Dfile.encoding=Cp1252 -DDotNetFramework2.0_x86= -Dfile.separator=\ -Dagent.work.dir=c:\BuildAgent\work -Dteamcity.projectName=OrderUploadService -DDotNetFramework2.0_x86_Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 -DDotNetFramework2.0_Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 -Dos.arch=x86 -DDotNetFramework1.1_x86_Path=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -DANT_HOME_1_7_0=C:\snapshots\java3rdpartylib\ant\1.7.0 -DDotNetFramework2.0= -DDotNetFramework1.1_x86= -Djava.io.tmpdir=c:\BuildAgent\bin\..\temp\teamcity.tmp -Dbuild.vcs.number.1=2342 -Demma.report.html.out.encoding=UTF-8 -Duser.name=dbulla -DbuildInfoFailOK=true "-Dos.name=Windows XP" -Dant.task.extensions=jetbrains.buildServer.agent.ant.CompilerAntExtension,jetbrains.buildServer.agent.ant.EchoAntExtension,jetbrains.buildServer.coverage.AntCoverageAdapter,jetbrains.buildServer.testng.TestNGTaskExtension, -Dreport.html.out.file=coverage/index.html -Dteamcity.auth.password=69b1cc4e5d5b3cdf1484cc660a9d8f366de466b4 -Didea.build.agent.port=9090 -Dteamcity.auth.userId=TeamCityBuildId=29 -Dteamcity.buildType.id=bt3 -Duser.variant= -DJAVA_HOME_1_4_2_04=C:\snapshots\java3rdpartylib\jdk\1.4.2_04 -Dagent.classpath=C:/BuildAgent/lib/buildServerServerLogging.jar;C:/BuildAgent/lib/buildServerXmlRpcWrapper.jar;C:/BuildAgent/lib/buildServerCommonRuntime.jar;C:/BuildAgent/lib/commons-codec-1.3.jar;C:/BuildAgent/plugins/testNGPlugin/lib/testNGAntExtension.jar;C:/BuildAgent/lib/xpp3_min-1.1.3.4.M.jar;C:/BuildAgent/lib/utils.jar;C:/BuildAgent/lib/buildServerMessages.jar;C:/BuildAgent/plugins/coveragePlugin/lib/emma.jar;C:/BuildAgent/lib/xstream-1.2.1.jar;C:/BuildAgent/plugins/coveragePlugin/lib/buildServerCoverageAgent.jar;C:/BuildAgent/lib/xmlrpc-2.0.1.jar;C:/BuildAgent/plugins/antPlugin/lib/buildServerAntServerLogging.jar;C:/BuildAgent/lib/nanocontainer-1.0-RC-1.jar -Dsuccessful.build.number=4 "-Duser.home=C:\Documents and Settings\dbulla" -Didea.build.server.build.id=29 -Dant.home=C:\snapshots\java3rdpartylib\ant\1.6.5 -Dpath.separator=; -DJAVA_HOME_1_4_2_12=C:\snapshots\java3rdpartylib\jdk\1.4.2_12 -classpath C:\snapshots\java3rdpartylib\ant\1.6.5\lib\ant-launcher.jar org.apache.tools.ant.launch.Launcher -lib C:/BuildAgent/lib/buildServerRuntimeUtil.jar;C:/BuildAgent/plugins/antPlugin/lib/buildServerAntRuntime.jar -listener jetbrains.buildServer.agent.ant.AgentBuildListener -buildfile c:\BuildAgent\work\Agent\OrderUploadService\build\build.xml test-ic
INFO - nt.runner.GenericProgramRunner - Buildfile: c:\BuildAgent\work\Agent\OrderUploadService\build\build.xml
INFO - nt.runner.GenericProgramRunner -
INFO - nt.runner.GenericProgramRunner - BUILD FAILED
INFO - nt.runner.GenericProgramRunner - java.lang.NoClassDefFoundError: junit/framework/Test
INFO - nt.runner.GenericProgramRunner - at java.lang.Class.forName0(Native Method)
INFO - nt.runner.GenericProgramRunner - at java.lang.Class.forName(Class.java:164)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.coverage.AntCoverageAdapter.class$(AntCoverageAdapter.java:74)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.coverage.AntCoverageAdapter.taskStarted(AntCoverageAdapter.java:147)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.agent.ant.AgentBuildListener$ExtensionsProcessor.taskStarted(AgentBuildListener.java:257)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.agent.ant.AgentBuildListener.taskStarted(AgentBuildListener.java:142)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Project.fireTaskStarted(Project.java:1940)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Task.perform(Task.java:360)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Target.execute(Target.java:341)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Main.runBuild(Main.java:653)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Main.startAnt(Main.java:187)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
INFO - nt.runner.GenericProgramRunner -
INFO - nt.runner.GenericProgramRunner - Total time: 0 seconds
INFO - nt.runner.GenericProgramRunner - java.lang.NoClassDefFoundError: junit/framework/Test
INFO - nt.runner.GenericProgramRunner - at java.lang.Class.forName0(Native Method)
INFO - nt.runner.GenericProgramRunner - at java.lang.Class.forName(Class.java:164)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.coverage.AntCoverageAdapter.class$(AntCoverageAdapter.java:74)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.coverage.AntCoverageAdapter.taskStarted(AntCoverageAdapter.java:147)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.agent.ant.AgentBuildListener$ExtensionsProcessor.taskStarted(AgentBuildListener.java:257)
INFO - nt.runner.GenericProgramRunner - at jetbrains.buildServer.agent.ant.AgentBuildListener.taskStarted(AgentBuildListener.java:142)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Project.fireTaskStarted(Project.java:1940)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Task.perform(Task.java:360)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Target.execute(Target.java:341)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Main.runBuild(Main.java:653)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Main.startAnt(Main.java:187)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
INFO - nt.runner.GenericProgramRunner - junit/framework/Test

2 comments

Hi Douglas,

Please make sure that your custom ant has junit-xxx.jar in its lib subdirectory. This is required for junit task to work and for our test listener.

Hope this helps,
KIR

0

Ah, that would do it.

We're using Ivy to bring in our libraries, as some projects are using JUnit4, and some JUnit3, so we'll have to adjust accordingly. Of course, those projects that can use TC's Ant should probably just do so

Thanks!


Douglas Bullard

0

Please sign in to leave a comment.