Search in sources :

Example 1 with DeploymentException

use of org.jboss.testharness.api.DeploymentException in project tomee by apache.

the class ContainersImplTomEE method undeploy.

@Override
public void undeploy(final String name) throws IOException {
    if (appInfo == null) {
        if (!(exception instanceof DeploymentException)) {
            System.out.println("Nothing to undeploy" + name);
        }
        return;
    }
    System.out.println("Undeploying " + name);
    try {
        deployer.undeploy(appInfo.path);
    } catch (final Exception e) {
        e.printStackTrace();
        throw new OpenEJBTCKRuntimeException(e);
    }
    final File toDelete;
    if (currentFile != null && (toDelete = currentFile.getParentFile()).exists()) {
        System.out.println("deleting " + toDelete.getAbsolutePath());
        delete(toDelete);
    }
}
Also used : DeploymentException(org.jboss.testharness.api.DeploymentException) OpenEJBTCKRuntimeException(org.apache.openejb.tck.OpenEJBTCKRuntimeException) File(java.io.File) OpenEJBTCKRuntimeException(org.apache.openejb.tck.OpenEJBTCKRuntimeException) IOException(java.io.IOException) ValidationException(org.apache.openejb.config.ValidationException) DeploymentException(org.jboss.testharness.api.DeploymentException)

Aggregations

File (java.io.File)1 IOException (java.io.IOException)1 ValidationException (org.apache.openejb.config.ValidationException)1 OpenEJBTCKRuntimeException (org.apache.openejb.tck.OpenEJBTCKRuntimeException)1 DeploymentException (org.jboss.testharness.api.DeploymentException)1