Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327441 - bundle.jar action does not include linked resource class files
Summary: bundle.jar action does not include linked resource class files
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Thomas Hallgren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 09:08 EDT by Alan Underwood CLA
Modified: 2019-02-25 14:40 EST (History)
2 users (show)

See Also:


Attachments
Patch to fix linked resources issue (2.39 KB, patch)
2010-10-12 08:55 EDT, Peter Woods CLA
thomas: iplog+
Details | Diff
Test case demonstrating failure (3.48 KB, application/x-zip-compressed)
2010-10-18 10:28 EDT, Peter Woods CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Underwood CLA 2010-10-11 09:08:02 EDT
I have a large number of plug-in projects that specify their build output via a linked resource, so the binary .class files do not go in to the project directory. However when I try to publish the feature with buckminster via the site.p2 action, or try to publish any plug-in via the bundle.jar action, buckminster fails to include the class files in its output.
Comment 1 Alan Underwood CLA 2010-10-11 09:09:12 EDT
I am using the latest version of buckminster and eclipse 3.6.1
Comment 2 Peter Woods CLA 2010-10-11 16:25:06 EDT
I have the same problem. I've put a forum post about it here:
http://www.eclipse.org/forums/index.php?t=msg&goto=632132
Comment 3 Peter Woods CLA 2010-10-12 08:55:31 EDT
Created attachment 180663 [details]
Patch to fix linked resources issue

This patch seems to fix our problem. Not really sure if it fixes the whole issue, however.

Patch fixes two different things:

 1. The URI locating source output folders is now processed by the
    workbench path variable manager API to resolve linked resource references.

 2. For absolute output paths, creates a product artifact with a full 'base' 
    path and no additional paths (previously it would create a null 'base' path 
    and one additional path with the absolute path, which didn't appear to 
    work).

We also discovered that for linked project resources, Buckminster appears to
treat absolute paths where the final directory element has the same name as the
original resource specially. This results creation of a product artifact with both a 'base' path and an additional path, which causes the final JAR to contain an extra (incorrect) top level directory. This issue has *not* been addressed by this patch.
Comment 4 Alan Underwood CLA 2010-10-12 10:24:15 EDT
Thanks very much for the patch, Pete. It works for me.

Now to see if somebody will take note and apply to source control.

Alan
Comment 5 Peter Woods CLA 2010-10-18 10:28:48 EDT
Created attachment 181101 [details]
Test case demonstrating failure

I'm working on a large scale RCP project at the minute for one of my customers. 
They want me to improve the build process from using lots of custom Ant and Ivy 
scripts to something more intelligible. I've decided that Buckminster is the 
right tool for this job, and have created an appropriate R-Map to map out the 
project's resources, some C-Queries, etc. These all seem to work pretty well.

The customer uses the ClearCase version control system, however. It's extremely
slow to build from because the "bin/" folder in your project lives on a network
drive with your other project resources. To work around this, they have set up
an Eclipse linked resource that maps "eclipse_build_loc" to, say "D:\Temp\build"
for build output. Then inside each plug-in you include the following in the
".project" file.

------------------
	<linkedResources>
		<link>
			<name>bin</name>
			<type>2</type>
			<locationURI>eclipse_build_loc/myprojectname</locationURI>
		</link>
	</linkedResources>
------------------

This maps the output "bin/" directory to live on your local disk instead of on
the network.

Unfortunately when you do a Buckminster build of these plug-ins they don't
include the compiled classes. I thought I was so close after mapping out all the
dozens of search locations out!  

Any suggestions on how to work around this? I've tried debugging the Buckminster
process, but the codebase is too large for me to quickly find out what's going
wrong. I'm not above patching my version of Buckminster, if necessary, until you
guys can come up with a fix for this.
Comment 6 Thomas Hallgren CLA 2010-10-18 11:35:42 EDT
Patch applied to helios-maintenance branch, rev 11619.

Thanks.