【问题标题】:CI/CD With Jenkins and Wix: Can't Find SourcesJenkins 和 Wix 的 CI/CD:找不到源
【发布时间】:2016-08-14 05:36:46
【问题描述】:

我正在尝试使用 Jenkins Wix Toolset Plugin 构建一个 msi。我已经在构建机器上安装了 Wix 3.10。

Jenkins 作业从 GitHub 中检查项目,我可以看到它运行良好。有 wxs 文件,但是好像找不到。

我已经在构建机器上安装了 Wix 并在 Jenkins 中配置了插件。

不确定它在这里查看的是哪个目录,但配置了 Jenkins 插件以通过 Ant 样式的文件模式 \*.wxs 获取 wxs 源文件:

为什么我看到文件(包括 wxs 文件)被添加到 Jenkins“工作区”,但 Wix 仍然无法找到它们?

当 Jenkins 构建运行时,我得到以下输出:

[wix] Enable Debug: true
[wix] Detecting environment variables...
[wix] Found sources: 0
[wix] Initializing tools...
[wix] Environment variables are not automatically added as parameters.
[wix] Environment variables are not automatically added as parameters.
[wix] Compiler found.
[wix] Linker found.
[wix] Starting compile process...
[wix] SEVERE: 0
[wix] Stacktrace follows:
java.lang.ArrayIndexOutOfBoundsException: 0
    at de.berg.systeme.jenkins.wix.Toolset.compile(Toolset.java:142)
    at de.berg.systeme.jenkins.wix.WixToolsetBuilder.perform(WixToolsetBuilder.java:164)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.Build$BuildExecution.build(Build.java:205)
    at hudson.model.Build$BuildExecution.doRun(Build.java:162)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
    at hudson.model.Run.execute(Run.java:1720)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:404)
Build step 'WIX Toolset' changed build result to FAILURE
Build step 'WIX Toolset' marked build as failure
Finished: FAILURE

[wix] 找到的来源:0

编辑 1:我已经设法克服了这个异常。原来我的 \*.wxs 的 Ant 样式文件模式不正确。相反,我使用了 **\*.wxs 并找到了该文件。原来还有一个问题。在我的 wxs 文件中,我引用了变量名称,例如“$(var.SolutionDir)”。 Wix 抱怨它找不到这个:

error CNDL0150 : Undefined preprocessor variable '$(var.SolutionDir)'.

这是在 .wixproj 文件中定义的,但似乎 Jenkins Wix 插件忽略了这个...

那么我如何让 Jenkins 插件知道它还应该知道还有一个 .wixproj 呢?

【问题讨论】:

    标签: jenkins wix windows-installer wix3.10


    【解决方案1】:

    您在源文件“\*.wxs”中给出的路径不正确。给出 wxs 文件所在位置的正确路径。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-11
      • 1970-01-01
      • 2015-03-23
      • 1970-01-01
      • 2021-09-04
      • 2019-01-06
      相关资源
      最近更新 更多