【发布时间】:2018-05-12 19:30:09
【问题描述】:
我有一个包装类型为 jar 的 maven 项目。我有大量的正常依赖项,它们存在于 m2 存储库中,还有一些 eclipse 包依赖项存在于 p2 存储库中。 我不能使用 tycho 编译器插件,因为它会禁止我使用 m2 repo 依赖项。 我尝试在 pom.xml 中添加 p2 存储库并在依赖标记中添加依赖项 -
<repositories>
<repository>
<id>test</id>
<layout>p2</layout>
<url>file:///C:/repo/test</url>
</repository>
</repositories>
但它给了我错误 -
Failed to execute goal on project test-common: Could not resolve dependencies for project
com.test.ce:test-common:jar:0.0.1: Failed to collect dependencies at
com.test.pd:com.pd.test.xml:jar:1.2.200.003: Failed to read artifact descriptor for
com.test.pd:com.pd.test.xml:jar:1.2.200.003: Could not transfer artifact
com.test.pd:com.pd.test.xml:jar:1.2.200.003 from/to test (file:///C:/repo/test):
Cannot access file:///C:/repo/test with type p2 using the available connector factories: BasicRepositoryConnectorFactory:
Cannot access file:///C:/repo/test with type p2 using the available layout factories: Maven2RepositoryLayoutFactory:
Unsupported repository layout p2 -> [Help 1]
【问题讨论】:
-
this post 会有帮助吗?
-
如果您仔细查看,则不是重复的。虽然这个问题是如何将 p2 存储库中的依赖项用于常规 maven 构建,但另一个问题询问如何在 p2 构建中使用常规 maven 依赖项(反之亦然)。
标签: eclipse maven dependencies osgi-bundle p2