我试图在一个工作的osgi捆绑休息容易jars为multipart。我正在使用REST服务,它具有MultipartFormOutput的输入参数。过去两天我没有成功解决这个问题。我错过了一些依赖,或者我需要在我的pom文件中纠正。我的pom文件的片段
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>
com.integration.service,
com.integration.model
</Export-Package>
<Import-Package>*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
也是家属
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jsapi</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-spring</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0-m10</version>
</dependency>
我得到错误:
java.lang.Exception: Could not start bundle mvn:com.xxx/xxxapi in feature(s) xxx-0.0.0: Unresolved constraint in bundle com.xxx.xxx-api [406]: Unable to resolve 406.0: missing requirement [406.0] osgi.wiring.package; (osgi.wiring.package=org.jboss.resteasy.plugins.providers.multipart)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:482)[49:org.apache.karaf.features.core:2.3.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:396)[49:org.apache.karaf.features.core:2.3.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:392)[49:org.apache.karaf.features.core:2.3.1]
at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)[34:org.apache.karaf.features.command:2.3.1]
at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:41)[34:org.apache.karaf.features.command:2.3.1]
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[23:org.apache.karaf.shell.console:2.3.1]
at org.apache.karaf.shell.console.jline.Console.run(Console.java:174)[23:org.apache.karaf.shell.console:2.3.1]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.xxx-api [406]: Unable to resolve 406.0: missing requirement [406.0] osgi.wiring.package; (osgi.wiring.package=org.jboss.resteasy.plugins.providers.multipart)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:479)[49:org.apache.karaf.features.core:2.3.1]
... 15 more
有人可以指导我缺少的东西。