Spring 框架下载为 OSGi 包

标签 spring osgi eclipse-gemini

我正在致力于 OSGi 的 Spring,又名 Eclipse Gemini Blueprint。

我发现的每个教程或文档都提到将 Spring 提供的多个包添加到我的 OSGi 容器中(例如 org.springframework.aop.jar)。找到当前 Spring 版本的下载已经够困难的了,因为似乎不再直接在他们的主页上提供(只有 Maven 链接等,这不是当前项目的选项)。特别是每个教程都提到,该库也作为 OSGi bundle 提供。

In addition, the Spring Framework provides a number of bundles that are required to be installed as dependencies. As of release 2.5 of the Spring Framework, the Spring jars included in the Spring distribution are valid OSGi bundles and can be installed directly into an OSGi platform.

来源:http://www.eclipse.org/gemini/blueprint/documentation/reference/1.0.2.RELEASE/html/app-deploy.html

但是我能找到的所有下载(例如 http://maven.springframework.org/release/org/springframework/spring/3.2.5.RELEASE/ )只包含普通的 jar,没有 OSGi 包。从 Spring 3.x 开始,提供 OSGi bundle 的做法是否已停止?如何将必要的 Spring 依赖项添加到我的项目中?教程/文档是否已经过时?

我正在使用最新版本的 Gemini,即 1.0.2。

最佳答案

您可以使用 Eclipse Maven 存储库

<repositories>
<repository>
    <id>gemini-blueprint</id>
    <name>Gemini Blueprint</name>
    <url>https://repo.eclipse.org/content/groups/gemini-blueprint/</url>
</repository>
</repositories>

<dependencies>
<dependency>
    <groupId>org.eclipse.gemini.blueprint</groupId>
    <artifactId>gemini-blueprint-extender</artifactId>
    <version>2.0.0.BUILD-SNAPSHOT</version>
</dependency>
</dependencies>

Blueprint Extender 的传递依赖项将包含您需要的所有 Spring 内容。

关于Spring 框架下载为 OSGi 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20267343/

相关文章:

java - 在 OSGi Bundle 中使用 JavaCompiler

spring - Eclipse RCP、Spring、Hibernate 类加载问题

java - 具有额外列的多对多仅返回一行

java - org.osgi.framework.BundleException : Could not resolve module: org. eclipse.jetty.plus

java - 用 Java 开发一个简单的插件模块化 rest 可达服务

osgi - 如何在基于功能的 eclipse rcp 应用程序中自动启动 org.eclipse.gemini.blueprint.extender?

Spring OSGi 状态

java - Magnolia CMS 与 Spring MVC maven 项目发布

java - Spring 启动 csrf 和 Jade

java - Spring 在运行时针对特定时间安排任务