IBM Software Group Rational Asset Manager v 7
® IBM Software Group Rational Asset Manager v 7. 2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos Ferreira Product Manager © 2006 IBM Corporation
IBM Software Group | Rational software Agenda § Setup § Demo Downloading and Asset § Demo Publishing and Asset § Demo Relating assets to previously published assets 2
IBM Software Group | Rational software Setup Ant § Download Ant 1. 7. 1 or later - http: //ant. apache. org/bindownload. cgi 4 Unzip files in C: ant § Install Ant – Directions found here http: //ant. apache. org/manual/index. html 4 Set environment variables § ANT_HOME=C: antapache-ant-1. 7. 1 § JAVA_HOME=c: jdk-1. 5. 0. 05 or where ever you have Java with tools. jar § PATH=C: antapache-ant-1. 7. 1bin append to you existing path § Download Contributor files 4 http: //sourceforge. net/projects/ant-contrib/files/ant-contrib-0. 6/ant-contrib-0. 6 bin. zip/download 4 Unzip files and copy the ant-contrib-0. 6. jar into the C: antapache-ant-1. 7. 1lib 3
IBM Software Group | Rational software Setup RAM scripting client jars § Go RAM Web Client, Help, Extensions 4 http: //<hostname>: <port>/ramclient. zip replace hostname and port http: //ibmdev. com: 9080/ramclient. zip § Download ramclient. zip, unzip it to a folder, like C: ramclient § Add unzipped folder on the ANT library path when you execute one of the ANT scripts. 4 ANT_HOME=C: antapache-ant-1. 7. 1; C: ramclient 4
IBM Software Group | Rational software Agenda § Setup § Demo Downloading and Asset § Demo Publishing and Asset § Demo Relating assets for published assets 5
IBM Software Group | Rational software Modify Download script to download and asset § Copy the file c: ramclientram. Download. Asset. xml § Add the properties in black replacing the values with your own for the asset to download § Save the file <project name="download. An. Asset" default="download. Asset" xmlns: ram="antlib: com. ibm. ram. ant"> <property name="lib. dir" value="C: libdir" /> Directory to download asset to <property name="ram. user. id" value="admin" /> <property name="ram. user. passwd" value="admin" /> RAM Web. Service URL from Extensions page <property name="ram. url" value="http: //qvmw 127. ibmratltst 01. com: 9080/ram. ws" /> <property name="ram. asset. quid" value="{8141 FA 04 -E 837 -FA 50 -7052 -5269 E 7 C 6937 C}" /> <property name="ram. asset. version" value="1. 0" /> <property name="build. id" value="1234" /> RAM asset unique id from Asset page RAM asset version from Asset page 6
IBM Software Group | Rational software Run download script Verbose § C: ramclient>ant -v -lib C: ramclient -file ram. Download. Asset-2. xml Ant command RAM scripts to download § Other options below § ant -v -lib <ramclient jars path> -file ram. Download. Asset. xml -Dlib. dir=<location where to download the artifacts> -Dram. url=<URL to repository location from Extension page> -Dram. user. id=<ram uid> -Dram. user. passwd=<ram passwd> Dram. asset. quid=<guid> -Dram. asset. version=<version> -Dbuild. id=<An ID that denotes what this download is for> 7
IBM Software Group | Rational software Ant Script Help § Under Reference 4 Rational Asset Manager Custom ANT Library § Under Extending 4 Build. Forge 8
IBM Software Group | Rational software Agenda § Setup § Demo Downloading and Asset § Demo Publishing and Asset § Demo Relating assets for published assets 9
IBM Software Group | Rational software Modify Publish script to publish an asset § Copy the file c: ramclientram. Publish. Asset. xml § Add the properties in red box below replacing the values with your own for the asset to download § Save the file RAM Web. Service URL from Extensions page RAM asset unique name RAM asset version RAM asset unique ID and version this asset is related to as part of a release Build metadata about asset 10
IBM Software Group | Rational software Run publish script Verbose § C: ramclient>ant -v -lib C: ramclient -file ram. Publish. Asset-2. xml Ant command RAM scripts to publish 11
IBM Software Group | Rational software Agenda § Setup § Demo Downloading and Asset § Demo Publishing and Asset § Demo Relating assets for published assets 12
IBM Software Group | Rational software Modify Relate. Artifacts-Link script to download and asset § Copy the file c: ramclientram. Download. Artifact. Links. xml § Add the properties in black replacing the values with your own for the asset to download § Save the file. RAM Web. Service URL from Extensions page Eclipse workspace where rambuildercontrol. xml files are 13
IBM Software Group | Rational software Run publish script again this time with relate § Modify the publish script to also include all the related files that were dependencies in the project specified in the rambuildercontrol. xml in the. settings folder of the workspace § This will generate a relationship file in the ram. download. result. file location § Add properties: <property name="build. dir" value="C: Documents and SettingsAdministratorDesktopRTC Workspace" /> <property name="ram. download. result. file" value="C: Build. Dirpublishresults" /> Verbose § C: ramclient>ant -v -lib C: ramclient -file ram. Publish. Asset-2. xml Ant command RAM scripts to publish 14
- Slides: 14