return summary;
}
private static DeploymentSummary getDeploymentSummary(DeploymentUnit unit)
{
DeploymentSummary dSummary = new DeploymentSummary();
dSummary.setDeploymentName(unit.getSimpleName());
String baseName = unit.getTopLevel().getSimpleName();
int dot = baseName.lastIndexOf('.');
if(dot > 0)
{
baseName = baseName.substring(0, dot);
}
dSummary.setDeploymentScopeBaseName(baseName);
/*
* Determine the packaging type (JAR or EAR, Standalone File not
* supported by this deployer)
*/
// Initialize to JAR
PackagingType packagingType = PackagingType.JAR;
// Determine if EAR
boolean isEar = unit != unit.getTopLevel();
if(isEar)
{
packagingType = PackagingType.EAR;
}
// Set type
dSummary.setPackagingType(packagingType);
// Return
return dSummary;
}