Build Files for Object Groups
The build file for object groups supports the following targets: adding, importing, editing, deleting, publishing, exporting, and synchronizing member of an object group. The default location of the build file is <TIBCO_HOME>/pd/1.2/samples/common.
project Element
The project element declares the default build target for the build.xml file. taskdef and target are subelements of the project. The optional default attribute allows you to specify a default target. You can select any target from the build file to be the default target.
<project default="target">
<taskdef ... />
<target name="target" ... />
</project>
import Element
The import element identifies the task definition file, which defines the path to the libraries required by ActiveMatrix Policy Director Governance.
<import file="${basic.cli.file}"/> <import file="${gov.admin.cli.file}"/>
target Element
The target element specifies the actions performed for an execution of the command line interface via the GovernanceAdminTask subelement. In a target you can provide a depends attribute containing a list of targets. Each target will be run in order until one fails or the list completes.
<target name="target">
<AMXAdminTask ... />
</target>
Add Target
<target name="add"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="add" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target>
Edit Target
<target name="edit"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="edit" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target>
Delete Target
<target name="delete"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="delete" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target>
Publish Target
<target name="publish"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="publish" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target>
synchMembers Target
<target name="sync-members"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="syncMembers" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:SyncObjectGroupMembers" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target>
Sample Build File
<project default="add"> <property file="ogp-cli.properties" /> <property name="exported.data.file" value="tog_export_data.xml"/> <import file="${basic.cli.file}"/> <import file="${gov.admin.cli.file}"/> <target name="add"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="add" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target> <target name="edit"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="edit" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target> <target name="delete"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="delete" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target> <target name="publish"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="publish" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:FixedObjectGroup | tog:DynamicObjectGroup" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target> <target name="sync-members"> <GovernanceAdminTask remote="true" propsFile="${props.file}" action="syncMembers" dataFile="DAA-1-tog_data.xml" objectSelector="declare namespace tog='http://tibco.com/governance/ogp/cli/types_tog'; tog:SyncObjectGroupMembers" overwrite="true" merge="true" createIfNotExists="true" force="true" failOnError="false"/> </target> </project>