views:

109

answers:

1

I'm trying to update the plugins for an Eclipse Galileo SR2 installation from the command line.

Something similar to this command (which asks for a specific feature):

java -jar org.eclipse.equinox.launcher_*.jar -application org.eclipse.update.core.standaloneUpdate -command update

Does anyone know if a command exists using p2 or any other Eclipse application runner?

+2  A: 

I was able to upgrade Eclipse Classic Galileo from SR1 to SR2 using the following command:

java -jar plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar 
     -application org.eclipse.equinox.p2.director 
     -installIU org.eclipse.sdk.ide 
     -uninstallIU org.eclipse.sdk.ide 
     -artifactRepository http://download.eclipse.org/releases/galileo 
     -metadataRepository http://download.eclipse.org/releases/galileo 
     -profile SDKProfile 
     -flavor tooling 
     -destination C:\eclipse 
     -p2.os win32 -p2.ws win32 -p2.arch x86
  • The director doesn't do updates currently, but doing both uninstall and install is equivalent. See bug 279659
  • The install/uninstall value org.eclipse.sdk.ide will depend on what exactly you have installed. Here this is the classic Eclipse SDK. If you are running something else you need to find the root installable unit id. Go to Help -> About -> Installation Details -> Installed Software. Look for the id of the root node of the tree. "Eclipse IDE for C/C++ Developers" is epp.package.cpp. "Eclipse IDE for Java Developers" is epp.package.java.
  • The -profile value SDKProfile also depends on what package you are running. Check the eclipse.p2.profile property in your config.ini file.
  • The -destination C:\eclipse is the eclipse I am upgrading which is also the eclipse I'm using to run this command.
Andrew Niefer
Thanks for this info. In my use case I don't know what features are updatable. I'd rather not perform an re-install if no updates exist.I'd like it to check every feature installed rather than a targeted IU. Is this possible?
Joe Wright