Bundle JRE with RCP plugin based application by tycho maven
Asked Answered
U

1

3

I have the RCP application that based on plugin model. I would like to put JRE to final artifacts that created by Maven+Tycho. I tried to follow to these recomendation

including-a-jre-in-a-tycho-build

bundle-jre-along-with-your-product

I created one more feature project where required JRE is put to folder in root of the feature project. In my case this jre/win64. The I add feature to product definition. But I don't understand How shall I notify maven process that responsible for product distribution creating about JRE in my feature project my build properties file is

bin.includes=feature.xml
root.win32.win32.x86_64= ./jre/win64

Also I created new pom.xml and add to parent pom.xml I use tycho 1.1.0 and Eclipse Neon.3 as platform

Uprear answered 3/4, 2018 at 15:53 Comment(0)
H
4

For my open source Eclipse RCP e4 application, I am bundling the OpenJDK binaries thankfully provided by Azul. Check out the Github project that builds the Eclipse feature.

In short, it uses the idea outlined in the above mentioned blog post Including a JRE in a Tycho build. The advantage over using root files is that the JRE can be more easily updated via P2 (in case of root files, the running JRE on Windows might prevent the replacement with an updated JRE).

The Tycho build in that repository does:

  • Download the JDK builds from Zulu
  • Create bundles with the appropriate setJvm p2 Touchpoint Instructions
  • Create a feature with all JRE bundles and a repository for use in other builds
  • Create an RCP e4 application with self-update functionality to test the packaged JRE

Using this in your RCP product is than a matter of adding the feature to the product definition:

<?xml version="1.0"?>
<?pde version="3.5"?>

<product name="Test Product">
    <features>
        <feature id="test.feature"/>
        <feature id="org.eclipse.e4.rcp"/>

        <feature id="name.abuchen.zulu.jre.feature"/>

    </features>
</product>
Humid answered 12/5, 2018 at 6:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.