def groupId(self): """ Effective groupId of the pom artifact taking into account parent groupId """ gId = POMReader.find(self._doc, "./pom:groupId") if gId is None: gId = POMReader.find(self._doc, "./pom:parent/pom:groupId") if gId is None: raise PomLoadingException("Unable to determine groupId") return gId.text.strip()
def groupId(self): """ Effective groupId of the pom artifact taking into account parent groupId """ gId = POMReader.find(self._doc, "./pom:groupId") if gId is None: gId = POMReader.find(self._doc, "./pom:parent/pom:groupId") if gId is None: raise PomLoadingException("Unable to determine groupId") return gId.text.strip()
def version(self): """ Effective version of the pom artifact taking into account parent version """ version = POMReader.find(self._doc, "./pom:version") if version is None: version = POMReader.find(self._doc, "./pom:parent/pom:version") if version is None: raise PomLoadingException("Unable to determine artifact version") return version.text.strip()
def version(self): """ Effective version of the pom artifact taking into account parent version """ version = POMReader.find(self._doc, "./pom:version") if version is None: version = POMReader.find(self._doc, "./pom:parent/pom:version") if version is None: raise PomLoadingException("Unable to determine artifact version") return version.text.strip()
def version(self): version = POMReader.find(self.__doc, "/ivy-module/info") if version is not None: try: version = version.attrib["revision"] except KeyError: raise PomLoadingException("Unable to determine version") return version
def artifactId(self): aId = POMReader.find(self.__doc, "/ivy-module/info") if aId is not None: try: aId = aId.attrib["module"] except KeyError: raise PomLoadingException("Unable to determine artifactId") return aId
def version(self): version = POMReader.find(self.__doc, '/ivy-module/info') if version is not None: try: version = version.attrib["revision"] except KeyError: raise PomLoadingException("Unable to determine version") return version
def groupId(self): gId = POMReader.find(self.__doc, "/ivy-module/info") if gId is not None: try: gId = gId.attrib["organisation"] except: raise PomLoadingException("Unable to determine groupId") return gId
def groupId(self): gId = POMReader.find(self.__doc, '/ivy-module/info') if gId is not None: try: gId = gId.attrib["organisation"] except: raise PomLoadingException("Unable to determine groupId") return gId
def artifactId(self): aId = POMReader.find(self.__doc, '/ivy-module/info') if aId is not None: try: aId = aId.attrib["module"] except KeyError: raise PomLoadingException("Unable to determine artifactId") return aId
def artifactId(self): """ Effective artifactId of the pom artifact """ aId = POMReader.find(self._doc, "./pom:artifactId") if aId is None: raise PomLoadingException("Unable to determine artifactId") return aId.text.strip()
def artifactId(self): """ Effective artifactId of the pom artifact """ aId = POMReader.find(self._doc, "./pom:artifactId") if aId is None: raise PomLoadingException("Unable to determine artifactId") return aId.text.strip()
def packaging(self): """ Packaging type of artifact or "jar" if unspecified """ packaging = POMReader.find(self._doc, "./pom:packaging") if packaging is None: # use default packaging type return "jar" return packaging.text.strip()
def packaging(self): """ Packaging type of artifact or "jar" if unspecified """ packaging = POMReader.find(self._doc, "./pom:packaging") if packaging is None: # use default packaging type return "jar" return packaging.text.strip()
def parent(self): aId = POMReader.find(self._doc, "./pom:parent/pom:artifactId") if aId is None: return None artifactId = aId.text groupId = "" gId = POMReader.find(self._doc, "./pom:parent/pom:groupId") if gId is not None: groupId = gId.text version = "" ver = POMReader.find(self._doc, "./pom:parent/pom:version") if ver is not None: version = ver.text relativePath = "" relPath = POMReader.find(self._doc, "./pom:parent/pom:relativePath") if relPath is not None: relativePath = relPath.text return ParentPOM(groupId, artifactId, version, relativePath)
def parent(self): aId = POMReader.find(self._doc, "./pom:parent/pom:artifactId") if aId is None: return None artifactId = aId.text groupId = "" gId = POMReader.find(self._doc, "./pom:parent/pom:groupId") if gId is not None: groupId = gId.text version = "" ver = POMReader.find(self._doc, "./pom:parent/pom:version") if ver is not None: version = ver.text relativePath = "" relPath = POMReader.find(self._doc, "./pom:parent/pom:relativePath") if relPath is not None: relativePath = relPath.text return ParentPOM(groupId, artifactId, version, relativePath)
def properties(self): """ Dictionary consisting of properties specified in pom.xml """ properties = {} xmlnodes = POMReader.find(self._doc, "./pom:properties") if xmlnodes is None: return properties propnodes = xmlnodes.getchildren() for node in propnodes: if node.tag.startswith('{'): tag = node.tag[node.tag.find('}') + 1:] else: tag = node.tag properties[tag] = node.text return properties
def properties(self): """ Dictionary consisting of properties specified in pom.xml """ properties = {} xmlnodes = POMReader.find(self._doc, "./pom:properties") if xmlnodes is None: return properties propnodes = xmlnodes.getchildren() for node in propnodes: if node.tag.startswith('{'): tag = node.tag[node.tag.find('}') + 1:] else: tag = node.tag properties[tag] = node.text return properties
def has_parent(self): parent = POMReader.find(self._doc, "./pom:parent") if parent is not None: return True return False
def has_parent(self): parent = POMReader.find(self._doc, "./pom:parent") if parent is not None: return True return False