如何在osgi/karaf中快速升级spring捆绑包?

如何在osgi/karaf中快速升级spring捆绑包?,spring,apache-karaf,Spring,Apache Karaf,我安装了Spring3.0.7附带的karaf(servicemix) 我需要使用Spring3.1.0 我不想一捆一捆地做。 还有别的办法吗 谢谢最新版本的Karaf为Spring提供了一项功能, 只需在新版本中安装该功能。Karaf/ServiceMix能够处理此问题 就做一个 feature:add-url <feature-maven-coordinate> feature:install <desired-featue> 功能:添加url 功能:安装 spri

我安装了Spring3.0.7附带的karaf(servicemix) 我需要使用Spring3.1.0 我不想一捆一捆地做。 还有别的办法吗


谢谢

最新版本的Karaf为Spring提供了一项功能, 只需在新版本中安装该功能。Karaf/ServiceMix能够处理此问题

就做一个

feature:add-url <feature-maven-coordinate>
feature:install <desired-featue>
功能:添加url
功能:安装

spring framework OSGI bundles存储库已冻结,但至少在2014年9月1日之前可以访问,版本仅在3.2.4.0发布之前

如果您想使用SpringFramework3.2.5或更高版本,则需要使用maven插件或其他插件转换捆绑包。maven插件的一个示例如下所示:

            <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
         <modelversion>4.0.0</modelversion>

         <groupid>org.springframework</groupid>
         <artifactid>spring-core</artifactid>
         <version>${osgi.spring.version}</version>

         <dependencies>
          <dependency>
           <groupid>org.springframework</groupid>
           <artifactid>spring-core</artifactid>
           <version>${spring.version}</version>
          </dependency>
         </dependencies>


         <build>
          <plugins>
           <plugin>
            <groupid>org.apache.maven.plugins</groupid>
            <artifactid>maven-dependency-plugin</artifactid>
            <configuration>
             <includegroupids>org.springframework</includegroupids>
             <includeartifactids>spring-core</includeartifactids>
            </configuration>
           </plugin>
           <plugin>
            <groupid>org.apache.felix</groupid>
            <artifactid>maven-bundle-plugin</artifactid>
            <configuration>
             <instructions>
              <export-package>
               org.springframework.asm,
               org.springframework.asm.commons,
               org.springframework.asm.signature,
               org.springframework.asm.util,
               org.springframework.cglib,
               org.springframework.cglib.beans,
               org.springframework.cglib.core,
               org.springframework.cglib.proxy,
               org.springframework.cglib.reflect,
               org.springframework.cglib.transform,
               org.springframework.cglib.transform.impl,
               org.springframework.cglib.util,
               org.springframework.core,
               org.springframework.core.annotation,
               org.springframework.core.convert,
               org.springframework.core.convert.converter,
               org.springframework.core.convert.support,
               org.springframework.core.enums,
               org.springframework.core.env,
               org.springframework.core.io,
               org.springframework.core.io.support,
               org.springframework.core.serializer,
               org.springframework.core.serializer.support,
               org.springframework.core.style,
               org.springframework.core.task,
               org.springframework.core.task.support,
               org.springframework.core.type,
               org.springframework.core.type.classreading,
               org.springframework.core.type.filter,
               org.springframework.util,
               org.springframework.util.comparator,
               org.springframework.util.xml
              </export-package>
              <import-package>
               !org.springframework.asm.tree,
               !joptsimple,
               !sun.*,
               !org.apache.tools.*,
               !org.aspectj.*,
               *
              </import-package>
             </instructions>
            </configuration>
           </plugin>
          </plugins>
         </build>

        </project>

4.0.0
org.springframework
弹簧芯
${osgi.spring.version}
org.springframework
弹簧芯
${spring.version}
org.apache.maven.plugins
maven依赖插件
org.springframework
弹簧芯
org.apache.felix
maven捆绑插件
org.springframework.asm,
org.springframework.asm.commons,
org.springframework.asm.signature,
org.springframework.asm.util,
org.springframework.cglib,
org.springframework.cglib.beans,
org.springframework.cglib.core,
org.springframework.cglib.proxy,
org.springframework.cglib.reflect,
org.springframework.cglib.transform,
org.springframework.cglib.transform.impl,
org.springframework.cglib.util,
org.springframework.core,
org.springframework.core.annotation,
org.springframework.core.convert,
org.springframework.core.convert.converter,
org.springframework.core.convert.support,
org.springframework.core.enums,
org.springframework.core.env,
org.springframework.core.io,
org.springframework.core.io.support,
org.springframework.core.serializer,
org.springframework.core.serializer.support,
org.springframework.core.style,
org.springframework.core.task,
org.springframework.core.task.support,
org.springframework.core.type,
org.springframework.core.type.classreading,
org.springframework.core.type.filter,
org.springframework.util,
org.springframework.util.comparator,
org.springframework.util.xml
!org.springframework.asm.tree,
!简朴,
!孙.*,
!org.apache.tools.*,
!org.aspectj.*,
*