Installing Eclipse 3.4.1 Despite p2

If you’re, like me, one of the unlucky ones that aren’t on p2’s friends list (translation: Eclipse p2 provisioning causes you an endless stream of pain and suffering), then you can’t install the 3.4.1 patches because p2 won’t let you.

There are several ways to deal with this. One of them is to delete your workspace’s .metadata, your Eclipse install and start from scratch, installing all plug-ins again, etc., always hoping that p2 doesn’t mess up until you’ve installed everything.

The other way is a workaround. It needs a bit of disk space and discipline. Do this:

  1. Leave your original Eclipse install alone. Specifically, never ever use the menu “Software updates…” again! Never. I mean it. Disable the entry if you can.
  2. Install eclipse again in a new place. This must be a standard install (not a shared one!!!)
  3. Do not start this install! Specifically, do not attempt to add all your update sites to this base template! Just unpack it and rename the “eclipse” directory to “eclipse-template”.
  4. Copy “eclipse-template” to “eclipse-install”.
  5. Start eclipse-install. If you worry that you might accidentally start the template once in a while, rename “eclipse.exe” to “eclipse.exe Is this install”.
  6. Download the 3.4.1 updates.
  7. Exit eclipse-install.
  8. Use your favorite file copy tool to copy all new files and directories in eclipse-installplugins and eclipse-installfeatures to your working copy of eclipse.
  9. Start your working copy.

Installing and updating plug-ins works in a similar way:

  1. Delete eclipse-install and recreate it from eclipse-template.
  2. Start eclipse-install.
  3. Open the install software dialog. Add the update site. You may be tempted to add the update sites to eclipse-template. Don’t do this! As soon as p2 can see more than one update site, it will eventually mess up in the dependency calculation.
  4. Install the plug-in.
  5. Create a directory for your new plug-in in the driectory “dropins” of your working copy of Eclipse.
  6. Copy the new files and directories from eclipse-installfeatures and eclipse-installplugins to the new directory below “dopins” in your working copy of Eclipse.
  7. If you need to install more than one plug-in, start with step 1. After you have installed anything in eclipse-install, the Eclipse instance is tainted and shouldn’t be used again.

That’s all folks. At least until the p2 guys fix the many bugs in their code. Which will probably in the Eclipse release in 2010.

That’s not because I believe that the p2 guys are stupid or lazy but because this kind of product just takes three years to mature and they started in 2007, so the first working version can be expected in 20010.

7 Responses to Installing Eclipse 3.4.1 Despite p2

  1. Anonymous says:

    You seem to be confusing the running system and the data manipulated by it, namely the workspace. p2 never interferes with the .metadata so you should not delete this folder or you may actually loose some data.

  2. Aaron Digulla says:

    After a new install of Eclipse after the p2 update disaster, I couldn’t open the workspace anymore. Eclipse would actually crash during startup. The only option left was to delete the .metadata because I had already deleted everything else.

  3. Patrick says:

    I was trying to add a few plugins to a brand new Eclipse 3.4.1 install and kept tripping over the dreaded

    Unsatisfied dependency: … requiredCapability: … org.eclipse.equinox.p2.iu

    errors. It drove me crazy.

    Many, many thanks for this post!

  4. Cinlloc says:

    I became crazy with that issue too !
    A great solution is to uninstall p2 and reinstall UpdateManager with this script.

  5. Marco says:

    nice try.
    it didn’t work.
    I hate p2, useless piece of s**t.

    Cannot complete the request. See the details.
    Cannot find a solution satisfying the following requirements Match[requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.swt/[3.4.0.v3448f,3.4.0.v3448f]].

    Clean install of Ganymede from the eclipse.org archives.

  6. Alexis says:

    Hi, for my part I’ve had a problem with SVN plugin. So p2 mess up the install.
    The thing that i’ve done is to ONLY HAVE ONE UPDATE SITE at once. so P2 doesn’t mess up.

    • digulla says:

      That helps, yes. Unfortunately, p2 has a habit to load all update sites even if you just want to install a single plugin from one site.

      Things have improved with Eclipse 3.6 but p2 is still a somewhat weak point 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: