在karaf上部署Microsoft Azure API jar

时间:2013-07-18 14:13:08

标签: maven azure apache-karaf

我是Maven和OSGI的新手,有谁可以帮助我知道如何在karaf OSGI容器上部署Microsoft Azure API jar? 以下是我的Maven项目的pom内容。             com.microsoft.windowsazure             微软windowsazure-API             0.4.3         

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.1</version>
    </dependency>
    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.1</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.9.2</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>1.9.2</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.2</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-xc</artifactId>
        <version>1.9.2</version>
    </dependency>
    <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>2.2.3-1</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-client</artifactId>
        <version>1.13</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-core</artifactId>
        <version>1.13</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-json</artifactId>
        <version>1.13</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jettison</groupId>
        <artifactId>jettison</artifactId>
        <version>1.1</version>
    </dependency>
    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.5</version>
    </dependency>

我有嵌入式依赖项,如下面的

                                         <Embed-Dependency>
                        microsoft-windowsazure-api,
                        commons-lang3,
                        commons-logging,
                        jackson-core-asl,
                        jackson-jaxrs,
                        jackson-mapper-asl,
                        jackson-xc,
                        javax.inject,
                        jaxb-impl,
                        jersey-client,
                        jersey-core,
                        jersey-json,
                        jettison,
                        mail
                    </Embed-Dependency>

当我这样做时,它会不断显示不同包的缺失依赖关系。我已经在pom中导入了所有包(*)

2 个答案:

答案 0 :(得分:1)

下载bnd.jar(捆绑工具)

保持azur并将两个jar都放在目录

转到该目录并运行以下命令

java -jar bnd.jar wrap microsoft-windowsazure-api 0.4.3.jar

tada ...你的捆绑已经准备就绪,只需部署它并继续你的工作:)

答案 1 :(得分:0)

看看Karaf的jcloud功能,它还包含一些天蓝色的包。我相信这会给你一个工作包的列表。