Tycho Product Export

This mini-howto is outdated!

Binding product-export mojo to eclipse-plugin project lifecycle does not guarantee proper build order and will likely result in unexpected results or failures like MNGECLIPSE-1272.

Recommended way to build Eclipse RCP applications is using separate project with packaging=eclipse-application.

Feature-based RCP example
Plugin-based RCP example

Before start, install Eclipse RCP with delta pack:

  1. Go to the Platform downloads page.
  2. Pick the build you want to use as your RCP target (e.g. the 3.4.1 milestone build).
  3. In the RCP SDK section (not the Eclipse SDK, Platform SDK, or RCP Binary sections) download the RCP SDK for your platform. This contains just the base RCP plug-ins for that platform.
  1. Extract it to a different directory than the IDE's (e.g. c:\eclipse-RCP-SDK).
  2. Optionally, if you want to deploy to other platforms, download the Delta Pack (the link is at the bottom of the RCP SDK section). This contains the platform-specific plug-ins for all platforms. Extract it to the same location as the RCP SDK (say OK to any prompts to overwrite files).
  3. Run the IDE (e.g. c:\eclipse\eclipse.exe).
  4. Go to Window > Preferences > Plugin-Development > Target Platform, and configure the location to be the eclipse subdirectory of the RCP SDK install (e.g. c:\eclipse-RCP-SDK\eclipse). Note: if you type or paste the path, you'll need to press the Reload button.
  5. The list of plug-ins on the Plug-ins tab should update to show the RCP SDK plug-ins; other plug-ins like those for JDT and PDE should not appear.

Below are the steps required to export a Hello world rich client application. If you wanna to download the entire project click HelloWorld.zip.

  1. Open Eclipse.
  2. Create a new Plug-in Project
  3. Go to next step. Uncheck "Generate an activator..." and check yes on "Would you like to create a rich client application?"
  4. Pick "Hello RCP" template and Finish.
  5. Run the plug-in to be sure if everything is ok.
  6. Create a new "Product Configuration"
  7. Type product name (HelloWorld) and select application (HelloWorld.application)
  8. On ID press new then Finish (use suggest values)
  9. Go to configuration tab and click on "Add..." select "HelloWorld" on the list. And press OK
  10. Click on "Add Required Plugins". Your plugin list should like this:
  11. Switch back to Overview tab and "Launch an Eclipse application", if eclipse launches hello world app it is a sign you did everything right so far. If don't launch, do a double check on your steps.
  12. Open project folder and run generate-poms:mvn org.codehaus.tycho:maven-tycho-plugin:generate-poms -DgroupId=tycho.demo -Dtycho.targetPlatform=your eclipse installation
  13. Add product export configurations to pom.xml
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.tycho</groupId>
            <artifactId>maven-osgi-packaging-plugin</artifactId>
            <version>${tycho-version}</version>
            <executions>
              <execution>
                <phase>package</phase>
                <id>product-export</id>
                <goals>
                  <goal>product-export</goal>
                </goals>
                <configuration>
                  <productConfigurationFile>HelloWorld.product</productConfigurationFile> <!-- replace to your real goal if you didn't use same namming -->
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    
  14. Run mvn clean package
  15. Open target/product directory. You can see the launcher file (launch.exe at windows). Just double click on it and you will get you HelloWorld open.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.