让karaf-maven-plugin将所有内容复制到发行版中

时间:2015-07-25 02:09:39

标签: maven apache-karaf

这是一个pom。它不起作用:它得到一个连线错误,其中一个编译范围功能无法找到由其中一个运行时范围功能提供的包。

我的问题是,我不明白,从文档中,如何说:在karaf程序集构建时复制捆绑

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>
    <parent>
        <artifactId>anvils-prototype</artifactId>
        <groupId>com.basistech.ws</groupId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    <artifactId>rosapi-assembly</artifactId>
    <packaging>karaf-assembly</packaging>
    <name>karaf assembly</name>
    <properties>
        <skip-dependency-convergence>true</skip-dependency-convergence>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${karaf.version}</version>
            <type>kar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf.karaf</groupId>
            <artifactId>apache-cxf</artifactId>
            <version>${cxf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>rosette-base-linguistics</artifactId>
            <version>${project.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>rosapi-worker</artifactId>
            <version>${project.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <finalName>${project.artifactId}</finalName>
                    <bootFeatures>
                        <feature>bundle</feature>
                        <feature>config</feature>
                        <feature>diagnostic</feature>
                        <feature>feature</feature>
                        <feature>jaas</feature>
                        <feature>shell</feature>
                        <feature>log</feature>
                        <feature>management</feature>
                        <feature>package</feature>
                        <feature>shell-compat</feature>
                        <feature>ssh</feature>
                        <feature>system</feature>
                        <feature>wrap</feature>
                        <feature>war</feature>
                        <feature>cxf</feature>
                    </bootFeatures>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

1 个答案:

答案 0 :(得分:0)

bootFeatures下定义的许多功能都不存在,或者未在功能依赖项(标准,cxf,rosapi功能)中定义。这就是为什么它不能创建组件,因为它不知道这些功能。

您可以尝试从一些众所周知的功能开始,例如:

config
management
war
cxf...