Home » Eclipse Projects » Oomph » How to get Product Export wizard to search Oomph bundle pool first(Issue about how Product Export wizard resolves plug ins to be exported )
How to get Product Export wizard to search Oomph bundle pool first [message #1725506] |
Fri, 04 March 2016 01:06 |
Joe Fernandez Messages: 27 Registered: November 2014 |
Junior Member |
|
|
I have very limited understanding of Oomph so apologies in advance because this may not be an Oomph issue at all but it seems to have started happening with Oomph.
In my Mars installation, plugins seem to have ended up in two locations:
1........ /.metadata/plugins under my workspace directory
2. <home directory>/.p2/pool/plugins
I believe Oomph is using the second as the bundle pool when it does updates - correct?
When I develop a new plug in and add dependencies, I am presented with plug-in versions from both locations, 1 & 2, and generally (but not always) pick the latest version, which comes from 2.
When I use the product export wizard, it seems to resolve the dependencies by looking for each plug-in in location 1 first, finding a match and hence using an older version in the export. Then, of course, the product will not run because of the version mismatch on the dependent plugins - the ones exported to the product export directory are the older versions, the ones with which the product was built are the later versions.
If I run the product from a launch configuration, it runs because the launch configuration has the explicit versions. I could solve the problem by manually entering the full version (including qualifier) for each plug-in in the product configuration but this gets painful with many plug-in dependencies.
IF my analysis above is correct, is there a way to get the Product Export wizard to change the order of its search for dependencies to start with the Oomph bundle pool first?
Many thanks
|
|
|
Re: How to get Product Export wizard to search Oomph bundle pool first [message #1725518 is a reply to message #1725506] |
Fri, 04 March 2016 07:02 |
Ed Merks Messages: 33236 Registered: July 2009 |
Senior Member |
|
|
Joe,
Comments below.
On 04.03.2016 02:06, Joe Fernandez wrote:
> I have very limited understanding of Oomph so apologies in advance
> because this may not be an Oomph issue at all but it seems to have
> started happening with Oomph.
>
> In my Mars installation, plugins seem to have ended up in two locations:
>
> 1........ /.metadata/plugins under my workspace directory
These are not plugins, this is workspace-specific metadata stored by
plugins in folders named according to the plugin.
>
> 2. <home directory>/.p2/pool/plugins
Yes, the bundle pool.
>
> I believe Oomph is using the second as the bundle pool when it does
> updates - correct?
Yes.
>
> When I develop a new plug in and add dependencies, I am presented with
> plug-in versions from both locations, 1 & 2, and generally (but not
> always) pick the latest version, which comes from 2.
What you're presented with depends on what's in your workspace and
what's in your target platform. I don't know how you've populated your
target platform. It defaults to the running installation, and if that's
using the bundle pool, they'll be physically located in the bundle
pool. If you've used a *.target file, the bundle will be deeply nested
in the PDE's metadata in the workspace.
>
> When I use the product export wizard, it seems to resolve the
> dependencies by looking for each plug-in in location 1 first, finding
> a match and hence using an older version in the export. Then, of
> course, the product will not run because of the version mismatch on
> the dependent plugins - the ones exported to the product export
> directory are the older versions, the ones with which the product was
> built are the later versions.
> If I run the product from a launch configuration, it runs because the
> launch configuration has the explicit versions. I could solve the
> problem by manually entering the full version (including qualifier)
> for each plug-in in the product configuration but this gets painful
> with many plug-in dependencies.
Actually I have no idea how you've populated your target platform, nor
how PDE exports a product. It should be respecting exactly what's in
your target platform and unless you have duplicates between your
workspace and the target platform, there should be no room for
confusion, and even if there are such duplicates, the workspace version
should have precedence.
>
> IF my analysis above is correct, is there a way to get the Product
> Export wizard to change the order of its search for dependencies to
> start with the Oomph bundle pool first?
I'm not sure if your analysis is correct. How is your target platform
populated?
Perhaps the issue is related to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=471652#c28
> Many thanks
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Re: How to get Product Export wizard to search Oomph bundle pool first [message #1725539 is a reply to message #1725533] |
Fri, 04 March 2016 09:10 |
Ed Merks Messages: 33236 Registered: July 2009 |
Senior Member |
|
|
Joe,
Comments below.
On 04.03.2016 09:45, Joe Fernandez wrote:
> Hi Ed
>
> Wow, really fast and helpful response :) , thanks!
>
> I'll reply to your questions on target platform soon but to keep this
> readable, initially I'd like to understand just your first point where
> you distinguish metadata from plug-ins:
>
> <JF> 1........ /.metadata/plugins under my workspace directory
> </JF>
>
> <EM> These are not plugins, this is workspace-specific metadata stored
> by plugins in folders named according to the plugin.
> </EM>
>
> I should have been more specific on this point.
>
> In the Package Explorer view, the Plug-In dependencies lists all the
> plug-ins as the jars with full versions and against each is either an
> entry as above or an entry to <home directory>/.p2/pool/plugins,
> which we agree is the Oomph bundle pool where new updates go.
> Now, to be more specific, the first case entry is actually:
> <workspace directory>
> \.metadata\.plugins\org.eclipse.pde.core\.bundle_pool\plugins
>
Yes, PDE under the covers also uses a bundle pool; I believe if you've
used a *.target file then PDE copies bundles into this location.
> And in this last sub directory \plugins
> are jar files for the named plugins.
Yes, PDE's bundle pool for a resolved target platform.
>
> So are we on the same wavelength - the jar files are in two different
> locations:
Yes, they're to different pools.
>
> one of which has a directory \.metadata in the path BUT also has a
> directory \.bundle_pool\plugins in the path
> the other has a directory \pool\ in the path and is the one we agreed
> is the bundle pool.
>
> I am puzzled on two counts: You are telling me the first one is only
> meta data - certainly it has .metadata in the path name but it holds
> jars. And it has bundle_pool in its path name.
The things directly under .metadata/plugins are the names of bundles but
those are not plugins. The PDE plugin (org.eclipse.pde.core) stores
metadata (a bundle pool for a resolved target platform) in this folder.
So nested further under that are the bundles of the target platform.
The export wizard should only be looking at your workspace IUs (bundles
and features) and the IUS in the target platform. I've seen recent
emails on pde-dev that suggest there may be a problem related to to the
one you're describing:
https://dev.eclipse.org/mhonarc/lists/pde-dev/
https://dev.eclipse.org/mhonarc/lists/pde-dev/msg02460.html
>
>
> Thanks for your patience!
>
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Re: How to get Product Export wizard to search Oomph bundle pool first [message #1725834 is a reply to message #1725566] |
Tue, 08 March 2016 03:35 |
Joe Fernandez Messages: 27 Registered: November 2014 |
Junior Member |
|
|
Here is a bit more information on my target platform settings:
My Target Definition, created within Eclipse Preferences has a Target Platform with Locations defined as:
${eclipse_home}
whose Content shows all the latest versions of the plugins
plus a couple of Update sites one of which is historical (Eclipse 4.4).
I have a question and some possibly dubious conclusions for which I would be glad for an answer and comments.
1. This is a Mars 2 release 4.5.2 installation, originally installed with Oomph. Has the Update Manager been replaced by Oomph so that whenever I have done a Check for Updates and applied them or Installed New Software, it has been carried out by Oomph and the new versions of plug ins were installed by Oomph in ITS bundle pool?
2. It appears to me, regardless of the answer to Q1, the settings in my Target Definition have kept it up to date with the download of the latest versions. And so has the Run Configuration. Both of these explicitly show the latest versions, with the Run Configuration also showing older versions but marking them as not selected.
This seems to be consistent with your statement:
<EM>
...... your
target platform. It defaults to the running installation, and if that's
using the bundle pool, they'll be physically located in the bundle
pool.
</EM>
assuming by "bundle pool" you mean that created by Oomph.
3. In which case the only bizarre conclusion I can come up with is that the Export Wizard is not working off the Target Definition nor is it working off the Run Configuration but rather only using the second bundle pool maintained under \.metadata.
The path to this is :
<workspace> \.metadata\plugins\org.eclipse.pde.core\.bundle_pool\plugins\
This is a separate bundle_pool that Oomph does NOT update, right?
You did say:
<EM>
If you've used a *.target file, the bundle will be deeply nested
in the PDE's metadata in the workspace.
</EM>
Not sure if the above qualifies as "deeply nested" but is this consistent with what you are suggesting?
Thanks again!
|
|
|
Re: How to get Product Export wizard to search Oomph bundle pool first [message #1725911 is a reply to message #1725834] |
Tue, 08 March 2016 13:36 |
Ed Merks Messages: 33236 Registered: July 2009 |
Senior Member |
|
|
Joe,
Comments below.
On 08.03.2016 04:35, Joe Fernandez wrote:
> Here is a bit more information on my target platform settings:
> My Target Definition, created within Eclipse Preferences has a Target
> Platform with Locations defined as:
>
> ${eclipse_home}
> whose Content shows all the latest versions of the plugins
>
> plus a couple of Update sites one of which is historical (Eclipse 4.4).
>
> I have a question and some possibly dubious conclusions for which I
> would be glad for an answer and comments.
>
> 1. This is a Mars 2 release 4.5.2 installation, originally installed
> with Oomph. Has the Update Manager been replaced by Oomph so that
> whenever I have done a Check for Updates and applied them or Installed
> New Software, it has been carried out by Oomph and the new versions of
> plug ins were installed by Oomph in ITS bundle pool?
It's always don't by p2, but there is an agent involved, and when an
installation is created by the Oomph installer using a bundle pool, that
installation has a so called shared agent. So I do believe the updates
end up in the pool.
> 2. It appears to me, regardless of the answer to Q1, the settings in
> my Target Definition have kept it up to date with the download of the
> latest versions. And so has the Run Configuration. Both of these
> explicitly show the latest versions, with the Run Configuration also
> showing older versions but marking them as not selected.
> This seems to be consistent with your statement:
>
> <EM>
> ..... your target platform. It defaults to the running installation,
> and if that's using the bundle pool, they'll be physically located in
> the bundle pool.
>
> </EM>
>
> assuming by "bundle pool" you mean that created by Oomph.
>
>
> 3. In which case the only bizarre conclusion I can come up with is
> that the Export Wizard is not working off the Target Definition nor is
> it working off the Run Configuration but rather only using the second
> bundle pool maintained under \.metadata.
I can't comment at all on what the Export Wizard does. That's a PDE
implementation detail.
> The path to this is :
>
> <workspace> \.metadata\plugins\org.eclipse.pde.core\.bundle_pool\plugins\
> This is a separate bundle_pool that Oomph does NOT update, right?
Yes, Oomph does not touch this.
>
> You did say:
> <EM>
> If you've used a *.target file, the bundle will be deeply nested in
> the PDE's metadata in the workspace.
> </EM>
>
>
> Not sure if the above qualifies as "deeply nested" but is this
> consistent with what you are suggesting?
Yes, my comment was just to say that
..metadata\plugins\org.eclipse.pde.core is not a plugin; it's a place
where PDE Core stores arbitrary data. In this case one of the things it
stores is some sort of a bundle pool, but all management of that and the
data under there is implemented by PDE.
>
> Thanks again!
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Sat Oct 19 14:56:19 GMT 2024
Powered by FUDForum. Page generated in 0.25139 seconds
|