DeployCommandParameters parameters = new DeployCommandParameters(new File(archive.getURI()));
ExtendedDeploymentContext context = new DeploymentContextImpl(null, archive, parameters, habitat.<ServerEnvironment>getService(ServerEnvironment.class));
context.setArchiveHandler(handler);
Collection<Sniffer> sniffers = snifferManager.getSniffers(context, classPathURIs, types);
String type = getTypeFromModuleType(md.getModuleType());
Sniffer mainSniffer = null;
for (Sniffer sniffer : sniffers) {
if (sniffer.getModuleType().equals(type)) {
mainSniffer = sniffer;
}
}
// if the sub module does not show characteristics of certain module
// type, we should still use the application.xml defined module type
// to add the appropriate sniffer
if (mainSniffer == null) {
mainSniffer = snifferManager.getSniffer(type);
sniffers.add(mainSniffer);
}
String [] incompatibleTypes = mainSniffer.getIncompatibleSnifferTypes();
List<String> allIncompatTypes = addAdditionalIncompatTypes(mainSniffer, incompatibleTypes);
List<Sniffer> sniffersToRemove = new ArrayList<Sniffer>();
for (Sniffer sniffer : sniffers) {
for (String incompatType : allIncompatTypes) {