Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you automate the installation of Eclipse plugins with command line?

Tags:

I need to automate Installation of Eclipse Classic and add two "plugins" :

  • CDT (not sure this can be called a "plugin")
  • PyDev

Install Eclipse Classic (just downloaded) :

sudo tar -xvzf eclipse-SDK-3.7-linux-gtk.tar.gz -C /usr/local/

How to install then CDT and PyDev as system plugins (not user's)?

like image 355
samb Avatar asked Aug 23 '11 16:08

samb


People also ask

How do I manage Eclipse plugins?

On Macintosh: Go to Eclipse > About Eclipse > Installation Details. In older versions: You might need go to Help > Software Updates > Manage Configuration. Select the plugin to Uninstall, and disable it with the task shown in the right window.

How do I know if a Eclipse plugin is installed?

One way of finding out is to select Help > About Eclipse Platform >. From this dialog, click Plug-in Details to get a list of all installed plug-ins, along with vendor and version information.

How do I run a plugin in Eclipse?

You can easily run a plug-ins in another instance of Eclipse by selecting Run > Run As > Run-time Workbench. This will launch a new workbench on the same Java runtime as your development workbench, with all plug-ins in your current workspace enabled, and starting in a special runtime workspace.

How do I install Eclipse Software from the command line?

This topic provides information on how to install Eclipse software from a command line. In addition to the Eclipse install tool available in the workbench ( Help > Install New Software ), it is also possible to install new Eclipse software from a command line.

How do I install plugins in Eclipse IDE?

Install plugins from the command lineor Eclipse IDE. You can find the Eclipse plugins to install into your copy of the Eclipse IDE for C/C++ Developers in the various tool folders located within the oneAPI installation folder, which is normally found in /opt/intel/oneapi or ~/intel/oneapi

How do I set up CMake with Eclipse IDE?

If you are going to use Eclipse IDE, there are some additional setup steps: Locate the Eclipse plugins that were included with your oneAPI tools (see the note below). Ensure that CMake has been installed. Install plugins from the command lineor Eclipse IDE.

How do I add a plugin to an eclipse repository?

In the Add Repository window, press the Archive button to open a file browser. In the file browser, select the Eclipse plugin file that you downloaded, as shown in Figure 2-2. Click Open to return to the previous dialog. Figure 2-2 Selecting Eclipse Plugins


1 Answers

I could find these two docs which helped :

  • http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Frunning_eclipse.htm
  • http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html

Install freshly downloaded Eclipse Classic :

sudo tar -xvzf eclipse-SDK-3.7-linux-gtk.tar.gz -C /usr/local/

To install desired CDT features (references found by using Eclipse's "Help>Install new software" tool)

  • C/C++ Development Tools ( org.eclipse.cdt.feature.group )
  • C/C++ Development Tools SDK ( org.eclipse.cdt.sdk.feature.group )
  • C/C++ Development Platform ( org.eclipse.cdt.platform.feature.group )
  • C/C++ Memory View Enhancements ( org.eclipse.cdt.debug.ui.memory.feature.group )
  • Eclipse Debugger for C/C++ ( org.eclipse.cdt.debug.edc.feature.group )
  • Miscellaneous C/C++ Utilities ( org.eclipse.cdt.util.feature.group )

run :

sudo /usr/local/eclipse/eclipse -nosplash \
  -application org.eclipse.equinox.p2.director \
  -repository http://download.eclipse.org/releases/indigo/,http://download.eclipse.org/tools/cdt/releases/helios/ \
  -destination /usr/local/eclipse \
  -installIU org.eclipse.cdt.feature.group \
  -installIU org.eclipse.cdt.sdk.feature.group \
  -installIU org.eclipse.cdt.platform.feature.group \
  -installIU org.eclipse.cdt.debug.ui.memory.feature.group \
  -installIU org.eclipse.cdt.debug.edc.feature.group \
  -installIU org.eclipse.cdt.util.feature.group

To install PyDev, we first need to insert their auto-signed certificate (which can be found here : http://pydev.org/pydev_certificate.cer )

#!/usr/bin/env python
# add PyDev's certificate to Java's key and certificate database
# Certificate file can be downloaded here : http://pydev.org/pydev_certificate.cer
import os, sys
import pexpect

print "Adding pydev_certificate.cer to /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts"

cwd = os.path.abspath (os.path.dirname(sys.argv[0]))
child = pexpect.spawn("keytool -import -file ./pydev_certificate.cer -keystore /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts")
child.expect("Enter keystore password:")
child.sendline("changeit")
if child.expect(["Trust this certificate?", "already exists"]) == 0:
    child.sendline("yes")
try:
    child.interact()
except OSError:
    pass

print "done"

so run it :

sudo ./add_pydev_certificate.py

The desired PyDev features are :

  • PyDev for Eclipse ( org.python.pydev.feature.feature.group )

run :

sudo /usr/local/eclipse/eclipse -nosplash \
  -application org.eclipse.equinox.p2.director \
  -repository http://pydev.org/updates/ \
  -destination /usr/local/eclipse \
  -installIU org.python.pydev.feature.feature.group
like image 88
samb Avatar answered Sep 24 '22 02:09

samb