RAM customer ANT library download search
Hello,
We have a schema where a parent asset represents a release and it has many related assets which are components of the system for a given release. Using the RAM custom ANT library I'd like to be able to download the latest version of a component asset by specifying the parent asset GUID (or better still by name and version) and also the name of a related component asset. I've looked through the RAM ANT APIs and this doesn't seem to be possible currently. The search element of the download task doesn't seem to give me a way to specify the relationship. Should I write my own ANT task to perform this specialized query and return a GUID that I could then use in the download task? |
18 answers
Hi,
In the main asset put a "depends on" related asset to the other subcomponents. Then when you download the main it will have the exact guid and version of the subcomponents in the main asset related asset list. You can then explicitly download those assets without requiring a search. If you want it to be the "latest" version of each subcomponent, when you create the relationship to the dependent sub asset, use the "range" function of the relationship after it is added (the "range" hyper link on the right side of the relationship) and put the range of versions and select the "highest" only radio button. RAM will then maintain this relationship to the highest version automatically. Use the "Create new version" button when creating a new version of a subasset. That way RAM knows explicitly that these are versions of the same asset, and not just another asset that happens to have the same name. RAM determines highest version by using the GUID of the assets. All assets with the same GUID are considered to be versions of the same asset. Rich |
The following snippet will help you see how to navigate through assets/relationships information from ant... You will need to deal with lists/for loops on relationships and artifacts which mean using something like Ant Contrib:
|
And note that you can just remove the version parameter from the ram:asset tag to get the latest version of that asset.
|
On 7/23/2010 12:08 PM, ebordeau wrote:
And note that you can just remove the version parameter from the latest asset we can do that automatically using the depends on relationship and range set to highest only. Then not only will it get the latest that asset itself will be maintained with the relationship to the latest. Rich |
Thank you very much Richard, Gili and Eric for your help.
|
Hi Gili,
I've tried using the propertyHelp task but it isn't working for me: <target> The result is:
|
Hi Gili, Sorry, this didn't display properly. I've removed the < >
|
Are you sure that the connection works.... it is only get executed when you look for an asset and such.
Can you download using this "ramServer" connection? |
Are you sure that the connection works.... it is only get executed when you look for an asset and such. Yes, the connection appears to be correct and I can download with the connection. I've emailed you the ant script and log4j debug level output. Thanks again for your help. |
Hi,
Is there a way to retrieve the GUID using the search/download task, using the name and version as inputs? Thanks |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.