if (deployment != null) {
deployment.setAutoStart(false);
}
// Check for attached BundleInfo
BundleInfo info = depUnit.getAttachment(OSGiConstants.BUNDLE_INFO_KEY);
if (deployment == null && info != null) {
deployment = DeploymentFactory.createDeployment(info);
deployment.addAttachment(BundleInfo.class, info);
OSGiMetaData metadata = info.getOSGiMetadata();
deployment.setAutoStart(!metadata.isFragment());
// Set the start level and prevent autostart if greater than the Framwork startlevel
AnnotationInstance slAware = getAnnotation(depUnit, "org.jboss.arquillian.osgi.StartLevelAware");
if (slAware != null) {