All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play.ant.StopTask Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package play.ant;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;

import play.utils.Utils;

public class StopTask extends Task {

    private String pid;

    public void setPid(String pid) {
        this.pid = pid;
    }

    @Override
    public void execute() throws BuildException {
        if (this.pid == null) {
            throw new BuildException("PID property missing");
        }
        try {
            Utils.kill(this.pid);
        } catch (Exception e) {
            throw new BuildException(e);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy