org.eclipse.pde.build outside from eclipse: Missing required plug-in

237 Views Asked by At

I have to create an Headless-Builder for an old project where the build and export for the feature only was possible inside the eclipse gui.

I managed to do the FullBuild whithout Eclipse GUI. For that I have written a Bundle that imports the project and makes the FullBuild. After this I try to export the project within the same bundle but I get the follwing errors:

    !ENTRY org.eclipse.pde.build 4 5 2022-09-24 13:49:38.938
    !MESSAGE Processing inclusion from feature com.xyz.xyz1tWzoxsKKH.feature: Bundle com.xyz.xyz_1.1.0.qualifier failed to resolve.:
    Missing required plug-in org.apache.commons.lang3_3.1.0.
    Missing required plug-in com.google.guava_14.0.1.
    ...
    Host plug-in JavaSE_0.0.0 has not been found.

If I install my bundle in eclipse and let run the export Job inside from eclipse (OSGi HostConsole) it works perfectly. But if I install my bundle outside in OSGi:

    java -DbaseLocation=D:/eclipse   -Dosgi.bundles=.\org.apache.felix.gogo.shell_0.10.0.v201212101605.jar@start,.\org.apache.felix.gogo.command_0.10.0.v201209301215.jar@start,.\org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar@start,.\org.eclipse.equinox.console_1.0.100.v20130429-0953.jar@start -jar org.eclipse.osgi_3.9.1.v20130814-1242.jar -console
    install file:...  /here I install all!! bundles eclipse has to in his plugin folder
    start org.eclipse.equionox.ds
    start com.mybuilder

The bundles are missing for the pde build process though I have installed them all in the new OSGi-Env. And alle dependieces are resolved. How is that possible? org.eclipse.pde.build is running in the same OSGi-Env like where all the bundles was installed too. org.eclipse.pde.build cant see them.

I even tried with -DbaseLocation=D:/eclipse so org.eclipse.pde.build could search for the missing plugins in the original eclipse installation where my Bundle works but even this way the build fails.

Maybe one extra hint: FullBuild of the project works in both ENVs, in eclipse and in my separate OSGi-Installation but outside from eclipse I have to workaround for a FullBuild because:

    <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

does not work. During the build I get a lot of errors because of the missing dependencies so I had to change my .classpath file to entries like:

    <classpathentry kind="lib" path="U:/BUILD/osgi/com.google.guava_14.0.1.jar"/>
    ...

With this entries the Fullbuild works without problems but the Export job for the feature fails because the same plugins will be missed. I think its maybe just a small thing that I have missed in understanding how the whole thing works. Thank you very much for reading and I am glade for every small hint.

1

There are 1 best solutions below

0
On BEST ANSWER

The solution was puting the bundles to install in "plugins" directory. I had no plugins directory and pde.core is only searching for them in that specific directory when creating a target. Thats it. Why -DbaseLocation with a pre-installed eclipse as target did not work - I dont know. PDE Core seemed to ignore this parameter.