PDA

View Full Version : How to build installer from iap.xml file using maven?



dayanandchalla
04-13-2016, 08:22 PM
Hi Guys,

We have created an iap.xml file for our product and we are using maven to generate build.

could please let me know if there is a way to generate installer using maven from iap file.

Thanks
Daya

sturge
04-21-2016, 01:25 PM
You can't build the installer directly with Maven, however, you can run ant within maven to build your installer with maven-antrun-plugin

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>build installer</id>
<phase>none</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />

<!-- Do ant stuff -->
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-commons-net</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<artifactId>ant</artifactId>
<groupId>ant</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>

kpriest
05-04-2016, 04:39 PM
Or just use the exec-maven-plugin


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>Combined</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>${project.build.directory}</workingDirectory>
<executable>"PATH-TO-IA"/build.exe</executable>
<arguments>
<argument>Combined-x64.iap_xml</argument>
<argument>-d</argument>
<argument>${project.build.directory}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>