Run plugin updates outwith Eclipse UI - eclipse

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?

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.

Related

Problem with installing plugins in Eclipse (installed requirements)

i´ve some trouble with installing a plugin in Eclipse. I´m using Quartus Prime Lite Edition (v. 18.1) NIOS II EDS (Eclipse Mars.2 Release (4.5.2)). This is a customized version from Intel for fpga programming.
My Problem:
When I try to install the plugin, it fails, because it could not find the installed requirements.
When I tried to install via "Install New Software" or via command line, i get the following message:
C:\Users\maemeba>"C:\intelFPGA_lite\18.1\nios2eds\bin\eclipse_nios2\eclipsec.exe" -nosplash -application org.eclipse.equinox.p2.director -repository http://welding1.wittag.net:9090/axivion/axivion-eclipse-plugin/repository -installIU com.axivion.aclipse.feature.feature.group
Installing com.axivion.aclipse.feature.feature.group 6.9.13.02186.
Installation failed.
Cannot complete the install because one or more required items could not be found. Software being installed: Axivion Eclipse Feature 6.9.13.02186 (com.axivion.aclipse.feature.feature.group 6.9.13.02186)
Missing requirement: Axivion Eclipse Feature 6.9.13.02186 (com.axivion.aclipse.feature.feature.group 6.9.13.02186) requires 'org.eclipse.equinox.p2.operations 2.1.0' but it could not be found
Application failed, log file location: C:\Users\maemeba\.altera.sbt4e\18.1.0.625-windows64\configuration\1579076958115.log
Logfile
I´ve checked, if the missing requirements are aviable, and they are there. See Eclipse Installed Details
The support for the Quartus product can't help me.
Do you know any solutions?
Many thanks,
kind regards
bastian7032

Eclipse Plugin Not "Resolved" after installation

I am installing some few plugins created by us in Eclipse. But a few of the plugins(let's say plugin A) after installation shows only "Installed" and not Resolved or Starting. For that to be Resolved, I need to restart with -clean option. This doesn't happen with plugin B(let's say), it gets Resolved or Starting.
I have also tried installing from cmd-
eclipsec -application org.eclipse.equinox.p2.director -repository http://path/to/plugin -installIU com.abc.feature.feature.group -destination //path/to/home -consoleLog -clean
Again, this works for plugin B, not Plugin A. But if I first install A and then install B, then A shows Resolved. Is this some property of A? If so, can we change the default state of a plugin after install? And, can I trigger A via some way, without starting eclipse with a -clean.
Thanks
To find out why plug-in/bundle A is not resolved, you can do the following:
Add org.eclipse.equinox.console to your Eclipse installation (if it's not there yet)
Start Eclipse from the command line with the arguments -console -noexit -consoleLog
In the Eclipse OSGi console type diag <bundle ID of plug-in A> to find out what prevents resolving bundle A.
See also: Eclipse Wiki - Where Is My Bundle

Eclipse p2 director application cannot update a feature

I am developing Node.js script to install Eclipse plugins by using Eclipse built-in p2 director application. And p2-director fails to update features in some cases.
D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.ui\templates>node nodeclipse-install.js install -repository jar:file:/D:/Workspaces/Nodeclipse-DEV/nodeclipse-1/org.nodeclipse.site/target/org.nodeclipse.site-0.10.0-SNAPSHOT.zip!/ maven
Nodeclipse CLI Installer (Eclipse Plugin Manager epm)
starting eclipsec -nosplash -application org.eclipse.equinox.p2.director -repository jar:file:/D:/Workspaces/Nodeclipse-DEV/nodeclipse-1/org.nodeclipse.site/target/org.nodeclipse.site-0.10.0-SNAPSHOT.zip!/ -installIU org.nodeclipse.enide.maven.feature.feature.group -tag org.nodeclipse.enide.maven.feature.feature.group -vmargs -Declipse.p2.mirrors=false
Installing org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402180840.
Installation failed.
Cannot complete the install because of a conflicting dependency.
Software being installed: Enide Maven 0.10.0.201402180840 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402180840)
Software currently installed: Enide Maven 0.10.0.201402170319 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402170319)
Only one of the following can be installed at once:
Enide Maven 0.10.0.201402180840 (org.nodeclipse.enide.maven.feature.feature.jar 0.10.0.201402180840)
Enide Maven 0.10.0.201402170319 (org.nodeclipse.enide.maven.feature.feature.jar 0.10.0.201402170319)
Cannot satisfy dependency:
From: Enide Maven 0.10.0.201402170319 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402170319)
To: org.nodeclipse.enide.maven.feature.feature.jar [0.10.0.201402170319]
Cannot satisfy dependency:
From: Enide Maven 0.10.0.201402180840 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402180840)
To: org.nodeclipse.enide.maven.feature.feature.jar [0.10.0.201402180840]
Application failed, log file location: E:\Eclipse\Enide-Studio-2014-try2-win64\eclipse\configuration\1392717353881.log
eclipsec process exit code 13
I also tried passing both .feature.jar and feature.group.
eclipsec -nosplash -application org.eclipse.equinox.p2.director -repository jar:file:/D:/Workspaces/Nodeclipse-DEV/nodeclipse-1/org.nodeclipse.site/target/org.nodeclipse.site-0.10.0-SNAPSHOT.zip!/ -installIU org.nodeclipse.enide.maven.feature.feature.group -tag org.nodeclipse.enide.maven.feature.feature.group -vmargs -Declipse.p2.mirrors=false
This maybe related to the fact that .maven feature includes .maven and .common plugins. .common plugin is also used by other features.
However this also happens with other features, that have no shared dependencies. p2 director help page does not specify the logic nor gives references.
On the p2 director level, there is no 'update' operation. Instead, you need to tell the director to both 'uninstall' and 'install' the IU that you want to be updated:
eclipse -application org.eclipse.equinox.p2.director -uninstallIU org.nodeclipse.enide.maven.feature.feature.group -installIU org.nodeclipse.enide.maven.feature.feature.group -repository ...

How to uninstall an Eclipse plugin via command line?

I recently installed Bravo Editor plugin into my Eclipse and it has crashed the installation of Eclipse, now I'm unable to start it.
I've already tried to call it from the command line with eclipse -clean, but it's no use.
I'd like to know how it could be uninstalled from the command line.
You can try using Eclipse Director and put com.beck.ep.feature.group as argument for -uninstallIU
The full command for this is:
eclipse -application org.eclipse.equinox.p2.director -uninstallIU com.beck.ep.feature.group
(Use eclipsec.exe on Windows.)
You can list the installed features to find the right ID with:
eclipse -application org.eclipse.equinox.p2.director -listInstalledRoots

Installing plugin into eclipse using command line

I have an update site, and got the directory which contains the features and plugins
How to install the plugin in eclipse application using the command line ?
I want to automate this process
You can invoke p2 director application using something like this:
eclipsec.exe
-application org.eclipse.equinox.p2.director
-repository http://download.eclipse.org/releases/galileo/
-installIU org.eclipse.cdt.feature.group
-destination d:/eclipse/
-profile SDKProfile
Here is also link to p2 wiki.