I am trying to get the latest artifact number from my repository,
I can't use the <release>3.4.6.17</release> tag because I want to control the version which I'm taking the latest version from.
For example in this maven-metadata.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.company.platform</groupId>
<artifactId>platform</artifactId>
<versioning>
<release>3.4.6.17</release>
<versions>
<version>3.3.0.89</version>
<version>3.3.17.65</version>
<version>3.3.17.66</version>
<version>3.3.19.65</version>
<version>3.4.2.70</version>
<version>3.4.2.71</version>
<version>3.4.4.39</version>
<version>3.4.4.40</version>
<version>3.4.4.41</version>
<version>3.4.4.42</version>
<version>3.4.6.1</version>
<version>3.4.6.2</version>
<version>3.4.6.3</version>
<version>3.4.6.4</version>
<version>3.4.6.16</version>
<version>3.4.6.17</version>
</versions>
<lastUpdated>20201011113748</lastUpdated>
</versioning>
</metadata>
I want to get the latest of the 3.4.4 versions, which is: 3.4.4.42.
And not the latest uploaded artifact which is: 3.4.6.17.
Is there a way in a shell script to parse that file by a given version (version=3.3.4)?