Community
Participate
Working Groups
Build Identifier: As specified in http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata#Advice_file_format, besides the same folder as .product (for products), the touchpoint instructions (p2.inf) can also appear and be respected under the same folder as feature.xml (for features), META-INF/ (for bundles). But up to now tycho only supports the product scenario. If a feature owns a p2.inf, the instructions won't be covered in the generated P2 metadata (content.jar) in case it's built by tycho. While if it's exported by wizard, it does. Attachments: 1. a sample feature project which contains a valid p2.inf, as well as pom.xml 2. the content.xml generated by tycho, which is incorrect. 3. the content.xml generated by export wizard, which is correct. Reproducible: Always Steps to Reproduce: 1.Import attached feature project into eclipse. Under root folder, there's a p2.inf which invokes "setProgramProperty" action in install phase. 2.Export the feature by wizard and check the content.xml which includes the instruction. 3.Build the project by maven and check the content.xml which doesn't include the instruction.
Created attachment 206398 [details] sample feature project
Created attachment 206399 [details] content.xml generated by tycho
Created attachment 206400 [details] content.xml generated by export wizard in eclipse
fwiw, p2.inf works as expected for eclipse-plugin project, we use it for m2e for quite some time now. See [1] for example http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.usagedata/META-INF?id=milestones/1.0.100/1.0.100.20110804-1717
Sorry, but I cannot reproduce the problem. The attachment from comment 1 doesn't contain a project but a p2 repository. My understanding was also that p2.inf files work in eclipse-feature projects, so please reopen this bug if you can reproduce the problem. BTW, you don't say which Tycho version you were using.
Created attachment 206608 [details] The correct source project of the sample feature Please ignore the previous one (attachment#1 [details]).
Reopen this issue since I can always re-produce it. I'm using version 0.13.0 of tycho.
And yes, the p2.inf inside a plugin is considered when exported with a feature. But still the p2.inf inside a feature is not.
Bonsoir, We are also facing that issue where p2.inf files under Features are not honored by Tycho. Works fine under a Bundle and under a Product (if using the Product ID prefix as noted on https://issues.sonatype.org/browse/TYCHO-517), but does not work for Features. Any suggestion? Thanks!
The attached example file does not include p2.inf in the feature.jar file in build.properties. Using Tycho 0.14.0-SNAPSHOT, the touchpoint instructions are properly included in generated p2 metadata after I fixed build.properties file. 0.13.0 indeed did not include setProgramProperty instructions in p2 repository metadata.
Bonjour, I confirm p2.inf files under Features are honored by latest Tycho 0.14.0 Note that to make it work, had to ensure p2.inf was added to bin.includes of Feature's build.properties; which is not required in PDE Build. Might be good to document. Thanks Igor for the update!
(In reply to comment #11) > Note that to make it work, had to ensure p2.inf was added to bin.includes of > Feature's build.properties; which is not required in PDE Build. Might be good > to document. But this is not right. You shouldn't include the p2.inf in your binaries. Are you by any chance still using eclipse-update-site?
(In reply to comment #12) > (In reply to comment #11) > > Note that to make it work, had to ensure p2.inf was added to bin.includes of > > Feature's build.properties; which is not required in PDE Build. Might be good > > to document. > But this is not right. You shouldn't include the p2.inf in your binaries. Are > you by any chance still using eclipse-update-site? Currently Tycho requires p2.inf to be packaged into the final artifact. This is side-effect of the way "full" metadata currently gets published (see my https://bugs.eclipse.org/bugs/show_bug.cgi?id=366456#c3). I have not decided if this is desired or not yet.