Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse plugin caching(How to handle with share plugins among Eclipse instalations)
icon5.gif  Eclipse plugin caching [message #822496] Fri, 16 March 2012 18:15 Go to next message
Raphael Moita is currently offline Raphael Moita
Messages: 24
Registered: September 2011
Junior Member
Hi Guys,

I'm facing a problem where I have some Eclipse instalations using plugins thru a shared dropins folder and when I modify any plugin its changes are not being reflected or even causing errors (e.g: ClassNotFound when a change a Activator name) on the Eclipse startup. In order to get the changes reflected I have to run Eclipse using -clean parameter.

Do you guys know any other way to get rid of these issue without using -clean parameter to start Eclise.

Any suggestion/insight will be really apreciated

Regards
--
Raphael Moita

Re: Eclipse plugin caching [message #822551 is a reply to message #822496] Fri, 16 March 2012 19:01 Go to previous messageGo to next message
Eclipse User
Eclipse now expects people to be using the install manager (update site)
to provide updates. The typical plugin structure has gotten to be so
large that a re-scan of the plugins on every start up would slow your
start up a lot.

Using -clean is a problem because it can destroy to install history and
prevent proper uninstall.

If you are doing a lot of testing of a plugin so that you are changing
it a lot then you should use the dropins folder instead. This plugin
hierarchy from this folder is scanned on every start up.

However you shouldn't use this for large regular permanent distributions
because it will slow your startup time significantly as you put more in
there.

--
Thanks,
Rich Kulp
Re: Eclipse plugin caching [message #824236 is a reply to message #822551] Mon, 19 March 2012 12:29 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 242
Registered: July 2009
Senior Member
I think Raphael is using dropins. And the bundle management system is called p2.

If the bundles still have the same bundle symbolic name (e.g., org.eclipse.swt) and version name,, then p2 assumes everything else is the same.

If you want to tweak values or change class names then you need to bump your version number.

And realize that dropins is officially deprecated and support may disappear at any time. You should be using p2's installation and update APIs instead.
Re: Eclipse plugin caching [message #824254 is a reply to message #824236] Mon, 19 March 2012 12:49 Go to previous messageGo to next message
Raphael Moita is currently offline Raphael Moita
Messages: 24
Registered: September 2011
Junior Member
Yes guys, I'm using dropins folder. Brian you solve it man, versioning jars avoid Eclipse to keep using the old classes on cache and I was not changing it at package time. But at same time you gave me other thing to wory about, deprecation of droping folder :/ I'll research about that.

Thank you guys for the help

Regards
--
Raphael Moita
Re: Eclipse plugin caching [message #824333 is a reply to message #824254] Mon, 19 March 2012 14:47 Go to previous messageGo to next message
Raphael Moita is currently offline Raphael Moita
Messages: 24
Registered: September 2011
Junior Member
Guys, I tried to simply change the MANIFEST.MF version (Bundle-Version: 1.0.2) and jar name (form com.abc.test.jar to com.abc.test_1.0.2.jar) and a weird behavior is taking place. The scenario is the following:

Into eclipse/dropins folder I have a link file "plugins.link" that contains a path poiting to the place where plugins are. This place must have a folder inside called plugins where all the jar files I want to load at eclipse startup should be.
=====
path=C:\\temp\\eclipse_3.7
=====

Inside c:\temp\eclipse_3.7\plugins I had com.abc.test.jar plugin running fine, then I replace it for the new version com.abc.test_1.0.2.jar but it was not recognized by Eclipse. In order to get things working I had to move com.abc.test_1.0.2.jar from c:\temp\eclipse_3.7\plugins to Eclipse's droping folder, start Eclipse and then the plugin shows up. After that I can move it back to c:\temp\eclipse_3.7\plugins and everything still working.

Does it make any sense to you guys?

Could be it a Eclipse bug or is it just a case where I'm forgetting to set something?

Thanks
--
Raphael Moita

[Updated on: Mon, 19 March 2012 14:59]

Report message to a moderator

Re: Eclipse plugin caching [message #825036 is a reply to message #824333] Tue, 20 March 2012 11:33 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 242
Registered: July 2009
Senior Member
Did you bump the version number in the jar's MANIFEST.MF? The version number on the actual jar name is merely a convention, and ignored by Eclipse/OSGi.
Re: Eclipse plugin caching [message #825965 is a reply to message #825036] Wed, 21 March 2012 13:32 Go to previous messageGo to next message
Raphael Moita is currently offline Raphael Moita
Messages: 24
Registered: September 2011
Junior Member
Yes Brian, I did: (MANIFEST.MF (Bundle-Version: 1.0.2))

I'm almost convinced that it doesn't work as it should (aka BUG)

I solved my problem using, instead of a .link file inside dropins folder, the vm argument "-Dorg.eclipse.equinox.p2.reconciler.dropins.directory" pointing to my external dropins folder. It'll get lost if you for some reason you decide to change the external dropins folder path forcing you to run eclipse with "-clean" to fix that, but besides that everything seems to work fine.

Backing to .link file. Have you guys ever got this .link technic to load plugins working ?

Thanks
--
Raphael Moita
Re: Eclipse plugin caching [message #826672 is a reply to message #825965] Thu, 22 March 2012 11:15 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

As mentioned dropins is not generally the way to go. It is a best effort, try multiple solutions, all bundles optional, silently failing install method. That means 2 things: 1) if your plugin doesn't install, you've got no idea why as you found out Smile and 2) adding a new set of plugins can actually cause currently working plugins to be uninstalled (although this is not likely to happen if you have 1-10 plugins, but I've heard of installs with >1000 plugins in dropins == bad)

Most of our plugins have version like: 3.8.0.v20120228-1800 <- the qualifier is tied to the last source code change, and exists in both the file name (less important) and the Bundle-Version (most important). During development, that makes it easy to figure out which bundles is the latest. At eclipse we have a complete policy around versioning that you probably don't need Smile but here it is http://wiki.eclipse.org/Version_Numbering

You can use p2 and Help>Install New Software to pick up new features, or the p2 director to install features or plugins into an RCP app that doesn't include the p2 UI or self-updating capabilities.

PW


Re: Eclipse plugin caching [message #827015 is a reply to message #826672] Thu, 22 March 2012 19:48 Go to previous messageGo to next message
Raphael Moita is currently offline Raphael Moita
Messages: 24
Registered: September 2011
Junior Member
Hello Paul,

I don't see that dropins such a bad option to centralize/manage plugin amond several Eclipse instalations, at least If I use this version plugin control (file name and Bundle-version) as you said, for now, Eclipse is behaving very well when I update my plugins just putting them in the external dropins folder (Eclispe needs to be restarted after that). Of course would be much better to use p2 to manage all the plugins but as a requiste I have to do that in a centralized way, without any Eclipse user interaction. I believe it's possible with some plugin p2 repository or something but like this topic would become much more complex than my first ideia of understand why the Eclispe cache was meesing my tests up. Smile

But fell free to expose your opinions about p2 repositories and its complexibility to implement.

I'm appreciating all your helpful replies

Thanks
--
Raphael Moita
Re: Eclipse plugin caching [message #827476 is a reply to message #827015] Fri, 23 March 2012 11:36 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You have to build your plugins and features now, and both PDE build and exporting deployable plugins and/or features produce p2 repositories. So you're already generating p2 repos (or can be with a little change). If you use Bundle-Version: 1.0.2.qualifier in your MANIFEST.MF eclipse's PDE builds can be told to replace that with an actual string during the build.

Using the director is straight-forward, and great for a headless environment. I use the IDE so it comes with p2, but an IDE install can also be used for managing an RCP app as well. I regularly unzip an eclipse-SDK and:


eclipse/eclipse \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository \
http://download.eclipse.org/tools/orbit/downloads/drops/R20110523182458/repository,\
file://$HOME/eclipseUpdate \
-installIUs \
org.apache.commons.jxpath/1.3.0.v200911051830,\
org.eclipse.e4.oome.feature.group


To install a plugin, the IU maps to the pluginId. To install a feature, the IU == featureId.feature.group.

The doc explains different p2 director use modes: http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html

Later,
PW


Re: Eclipse plugin caching [message #829494 is a reply to message #827476] Mon, 26 March 2012 11:14 Go to previous message
Raphael Moita is currently offline Raphael Moita
Messages: 24
Registered: September 2011
Junior Member
Paul, I'll take a deep look on this link and I'll be back with the results (good or bad) soon Smile

Thanks a milion
--
Raphael Moita
Previous Topic:ErrorDialog doesnot show special characters
Next Topic:error with adb
Goto Forum:
  


Current Time: Sat Sep 20 06:07:11 GMT 2014

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

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