【发布时间】:2017-10-20 10:10:25
【问题描述】:
作为评估的一部分,将此查询也放在这里,以防其他人也发现了问题并解决了问题。
我的问题是如何在运行maven 构建时从命令行将参数传递给install4jc 编译器,例如我现在有这样的事情:
mvn clean package -Dinstall4j.home=$INSTALL4J_HOME -Dinstall4j.compiler=$INSTALL4J_COMPILER -Dxxxx.install4j.project.file=$XXXXX_INSTALL4J_PROJECT_FILE
但我得到了这个错误:
[INFO] Loading config file
/path/to/installer-file
[INFO] install4j: compilation failed. Reason:
null------------------------------------------------------------------------------
[INFO]
[INFO] The private key is encrypted. To avoid manual intervention, set
the
[INFO] "--mac-keystore-password" command line option or the
[INFO]
"macKeystorePassword" ant task attribute.
[INFO]
------------------------------------------------------------------------------
[INFO]
Enter the password for the macOS key store:
[INFO]
------------------------------------------------------------------------
[INFO]
BUILD FAILURE
我更关心通过 maven 传递密码,我知道如何使用 -D 选项通过 install4jc 命令行传递密码。
是否有可以传递此密码的compiler. 或runtime. 属性(请参阅https://resources.ej-technologies.com/install4j/help/doc/steps/general/variables.html)。 windows keystore password 同样适用。
【问题讨论】:
-
我猜你正在使用来自sonatype 的maven 插件,是吗?在那里,您可以在配置部分预定义 maven 插件的属性,并通过命令行覆盖属性以使用
-Dinstall4j.winKeystorePassword=xyz进行开发或安全目的。
标签: windows macos maven command-line install4j