p2.inf Filtering in Tycho when building an RCP app

2019-07-16 03:12发布

I´m building an RCP application using tycho. The RCP application uses p2 and its self updateable capabilities configuring the respository in an p2.inf file. Works like a charm.

Now I want to introduce a placeholder ${updatesiteurl} in the p2.inf file and replace it with the URL according to the environment for which it is built. But unforunately it get´s replaced with an empty string instead of the environment variable which I guess happens because tycho, or the p2 director, replaces some escaped characters (like the ":" which is ${58} for example).

Any ideas how this could be solved? I thought about explicitly declaring the resource plugin and binding it to an earlier build phase but that didn´t work either...

标签: rcp p2 tycho
1条回答
迷人小祖宗
2楼-- · 2019-07-16 03:40

What finally worked is: I moved the p2.inf file to directory /p2 and let the maven resource plugin copy the file with the replacements to a temporary folder in /target. Now a copy task copies the file in a later phase (why the hell didn´t this work in the same phase...) to the the root directory, where the .product file is, since both have to be in the same directory (with the same prefix). Finally clean deletes the p2.inf file in the root directory...

查看更多
登录 后发表回答