Running a TIBCO Business Studio Command-Line Interface Script

Procedure

  1. Create an Ant build.xml file containing one or more TIBCO Business Studio command-line tasks. For example, the following build file creates an SOA project, a composite in the project, and creates a DAA.
    <project default="createAll">
    	<target name="createAll depends="createProj, createComposite, createDAA"/>
    
    <target name="createProj">
     <sds.createSoaProject projectName="aProject"/>
    </target>
    
    <target name="createComposite">
     <sds.createComposite projectName="aProject" compositeName="aComposite"/>
    </target>
    
    <target name="createDAA">
     <sds.createDAA projectName="myProject" daaLoc="/MyProject/Deployment Artifacts/myApp.daa" 
    	includeApplicationReferences="true" overwriteExistingDAA="true">
    
     <application compositeName="myAppName">
    		<resourceTemplate name="myJDBC" exclude="true"/>
     </application>
    	<feature id="com.sample.myfeature"/>
    
    </sds.createDAA>
    </target>
    
    </project>

    The following helloworld1 build file imports SOA and Java projects and creates a DAA:

    <?xml version="1.0" ?> 
    <project name="helloworld1" basedir="." default="all">
    
    	<property name="projDir" value="C:/helloworld1"/>	
    
    	<property name="javaProjectName" value="jv.helloworld1.jv"/>
    	<property name="soaProjectName" value="jv.helloworld1.soa"/>
    	
    	<property name="importJavaProject" value="${projDir}/${javaProjectName}"/>
    	<property name="importSoaProject" value="${projDir}/${soaProjectName}"/>
    	
    
    	<!-- Main target -->
    	<target name="all" depends="importProjectsIntoWorkspace, createApplicationDAA"/>		
    
    	<!-- Imports the projects into the workspace -->
    	<target name="importProjectsIntoWorkspace">		
    		<sds.importProject projectLoc="${importJavaProject}" />
    		<sds.importProject projectLoc="${importSoaProject}" />
    	</target>
    	
    	<target name="createApplicationDAA">
    		<sds.createDAA
    			projectName="${soaProjectName}" 
    			daaLoc="/${soaProjectName}/Deployment Artifacts/${soaProjectName}.daa"
    			includeApplicationReferences="true" overwriteExistingDAA="true">
    
    			<application compositeName="${soaProjectName}"/>
    		</sds.createDAA>
    				
    	</target>
    </project>
  2. Open a terminal window and change to the folder TIBCO_HOME/studio/version/eclipse.
  3. Run the amx_eclipse_ant command:
    • Windows amx_eclipse_ant.exe -buildfile path to build.xml -data workspace [-vmargs args ]
    • Linux amx_eclipse_ant -buildfile path to build.xml -data workspace [-vmargs args ]
    Running amx_eclipse_ant.exe -buildfile "C:/helloworld1/build.xml" -data "C:/hws" -vmargs -Xms256m -Xmx512m -XX:MaxPermSize=256m with the preceding helloworld1 build file yields the following:
    C:\amsg320\studio\<version_number>\eclipse>amx_eclipse_ant.exe -buildfile "C:/helloworld1/build.xml" -data "C:/hws"
    Buildfile: C:/helloworld1/build.xml
    
    importProjectsIntoWorkspace:
    [sds.importProject] null
    [sds.importProject] ...
    ...
    [sds.importProject] Importing Project 'C:/helloworld1/jv.helloworld1.soa'
    
    createApplicationDAA:
    [sds.createDAA] Waited for 47ms for workspace refreshes after building features.
    
    all:
    BUILD SUCCESSFUL
    
    BUILD SUCCESSFUL
    Total time: 2 minutes 18 seconds