rational asset manager v7.2 using scripting
DESCRIPTION
Rational Asset Manager v7.2 Using Scripting. Tutorial for using command line and scripting using Ant Tasks Carlos Ferreira Product Manager. Agenda. Setup Demo Downloading and Asset Demo Publishing and Asset Demo Relating assets to previously published assets. Setup Ant. - PowerPoint PPT PresentationTRANSCRIPT
®
IBM Software Group
© 2006 IBM Corporation
Rational Asset Manager v7.2 Using ScriptingTutorial for using command line and scripting using Ant Tasks
Carlos Ferreira Product Manager
IBM Software Group | Rational software
2
Agenda
Setup Demo Downloading and Asset Demo Publishing and Asset Demo Relating assets to previously published assets
IBM Software Group | Rational software
3
Setup Ant
Download Ant 1.7.1 or later - http://ant.apache.org/bindownload.cgi Unzip files in C:\ant\
Install Ant – Directions found here http://ant.apache.org/manual/index.html Set environment variables
ANT_HOME=C:\ant\apache-ant-1.7.1 JAVA_HOME=c:\jdk-1.5.0.05 or where ever you have Java with tools.jar PATH=C:\ant\apache-ant-1.7.1\bin append to you existing path
Download Contributor files http://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-0.6/ant-contrib-0.6-bin.zip/downlo
ad Unzip files and copy the ant-contrib-0.6.jar into the C:\ant\apache-ant-1.7.1\lib
IBM Software Group | Rational software
4
Setup RAM scripting client jars
Go RAM Web Client, Help, Extensions http://<hostname>:<port>/ram/ramclient.zip replace hostname and port
http://ibmdev.com:9080/ram/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. ANT_HOME=C:\ant\apache-ant-1.7.1;C:\ramclient
IBM Software Group | Rational software
5
Agenda
Setup Demo Downloading and Asset Demo Publishing and Asset Demo Relating assets for published assets
IBM Software Group | Rational software
6
Modify Download script to download and asset Copy the file c:\ramclient\ramDownloadAsset.xml Add the properties in black replacing the values with your own for the asset to download Save the file
<project name="downloadAnAsset" default="downloadAsset" xmlns:ram="antlib:com.ibm.ram.ant">
<property name="lib.dir" value="C:\libdir" />
<property name="ram.user.id" value="admin" />
<property name="ram.user.passwd" value="admin" />
<property name="ram.url" value="http://qvmw127.ibmratltst01.com:9080/ram.ws" />
<property name="ram.asset.quid" value="{8141FA04-E837-FA50-7052-5269E7C6937C}" />
<property name="ram.asset.version" value="1.0" />
<property name="build.id" value="1234" />
Directory to download asset to
RAM WebService URL from Extensions page
RAM asset unique id from Asset page
RAM asset version from Asset page
IBM Software Group | Rational software
7
Run download script
C:\ramclient>ant -v -lib C:\ramclient -file ramDownloadAsset-2.xml
Other options below ant -v -lib <ramclient jars path> -file ramDownloadAsset.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>
Verbose
Ant command
RAM scripts to download
IBM Software Group | Rational software
8
Ant Script Help
Under Reference Rational Asset
Manager Custom ANT Library
Under Extending BuildForge
IBM Software Group | Rational software
9
Agenda
Setup Demo Downloading and Asset Demo Publishing and Asset Demo Relating assets for published assets
IBM Software Group | Rational software
10
Modify Publish script to publish an asset Copy the file c:\ramclient\ramPublishAsset.xml Add the properties in red box below replacing the values with your own for the asset to download Save the file
Build metadata about asset
RAM WebService 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
IBM Software Group | Rational software
11
Run publish script
C:\ramclient>ant -v -lib C:\ramclient -file ramPublishAsset-2.xml
Verbose
Ant command
RAM scripts to publish
IBM Software Group | Rational software
12
Agenda
Setup Demo Downloading and Asset Demo Publishing and Asset Demo Relating assets for published assets
IBM Software Group | Rational software
13
Modify RelateArtifacts-Link script to download and asset
Copy the file c:\ramclient\ramDownloadArtifactLinks.xml Add the properties in black replacing the values with your own for the asset to download Save the file.
RAM WebService URL from Extensions page
Eclipse workspace where rambuildercontrol.xml files are
IBM Software Group | Rational software
14
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 Settings\Administrator\Desktop\RTC Workspace\" />
<property name="ram.download.result.file" value="C:\BuildDir\publishresults" />
C:\ramclient>ant -v -lib C:\ramclient -file ramPublishAsset-2.xml
Verbose
Ant command
RAM scripts to publish