Generating a DAA from the Command Line using an Ant Task
Procedure
- In TIBCO Business Studio, create any type of project, for example File > New Project > General > Project.
- Inside the project, create a file called build.xml (New > File > build.xml)
-
Open this file and type your script, similar to the following:
- You can use all standard Ant tasks and TIBCO Business Studio specific tasks, starting with
tbs.,
sds. or
bpm.
Note: bpm.generateDAA is used to create DAAs from BPM projects and sds.createDAA is used to create DAAs from SOA composite applications.Tip: You can use the Buildbeforegenerating flag, set to true, to perform a clean build of the Workspace before generating the DAA’s Workspace to make sure everything has already been built. For example:
bpm.generateDAA buildbeforegenerating="true" projectname="Utilities" daalocation="${env.PROJECTLOC}"/>
However, this will slow down the generation and is not a required process since an incremental build is performed while importing the processes.
Note: We recommend that you use tbs.importProjects rather than sds.importProject for BPM projects, as it provides far more stable post import migration and building.sds.importProject is included for backward compatibility and tbs.importProjects is recommended for new scripts.
If you use tbs, the following options are available:
- dir - The root directory to use for simple format folder structure imports.
- file - The archive file to use for simple format archive imports (including zip, tar, tar.gz)
(dir and file are mutually exclusive)
- copyProjects - (defaults to true) Ensures a copy of any imported project is made to the workspace. Applicable only to folder structure imports.
- useArchives - (defaults to false) Ensures archive import is attempted when using nested element format.
When a simple format archive import, using the file attribute, is used the useArchives attribute is not required - it is implicitly set to true.
- skipPostImportTask - (defaults to false) Post import tasks are skipped when set to true.
- The example above uses 2 tasks: the first is used for importing a project from a specified location (projectloc) into the workspace and the second is used to generate DAA/s from the workspace project/s into a specified location (daalocation).
- The above script imports a single project, but you could also import a number of projects by specifying the parent folder in the script. For example:
<target name="default" description="Test to generate DAA for all projects under projectloc"> <tbs.importProjects dir="C:/workspace-3.5.0"/> <bpm.generateDAA daalocation="C:/daaOut"/> </target>
- By default the
generateDAA task will generate DAA/s for all relevant projects in the workspace.
Note: Command line generation does not overwrite the workspace, therefore every time the command is run, you must ensure that you provide an empty project workspace.
Also note that before importing any projects please ensure that they have been migrated first using the user interface, as command line generation does not auto migrate.
- You can use all standard Ant tasks and TIBCO Business Studio specific tasks, starting with
tbs.,
sds. or
bpm.
Copyright © Cloud Software Group, Inc. All rights reserved.