0

could someone from Eclipse guru explain in plain English what I do wrong? :) Suppose I have a multimodal maven project and each module is an eclipse plugin. Additionally, I have a module that creates an Eclipse feature(s) from these plugins. I want to create an Eclipse product from all my features and run it as CLI application which is run by ant. So, I create another module that contains a product file for my application. I decided that my product will be feature-oriented, thus I add the section in my product file and insert all my features there.

After that on "Configuration" tab I press "Add recommended" and Eclipse adds the next plugins

 <plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
 <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
 <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
 <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
 <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />

in the configuration section of the product file.

I compile the whole of my maven project and receive an executable file that I can run in the terminal.

But unfortunately, when I start this file by command ant -propertyfile ant.cfg -f config/compile.xml

I receive

BUILD FAILED
..... : exec returned: 139

When I start my executable file I receive "Segmentation fault"

So my question is: which plugins should I add to the configuration section of the product file?

P.S. There is a more detailed description in my another post P.P.S There was a lot of additional plugins in the product file when this product was running by Java 8 on Eclipse Kepler, should I add all of them?

Andrqxa
  • 87
  • 1
  • 9
  • Unfortunately, when I press 'Add Required' nothing happens. Target platform is based on 2020-12. There is my [post](https://stackoverflow.com/questions/65971888/eclipce-rcp-is-crashed-when-starting) with configs. – Andrqxa Jan 31 '21 at 18:52
  • 1
    Your product file is using 'features' which specify the plug-ins required, you can't add individual plug-ins to a feature based product. – greg-449 Jan 31 '21 at 20:48

1 Answers1

0

The root problem was not in the list of the features and plugins, but in <programArgsLin>-os ${target.os} -ws ${target.ws} -arch ${target.arch} -consoleLog After removing -os ${target.os} -ws ${target.ws} -arch ${target.arch} the application is starting without "Segmentation fault".

And about the list of the features and plugins - I've found the "an algorithm" :)

  1. Open product file and on the "Contents" tab add all your features you need
  2. Go to "Configuration" tab and press "Add Recomended", eclipse will add
<configurations>
      <plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
   </configurations>

to the product file 3. On this step application still cannot be compiled, because org.apache.felix.scr cannot be found. I've used approach from this post to find in which feature org.apache.felix.scr is belonged - it's org.eclipse.e4.rcp

  1. So, I've returned to "Contents" tab and added org.eclipse.e4.rcp as a feature
  2. After that I've pressed "Add required" and eclipse added additional features. Thus full product configuration file looks like
...
<launcherArgs>
      <programArgs>-consoleLog
      </programArgs>
      <vmArgs>-Xshare:auto -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dlogback.configurationFile=log.xml
      </vmArgs>
      <vmArgsLin>
         <argsX86_64>-Xmx2048m -Xms512m -XX:+UseParallelGC</argsX86_64>
      </vmArgsLin>
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
      </vmArgsMac>
      <vmArgsWin>-Xmx768m -Xms256m
      </vmArgsWin>
   </launcherArgs>
...
<features>
     ... list of my features ...
      <feature id="org.eclipse.e4.rcp" installMode="root"/>
      <feature id="org.eclipse.emf.ecore" installMode="root"/>
      <feature id="org.eclipse.emf.common" installMode="root"/>
   </features>

   <configurations>
      <plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
   </configurations>
...
Dharman
  • 30,962
  • 25
  • 85
  • 135
Andrqxa
  • 87
  • 1
  • 9