我有移植項目。目前版本爲CQ5.6。 Maven構建正在成功部署。但是,在構建之後,osgi中的軟件包顯示爲已安裝狀態。導致該問題的兩個依賴關係。OSGI捆綁軟件依賴問題
org.apache.felix.shell,version=[1.0,2) -- Cannot be resolved
在構建過程中,我收到如下錯誤。
錯誤
[INFO] --- maven-bundle-plugin:2.3.4:bundle (default-bundle) @ myPRJ-taglib ---
[ERROR] Error building bundle com.mypack.deewealth:myPRJ-taglib:bundle:1.0.0-SNAPSHOT : Unresolved references to [org.apache.felix.shell] by class
(es) on the Bundle-Classpath[Jar:dot, Jar:OSGI-INF/lib/recaptcha4j-0.0.8-kohsuke-1.jar, Jar:OSGI-INF/lib/commons-io-2.1.jar, Jar:OSGI-INF/lib/commons-
lang-2.4.jar, Jar:OSGI-INF/lib/crx-packagemgr-1.0.22.jar, Jar:OSGI-INF/lib/squeakysand-osgi-0.4.0.jar, Jar:OSGI-INF/lib/jsoup-1.6.1.jar, Jar:OSGI-INF/
lib/stax-api-1.0-2.jar, Jar:OSGI-INF/lib/org.apache.sling.settings-1.1.0.jar, Jar:OSGI-INF/lib/cq-compat-runmode-0.2.0.jar, Jar:OSGI-INF/lib/commons-c
ollections-3.2.1.jar, Jar:OSGI-INF/lib/squeakysand-jsp-0.4.0.jar, Jar:OSGI-INF/lib/squeakysand-commons-0.4.0.jar]: [org/apache/sling/settings/impl/Run
ModeCommand.class]
爲了解決這個我添加下面扶養在pom.xml中,我們在 依賴
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.shell</artifactId>
<version>1.4.2</version>
<scope>provided</scope>
</dependency>
添加在import語句。
<Import-Package>
....
....
org.apache.felix.shell
</Import-Package>
之後,構建成功,但捆綁在因爲
org.apache.felix.shell,version=[1.0,2) -- Cannot be resolved
任何建議,解決國家爲什麼這是造成問題的原因。