Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Problem exporting a package
Problem exporting a package [message #95470] Tue, 21 August 2007 08:55 Go to next message
Eclipse UserFriend
Originally posted by: fergonco.gmail.com

Hi all,

I have in my manifest file the following lines:

Export-Package: org.gdms.data
Bundle-ClassPath: .,
external:/root/workspace/platform/gdms/target/classes

the "external" line points to the output directory of another eclipse project and contains the directory "org/gdms/data" with the .class files. In the Export-Package header I'm trying to export the package of that "linked" project.

The problem is that Eclipse complains by saying: Package 'org.gdms.data' does not exist in this plug-in

If I substitute the external reference by a reference to a jar file it works:
Export-Package: org.gdms.data
Bundle-ClassPath: .,
gdms-1.0-SNAPSHOT.jar

Is it a known feature? a bug? the wrong way to do what I want?

Best regards,
Fernando
Re: Problem exporting a package [message #95565 is a reply to message #95470] Tue, 21 August 2007 14:37 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
I would advise against using external:-tag at all costs. But in this
case it really should not be used.

Instead you should just make the project which contains
/root/workspace/platform/gdms/target/classes a plugin project and have
it export the package org.gdms.data. Then have the rest of your bundles
import the package or require the bundle to get the org.gdms.data package.

HTH.

Tom.
Re: Problem exporting a package [message #95579 is a reply to message #95565] Tue, 21 August 2007 15:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fergonco.gmail.com

Thanks for your answers Tom,

The problem with the solution you propose is that I should export a lot of packages in this case. Also I'm trying to create a Maven plugin that does it automatically. That's why I'm still trying to solve the problem without modifying the linked project.

Is the solution you propose the only one to link one plug-in project with a normal java project?

I have tried another solution. I have created an eclipse linked folder called "gdmsclasses" in the root of the plug-in project that points to the output directory of the normal project. So my manifest is like this:

Export-Package: org.gdms.data
Bundle-ClassPath: .,
gdmsclasses

But it still complains saying that the package doesn't exist in the plug-in.

any hint?
Re: Problem exporting a package [message #95593 is a reply to message #95579] Tue, 21 August 2007 18:49 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
You may want to move this thread to the PDE newsgroup or mailing list
since that is where you are having issues. But even if you did not have
any issues with PDE I think the runtime will have issues self-hosting
such a project. This is because the framework is not workspace aware
and will not understand the linked folder you are using for the bundle
classpath. So at runtime I'm not sure the framework will be able
understand how to load the classes in a linked folder.

Tom.
Re: Problem exporting a package [message #95607 is a reply to message #95593] Tue, 21 August 2007 20:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fergonco.gmail.com

Ok, I will move this to the PDE newsgroup.

At runtime the problem is solved because the Maven plug-in I'm developing packages everything right, the referenced projects as a jar file and copies it into the directory of the bundle, changing the manifest file into a more conventional one. The problem is to have a dynamic development environment without having to build jars to run/debug your code...

Again, thanks for your help

Best regards,
Fernando
Re: Problem exporting a package [message #95888 is a reply to message #95579] Sun, 26 August 2007 23:42 Go to previous message
Eclipse UserFriend
Originally posted by: fergonco.gmail.com

It works!

The solution I mentioned about creating a linked folder to the output directory of the referenced project works if that dependency is exported in the last tab of the build path configuration dialog...

Fernando
Previous Topic:Bug in org.eclipse.equinox.cm
Next Topic:How can I find out why service registration failed?
Goto Forum:
  


Current Time: Fri Apr 26 14:41:09 GMT 2024

Powered by FUDForum. Page generated in 0.03756 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top