The macro is used to add a log to the build result if the log file is available. If the file is not available, no error is generated and the build continues.
The macro supports Team Build Attributes, as well as, its own macro specific attributes. Click on a link for more information on the common attributes.
The following table describes the macro specific attributes for the macro:
| Macro Specific Attributes | ||
| Attribute | Description | Required |
| buildResultUUID |
The UUID of the build result which contains the file. The default value of this attribute is ${buildResultUUID} because that property is built-in when using the standard tooling.
|
No |
| characterEncoding | The character encoding used in the artifact file. It must be an IANA-compliant name. Defaults to the default encoding of the current platform. For more information, see IANA List of Character Set Names. | No |
| componentName | The name of the component to which this contribution applies. Used for grouping in the user interface. | No |
| contentType | The MIME content type of the artifact. If not specified, it is derived from the file extension. For an unknown file extension, application/unknown is used. | No |
| filePath | The path to the log. The path can be an absolute path or a path relative to the base directory of the build file. | Yes |
| label | The label for the build result contribution. | Yes |
| status |
The status of the contribution. Must be one of the following: OK, ERROR, WARNING, or INFO.
|
No |
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed Materials - Property of IBM
(c) Copyright IBM Corporation 2020. All Rights Reserved.
Note to U.S. Government Users Restricted Rights:
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
-->
<project
basedir="."
default="all"
name="Example"
xmlns:xt="antlib:com.ibm.team.build.extensions.toolkit">
<description>Example</description>
<!-- Load build extensions -->
<xt:loadBuildExtensions/>
<xt:getJarLocation property="jarPath"/>
<!-- Load common resources -->
<import>
<javaresource name="scripts/smpe/imports/$common.xml">
<classpath location="${jarPath}"/>
</javaresource>
</import>
<!-- - - - - - - - - - - - - - - - - - - *
* Example *
*- - - - - - - - - - - - - - - - - - - -->
<target name="main" description="main">
<LogSendIfAvailable label="Updated: @{file}" filePath="@{reportFolder}@{mac.filesep}@{file}.log"/>
</target>
<target depends="main" description="all" name="all"/>
</project>