Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Usage of dropins in RCP fails after renaming installation location
Usage of dropins in RCP fails after renaming installation location [message #879569] Thu, 31 May 2012 13:00 Go to next message
Alexander May is currently offline Alexander May
Messages: 19
Registered: March 2011
Junior Member
Hi,

after quite a long try-and-error session I finally manged to get dropins working in my RCP product. Basically I do the same as mentioned in forum topic 174347.

Unfortunately dropins do wok only when I run my product from exactly the same location as I exported it to. If I move the installation folder to some other location or even zip and unzip it the dropins support breaks.

I realized when renaming the installation directory just before the first start of the exported product a directory with the old name is created and contains an artifacts.xml and a config.ini file (which both are substantially smaller then the originals).

Why does the application still acces the old directory? It seems as if there where some absolute paths configured. Where can I find/modify them and what parameters do influence creation of artifacts.xml and config.ini?

Regards,
Alexander
Re: Usage of dropins in RCP fails after renaming installation location [message #879741 is a reply to message #879569] Thu, 31 May 2012 18:59 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2500
Registered: July 2009
Senior Member
On 2012-31-05 15:00, Alexander May wrote:
> Hi,
>
> after quite a long try-and-error session I finally manged to get dropins
> working in my RCP product. Basically I do the same as mentioned in forum
> topic 174347.
>
> Unfortunately dropins do wok only when I run my product from exactly the
> same location as I exported it to. If I move the installation folder to
> some other location or even zip and unzip it the dropins support breaks.
>
> I realized when renaming the installation directory just before the
> first start of the exported product a directory with the old name is
> created and contains an artifacts.xml and a config.ini file (which both
> are substantially smaller then the originals).
>
> Why does the application still acces the old directory? It seems as if
> there where some absolute paths configured. Where can I find/modify them
> and what parameters do influence creation of artifacts.xml and config.ini?
>
> Regards,
> Alexander

Are you aware of that support for drop-ins are bound to go away some
day... it is not the preferred way of installing things into Eclipse/RCP
and only there for historical reasons.

You may be better off using higher level p2 operations.

Just saying...
- henrik
Re: Usage of dropins in RCP fails after renaming installation location [message #879770 is a reply to message #879741] Thu, 31 May 2012 20:11 Go to previous messageGo to next message
Alexander May is currently offline Alexander May
Messages: 19
Registered: March 2011
Junior Member
Actaully I'm not aware of that issue, although I 'ce found some minor hints in other posts.

What is the preferred way installing a single plug-ins? I have several user groups that need single functionalities which is already bundled in single plug-ins and I want to avoid needing to add a feature for each. Is there a better way? It should be as easy as sending the bundle vie mail and just droping it somewhere... (just like dropins is)

Alexander
Re: Usage of dropins in RCP fails after renaming installation location [message #879811 is a reply to message #879770] Thu, 31 May 2012 22:09 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2500
Registered: July 2009
Senior Member
On 2012-31-05 22:11, Alexander May wrote:
> Actaully I'm not aware of that issue, although I 'ce found some minor
> hints in other posts.
>
There are a number of problems with dropins - poor error messages, hard
to update, they lack certain meta-data information etc. etc.

> What is the preferred way installing a single plug-ins? I have several
> user groups that need single functionalities which is already bundled in
> single plug-ins and I want to avoid needing to add a feature for each.
> Is there a better way? It should be as easy as sending the bundle vie
> mail and just droping it somewhere... (just like dropins is)
>
> Alexander

You can use the p2 director to install things. Your bundles should be
available in a p2 repository either available locally in the file
system, or on an update site (reachable with a http/https/ftp URL).
Things does not have to be features to be installable by p2, that is
just what is shown to the user in the Eclipse UI (users would go crazy
if every bundle was shown all the time).

You need to think about how you keep your users updated as the bundles
you are currently "dropping in" changes / needs to change. When dropping
them in, or installing them as separate roots, it becomes difficult to
support a single update.

Look at how you can publish a p2 site including the bundles, and how you
can use optional and non greedy (i.e. so they are not automatically
installed if present in the repo installing other things from).

There are a lot of powerful things you can do/describe in a p2
repository - the difficulty is often figuring out what you really want
and how to express it.

Hope that helps you searching for more information on topics that can
lead you to a better solution. I am sure someone else must have done
something similar... (not me though, so I can't point you to an example).

- henrik
Re: Usage of dropins in RCP fails after renaming installation location [message #880131 is a reply to message #879811] Fri, 01 June 2012 13:44 Go to previous messageGo to next message
Alexander May is currently offline Alexander May
Messages: 19
Registered: March 2011
Junior Member
Thank you henrik, you convinced me not to rely on dropins.

I managed to make buckminster build p2 repos for my single plugins which I can install using the director.

But my very first problem ist still the same with this approach. The bundle gets installed properly when I use my product exactly where it was build. If I rename the directory or even zip/unzip it afterwards p2 director won't work anymore (meaning the plug-in is not available in the running product)

Any hints on that?

I use the following command from the Eclipse help to install the bundle
eclipsec.exe -application org.eclipse.e quinox.p2.director -repository file:/<path to the repo file>; -installIU <bundle id>

This works as long as I do not intent to deliver the product to another machine Wink

Alexander
Re: Usage of dropins in RCP fails after renaming installation location [message #880149 is a reply to message #880131] Fri, 01 June 2012 14:23 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2500
Registered: July 2009
Senior Member
On 2012-01-06 15:44, Alexander May wrote:
> Thank you henrik, you convinced me not to rely on dropins.
>
> I managed to make buckminster build p2 repos for my single plugins which
> I can install using the director.
>
> But my very first problem ist still the same with this approach. The
> bundle gets installed properly when I use my product exactly where it
> was build. If I rename the directory or even zip/unzip it afterwards p2
> director won't work anymore (meaning the plug-in is not available in the
> running product)
>
> Any hints on that?
>
> I use the following command from the Eclipse help to install the bundle
>
> eclipsec.exe -application org.eclipse.e quinox.p2.director -repository
> file:/<path to the repo file>; -installIU <bundle id>
>
> This works as long as I do not intent to deliver the product to another
> machine ;)
>

There is a parameter that must be set when installing that makes the
result relocatable - sounds like that is what is biting you.
You need to set that when installing the product in the file system for
the purpose of zipping it up.

Best example of multi target RCP app build is cloudsmith / geppetto @
github - don't know if that helps you.

Regards
- henrik
Re: Usage of dropins in RCP fails after renaming installation location [message #880325 is a reply to message #880149] Fri, 01 June 2012 21:22 Go to previous message
Alexander May is currently offline Alexander May
Messages: 19
Registered: March 2011
Junior Member
Thank you Hendrik,

with the link to geppetto and the hint to search for a missing parameter i figured the issue out.

I needed to add the roaming parameter to the director installation for my product. Btw I was able to significanly clean up my build scripts by using p2.director target as you do in geppetto and make the missing parameter much more obvious.

Allthough I don't need it anymore I just retested the dropins behavior with the new roaming enabled product and it works as expected Wink

Thank you very much,
Alexander
Previous Topic:Is building own distribution by p2 is correct way?
Next Topic:"site.xml" in update site URL
Goto Forum:
  


Current Time: Tue Oct 21 20:08:42 GMT 2014

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

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