maven - 如何在 Maven 构建中使用 Inno Setup?

标签 maven jenkins inno-setup

我的 Eclipse RCP 应用程序是通过 Maven 构建的。我很想通过 Inno Setup 自动构建一个设置。但我不知道在哪里包含 Inno Setup exe 和 .iss,它也应该包含在自动 Jenkins 构建中,那么 Inno Setup 应该放在哪里?

这是 Google 告诉我要做的,但我总是收到 IOException,因为找不到 ISCC.exe

有人做过这样的 Maven-Inno Setup-build 吗?

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.6.0</version>
    <executions>
      <execution>
        <phase>install</phase>
        <goals>
          <goal>exec</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <executable>ISCC.exe</executable>     
      <arguments>
        <argument>setup.iss</argument>
      </arguments>
    </configuration>
  </plugin>

最佳答案

请参阅exec-maven-plugin:exec页面:

executable:

The executable. Can be a full path or the name of the executable. In the latter case, the executable must be in the PATH for the execution to work.

The plugin will search for the executable in the following order:

  1. relative to the root of the project
  2. as toolchain executable
  3. relative to the working directory (Windows only)
  4. relative to the directories specified in the system property PATH (Windows Only)

Otherwise use the executable as is.

我还将插件执行绑定(bind)到 package 阶段而不是 install 阶段,因为它是 the more natural one :

package – take the compiled code and package it in its distributable format

这样您也可以在集成测试阶段使用设置的结果。

关于maven - 如何在 Maven 构建中使用 Inno Setup?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48624027/

相关文章:

maven - 如何让 Jenkins 构建正确的 .war 文件?

java - 如何使用不同的资源文件夹配置 Maven 配置文件?

Jenkins - 将脚本化管道导出到共享库中

windows - InnoSetup - 为默认子项添加值?

spring - 加载类 "org.slf4j.impl.StaticLoggerBinder"失败,Spring Boot

java - 如何在 Jenkins 上处理并发 Maven 构建?

jenkins - JENKINS 中是否有从节点 home 的环境变量?

inno-setup - Inno Setup 在打包过程中重命名文件

inno-setup - 更改 Inno Setup 启动时的焦点控制

maven - 使用 Maven Ant 任务将 jar 部署到 Nexus