简体   繁体   中英

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. 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. My Eclipse plugin project needs to point to the p2Repository 's target folder to get the dependecies. But by providing the following code in the eclipse-plugin POM file is not working:

 <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.

But you can simply construct an absolute URL pointing to the sibling project's target folder by using the ${project.baseUri} Maven property:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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