How to build a feature to a zip file using Tycho

2020-04-21 04:00发布

问题:

I'm trying to export an Eclipse feature using Tycho, replacing the "Export Wizard" found on the Eclipse overview of the feature. The wizard gives the option for the export destination as a zip file. Is there a way to do the same with Tycho?

回答1:

In order to build a zip file with the feature and the feature's plug-ins, you need to add a module of the assembly packaging type eclipse-repository to your reactor:

  • Add an eclipse-repository module with the same parent POM as the eclipse-feature module (in order to inherit the same target platform configuration).
  • Create a category.xml file in the root of the new module with the following content:

    <?xml version="1.0" encoding="UTF-8"?>
    <site>
        <feature id="todo.your.feature.id" />
    </site>
    
  • Add the new module to your root POM.