如何配置上生成代理编译的JRE? [英] How to configure compile-jre on build agents?

查看:160
本文介绍了如何配置上生成代理编译的JRE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的开发环境,包括谁建立的安装介质数生成代理。今天我们在构建代理商之一有install4j的内部编译错误。类的版本不匹配的一些自定义类。我们发现,在生成代理安装JRE是一个jre_1.6 X32和jre_1.7 64。该项目的设置被设定为创建具有1.7的最低Java版本X32一个安装程序中。因此install4j(%JAVA_HOME%等)的搜索算法中使用的jre_1.6 X32编译code。

Our development environment consist of several build agents who builds the installer mediums. Today we had a compile error inside of install4j at one of the build agents. The class version didn't match with some custom classes. We found out that the installed jre on the build agent were a jre_1.6 x32 and a jre_1.7 x64. The project setting was set to create a x32 installer medium with a minimum java version of 1.7. Therefore the search algorithm of install4j (%JAVA_HOME% etc.) used the jre_1.6 x32 to compile the code.

现在的问题是:是它可以配置编译JRE在Maven构建过程?也许要修改config.xml的路径从%USER_HOME%/。install4j5到%INSTALL4J_HOME%/配置?

Now the question: is it possible to configure the compile-jre during the maven build process? Maybe to modify the path of the config.xml from %User_Home%/.install4j5 to %INSTALL4J_HOME%/config?

为我们的环境,最好的解决办法是指向编译JRE到JRE,这将在Maven构建过程中被提取(阶段:流程资源)和稍后将在安装程序中,作为捆绑的JRE被列入应用程序。然后,我们可以确保应用程序编译使用相同的JRE,因为它会在安装后使用。无论生成代理的配置方式(64或32倍)。

The best solution for our environment would be to point the compile-jre to a jre, which will be extracted during the maven build (phase: process-resources) and which will be included later in the installer as the bundled jre for the application. Then we could be ensure that the application is compiled with the same jre as it will be used after installation. No matter how the build agent is configured (x64 or x32).

希望这个问题是可以理解的。

Hopefully the problem is understandable.

问候

哈迪

Greetings
Hardie

推荐答案

在常规设置 - > Java版本的步骤,您可以配置将用于脚本编译的JDK或JRE。默认情况下,它被设置为目前使用的JRE,即JRE的install4j IDE和命令行编译器与运行。

On the "General Settings->Java version" step, you can configure the JDK or JRE that will be used for script compilation. By default, this is set to "Currently used JRE", i.e. the JRE that the install4j IDE and the command line compiler are running with.

为了让更多的编译确定性,切换到配置的JDK。只有JRE(如JDK 1.7)指定的名称将被保存在项目的实际JRE,必须在每台机器上配置并随后在全球范围对所有项目中的相同。

To make compilation more deterministic, switch to a configured JDK. Only the specified name of the JRE (such as "JDK 1.7") will be saved in the project, the actual JRE has to be configured on each machine and is then globally the same for all projects.

如果你一具无头的机器上编译,编辑 $ HOME / .install4j5 / config.xml中并设置的JDK 元素像

If you compile on a headless machine, edit $HOME/.install4j5/config.xml and set the jdks element to something like

<jdks>
  <jdk name="JDK 1.7" id="1" javaHome="path/to/java/home" 
      version="1.7.0" jreOnly="false" />
</jdks>

这篇关于如何配置上生成代理编译的JRE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆