I've got an ant build task that is reporting that it has failed, even when the ant build in question has succeeded. I've got several other ant builds in the same FinalBuilder script that are working just fine.
I'm using Finalbuilder 5.5.0.518 on Windows XP SP2.
Here is the output I'm seeing:
Buildfile: C:\p4_rc\depot\server\connect\inyo\static\build.xml [copy] Warning: Could not find file C:\p4_rc\depot\server\connect\inyo\static\scripts\dsDownload_v1.0.js to copy. initPROD:
backup: [mkdir] Created dir: C:\p4_rc\depot\server\connect\inyo\static\tmp
update: [copy] Copying 1 file to C:\p4_rc\depot\server\connect\inyo\static\scripts CommonTasks: [echo] Performing static common tasks ...
DeployPROD: [echo] Static built successfully. BUILD SUCCESSFUL Total time: 0 seconds Action Failed C:\Program Files\Ant\apache-ant-1.7.0\bin\ant.bat returned : 0
The warning about not finding a file actually expected, so that shouldn't be causing the action to fail. Ant says the build is successful and exits with a 0, so I can't see why FinalBuilder is thinking the action has failed. Any ideas?
Thanks for posting. There was a bug with the way we were reading the result code from Ant.bat. If you upgrade to the latest FB 5 release (from the Downloads page), this bug should be fixed.
Thanks for the follow-up. Sorry the new build didn't fix your problem.
To give you some background on this, in the "bad old days" Ant didn't always return a reliable exit code. So FinalBuidler checks for error output from Ant as well as checking the exit code.
In this case, the output FinalBuilder is considering to be an error is probably the warning.
Given that the exit code is now considered reliable, I've added an option to the action called "Fail on warning or error output". It's enabled by default, but if you disable it then you should get correct behaviour in your case.
Ok, that fixes it. I understand what you mean about getting incorrect return values. I've got some Symbian builds that exit with a 0 when they have errors. My builds end up catching the failure a couple of steps later when the packaging steps fail because some file are missing.
Thanks for adding the option to ignore the warning, that works well.