首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有karaf-maven-plugin的StartupFeatures

带有karaf-maven-plugin的StartupFeatures
EN

Stack Overflow用户
提问于 2016-11-04 18:39:32
回答 1查看 1.1K关注 0票数 0

我正在尝试创建自己的karaf发行版,现在我能够没有任何问题地组装我的特性,但是我无法使用推荐的标记将它们注册到startup.properties

代码语言:javascript
复制
<startupFeature>foo</startupFeature> This will result in the feature bundles
being listed in startup.properties at the appropriate start level and the bundles
being copied into the "system" internal repository. You can use feature_name
or feature_name/feature_version formats.

当我使用标签时,我会得到以下错误:

代码语言:javascript
复制
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.5:assembly (default-cli) on project winthor-karaf: Unable to build assembly: Unable to resolve root: missing requirement [root] osgi.identity; osgi.ide
ntity=winthor-core-servico; type=karaf.feature; filter:="(&(osgi.identity=winthor-core-servico)(type=karaf.feature))" -> [Help 1]

如果我在installedFeatures标记之前使用startUpFeatures标记,错误就会消失,但是特性包没有在startup.properties文件中注册,所以它们不会启动。

我做错什么了?

下面是我的pom的相关部分:

代码语言:javascript
复制
  <dependencies>
    <dependency>
      <groupId>org.apache.karaf.features</groupId>
      <artifactId>framework</artifactId>
      <version>4.0.5</version>
      <type>kar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf.features</groupId>
      <artifactId>standard</artifactId>
      <classifier>features</classifier>
      <version>4.0.5</version>
      <scope>runtime</scope>
      <type>xml</type>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf.features</groupId>
      <artifactId>spring</artifactId>
      <classifier>features</classifier>
      <type>xml</type>
      <version>4.0.5</version>
      <scope>runtime</scope>
    </dependency>


    <dependency>
      <groupId>br.com.pcsist.winthor.core</groupId>
      <artifactId>winthor-core-features</artifactId>
      <version>1.0.0</version>
      <scope>runtime</scope>
      <classifier>features</classifier>
      <type>xml</type>
    </dependency>
    <dependency>
      <groupId>br.com.pcsist.winthor.core</groupId>
      <artifactId>winthor-autenticacao-features</artifactId>
      <version>1.0.0</version>
      <scope>runtime</scope>
      <classifier>features</classifier>
      <type>xml</type>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <version>4.0.5</version>
        <extensions>true</extensions>
        <configuration>
          <bootFeatures>
            <bootFeature>instance</bootFeature>
            <bootFeature>package</bootFeature>
            <bootFeature>log</bootFeature>
            <bootFeature>ssh</bootFeature>
            <bootFeature>aries-blueprint</bootFeature>
            <bootFeature>framework</bootFeature>
            <bootFeature>system</bootFeature>
            <bootFeature>feature</bootFeature>
            <bootFeature>shell</bootFeature>
            <bootFeature>management</bootFeature>
            <bootFeature>service</bootFeature>
            <bootFeature>jaas</bootFeature>
            <bootFeature>shell-compat</bootFeature>
            <bootFeature>deployer</bootFeature>
            <bootFeature>diagnostic</bootFeature>
            <bootFeature>wrap</bootFeature>
            <bootFeature>bundle</bootFeature>
            <bootFeature>config</bootFeature>
            <bootFeature>kar</bootFeature>
          </bootFeatures>
          <startupFeatures>
            <startupFeature>winthor-core-data</startupFeatur>
            <startupFeature>winthor-core-servico</startupFeature>
            <feature>winthor-autenticacao</feature>
          </startupFeatures>
        </configuration>
      </plugin>
    </plugins>
  </build>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-11-09 19:49:37

我们使用不同的方法解决了我们的问题,我们发现startup.properties包在bootFeatures之前运行bootFeatures,这在文档中并不清楚,所以我们创建了一个带有核心特性的简单的,并将它作为一个编译作用域引用到自定义的karaf发行版。

其余的功能被注册为运行时范围内的启动功能,它工作起来就像一种魅力。

关于karaf插件,startupfeatures的功能似乎被破坏了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40429737

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档