/** Executes the target, if any, that user designates executing before failing the test */ private void executeHaltTarget(int exitValue) { if(m_onHaltTarget != null) { if(m_outputDir != null) { getProject().setProperty("testng.outputdir", m_outputDir.getAbsolutePath()); } getProject().setProperty("testng.returncode", String.valueOf(exitValue)); Target t= getProject().getTargets().get(m_onHaltTarget); if(t != null) { t.execute(); } } }
/** * Performs the tasks within this target (if the conditions are met), * firing target started/target finished messages around a call to * execute. * * @see #execute() */ public final void performTasks() { RuntimeException thrown = null; project.fireTargetStarted(this); try { execute(); } catch (RuntimeException exc) { thrown = exc; throw exc; } finally { project.fireTargetFinished(this, thrown); } }
/** Executes the target, if any, that user designates executing before failing the test */ private void executeHaltTarget(int exitValue) { if (m_onHaltTarget != null) { if (m_outputDir != null) { getProject().setProperty("testng.outputdir", m_outputDir.getAbsolutePath()); } getProject().setProperty("testng.returncode", String.valueOf(exitValue)); Target t = getProject().getTargets().get(m_onHaltTarget); if (t != null) { t.execute(); } } }
antProject.addReference("maven.plugin.classpath", p); getLog().info("Executing tasks"); antTasks.execute(); getLog().info("Executed tasks"); } catch (Exception e) {