【问题标题】:Want to compile Inno Setup (.iss file) with Maven Plugin Exec想用 Maven Plugin Exec 编译 Inno Setup(.iss 文件)
【发布时间】:2019-04-18 14:52:32
【问题描述】:

我有一个关于 Exec Maven 插件的问题。

我想使用 exec maven 插件执行我的 setup.iss 文件(使用 Inno Setup 生成)。

一个问题:我应该在我的 pom 中为我的文件定义一个路径,还是必须将 setup.iss 放在哪个目的地才能让 maven 找到它?

这是我的 pom 中的代码:

<profiles>
    <profile>
        <id>exec</id>
        <activation>
            <property>
                <name>exec</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.6.0</version>
                    <configuration>
                        <mainClass>de.audi.analysis.main.Main</mainClass>
                        <executable>ISCC.exe</executable>
                        <workingDirectory></workingDirectory>
                        <arguments> 
                            <argument>firstsetup.iss</argument>
                        </arguments>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>install</phase>
                            <goals>
                                <goal>exec</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>

【问题讨论】:

    标签: java maven inno-setup exec-maven-plugin


    【解决方案1】:

    exec-maven-plugin 只是使用您提供的参数调用 iscc.exe。在这种情况下,插件将执行iscc.exe firstsetup.iss

    我相信它假设 firstsetup.iss 将在 maven 项目的 ${project.basedir} 中(pom.xml 所在的位置)或 workingDirectory(如果提供)。也可以使用参数传递特定的文件路径。

    &lt;argument&gt;${project.basedir}/&lt;some-path&gt;/firstsetup.iss&lt;/argument&gt;

    【讨论】:

      【解决方案2】:

      问题是我必须将所有 dll 添加到我的解决方案中。添加所有inno dll文件后,它工作正常,我得到了构建成功。谢谢你的回答亚当。这是我的 pom 配置:

      <configuration>
           <executable>src/main/resources/innosetup/ISCC.exe</executable>
           <workingDirectory>src/main/resources/innosetup</workingDirectory>
           <arguments>
             <argument>audience-setup1.iss</argument>
           </arguments>
      </configuration>
       <executions>
        <execution>
          <goals>
           <goal>java</goal>
          </goals>
        </execution>
       </executions>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-01-08
        • 2020-04-07
        • 1970-01-01
        • 2018-01-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多