springosgieclipse-gemini

Spring framework download as OSGi bundles


I'm working myself into Spring for OSGi, aka Eclipse Gemini Blueprint.

Every tutorial or documentation I found mentions adding several bundles provided by Spring to my OSGi-container (like org.springframework.aop.jar). It was hard enough finding a download for the current Spring release, as it seems it is not directly provided on their homepage anymore (only maven links etc. and this is not an option for the current project). Especially every tutorial mentions, that this libraries are provided as OSGi bundles aswell.

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.

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

But all of the downloads I could find (e.g. http://maven.springframework.org/release/org/springframework/spring/3.2.5.RELEASE/) only contained normal jars, no OSGi bundles. Is the practice of providing OSGi-bundles discontinued as of Spring 3.x? How do I add the neccessary Spring dependencies to my project? Are the tutorials/documentations outdated?

I'm using the latest release of Gemini which is 1.0.2.


Solution

  • You can use the Eclipse Maven Repository

    <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>
    

    The transitive dependencies of Blueprint Extender will contain all Spring stuff you need.