Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349421 - relative paths in .product file not correctly mapped
Summary: relative paths in .product file not correctly mapped
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Jan Sievers CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-15 07:35 EDT by Jan Sievers CLA
Modified: 2021-04-28 16:55 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.