Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Plugin not loading from dropins directory
Plugin not loading from dropins directory [message #662513] Wed, 30 March 2011 21:25 Go to next message
Kevin Allen is currently offline Kevin AllenFriend
Messages: 3
Registered: March 2011
Junior Member
Hi all,

I've written my first plugin, a custom classpath container, to help simplify the sharing of our project, which we're distributing to our developers to place in their /dropins directory. It seems to work in good order - mostly.

For one specific developer (my boss, ironically enough) the container doesn't show up. It's not available as an entry on the library list, it doesn't show up in the Installation Details/Configuration listing, no errors in the log, nothing... We've tried it with 3.5 (our standard) and 3.6 (which he upgraded to). So far, nobody else has had a problem.

He CAN see another classpath container we put in the /dropins, so I assume it's something with my plugin that's interacting with something in his system. But I'm at a loss - I get no problems from anyone else's installation, and absolutely no feedback from his system. It's like it just doesn't recognize that it's there.

Thanks in advance.
Re: Plugin not loading from dropins directory [message #662635 is a reply to message #662513] Thu, 31 March 2011 11:18 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 03/30/2011 05:25 PM, Kevin Allen wrote:
> He CAN see another classpath container we put in the /dropins, so I
> assume it's something with my plugin that's interacting with something
> in his system. But I'm at a loss - I get no problems from anyone else's
> installation, and absolutely no feedback from his system. It's like it
> just doesn't recognize that it's there.

Yes, dropins is an all optional install, silently failing, best effort
folder. It works OK for a small # of additions that don't interfere
with each other. But if they do (as appears to be the case here) there's
no explanation (I believe they were looking at allowing some logging,
but I don't know if that made it into 3.7 yet).

If you want to diagnose the problem, create a p2 repo with the plugin
that doesn't install and try and install it using the director (try on a
copy of a normal dev install, so you can prove it works) on your bosses
install. If it fails, it will spit out mucho information :-)

Creating the p2 repo: File>Export...>Deployable plug-ins and generate
the p2 metadata. Or add the p2 flags to your PDE build if that's what
you are using. Or use the publisher to generate data from some
plugins/features [1].

Then use the director [2] to install the plugin/feature you want. For a
plugin, for example:


bash$ eclipse/eclipse \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository \
file:///path/to/p2/repo \
-installIU \
org.example.my.plugin.id


[1]
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/p2_publisher.html

[2]
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/p2_director.html

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Plugin not loading from dropins directory [message #662743 is a reply to message #662635] Thu, 31 March 2011 18:12 Go to previous messageGo to next message
Kevin Allen is currently offline Kevin AllenFriend
Messages: 3
Registered: March 2011
Junior Member
Thanks for the quick reply.

It looks like the P2 metadata has to be based on an Eclipse Product, as opposed to simply a plugin, which is creating a whole lot of extra overhead. I'll admit to some frustrating trying to slog my way through this - I'm obviously missing some parts, because various wizards and settings aren't recognizing what I think it should be recognizing.

Is the product definition the way I have to go with this, or is there some handy shortcut to get the plugin exported with the proper P2 data?
Re: Plugin not loading from dropins directory [message #662767 is a reply to message #662743] Thu, 31 March 2011 20:17 Go to previous messageGo to next message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 63
Registered: July 2009
Member
In article <in2fop$3uv$1@news.eclipse.org>, keallen@satx.rr.com says...
>
> Is the product definition the way I have to go with this, or is there
> some handy shortcut to get the plugin exported with the proper P2
> data?

I usually use PDE to publish the plug-ins without p2 metadata and then
use the p2 FeaturesAndBundlesPublisher to create the p2 repository.

I create an Eclipse Application launch configuration and add these
options:
-source <dir with plug-ins and features>
-inplace
-append
-metadataRepository file:<dir with plug-ins and features>
-metadataRepositoryName "<name> Eclipse Extensions"
-artifactRepository file:<dir with plugins and features>
-artifactRepositoryName "<name> Artifacts"
-publishArtifacts
-publishArtifactRepository
-compress
-noDefaultIUs

Namaste, Bruce
Re: Plugin not loading from dropins directory [message #662887 is a reply to message #662743] Fri, 01 April 2011 11:41 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 03/31/2011 02:12 PM, Kevin Allen wrote:
>
> Is the product definition the way I have to go with this, or is there
> some handy shortcut to get the plugin exported with the proper P2 data?
>

Bruce's use of the publisher is the quickest.

You can also create a simple feature project with your plugin in
question. Then File>Export...>Deployable Features will generate a p2
repo with your plugin in it. You can see what's in any repo you
generate with:

bash-4.1$ eclipse/eclipse \
> -application org.eclipse.equinox.p2.director \
> -noSplash \
> -repository \
> file:///path/to/feature/export/directory \
> -list

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Plugin not loading from dropins directory [message #662989 is a reply to message #662513] Fri, 01 April 2011 18:34 Go to previous messageGo to next message
Kevin Allen is currently offline Kevin AllenFriend
Messages: 3
Registered: March 2011
Junior Member
Managed to get the P2 generated, and attempted to install. Unfortunately, it hangs during the install with no failure, errors or feedback of any kind.

So while I appreciate the help, this has officially become more expensive than it's worth to us for what was basically a convenience feature for our devs.

I know p2 and the dropins are relatively new in Eclipse's life, hopefully future versions will improve the error reporting. I was definitely trying to do this on the cheap, and am perfectly willing to take responsibility for my problems writing the plugin... but there's really no reason for any product to swallow errors silently, much less for one as robust as Eclipse.


Thanks again for the assistance.
Re: Plugin not loading from dropins directory [message #662991 is a reply to message #662989] Fri, 01 April 2011 19:20 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 04/01/2011 02:34 PM, Kevin Allen wrote:
> Managed to get the P2 generated, and attempted to install.
> Unfortunately, it hangs during the install with no failure, errors or
> feedback of any kind.

That usually implies SAT4J is busy trying to find a solution to whatever
is in the installation. If it hasn't failed and hasn't succeeded it's
not hung, it's calculating.

Just as an aside, one thing you could still check is to make sure you
uncheck "contact all update sites" ... it's not relevant for what you
are doing (and that will eliminate any IO component). Also make sure
you don't also have a version of that plugin in your install dropins folder.

The dropins algorithm is to install all of dropins as optional. It then
tries to find the best solution. Then it tries 1000 more times to find
a better solution. If it can find a better solution, it resets the
counter and tries 1000 more times. The algorithm provides stability
and predictability not tied to the computers hardware ... but if you
have a large number of plugins in dropins (I've heard of installs with
thousands :-) a re-evaluation can take >10 minutes.

But yes, I can understand that's all the time you have to look at it and
it's time to move on :-)

Later,
PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Plugin not loading from dropins directory [message #663289 is a reply to message #662513] Mon, 04 April 2011 14:33 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

And I guess there is debugging available for dropins now:
http://aniszczyk.org/2011/04/04/debugging-eclipse-p2-dropins /

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Previous Topic:HowTo get the data from a wizard?
Next Topic:Changed Perspective not showing
Goto Forum:
  


Current Time: Fri Aug 07 22:42:52 GMT 2020

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

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

Back to the top