Light Mojo Usage

Brief examples on how to use the light goal without using project.packaging.

The light mojo

If you want to convert one or multiple WiX Object (.wixobj) files into a MSI (.msi) file, use this configuration in your POM: By default the .msi file will have the same name as the project finalName - default artifactId-version Generally this will be done in a separate module with pom packaging.

configuration packaging defaults to project.packaging, and intDirectory defaults to target/wixobj/Release +---+ project ... build plugins plugin groupIdcom.github.wix-maven/groupId artifactIdwix-maven-plugin/artifactId configuration packagingmsi/packaging intDirectorytarget/test/intDirectory /configuration /plugin /plugins ... /build ... /project +---+

If you have used the intDirectory parameter for the candle goal, you may need to include the location of the WiX object files:

      <plugin>
        <groupId>org.apache.npanday.plugins</groupId>
        <artifactId>wix-maven-plugin</artifactId>
        <version>1.0-SNAPSHOT</version>
        <configuration>
          <packaging>msi</packaging>
          <intDirectory>target/IT</intDirectory>
          <includes>
            <include>**/IT*.wxs</include>
          </includes>
          <excludes>
            <exclude>**/IT1*.wxs</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <id>wix</id>
            <goals>
              <goal>light</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

It is always a good idea to put generated files under the 'target' directory so that they are cleaned up properly.