def generate_jira_core_sources_closure(log: Logger): workspace_args = DataBean() workspace_args.with_workspace = args.with_workspace # attempt to compile jira-core in offline mode - assume jira-api is installed. jira_core_gen_src = MavenCallable(workspace_args).phase('generate-sources').skip_tests().project('jira-components/jira-core').option('-o') jira_core_gen_src(log) if jira_core_gen_src.returncode == Callable.success: return jira_core_gen_src.returncode else: # something failed: maybe jira-api was not actually installed? fix this: log.warn('Generate sources failed for jira-core. Will attempt to compile and install jira-api before giving up.') jira_api_install = MavenCallable(workspace_args).phase('install').skip_tests().project('jira-components/jira-api') jira_api_install(log) if jira_api_install.returncode != Callable.success: return jira_api_install.returncode jira_core_gen_src.returncode = None jira_core_gen_src(log) return jira_core_gen_src.returncode
def generate_jira_core_sources_closure(log: Logger): workspace_args = DataBean() workspace_args.with_workspace = args.with_workspace # attempt to compile jira-core in offline mode - assume jira-api is installed. jira_core_gen_src = MavenCallable(workspace_args).phase( 'generate-sources').skip_tests().project( 'jira-components/jira-core').option('-o') jira_core_gen_src(log) if jira_core_gen_src.returncode == Callable.success: return jira_core_gen_src.returncode else: # something failed: maybe jira-api was not actually installed? fix this: log.warn( 'Generate sources failed for jira-core. Will attempt to compile and install jira-api before giving up.' ) jira_api_install = MavenCallable(workspace_args).phase( 'install').skip_tests().project('jira-components/jira-api') jira_api_install(log) if jira_api_install.returncode != Callable.success: return jira_api_install.returncode jira_core_gen_src.returncode = None jira_core_gen_src(log) return jira_core_gen_src.returncode
def run_maven(self, maven: MavenCallable): self.maven_runs.append(maven) maven.returncode = self.return_code return self.return_code