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

Bug 349421

Summary: relative paths in .product file not correctly mapped
Product: z_Archived Reporter: Jan Sievers <jan.sievers>
Component: TychoAssignee: Jan Sievers <jan.sievers>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: contact, davymeers, igor, sbernard, t-oberlies
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jan Sievers CLA 2011-06-15 07:35:15 EDT
PublishProductMojo prepares .product files by copying them into target/products/<productId>/ along with <productId>.p2.inf renamed to p2.inf.

This breaks relative paths in the .product file such as paths to icons because they are interpreted as relative to the product file parent folder.
(see org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile#addIcon() )

As a fallback, the path is interpreted relative to the current working dir which we should not rely on.

This bug should go away once we have the eclipse-product packaging type which allows only one .product file which in turn would make coyping of the .product file unnecessary.

workarounds:

1. either use "../../../" as prefix of the icon file (product export will not work from PDE in this case though)

2. or use maven-resources-plugin to copy the icons where they are expected relative to the copied .product file, see e.g.

https://github.com/mudelta/tycho-demo/commit/cc42dc12a972dab122030b046440f47e0485e321
Comment 1 Jan Sievers CLA 2011-07-14 11:32:38 EDT
fixed with commit  9ec333d1
Comment 2 Tobias Oberlies CLA 2011-07-15 07:30:17 EDT
This should be mentioned in a migration guilde for 0.13 (e.g. here [1]), because people need to undo the workarounds which were necessary in 0.11-0.12.

[1] http://wiki.eclipse.org/Tycho/Release_Notes/0.13
Comment 3 Jan Sievers CLA 2011-07-15 07:37:58 EDT
(In reply to comment #2)
> This should be mentioned in a migration guilde for 0.13 (e.g. here [1]),
> because people need to undo the workarounds which were necessary in 0.11-0.12.

the fix doesn't break existing builds with workarounds.
Anyway I added a new and noteworthy item.