AEM-Java项目添加graphql-java依赖后OSGI Bundle无法启动问题
我正在开发一个AEM-Java项目,在带有BND插件的Maven项目中添加graphql-java依赖时遇到问题:添加依赖并构建代码后,OSGI Bundle始终处于installed状态,推测是graphql-java存在缺失的Jar依赖。
构建时出现如下错误提示:
[ERROR] [api-regions-exportsimports] com.adobe.aem.guides.aemspa.react:aem-guides-aem-spa.react.core:1.0.0-SNAPSHOT: Bundle aem-guides-aem-spa.react.core:1.0.0-SNAPSHOT is importing package(s) [com.google.errorprone.annotations, org.reactivestreams, org.dataloader.stats, org.checkerframework.checker.nullness.qual, org.dataloader, com.google.errorprone.annotations.concurrent, javax.annotation.meta] in start level 20 but no bundle is exporting these for that start level. (com.adobe.aem.guides.aemspa.react:aem-guides-aem-spa.react.all:1.0.0-SNAPSHOT)
我已尝试以下操作但未解决问题:
- 在core pom.xml和parent pom.xml中添加了版本为20.2的graphql-java依赖(也尝试过19版本)
- 在core pom.xml中配置了BND规则:
Import-Package: javax.annotation;version=0.0.0,!com.google.,!org.checkerframework.,!javax.annotation.,!graphql.com.google.,!sun.misc, -includeresource: graphql-java-[0-9.]*.jar;lib:=true - 已在相关技术社区求助但未得到有效解决方案
内容的提问来源于stack exchange,提问作者Prince Shivhare

