Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 161434 - unable to export plugins which references jars from outside the workspace
Summary: unable to export plugins which references jars from outside the workspace
Status: RESOLVED DUPLICATE of bug 66177
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-18 12:24 EDT by Fabrizio Giustina CLA
Modified: 2006-12-14 12:46 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabrizio Giustina CLA 2006-10-18 12:24:08 EDT
When a plugin needs to reference some external jars you can setup linked resources so eclipse see those jars inside the plugin project.
For example, when using maven we create a link like 
M2_REPO/javax/mail/mail/1.4/mail-1.4.jar -> plugin/mail-1.4.jar

every works fine in Eclipse using this configuration (building, running inside eclipse as an application or a product), but when you try exporting your plugin PDE is not able to compile it.

Adding the required jar to "jars.extra.classpath" in build.properties doesn't help since PDE don't see linked resources.

We found out that adding the full path for the resource to build.properties ( jars.extra.classpath = x:/repo/javax/mail/mail/1.4/mail-1.4.jar ) makes PDE happy and the project compile successfully during an export.

However, this makes the project stop working in eclipse, since eclipse considers absolute paths in build.properties broken (you can't add external jars to build properties from the UI, and they are marked are errors when you try to build).
If PDE can't work with linked resources, why not allowing absolute paths in the "jars.extra.classpath" entry (since it actually appears to work... not sure if this is expected or not)?

This is similar to BUG 66177 but it's specifically related to linked dependencies and could be easy to fix (the full-path workaround appears to be already working for export but not for internal build).
Comment 1 Andrew Niefer CLA 2006-10-18 13:01:37 EDT
What build are you using?  Please try a 3.3 integration build, I20061003-0800 or later.  This sounds similar to bug 158589 which was fixed.
Comment 2 Pascal Rapicault CLA 2006-12-14 12:46:52 EST
To work around the issue you could try to bundle up the libraries and then refer to them on the jars.extra.classpath using platform:/plugin/bundleSymblicName. 
Those libraries would still have to be loaded in the IDE and in the target.


*** This bug has been marked as a duplicate of bug 66177 ***