Blob Blame Raw
From 0870cac2b02aef1e75aada3b4d235f76b0d4ee1e Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb@redhat.com>
Date: Thu, 29 May 2014 10:23:07 +0200
Subject: [PATCH 01/10] [pom] Add ability to read parent's version

---
 python/javapackages/pom.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/python/javapackages/pom.py b/python/javapackages/pom.py
index 604728f..6c15813 100644
--- a/python/javapackages/pom.py
+++ b/python/javapackages/pom.py
@@ -95,6 +95,17 @@ class POM(object):
             return gId.text.strip()
 
     @property
+    def parentVersion(self):
+        """
+        version of the parent artifact of None
+        """
+        ver = self.__find('./pom:parent/pom:version')
+        if ver is None:
+            return None
+        else:
+            return ver.text.strip()
+
+    @property
     def groupId(self):
         """
         Effective groupId of the pom Artifact taking into account parent groupId
-- 
1.9.3