我对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>
答案 0 :(得分:0)
exec-maven-plugin只是使用您提供的参数调用iscc.exe。在这种情况下,插件将执行url(r'^the_url_to_run_the_script$', main_function)
我认为它假定firstsetup.iss将在maven项目的$ {project.basedir}中(在pom.xml所在的位置)或workingDirectory(如果提供)。特定的文件路径也可以使用参数传递。
iscc.exe firstsetup.iss
答案 1 :(得分:0)
问题是我必须将所有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>