@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
phaseContext.addDeploymentDependency(Services.SYSTEM_CONTEXT, OSGiConstants.SYSTEM_CONTEXT_KEY);
phaseContext.addDeploymentDependency(Services.ENVIRONMENT, OSGiConstants.ENVIRONMENT_KEY);
DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
<BUG>if (depUnit.hasAttachment(OSGiConstants.DEPLOYMENT_KEY)) {
if (FrameworkActivationService.activated() == false) {</BUG>
ServiceVerificationHandler verificationHandler = depUnit.getAttachment(Attachments.SERVICE_VERIFICATION_HANDLER);
FrameworkActivationService.addService(deploymentTracker.getServiceTarget(), verificationHandler);
}

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
phaseContext.addDeploymentDependency(Services.SYSTEM_CONTEXT, OSGiConstants.SYSTEM_CONTEXT_KEY);
phaseContext.addDeploymentDependency(Services.ENVIRONMENT, OSGiConstants.ENVIRONMENT_KEY);
DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
if (!depUnit.hasAttachment(OSGiConstants.DEPLOYMENT_KEY) && !hasValidInjectionPoint(depUnit))
return;
if (FrameworkActivationService.activated() == false) {
ServiceVerificationHandler verificationHandler = depUnit.getAttachment(Attachments.SERVICE_VERIFICATION_HANDLER);
FrameworkActivationService.addService(deploymentTracker.getServiceTarget(), verificationHandler);
}
