osgi.wiring.package; (及(osgi.wiring.package = META-INF.cxf)(版本> = 2.6.0)((版本>!= 3.0.0)))

时间:2017-06-08 10:58:07

标签: cxf pom.xml jbossfuse

我用maven生成了这个项目

mvn archetype:generate
-DarchetypeGroupId=org.apache.servicemix.tooling
-DarchetypeArtifactId=servicemix-cxf-code-first-osgi-bundle
-DarchetypeVersion=2012.01.0.redhat-60024
-DgroupId=org.fusesource.example
-DartifactId=cxf-basic
-Dversion=1.0-SNAPSHOT

创建了boundle并尝试安装并启动它到Jboss Fuse我得到了错误

Error executing command: Error installing bundles:
Unable to start bundle mvn:org.fusesource.example/cxf-basic/1.0-SNAPSHOT: Unresolved constraint in bundle cxf-basic [363]: Unable to resolve 363.0: missing requirement [363.0] osgi.wiring.package; (&(osgi.wiring.package=META-INF.cxf)(version>=2.6.0)(!(version>=3.0.0)))

我已经尝试更改

的版本
<plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>2.3.7</version>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                    <Import-Package>
                        javax.jws,
                        javax.wsdl,
                        javax.xml.bind,
                        javax.xml.bind.annotation,
                        javax.xml.namespace,
                        javax.xml.ws,
                        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.jaxws,
                        org.apache.cxf.transport.http,
                        org.springframework.beans.factory.config
                    </Import-Package>
                    <Private-Package>
                        !org.fusesource.example.client,
                        org.fusesource.example,
                        org.fusesource.example.types
                    </Private-Package>
                    <Require-Bundle>org.apache.cxf.bundle</Require-Bundle>
                    <!--
                        <DynamicImport-Package>*</DynamicImport-Package>
                    -->
                </instructions>
            </configuration>
        </plugin>

有一个新的,但当我这样做时,错误在

中略有改变
Error executing command: Error installing bundles:
Unable to start bundle mvn:org.fusesource.example/cxf-basic/1.0-SNAPSHOT: Unresolved constraint in bundle cxf-basic [362]: Unable to resolve 362.0: missing requirement [362.0] osgi.wiring.package; (&(osgi.wiring.package=javax.jws)(version>=2.0.0)(!(version>=3.0.0)))

我做错了什么?

1 个答案:

答案 0 :(得分:0)

缺少javax.jws包。您必须使用良好版本(2.0.0)在容器中安装lib。 如果已经是这种情况,并且您想要使用提供的版本,请尝试以下方法:

                    <Import-Package>
                        javax.jws;version="[1.0.0, 0)",
                        javax.wsdl,
                        javax.xml.bind,
                        javax.xml.bind.annotation,
                        javax.xml.namespace,
                        javax.xml.ws,
                        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.jaxws,
                        org.apache.cxf.transport.http,
                        org.springframework.beans.factory.config
                    </Import-Package>