Given that I have Dependency groupId and artifactId, how do I extract the version for this dependency from the pom.xml file?
Example: I want to be able to extract the dependency version below if I query using the artifactId and groupId.
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.6</version>
</dependency>
I want to assign the version to a global environment variable i.e. DEP_VERSION=1.6