java - ResolutionException: Unable to resolve root: 缺少需求 [root] filter:="(osgi.wiring.package=javax.jws)(version>=1.1.0)(!(version>=2.0.0))
问题描述
当我尝试在 Fabric8 的容器上部署 7 个捆绑包中的 1 个时,出现下一个错误:
2021-06-29 15:24:41,239 | ERROR | dd741-1-thread-1 | DeploymentAgent | 83 - io.fabric8.fabric-agent - 1.2.0.redhat-133 | Unable to update agent
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=bundleinterface; type=karaf.feature; filter:="(&(osgi.identity=bundleinterface)(type=karaf.feature))" [caused by: Unable to resolve bundleinterface/0.0.0: missing requirement [bundleinterface/0.0.0] osgi.identity; osgi.identity=bundleproject-interface; type=osgi.bundle; version="[2.0.14.RELEASE,2.0.13.RELEASE]"; resolution:=mandatory [caused by: Unable to resolve bundleproject-interface/2.0.13.RELEASE: missing requirement [bundleproject-interface/2.0.13.RELEASE] osgi.wiring.package; filter:="(&(osgi.wiring.package=javax.jws)(version>=1.1.0)(!(version>=2.0.0)))"]]
关于我的 pom.xml 的信息:
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- to generate the MANIFEST-FILE of the bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>bundleproject-interface</Bundle-SymbolicName>
<Export-Package>
com.bundleproject.interface.*,
com.bundleproject.interfaceimpl.*
</Export-Package>
<Import-Package>
org.apache.cxf.transport.http,
io.fabric8.cxf,
<!-- work around :: ini :: try to import the javax package but no work :( -->
<!-- javax.jws.*;version="[1.1.0, 2.0.0)", -->
javax.jws;version="[1.1.0,2.0.0)",
<!-- work around :: fin -->
*
</Import-Package>
<Import-Service>
com.bundleproject.service.LogService,
com.bundleproject.service.MessageFailService,
com.bundleproject.dsservice.IMsgLogService
</Import-Service>
</instructions>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.cxf
</groupId>
<artifactId>
cxf-codegen-plugin
</artifactId>
<versionRange>
[3.0.1,)
</versionRange>
<goals>
<goal>wsdl2java</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
我在用:
- Java 1.8(用于编译整个项目),我之前能够部署 5/7 个包
- Maven 3.4.5
- Fabric8-1.2.0.redhat-133
该项目之前部署在 Jboss Fuse 6.2.1 上并且运行良好。但是被 Fabric8 1.2.0.redhat-133 改变了
解决方案
推荐阅读
- mongodb - Groupby 数组元素并根据 Mongodb 查询中的日期对其进行分类
- javascript - 为什么我们使用 this.initialState = this.state;
- c++ - GCC / G++ 路径包含标志以 '=' 开头
- python - 为什么我的海龟绘图程序在 2 个动作后就死了
- fgets - 从 gcc 中的“fgets”中删除换行符
- angular - 角度 texarea 到阵列管道
- c++ - 试图从一个带有参数函数的函数返回一个函数
- css - 将特定的 woocommerce 子类别显示为没有空格的列表
- python - Pandas 合并:df1.merge(df2, on='Date') 不合并,左侧数据框 df1 保持不变?
- php - 此路由不支持 POST 方法。支持的方法:GET、HEAD。我想将数据从 curl 保存到数据库表