如何将另一个项目的目标文件夹用作 Tycho 构建中的目标平台存储库?

How to use the target folder of another project as target platform repository in a Tycho build?

我正在持续集成环境中创建 Eclipse 插件。我的项目包含如下四个子模块

parent
   ---p2Repository
   ---eclipseplugin
   ---feature
   ---updateSite

在持续集成构建期间,首先创建依赖项的 p2 存储库。我的 Eclipse 插件项目需要指向 p2Repository 的目标文件夹以获取依赖项。但是通过在 eclipse-plugin POM 文件中提供以下代码是行不通的:

 <repositories>
    <repository>
        <id>Dependencies</id>
        <layout>p2</layout>
        <url>file:/../p2Respository/target/repository/</url> 
    </repository>
</repositories>

有什么建议吗?

您指定的文件 URL 不代表相对路径,存储库配置不支持相对 URL。

但是您可以使用 ${project.baseUri} Maven 属性:

简单地构造一个指向兄弟项目目标文件夹的绝对 URL
<repositories>
    <repository>
        <id>Dependencies</id>
        <layout>p2</layout>
        <url>file:/${project.baseUri}/../p2Respository/target/repository/</url> 
    </repository>
</repositories>