When there is no maven-metadata.xml file in the directory
where the artifact is located, assume the version part in the
artifact name is equal to the name of the directory where the
artifact is located. This is needed to support releases which
don't use maven-metadata.xml in the directories with
additional artifacts.
Change-Id: I593305471107c02c66c6c1bb004c3d2a8c6842ac
Signed-off-by: Jozef Behran <jbehran@cisco.com>
${namepart}= SSHLibrary.Execute_Command curl ${url}/maven-metadata.xml | grep value | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1
BuiltIn.Log ${namepart}
${length}= BuiltIn.Get_Length ${namepart}
- BuiltIn.Run_Keyword_If ${length} == 0 BuiltIn.Fail Artifact "${artifact}" not found in component "${component}"
+ ${namepart}= BuiltIn.Set_Variable_If ${length} == 0 ${version} ${namepart}
${filename}= BuiltIn.Set_Variable ${name_prefix}${namepart}${name_suffix}
BuiltIn.Log ${filename}
${url}= BuiltIn.Set_Variable ${url}/${filename}