weld/core — pull request #318 by sunix (2013-06-28 16:14:48+00:00)
Title: Weld-OSGi Fixes

# Weld-OSGi fixes
## [WELD-1407](https://issues.jboss.org/browse/WELD-1407) Fixing hard coded weld version in OSGi bundles
The first commit fixes the version of imported/exported package that were using the hard coded version 1.2.0-SNAPSHOT. The 1.2.0.beta1 released version is even buggy as the requirements are on 1.2.0-SNAPSHOT version in the MANIFEST.MF files.

Constraint violation for package 'org.jboss.weld.environment.se' when resolving module 14.0
between existing export 14.0.org.jboss.weld.environment.se
NO BLAME and uses constraint 2.0.org.jboss.weld.environment.se
BLAMED ON [[14.0] package; (&(package=org.jboss.weld.environment.se)(version>=1.2.0.SNAPSHOT))]

## [WELD-1406](https://issues.jboss.org/browse/WELD-1406) Weld-osgi-core-mandatory/integration should export/import org.jboss.weld.interceptor
The second commit fixes a non exported/imported package: `org.jboss.weld.interceptor`. When one of the class is used by any clients bundles, it's raising an exception:

16:13:32.164 [Gogo shell] ERROR o.j.w.e.o.i.i.Weld - Initialization of Weld instance for bundle com.sample.hello-world-multilingual [10] caused an error: java.lang.NoClassDefFoundError: org/jboss/weld/interceptor/InterceptorBindingType
java.lang.NoClassDefFoundError: org/jboss/weld/interceptor/InterceptorBindingType
at org.jboss.weld.bean.InterceptorImpl.getInterceptorBindings(InterceptorImpl.java:80)
at org.jboss.weld.bean.InterceptorImpl.toString(InterceptorImpl.java:120)
at java.text.MessageFormat.subformat(MessageFormat.java:1246)
at java.text.MessageFormat.format(MessageFormat.java:836)
at java.text.Format.format(Format.java:140)
at java.text.MessageFormat.format(MessageFormat.java:812)
at ch.qos.cal10n.MessageConveyor.getMessage(MessageConveyor.java:89)
at org.jboss.weld.logging.WeldMessageConveyor.getMessage(WeldMessageConveyor.java:66)
at org.slf4j.cal10n.LocLogger.trace(LocLogger.java:72)
at org.jboss.weld.bean.AbstractBean.initDefaultQualifiers(AbstractBean.java:215)
at org.jboss.weld.bean.AbstractBean.initQualifiers(AbstractBean.java:209)
at org.jboss.weld.bean.ManagedBean.(ManagedBean.java:286)
at org.jboss.weld.bean.InterceptorImpl.(InterceptorImpl.java:63)
at org.jboss.weld.bean.InterceptorImpl.of(InterceptorImpl.java:59)
at org.jboss.weld.bootstrap.AbstractBeanDeployer.createInterceptor(AbstractBeanDeployer.java:228)
at org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:149)
at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:204)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:357)

## [WELD-1408](https://issues.jboss.org/browse/WELD-1408) Fixing OSGi bundles stop process (broken since WELD-1307)
This third commit fix stop management of a bean bundle. The initial code was removing the bundle from `managed` map and then it was checking if the bundle was in the map. stop management code was never executed and stop events weren't send properly.

at org.jboss.weld.environment.osgi.impl.integration.IntegrationActivator.stopManagement(IntegrationActivator.java:241)

if (future == null) {
final CDIContainer container = managed.remove(bundle.getBundleId());

## [WELD-1444] Fixing weld-osgi examples
Upgrading versions of containers (felix, equinox, knopflerfish) so these work with the upgraded version of OSGi 4.3.1