Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Joe Fernandez is currently offline Joe FernandezFriend
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 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31159
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
>
Re: How to get Product Export wizard to search Oomph bundle pool first [message #1725533 is a reply to message #1725506] Fri, 04 March 2016 08:45 Go to previous messageGo to next message
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
Hi Ed

Wow, really fast and helpful response Smile , 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

And in this last sub directory \plugins
are jar files for the named plugins.

So are we on the same wavelength - the jar files are in two different locations:

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.


Thanks for your patience!



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 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31159
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!
>
>
>
>
Re: How to get Product Export wizard to search Oomph bundle pool first [message #1725566 is a reply to message #1725539] Fri, 04 March 2016 13:03 Go to previous messageGo to next message
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
Hi Ed

<EM>
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.

</EM>

Not certain if this correctly answers your question but in Preferences the Target Platform entry of Target Definition that is Active has its Location as ${eclipse_home} and the Location Contents shows that it has the latest version of plug-ins that are in my dependencies.

I have re-confirmed that these latest versions appear in the Oomph bundle pool but NOT in the PDE bundle pool. And that the export fails to pick the latest versions.

I am not using a .target file.

I had a look at the links you provided and It seems - at first sight - a rather different problem where the build fails to include the required multiple versions. Here it does not store the version information and then seemingly resolves from the wrong location.

I have previously exported multiple products successfully so I need to re test exporting those again and understand what if any differences there are in the target platform definitions I use in them.

Thanks for taking the time to provide the detailed answers even though it appears that it could well be a product export issue and not an Oomph issue.

More on this to follow as I learn more...... Smile

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 Go to previous messageGo to next message
Joe Fernandez is currently offline Joe FernandezFriend
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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31159
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!
>
>
Previous Topic:Eclipse-Installer called by Console
Next Topic:Oomph setup with two installations
Goto Forum:
  


Current Time: Tue Jun 02 12:22:04 GMT 2020

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

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

Back to the top