Tycho fails to resolve reference from product to eclipse-feature from a different reactor build

ぐ巨炮叔叔 提交于 2019-12-01 01:18:36

probably you are using ".qualifier" as version suffix when referencing the feature in your .product. ".qualifier" is replaced by the build timestamp by default, so this is probably not what you want. Try using "0.0.0" (=latest) instead.

Your product file seems to specify the version 1.0.0.qualifier in the reference to your feature in the other reactor.

Due to a bug in Tycho (bug 373817) the qualifier literal is not replaced by the right timestamp in this case: Tycho uses the timestamp of the current build (as you correctly observed) instead of the timestamp from the feature version which is available in the target platform.

As Jan already pointed out, the workaround for this problem is to use the version 0.0.0 in the reference to the feature.

Like with all "inclusion" references (i.e. features "include" plug-ins, and products "includes" features), Tycho will replace that version with the actual version from the target platform. (Note: Artifacts from previous Tycho builds with mvn clean install are automatically part of the target platform.) But with 0.0.0 this will even work correctly in case of two reactors.


For reference: With newer Tycho versions, the error message in case of the setup described in the question is different:

Failed to execute goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0:publish-products (...): Exception while publishing product (...)\test.product: publishing result: [Included element my.testlib.feature.feature.group 1.0.0.201109081051 is missing. Cannot determine filter for requirement to this element.]

This message occurs due to the same Tycho bug, and the workaround is the same.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!