0
我想创建自己的karaf发行版,现在我可以装配我的功能而没有任何问题,但我无法将它们注册到启动。属性使用推荐的标签。用karaf-maven-plugin启动功能
<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.
当我使用的标签,我收到以下错误:
[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文件中注册,因此它们不会启动。
我做错了什么?
这里是我的聚甲醛的相关部分:
<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>
我有自定义分发的类似问题。请尝试从功能代码中删除范围运行时...它看起来像它在这里的文档中所说的一样(https://svn.apache.org/repos/asf/karaf/site/production/manual/latest -3.0.x/custom-distribution.html),但对我来说它工作! –
删除运行时作用域会将依赖关系更改为编译作用域,并且由于看起来插件无法解决某些临时依赖关系,我尝试手动添加依赖关系,但未成功。 例如: ...无法解析org.springframework.osgi.web/1.2.1:缺少需求... –