private DeploymentDescription generateDeployment(Method deploymentMethod)
{
TargetDescription target = generateTarget(deploymentMethod);
ProtocolDescription protocol = generateProtocol(deploymentMethod);
Deployment deploymentAnnotation = deploymentMethod.getAnnotation(Deployment.class);
DeploymentDescription deployment = null;
if(Archive.class.isAssignableFrom(deploymentMethod.getReturnType()))
{
deployment = new DeploymentDescription(deploymentAnnotation.name(), invoke(Archive.class, deploymentMethod));
deployment.shouldBeTestable(deploymentAnnotation.testable());
}
else if(Descriptor.class.isAssignableFrom(deploymentMethod.getReturnType()))
{
deployment = new DeploymentDescription(deploymentAnnotation.name(), invoke(Descriptor.class, deploymentMethod));
//deployment.shouldBeTestable(false);
}
deployment.shouldBeManaged(deploymentAnnotation.managed());
deployment.setOrder(deploymentAnnotation.order());
if(target != null)
{
deployment.setTarget(target);
}
if(protocol != null)