Bamboo cannot find build script on Windows boxes

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When bamboo triggers the builder (ant) it cannot find the build script. For example,

Starting to build 'ASYNCPROC - ASYNCPROCBASE'
... running command line: D:\devtools\apache-ant-1.7.1\bin\ant.bat \-f build.xml make
... in : D:\Documents\Project\CI\Bamboo\jisano3\bamboo-home\xml-data\build-dir\ASYNCPROC-ASYNCBASE\build
... using java.home: D:\devtools\Java\jdk1.5.0_17

16-Apr-2009 06:30:00 Buildfile: build.xml does not exist\!
16-Apr-2009 06:30:00 Build failed

Diagnosis

Add more debug to your Ant build (For example; to ant.bat : echo "BAMBOO" %cd%)

22-Apr-2009 11:08:35 Building started with AntBuilder command

22-Apr-2009 11:08:35 Starting to build 'Async_batch - asyncbatchplan'<br />
... running command line: D:\devtools\apache-ant-1.7.1\bin\ant.bat \-f build.xml clean test<br />
... in : D:\Bamboo\bamboo-home\xml-data\build-dir\ASYNCBATCH-ASYNCBATCHKEY\build<br />
... using java.home: D:\devtools\Java\jdk1.5.0_17<br />
... using extra environment variables: \-Dbasedir=D:\Bamboo\bamboo-home\xml-data\build-dir\ASYNCBATCH-ASYNCBATCHKEY

22-Apr-2009 11:08:35 BAMBOO D:\*
22-Apr-2009 11:08:35 Buildfile: build.xml does not exist\!
22-Apr-2009 11:08:35 Build failed

In the except above, it is clear that ant starts off in the wrong directory.

Cause

The Windows command shell has been configured to run a command when it is invoked via windows registry key,

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

The key was set AutoRun to cd\ . Which makes all commands files automatically run from the root.

Resolution

Disable cd <root> autorun feature in the registry key to allow the command shell to start from the directory it is invoked from.

Alternatively, vote for JIRA issue BAM-3858 to be resolved.

Last modified on Jun 13, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.