コード例 #1
0
ファイル: EhMetrics.py プロジェクト: moink635/mysource
    def set_remote(self, log: Logger, pom_parser=None):

        if pom_parser is None:
            try:
                pom_parser = PomParser(os.sep.join([".", "pom.xml"]))
            except ParseError as e:
                log.error("Parse error in main project pom: " + str(e))
                return Callable.do_not_proceed
            except OSError as e:
                log.error("Could not read main project pom: " + str(e))
                return Callable.do_not_proceed

        developerConnection = pom_parser.get_developer_connection()

        git_scm_type = "scm:git:"
        if not developerConnection.startswith(git_scm_type):
            # worried that it's not?
            raise Exception("I can't believe this is happening.")

        self.git.set_remote("origin", developerConnection[len(git_scm_type) :])
コード例 #2
0
 def buildLayout(tomcatDir, tomcatVersion, jira_home, instance_name, ondemand):
     pom_parser = PomParser('pom.xml')
     version_ = pom_parser.get_property(WorkspaceBuilder.VERSIONS[tomcatVersion])
     return WorkspaceLayout(tomcatVersion, version_, tomcatDir, jira_home, instance_name, ondemand)