本文整理了Java中org.apache.tools.ant.taskdefs.Execute.killedProcess()
方法的一些代码示例,展示了Execute.killedProcess()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Execute.killedProcess()
方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Execute
类名称:Execute
方法名:killedProcess
[英]Test for an untimely death of the process.
[中]测试进程是否过早死亡。
代码示例来源:origin: org.apache.ant/ant
/**
* Executes the given source-file or classname with the given arguments in a separate VM.
* @param command String[] of command-line arguments.
*/
private int fork(String[] command) throws BuildException {
Execute exe
= new Execute(redirector.createHandler(), createWatchdog());
setupExecutable(exe, command);
try {
int rc = exe.execute();
redirector.complete();
if (exe.killedProcess()) {
throw new BuildException(TIMEOUT_MESSAGE);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: org.apache.ant/ant
if (exe.killedProcess()) {
String msg = "Timeout: killed the sub-process";
if (failOnError) {
代码示例来源:origin: org.apache.ant/ant
throw new BuildException(e);
} finally {
timedOut = exe.killedProcess();
代码示例来源:origin: com.sun.xml.ws/jaxws-tools
/**
* Executes the given classname with the given arguments in a separate VM.
*/
private int run(String[] command) throws BuildException {
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
Execute exe = new Execute(logstr);
exe.setAntRun(project);
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, location);
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
/**
* Executes the given classname with the given arguments in a separate VM.
*/
private int run(String[] command) throws BuildException {
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
Execute exe = new Execute(logstr);
exe.setAntRun(project);
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, location);
}
}
代码示例来源:origin: com.sun.japex/japex
/**
* Executes the given classname with the given arguments in a separate VM.
*/
private int run(String[] command) throws BuildException {
for (int i = 0; i < command.length; i++) {
System.out.println("#### command[" + i + "] =" + command[i]);
}
Execute exe = null;
exe = new Execute();
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
}
catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: javaee/metro-jax-ws
/**
* Executes the given classname with the given arguments in a separate VM.
*/
private int run(String[] command) throws BuildException {
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
Execute exe = new Execute(logstr);
exe.setAntRun(project);
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, location);
}
}
代码示例来源:origin: javaee/metro-jax-ws
/**
* Executes the given classname with the given arguments in a separate VM.
*/
private int run(String[] command) throws BuildException {
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
Execute exe = new Execute(logstr);
exe.setAntRun(project);
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, location);
}
}
代码示例来源:origin: org.apache.cxf/cxf-anttasks
public void execute() throws BuildException {
buildCommandLine();
LogStreamHandler log = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
Execute exe = new Execute(log);
exe.setAntRun(getProject());
exe.setCommandline(cmd.getCommandline());
try {
int rc = exe.execute();
if (exe.killedProcess()
|| rc != 0) {
throw new BuildException("java2ws failed", getLocation());
}
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: org.apache.cxf/cxf-anttasks
public void execute() throws BuildException {
buildCommandLine();
LogStreamHandler log = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
Execute exe = new Execute(log);
exe.setAntRun(getProject());
exe.setCommandline(cmd.getCommandline());
try {
int rc = exe.execute();
if (exe.killedProcess()
|| rc != 0) {
throw new BuildException("wsdl2java failed", getLocation());
}
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: org.jboss.ws/jbossws-common-tools
throw new BuildException(e);
} finally {
timedOut = exe.killedProcess();
代码示例来源:origin: org.glassfish.metro/webservices-tools
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
}
代码示例来源:origin: com.sun.xml.bind/jaxb-jxc
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
}
代码示例来源:origin: com.sun.xml.ws/jaxws-tools
/**
* Executes the given class name with the given arguments in a separate VM.
*
* @param command arguments.
* @return return value from the executed process.
*/
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
/**
* Executes the given class name with the given arguments in a separate VM.
*
* @param command arguments.
* @return return value from the executed process.
*/
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
/**
* Executes the given class name with the given arguments in a separate VM.
*
* @param command arguments.
* @return return value from the executed process.
*/
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: javaee/metro-jax-ws
/**
* Executes the given class name with the given arguments in a separate VM.
*
* @param command arguments.
* @return return value from the executed process.
*/
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: javaee/metro-jax-ws
/**
* Executes the given class name with the given arguments in a separate VM.
*
* @param command arguments.
* @return return value from the executed process.
*/
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc
/**
* Executes the given class name with the given arguments in a separate VM.
*
* @param command arguments.
* @return return value from the executed process.
*/
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Executes the given class name with the given arguments in a separate VM.
*
* @param command arguments.
* @return return value from the executed process.
*/
private int run(String[] command) throws BuildException {
Execute exe;
LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
exe = new Execute(logstr);
exe.setAntRun(getProject());
exe.setCommandline(command);
try {
int rc = exe.execute();
if (exe.killedProcess()) {
log("Timeout: killed the sub-process", Project.MSG_WARN);
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
内容来源于网络,如有侵权,请联系作者删除!