eclipsecommandlinep2

p2 director command line parameter to find installable units does not return information


I am attempting to use p2 director with a command line parameter to get a list of installable units from a p2 repository. I started with the steps from this post to use the -list parameter:

Command line to find units in a p2 repository using p2 query language

However, when I run p2 director, the command line returns nothing.

My command line looks like this:

"C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse"\eclipsec.exe -application org.eclipse.equinox.p2.director -debug "C:\Users\IBM_ADMIN\Documents\projects\localtpbuild\p2Options.txt" -repository 

As you can see, I turned on debugging using the -debug command. My options file contains:

org.eclipse.equinox.p2.core/debug=true
org.eclipse.equinox.p2.core/artifacts/mirrors=true

I'm running the command from a batch file:

@ECHO OFF
SET _EXEDIR_="C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse"
SET _REPO_=https://download.eclipse.org/technology/swtbot/releases/latest/
@ECHO Querying P2...
@ECHO ON
%_EXEDIR_%\eclipsec.exe -application org.eclipse.equinox.p2.director -debug "C:\Users\IBM_ADMIN\Documents\projects\localtpbuild\p2Options.txt" -repository %_REPO_% -list
@ECHO P2 query complete.
@ECHO OFF
pause

And the result, showing debug info, but no entries, is:

Querying P2...

C:\Users\IBM_ADMIN\Documents\projects\localtpbuild>"C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse"\eclipsec.exe -application org.eclipse.equinox.p2.director -debug "C:\Users\IBM_ADMIN\Documents\projects\localtpbuild\p2Options.txt" -repository https://download.eclipse.org/technology/swtbot/releases/latest/ -list
Start VM: C:/IBM/IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5/eclipseDevelopmentPackage/ibm_sdk80/jre/bin/javaw.exe
-Xms256m
-Xmx1024m
-XX:MaxPermSize=256m
-XX:PermSize=64m
-Dosgi.requiredJavaVersion=1.6
-Dosgi.bundlefile.limit=100
-Dhttps.protocols=TLSv1.2,TLSv1.1,TLSv1
-jar C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse\plugins\org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
-os win32
-ws win32
-arch x86
-showsplash
-launcher C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse\eclipsec.exe
-name IBM Development Package for Eclipse
--launcher.library C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.1.500.v20170531-1133\eclipse_1624.dll
-startup C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse\plugins\org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.overrideVmargs
-exitdata 3db8_a0
-application org.eclipse.equinox.p2.director
-debug C:\Users\IBM_ADMIN\Documents\projects\localtpbuild\p2Options.txt
-repository https://download.eclipse.org/technology/swtbot/releases/latest/
-list
-vm C:/IBM/IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5/eclipseDevelopmentPackage/ibm_sdk80/jre/bin/javaw.exe
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize=256m
-XX:PermSize=64m
-Dosgi.requiredJavaVersion=1.6
-Dosgi.bundlefile.limit=100
-Dhttps.protocols=TLSv1.2,TLSv1.1,TLSv1
-jar C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\eclipse\plugins\org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar

P2 query complete.
Press any key to continue . . .

Am I missing something?


Solution

  • It seems you run into Eclipse bug 417799.

    As a workaround add the following to your command line (to use ...\server\jvm.dll instead of ...\javaw.exe):

    -vm C:\IBM\IBM_DevelopmentPackage_for_Eclipse_Win_X86_32_6.5.5\eclipseDevelopmentPackage\ibm_sdk80\jre\bin\server\jvm.dll