简体   繁体   中英

Want to compile Inno Setup (.iss file) with Maven Plugin Exec

I have a Question about the Exec Maven Plugin.

I want to execute my setup.iss file (generated with Inno Setup) with the exec maven plugin.

One question: Should I define a path for my file in my pom or in which destination the setup.iss has to be put for maven to find it?

Here is the code from my 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>

The exec-maven-plugin is simply calling the iscc.exe with the arguments you provide. In this instance the plugin would execute iscc.exe firstsetup.iss

I believe it assumes the firstsetup.iss will be in the ${project.basedir} of the maven project (where the pom.xml is) or the workingDirectory if provided. A specific file path can be passed with argument as well.

<argument>${project.basedir}/<some-path>/firstsetup.iss</argument>

The problem was that i have to add all the dll to my solution. After adding all inno dll files it works fine and i get build success. Thank you for your Answer Adam. Here is my pom configuration:

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM