简体   繁体   English

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

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

I am creating an Eclipse plugin in an continuous integration environment. 我正在持续集成环境中创建Eclipse插件。 My project contains four child modules as follows 我的项目包含四个子模块,如下所示

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

During the continuous integration build, first the p2 repository for the dependencies is created. 在持续集成构建过程中,首先创建依赖项的p2存储库。 My Eclipse plugin project needs to point to the p2Repository 's target folder to get the dependecies. 我的Eclipse插件项目需要指向p2Repository的target文件夹以获取依赖关系。 But by providing the following code in the eclipse-plugin POM file is not working: 但是通过在eclipse-plugin POM文件中提供以下代码无法正常工作:

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

Any advice? 有什么建议吗?

The file URL you specified does not represent a relative path, and relative URLs are not supported in the repositories configuration. 您指定的文件URL不代表相对路径,并且存储库配置中不支持相对URL。

But you can simply construct an absolute URL pointing to the sibling project's target folder by using the ${project.baseUri} Maven property: 但是,您只需使用${project.baseUri} Maven属性,即可构造一个指向同级项目目标文件夹的绝对URL:

<repositories>
    <repository>
        <id>Dependencies</id>
        <layout>p2</layout>
        <url>file:/${project.baseUri}/../p2Respository/target/repository/</url> 
    </repository>
</repositories>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM