Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 285514

Summary: No executable produced during product export with platform-specific root file entries in feature's build.properties
Product: [Eclipse Project] PDE Reporter: Jeff Norris <jnorris>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, caniszczyk, jeffmcaffer, luca_quaglia
Version: 3.5   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 309758    
Attachments:
Description Flags
my build.properties file
none
my .product file
none
director log none

Description Jeff Norris CLA 2009-08-03 23:06:37 EDT
Build ID: 20090619-0625

I have a working P2-enabled product, but I wanted to bundle a JRE on Windows and Linux and have p2 manage it along with everything else.  I added the JRE as root files in my top feature's build.properties with entries that look like this:

root.linux.gtk.x86=jre1.5.0_18-Linux
root.win32.win32.x86=jre1.5.0_18-Win

Unfortunately, if these entries are in my build.properties file when I export the product, I get no errors and the jre appears in the export but it doesn't produce an executable *for the platforms that are mentioned in build.properties*.  I'll get an executable for a platform if I take that platform's entry out of the build.properties file *or* I'll get all of the executables if I uncheck the "Generate metadata repository" box in the export wizard.
Comment 1 Chris Aniszczyk CLA 2009-08-04 15:00:23 EDT
Can you post your build.properties for the feature?
Comment 2 Chris Aniszczyk CLA 2009-08-04 15:02:01 EDT
Also, shouldn't your entries be like this? 

root.linux.gtk.x86.folder.jre=jre1.5.0_18-Linux
root.win32.win32.x86.folder.jre=jre1.5.0_18-Win
Comment 3 Jeff Norris CLA 2009-08-04 15:16:22 EDT
Created attachment 143435 [details]
my build.properties file
Comment 4 Jeff Norris CLA 2009-08-04 15:20:45 EDT
I was following these instructions:

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_rootfiles.htm

Note that my jre1.5.0_18-Linux and jre1.5.0_18-Win folders have a jre/ subdirectory in them.  The jre is being correctly included in the export, it's just not including an executable.  Your suggested entries just explicitly include the subdirectory in the entry, but I don't think there's any other difference.

I also tried it with your entries with the same results - jre is included, but there's no executable for the platforms mentioned in build.properties.

Comment 5 Chris Aniszczyk CLA 2009-08-04 15:21:49 EDT
How are you including the delta pack?
Comment 6 Jeff Norris CLA 2009-08-04 15:23:30 EDT
Created attachment 143436 [details]
my .product file

I'm also including my .product file on the possibility that there's something else that I need to have in here.  I admit that some of the platform-specific stuff in the .product file is a bit tricky.
Comment 7 Jeff Norris CLA 2009-08-04 15:25:12 EDT
I downloaded the delta pack into a different directory, then edited my target platform and added that directory to it, just like Andrew Niefer's blog post says here:

http://aniefer.blogspot.com/2009/06/using-deltapack-in-eclipse-35.html



Comment 8 Chris Aniszczyk CLA 2009-08-04 15:29:48 EDT
I'm wondering if we're bit by bug 285514

Andrew, any thoughts?
Comment 9 Chris Aniszczyk CLA 2009-08-04 15:30:18 EDT
oops, I mean this bug

281224: [product] not added to feature based product without deltapack
https://bugs.eclipse.org/bugs/show_bug.cgi?id=281224
Comment 10 Andrew Niefer CLA 2009-08-05 11:31:22 EDT
I suspect this is caused by a collision in the naming of the product-id and the feature the product includes.

The executables are automatically packaged into IUs & artifacts named
<product-id>_root.<config>
Which also happens to be the pattern for rootfiles contributed by features, but with product-id replaced with feature-id.

Jeff can you try changing the .product's ID to be different from the feature. 
Comment 11 Jeff Norris CLA 2009-08-05 17:50:24 EDT
Andrew, that fixed it, thanks!  We can work around this issue for now by simply giving our product a different ID than any features that are being exported.  Since I think that naming products after features probably isn't that uncommon, it's probably a good idea to find some way to namespace them differently.

Thanks again!


Comment 12 Jeff Norris CLA 2009-08-05 17:58:25 EDT
Created attachment 143571 [details]
director log

Here is the director log, produced as requested.
Comment 13 Jeff Norris CLA 2009-08-05 17:59:44 EDT
(In reply to comment #12)
> Created an attachment (id=143571) [details]
> director log
> 
> Here is the director log, produced as requested.
> 

Sorry - this was meant for a different bug.  Ignore, please.
Comment 14 Chris Aniszczyk CLA 2009-08-05 20:59:49 EDT
A good pattern is generally for the product identifier to be the id of the actual product extension (if you have one). This is the case for 99.9% of people. For those who use products and don't have a product extension (or application even) things may be different.

I wonder if we could add some PDE UI tooling to detect this type of problem.

Is there something you can do at the build level to ease these collisions Andrew?
Comment 15 Andrew Niefer CLA 2010-02-18 18:11:07 EST
See bug 293111 suggesting errors/warnings on the product file.

The product_root IUs have the same structure as feature_root IUs because the product root IU is really just the org.eclipse.equinox.executable feature root IUs branded to match the product.

we can look at tweaking the branding a bit.
Comment 16 Lars Vogel CLA 2018-12-03 09:05:38 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.