def get_artifacts(): arts = map(lambda x: x.text, ET.fromstring(c.get_url( format_version_nexus_url( check_version( reduce_to_mcv_2())))).findall('data/*/text')) lv = sorted( filter(lambda x: x is not None, list(set(map( lambda x: c.get_or_none(re.split(version_splitter(), x), 1), arts)))), key=lambda x: x.split('-')[-1]) if get_behavior() == 'E': iv = c.getenv_or_exit('VERSION') return filter(lambda x: iv in x, arts) if iv in lv else \ c.print_and_exit(c.write_log('No such version', 'e'), 3) else: return filter(lambda x: lv[-1] in x, arts)
def get_latest_release(): return sorted(map(lambda x: x.text, ET.fromstring(c.get_url( format_base_nexus_url(check_obligatory_params()) + '/maven-metadata.xml')).findall('versioning/versions/*')))[-1]
def get_latest_available_snapshot(): return sorted(map(lambda x: x.text, filter(lambda x: x.text.endswith('-SNAPSHOT'), ET.fromstring(c.get_url( format_base_nexus_url(check_obligatory_params()) + '/maven-metadata.xml')).findall('versioning/versions/*'))))[-1]
def do_check(): return version in map(lambda x: x.text, ET.fromstring(c.get_url( format_base_nexus_url(check_obligatory_params()) + '/maven-metadata.xml')).findall('versioning/versions/*'))