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

Bug 315962

Summary: Incorrect path to branding plugin
Product: z_Archived Reporter: Axel Guckelsberger <info>
Component: BuckminsterAssignee: buckminster.core-inbox <buckminster.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.kesselheim, thomas
Version: unspecifiedFlags: thomas: iplog+
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Exception stack trace none

Description Axel Guckelsberger CLA 2010-06-07 08:16:47 EDT
Build Identifier: 

Structure:
  * branding plugin in com.example.branding containing splash screen, icons, etc.
  * product feature in com.example.product.feature (including product definition file)
  * p2 site feature in com.example.site.feature

The build lets Hudson perform svn checkout into different sub directories, like scm/features, scm/plugins, scm/tests, etc. Buckminster does then use a local provider for resolving the cquery.

During building the p2 update site the following error occurs:

INFO: [start com.example.site.feature:eclipse.feature$1.0.0#site.p2]
java.io.FileNotFoundException: /var/lib/hudson/jobs/Build_P2_Repository/workspace/scm/features/com.example.product.feature/com.example.branding/icons/launcher/alt_launcher.icns (No such file or directory)
See how the path is taken as relative in the file system. The correct path would then be:
/var/lib/hudson/jobs/Build_P2_Repository/workspace/scm/plugins/com.example.branding/icons/launcher/alt_launcher.icns

In the product definition file the resources are referenced by
/com.example.branding/icons/foobar.ico
I tried to use platform:/resource/... notation also, but this does not work inside the IDE already.

Seems like Buckminster does not understand resources lying in another bundle. Weird is that only for the mac os icon an exception is raised though.



Reproducible: Always
Comment 1 Thomas Hallgren CLA 2010-06-08 05:35:48 EDT
A stacktrace would be very helpful here (should be printed if you use --displaystacktrace or use loglevel DEBUG). I suspect that the problem is in the p2 publisher since we've had a fair amount of problem related to Mac and branding.

See also bug 278909 and bug 291045.
Comment 2 Axel Guckelsberger CLA 2010-06-08 06:45:34 EDT
Created attachment 171382 [details]
Exception stack trace

Stack trace of exception
Comment 3 Axel Guckelsberger CLA 2010-06-08 06:48:08 EDT
Added the stack trace. Changing to debug level only did not reveal it, thus I used the --displaystacktrace argument on raw ssh console. Seems like you were right with the p2 publisher.
Comment 4 Axel Guckelsberger CLA 2010-06-09 04:11:14 EDT
Maybe bug 305143 is related as well.
Comment 5 Axel Guckelsberger CLA 2010-06-09 11:18:58 EDT
Any way to bypass this exception? A temporary workaround would be sufficient, just to avoid the builds failing preventing further work. Maybe it would be enough to remove the mac launcher icon completely from the product definition?
Comment 6 Thomas Hallgren CLA 2010-06-09 11:20:50 EDT
I have no Mac so I can't really help out with this one. If you have some time to spend and can provide a patch, I'll certainly consider it for inclusion.
Comment 7 Axel Guckelsberger CLA 2010-06-09 11:34:29 EDT
I also do not own a Mac... the error happens on a Linux machine while building the p2 update site.
Comment 8 Axel Guckelsberger CLA 2010-06-13 04:05:38 EDT
Tried to remove the macos launcher icon from the product definition. But then the same error occurs for the ini file.
It is possible to build a p2 site without considering macosx? This would be sufficient for me temporarily :-)
Comment 9 Axel Guckelsberger CLA 2010-06-21 14:01:54 EDT
Looked into the Buckminster code, but I think it is not reasonable to work around it there (as it seems impossible to distinguish that error from others).
The real solution is your patch in 278909 in my opinion - if you agree then you can close this one as a duplicate.
Comment 10 Axel Guckelsberger CLA 2010-06-21 16:01:18 EDT
Proposed patch for this one:

BrandingIron.java, we have these lines starting in line 178:

    iconName = icon.getName();
    Utils.copy(icon, new File(target + "/Resources/" + icon.getName())); //$NON-NLS-1$
    new File(initialRoot + "/Resources/Eclipse.icns").delete(); //$NON-NLS-1$


I think these must be enclosed by:

if (icon.exists()) {
...
}
Comment 11 Thomas Hallgren CLA 2010-06-25 02:13:59 EDT
The patch is checked in to helios-maintenance, rev 11489.