Development tools : Massive build UDTT project : Programmatic build for UDTT projects : BTTBuildTask class : Invoking BTTBuildTask to build a set of UDTT files
  
Invoking BTTBuildTask to build a set of UDTT files
BTTBuildTask also allows to generate specific files. To do it, the Ant <fileset> tag should be used to define the set of files to be built.
In this case, BTTBuildTask has an optional parameter known as buildDependencies whose values can be true or false. If this parameter is not specified or its value is different from a valid value, it is assumed that it is false. Value true indicates that it is necessary to generate not just the files included in <fileset> but also their dependent files. Only self defined flow files are considered to have dependent files and they are:
local xui files referenced from a page, popup page or final state in the flow
self defined local operation files referenced from operation states in the flow
mapping flow files defined in any state or transition in the flow
Example 1
btt-buildWithFileset.xml file is an example about how to invoke the task in this case:
<taskdef name="BTTBuild" classname="antbuildtask.BTTBuildTask"></taskdef>
  <property name="workspace" value="your_workspace_path"/>
  <target name="main">
    <BTTBuild channel="dojo" outputFile="myFile" validationOutputFile="myValidationFile" validationLevel=""/>
      <fileset dir="${workspace}">
        <include name="projectA/xui/*.xui"/>
        <include name="projectA/src/definitions/context.transaction"/>
        <include name="projectB/src/definitions/context.transaction"/>
      </fileset>
    </BTTBuild>
  </target>
The dir attribute must have as value the Eclipse workspace path where the files to be generated are located. It must match with the workspace path specified in -data parameter when invoking the build Ant file (refer to section 4. Execution Environment).
Each name value (in <include> tag) must contain the path file name from the project name. In case a file is not found in the specified path, BTTBuildTask will ignore it because it doesnt receive it in its Ant filesets variable. Files from different projects can be specified in the same fileset.
Notice that the project attribute does not make sense in this case. If it is specified, it will be ignored.
Example 2
btt-buildWithFilesetAndDependencies.xml file is an example about how to invoke the task with buildDependencies equals to true.
<taskdef name="BTTBuild" classname="antbuildtask.BTTBuildTask"></taskdef>
<property name="workspace" value="your_workspace_path"/>
<target name="main">
  <BTTBuild channel="dojo" outputFile="myFile" validationOutputFile="myValidationFile" validationLevel="" buildDependencies="true">
    <fileset dir="${workspace}">
      <include name="project/xui/*.xui"/>
      <include name="project/src/definitions/context.transaction"/>
    </fileset>
  </BTTBuild>
</target>
Take into account that:
files located in non-UDTT projects are not generated
files that appear several times (because they are specified explicitly in the fileset or because they are dependent files referenced more than once) are only generated once
<fileset> is case sensitive by default. In case no case sensitive is necessary, use casesensitive attribute as follows:
<fileset dir="${workspace}" casesensitive="false">
  <include name="a/xui/index.xui"/>
</fileset>
Go up to
BTTBuildTask class