I'm using the p2 director on Linux to install plugins into the Linux Eclipse instance and into Windows instance as well. The Linux one works well, but I struggle with the Windows. I tried few arguments (or without) and tried few different repositories/plugins to install, but I still end up with the same error:
Installing org.eclipse.cdt.feature.group 9.4.0.201712051550.
Installation failed.
An error occurred while installing the items
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.google.gson 2.7.0.v20170129-0911, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
Error while loading manipulator.
For example, I start with plain Eclipse Platform Runtime Binary 4.7.1a and I'm trying to install CDT 9.3 on top of it (but this problem applies to other plugins as well).
I set my repositories (http://download.eclipse.org/releases/oxygen,http://download.eclipse.org/tools/cdt/releases/9.3) and artefacts (org.eclipse.cdt.feature.group) accordingly and then run following:
./eclipse -application org.eclipse.equinox.p2.director -noSplash -roaming -repository $PLUGIN_REPOSITORIES -installIU $PLUGIN_ARTEFACTS -destination ../../scWindows/eclipse -bundlepool ../../scWindows/eclipse -p2.os win32 -p2.ws win32 -p2.arch x86_64
Is there an argument I'm missing or I'm doing something wrong?
I don't fully understand exactly why or how. But when I used an absolute path instead of relative paths it remedied my problem. Together with the -roaming the relative paths should be stored, so the final should be as desired, but for the moment the p2 seems to need the absolute path. I worked around it with the following:
sudo apt-get install realpath
WINDOWS_ABSOLUTE_PATH=`realpath ../../scWindows/eclipse`
echo $WINDOWS_ABSOLUTE_PATH
So in the script, I just use the variable $WINDOWS_ABSOLUTE_PATH which will get resolved as the full absolute path.