我可以毫無問題地構建我的項目「samba.interfaces」和「samba.message」。但是,當我嘗試啓動ServiceMix的「samba.message」捆綁(需要包含包de.samba.common的「samba.interfaces」束),我收到以下錯誤:在ServiceMix中部署一個Maven構建的OSGi包:「捆綁中的未解約束...」
Error executing command: Unresolved constraint in bundle message [195]: module;
(&(bundle-symbolic-name=de.samba.common)(bundle-version>=0.0.1))
那麼,是什麼是用於的符號名稱?它是否必須與主包一樣?這是指定消息包的POM的一部分:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.2.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>de.samba.message.Activator</Bundle-Activator>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>SAMBA Message</Bundle-Name>
<Bundle-Version>1.0.0</Bundle-Version>
<Import-Package>
javax.jws,
javax.wsdl,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.namespace,
javax.xml.ws,
META-INF.cxf,
META-INF.cxf.osgi,
org.apache.cxf.endpoint,
org.apache.cxf.bus,
org.apache.cxf.bus.spring,
org.apache.cxf.bus.resource,
org.apache.cxf.configuration.spring,
org.apache.cxf.resource,
org.apache.cxf.service.model,
org.apache.cxf.jaxws,
org.apache.cxf.transport.http_osgi,
org.springframework.beans.factory.config,
org.springframework.beans.factory.xml,
org.springframework.core.io,
org.springframework.beans.factory,
org.springframework.context.support,
org.springframework.beans,
org.springframework.context,
org.osgi.framework,
org.apache.log4j,
de.samba.common.auditingcontrol.*,
de.samba.common.collect.*,
de.samba.common.message.*,
de.samba.common.repository.*,
de.samba.common.security.*,
de.samba.common,
*
</Import-Package>
<Export-Package>de.samba.message.*</Export-Package>
<Private-Package>
</Private-Package>
<!--
<DynamicImport-Package>*</DynamicImport-Package>
-->
</instructions>
任何想法可能會導致此錯誤?
這並沒有幫助。 – Akku 2011-02-02 12:33:09