问题描述
我有基于插件模型的RCP应用程序。我想把JRE放到由Maven + Tycho创建的最终工件上。我试图遵循这些建议
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
我创建了另一个功能项目,其中所需的JRE放在功能项目的根目录中。在我的情况下这个jre / win64。我为产品定义添加了功能。但我不明白如何通知maven进程负责在我的功能项目中创建有关JRE的产品分发
我的构建属性文件是
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 projectmy build properties file is
bin.includes=feature.xml
root.win32.win32.x86_64= ./jre/win64
我也创建了新的pom.xml并添加到父pom.xml
我使用tycho 1.1.0和Eclipse Neon.3作为平台
Also I created new pom.xml and add to parent pom.xmlI use tycho 1.1.0 and Eclipse Neon.3 as platform
推荐答案
对于我的开源Eclipse RCP e4应用程序,我正在捆绑由Azul提供的OpenJDK二进制文件。查看构建Eclipse功能的。
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.
简而言之,它使用了上述博客文章中概述的想法。使用根文件的优点是可以通过P2更轻松地更新JRE(在根文件的情况下,Windows上运行的JRE可能会阻止使用更新的JRE替换)。
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).
内置:
- 从祖鲁语
- 使用相应的<$ c $创建捆绑包c> setJvm
- 创建包含所有JRE捆绑包的功能以及用于其他版本的存储库
- 创建具有自我更新功能的RCP e4应用程序以测试打包的JRE
- 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
在RCP产品中使用此功能不仅仅是将功能添加到产品定义中:
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>
这篇关于使用tycho maven将JRE与基于RCP插件的应用程序捆绑在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!