return;
String[] names = jarNames.split(",");
for (String name : names)
{
DeploymentProgress distribute = getDeploymentManager().distribute(name, getManagedURL(name), copyContent);
//distribute.addProgressListener(LOG_PROGRESS_LISTENER);
distribute.run();
checkProgress(distribute);
deploymentNames.addAll(Arrays.asList(distribute.getDeploymentID().getRepositoryNames()));
}
// Check the resolution of repository names
assertTrue("resolve repsoitory names",
Arrays.asList(getDeploymentManager().getRepositoryNames(names)).containsAll(deploymentNames));
DeploymentProgress start = getDeploymentManager().start(deploymentNames.toArray(new String[ deploymentNames.size()]));
start.run();
checkProgress(start);
staticLog.info("Deployed package: " + deploymentNames);
}
catch (Exception ex)
{
// Throw this in testServerFound() instead.
deploymentException = ex;
staticLog.error("Caught exception when trying to deploy : " + jarNames, ex);
}
}
protected void tearDown() throws Exception
{
if (jarNames == null)
return;
DeploymentProgress stop = getDeploymentManager().stop(deploymentNames.toArray(new String[ deploymentNames.size()]));
stop.run();
checkProgress(stop);
DeploymentProgress undeploy = getDeploymentManager().remove(deploymentNames.toArray(new String[ deploymentNames.size()]));
undeploy.run();
checkProgress(undeploy);
// Clear names
this.deploymentNames.clear();