我想从驻留在 maven Central 上的 OSGI 包生成 P2 存储库。我有
- 使用 dependencies=consider 定义了一个 POM 优先的功能项目
- 使用范围编译定义 Maven 依赖项并键入 jar
- 定义了一个 feature.xml,其中包含对 manifest.mf 中声明的包符号名称和版本的精确引用
当我尝试构建该功能时,我收到
No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from org.codehaus.jackson.feature.group 1.9.1.qualifier to jackson-mapper-lgpl [1.9.12,1.9.13).", "Unable to satisfy dependency from org.codehaus.jackson.feature.group 1.9.1.qualifier to jackson-core-lgpl [1.9.12,1.9.13).", "No solution found because the problem is unsatisfiable."]
其中org.codehaus.jackson.feature是我正在构建的功能,而jackson-mapper-lgpl [1.9.12,1.9.13)和jackson-core-lgpl [1.9.12,1.9.13)是 OSGI 的规范我试图包含的捆绑包。
当我打开调试模式时,我看到正在找到组件,这使得行为更加奇怪:
[DEBUG] P2Resolver: artifact org.codehaus.jackson:jackson-core-lgpl:1.9.12 at location /home/jsuess/.m2/repository/org/codehaus/jackson/jackson-core-lgpl/1.9.12/jackson-core-lgpl-1.9.12.jar resolves installable unit jackson-core-lgpl/1.9.12
[DEBUG] P2resolver.addMavenArtifact org.codehaus.jackson:jackson-mapper-lgpl:jar:1.9.12:compile
[DEBUG] P2Resolver: artifact org.codehaus.jackson:jackson-mapper-lgpl:1.9.12 at location /home/jsuess/.m2/repository/org/codehaus/jackson/jackson-mapper-lgpl/1.9.12/jackson-mapper-lgpl-1.9.12.jar resolves installable unit jackson-mapper-lgpl/1.9.12
[DEBUG] Registered artifact repository org.eclipse.tycho.repository.registry.facade.RepositoryBlackboardKey(uri=file:/resolution-context-artifacts@/home/jsuess/workspace/org.codehaus.jackson/features/org.codehaus.jackson)
我相信从 maven 获取包并创建 P2 一定是一个常见的用例,所以我想知道是否有人可以指出我可以用作模板的工作示例 POM。