Thursday, June 28, 2012

Eclipse p2 Frustrations

Eclipse p2 continually frustrates me. For years I have been working around it and we have been peacefully coexisting. I recently tried to dip my toes back in the water to see if I could better understand it and use it better.  I have what seems to me a simple situation that would be common in the Eclipse world but I cannot find a satisfactory solution.

I have an Eclipse feature comprised of many plugins. These are intended to be installed in an Eclipse-based IDE and the assumption is that it should be possible to install it via the update manager UI of Eclipse or the Marketplace client. My feature extends a lot of other Eclipse plugins that need to be installed.  For example, it needs Subclipse, Mylyn, GEF and several other plugins.  Some of these are hosted on and some are on other sites.  I want someone to be able to install my feature and have any other features that are needed discovered and installed automatically and seamlessly.

The peaceful coexistence I have talked about is that I have been able to make this work by hosting all of the dependencies on the same update site as my feature.  This is labor intensive and kind of annoying but it worked so that is what I did.  I would much prefer to just publish a site that contains only my features and whatever pointers are needed for Eclipse to go get the rest of the plugins.  I cannot figure out any way to do it and I have not seen any other sites that do this successfully so I just assume Eclipse cannot do this.

Am I wrong in thinking this should not only be possible, but easy?

I have tried adding associate sites to the site.xml.  That did not do anything.   I tried adding a p2.inf file to my feature JAR's.  I could see that the UpdateSitePublisher added the instructions to the content.xml file, but it appears to add them in a place that would only be applied after my feature is installed.  So it does not help for my scenario of needing to add these sites to find required dependencies.  I am at a loss and about to go back to my ugly workaround.

Wednesday, August 3, 2011

Debugging Eclipse Indigo plugins on OSX

I do not why this took me so long to figure out, but I have been having a problem with Indigo that whenever I fire up the Eclipse Runtime workbench to debug a plugin it would crash almost immediately. At first, I thought it had something to do with my plugins, but eventually I took the time to do a clean install without any of my plugins and saw the problem just by creating a simple demo project in the runtime. Since I already had a working Helios installation, I just shrugged and went back to using that for now and set the problem aside.

Well, last week I got a new Macbook Air with Lion preinstalled and so I am setting up a new system from scratch. This time I only have Indigo installed and lo and behold I am still seeing the same problem. Realizing that there must be a simple explanation, I now looked closer and see that there is a simple explanation. For some reason, on Indigo when it Eclipse creates your default configuration it is not including the PermGen settings by default. So I was just crashing due to not enough PermGen space errors. Pretty obvious, it has just been a long time since I had seen these problems.

Adding "-XX:MaxPermSize=256m" to the -vm arguments in my Runtime Configuration has everything working great again.

Monday, April 25, 2011

I've been hacked!

I was hacked today (or at least I learned of it today). Early this AM a SPAM was sent from my GMail account to all of the Contacts in my GMail -- which I believe is any address I have ever received an email from. Given all of the mailing lists I am on, this is a decent number of addresses. Since the email was DKIM-verified to come from GMail and it went to all my contacts, I have to assume someone was able to successfully login to my GMail. I have since changed my password a couple times, and turned on the 2-factor authentication feature. I would highly recommend everyone do this with their Google account if they have not. I also changed my password on every site I can think of, just for safe measure.

How did this happen? I have no way to know for certain, but I have a theory. The Sony Playstation Network has been down for several days now due to some kind of attack. My username for PSN was my GMail account and I was stupid enough to use the same password (or at least they matched last week, I may have recycled back to it). I mainly use PS3 and PSN for Netflix streaming. I suspect that when the site was first down last week that intruders were intercepting logins and they got the username and password. My main reason to doubt this theory is that hacking PSN seemingly was sophisticated to do, so why would they use the information they stole in such an amateurish way as to send an obvious SPAM that alerted me to the problem? I have to think they downloaded all my email and information before they did this. I wonder why they did not also change my password as it seems like they could have done so.

It is fairly disconcerting to wonder what private information, such as credit card numbers, that I might have in my GMail archive. For now, I at least think I have safely updated all of my accounts so that the passwords are different on every site.

Update (2011-04-26): Sony has now pretty much confirmed that this all originated with the hack of PSN. See this blog post: Of course it was still stupid on my part to use my GMail password anywhere outside of GMail.