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:缺少需求... –