Problems with Product Export within Eclipse: wrong content in created jars [message #461770] |
Tue, 16 January 2007 10:47  |
Eclipse User |
|
|
|
Hi everybody,
I have serious problems with the product export offered by Eclipse and I hope anyone can help me.
I searched serveral forums but I couldn't find any solutions that work, yet.
The project consists of serveral plugins. Some of them using native libraries.
I'm working on the Eclipse Plattform 3.2.1 using Java 5 and I'm
exporting the product to a directory via the Eclipse Product export wizard offered on the overview
page of the product description and configuration dialog (i. e. editor).
The export process terminates without any errors, but starting the product
via the generated exe-file fails. The log reports that the activator of the bundle to execute is invalid and
cannot be found respectively. A ClassNotFoundException is thrown.
Inspecting the plugins subdirectory created during the export process shows
that indeed for every plugin the product consists of, an appropriate jar archive is created
but with wrong content:
Instead of containing all the classes and packages that make up the related plugins
all the jar archives consist of classes and packages of one single plugin (Lets call it plugin A).
Only the manifest.mf files, the plugin.xml files and the referenced libraries are exported correctly to the corresponding archives.
That's why the required activator cannot be found: It isn't exported to the jar file so far.
First I thought that problem could be traced back to dependencies between the different plugins and plugin A, because
almost all plugins depends on plugin A. But the problem even occurs if there is no dependency declared.
Exporting each plugin separately via Export... -> Plug-in Development -> Deployable plug-ins and fragments
with checked "Package plug-ins as individual JAR archives" option leads to the expected result.
But if more than one plugin are exported this way at the same time
(i. e. several plugins are checked within the Export deployable plug-ins and fragments wizard page)
the problem occurs again, even when plugin A is not exported.
Due to posted problem solutions a lot of errors concerning the product export could be traced back to a missing "."
entry within the classpath declaration. I checked all my MANIFEST.MF entries.
If any native library is referenced in the classpath declaration, the "." entry is also there.
The same I checked for the build properties.
Have anyone suggestions what the reason for this problem could be?
Thanks
Markus
|
|
|
|
|
Re: Problems with Product Export within Eclipse: wrong content in created j [message #461935 is a reply to message #461933] |
Thu, 18 January 2007 07:41   |
Eclipse User |
|
|
|
Don't know -- it might also depend on whether there were .project files created from before that you (or someone else) had checked in. I doubt that the tortoisesvn/subclipse would have made the difference, but there might have been some (e.g. does tortoisesvn check out .project files?)
Other than that, can't think of a major difference why. Once you get used to what a source should look like, it becomes easier to set them up in the future. To be honest, half the time it's easier to create a new project, and then just specify the location of an existing codebase; Eclispe will then write in the new values. You might have to specify source folders, but in my experience setting up a new plugin is easier than trying to massage an old project into a plugin; and in any case, with SVN, the move of source code is free, right? So create a new plugin (e.g. with a new name), then svn move your source into the right place afterwards.
Alex.
|
|
|
|
|
Re: Problems with Product Export within Eclipse: wrong content in created j [message #461956 is a reply to message #461953] |
Thu, 18 January 2007 11:53  |
Eclipse User |
|
|
|
It shouldn't matter whether the projects are inside or outside the workspace. You're not storing the workspace in SVN, though, are you? :-)
Anyway, sometimes these things happen. I've seen big problems with files like .classpath when there's a merge conflict and you have weird characters in the files that can't be loaded by an XML parser.
As long as you've got it working now, I wouldn't worry too much about it :-)
Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.04230 seconds