Search code examples
eclipsemaveneclipse-rcptycho

Maven install tycho native launcher issue on basic eclipse plugin


I'm trying to automate the build of an eclipse RCP application. I decided to this using maven with its tycho plugin. However I followed the tutorials where I create a plugin, feature and then a product. Following this tutorial, http://mattiasholmqvist.se/2010/03/building-with-tycho-part-2-rcp-applications/ seems a bit out of date.

However when I run my mvn install I get :

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.056s
[INFO] Finished at: Sat Aug 31 17:50:34 BST 2013
[INFO] Final Memory: 78M/411M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.18.1:product-export (default-product-export) on project com.hal
lahan.premierProduct: Product includes native launcher but no target environment was specified -> [Help 1]
[ERROR]

In the product if I uncheck the use native launchers I get a different issue:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.18.1:product-export (default-product-export) on project com.hallahan.premierProduct : Execution default-product-export of goal org.eclipse.tycho:tycho-packaging-plugin:0.18.1:product-export failed: Could not resolve plugin org.eclipse.core.resources.win32.x86_64_null; Path to dependency: -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]

Any help would be a great help or pointers how to get around either of these issues would be a great help.


Solution

  • Try to add environments configuration into your pom.xml:

    <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <version>${tycho-version}</version>
            <configuration>
              <environments>
                <environment>
                  <os>win32</os>
                  <ws>win32</ws>
                  <arch>x86</arch>
                </environment>
                <environment>
                  <os>linux</os>
                  <ws>gtk</ws>
                  <arch>x86_64</arch>
                </environment>
                <environment>
                  <os>macosx</os>
                  <ws>cocoa</ws>
                  <arch>x86_64</arch>
                </environment>
              </environments>
            </configuration>
          </plugin>
    

    Also, check out this link for more information.