Error Handling

The import process comprises of running some build process in a chain execution. The error could occur in any of the chain build files. By default, if any of chained build file encounters error it terminates its process, the error is recorded in the Post build report but the error does not cause the chain to terminate. The control simply passes to the next build file in the chain.

If you do not want this behavior, update the property "fail.build.on.subant-build.failure.default" to true in the common.xml file.

Alternatively, pass the property as follows:

>ant -f build.xml clean -Dfail.build.on.subant-build.failure.default=true

By default, the above property is set to false.

Now as we just saw that default behavior is to terminate any build file that encountered error and continue to next build file in chain. Now what if this failure was due to the failure of one ActiveMatrix Administrator task and user might be okay to skip just that ActiveMatrix Administrator task but continue with the next ActiveMatrix Administrator task in same build file?

For example build file of Node - during start task we enable shared library (custom features) and then proceed to enabling / installing resource instances. Now, if enable shared library task encounters an error, that build file is aborted by default and resource instance enabling ActiveMatrix task are skipped. That ActiveMatrix Administrator task (installing of resource instance) might not have failed but it did not get a chance to execute.

If you want above behavior to change, update the property "fail.build.on.AMXAdminTask.fail.default" value to false in file common.xml. That means one failure of ActiveMatrix Administrator task in given build file does not cause complete abort of that build file.

Alternatively you can pass same property using the -D option while running import:

>ant -f build.xml start -Dfail.build.on.AMXAdminTask.fail.default=false