我在哪里可以找到Spring 4 OSGi包

时间:2014-01-17 08:30:26

标签: spring osgi

在哪里可以找到Spring 4的OSGi包?我检查了http://ebr.springsource.com/但是只能找到Spring 3.2.x并且Maven Central中的工件不是捆绑包。

澄清

我不是在寻找Spring DM或类似产品。我正在寻找“Spring Framework”JAR(spring-core,spring-beans,spring-context,...)作为OSGi包。我不是想在OSGi环境中创建应用程序上下文。我只需要OSGi环境中的(异常)类。

5 个答案:

答案 0 :(得分:17)

Spring将 NOT 支持任何进一步的版本作为OSGi捆绑包。春季3.2.4已经停止了官方支持(尽管你可以找到3.2.5文件here,与Eclipse Forum中的陈述相矛盾)

来自Spring的Glyn Normington承认,在几个地方,请看这里:

然而,有希望。在Karaf-dev列表中,可以看到他们打算在ServiceMix项目中支持spring库。整个帖子中的详细信息请参阅here

答案 1 :(得分:14)

我发现ServiceMix提供了OSGi-fy Spring捆绑包。 4.1.4, http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.spring-aop/

我在我的osgi Bundle项目中尝试过,设置这样的依赖:

 <dependency>
        <groupId>org.apache.servicemix.bundles</groupId>
        <artifactId>org.apache.servicemix.bundles.spring-core</artifactId>
        <version>4.1.1.RELEASE_3</version>
 </dependency>

在Felix中运行已发现的sprint包已激活:

START LEVEL 1
 ID|State      |Level|Name
...
5|Resolved   |    1|Apache ServiceMix :: Bundles :: spring-expression (4.1.1.RELEASE_3)
6|Active     |    1|Apache Felix Gogo Command (0.14.0)
7|Active     |    1|Apache Felix Gogo Runtime (0.12.1)
8|Active     |    1|Apache Felix Gogo Shell (0.10.0)
...
10|Active     |    1|Apache ServiceMix :: Bundles :: spring-context (4.1.1.RELEASE_3)
11|Active     |    1|Apache ServiceMix :: Bundles :: spring-core (4.1.1.RELEASE_3)
.... 

但是在最新版本5.4.0中,ServiceMix仅包含spring 3.2.11。

在我的OSGi环境中使用spring 4.1.1有任何风险吗?

答案 2 :(得分:13)

Spring Source去年停止使用OSGI heaaders创建jar: http://www.infoq.com/news/2012/10/spring-osgi-gradle/

我认为你不会得到包含OSGI捆绑包的官方maven回购。我们经常对OSGI包使用http://ebr.springsource.com/,但即便如此,也不包含3.2之后的任何版本

由于回购率低而无法添加为评论,因此添加为答案。

答案 3 :(得分:6)

我必须说,将Spring迁移到OSGi仍然存在于Apache ServiceMix中。 从maven repo

获取支持OSGi的清单的最新(4.0.2.RELEASE)Spring工件

答案 4 :(得分:0)

相关问题