NSIS Maven Plugin

The NSIS Maven Plugin, utilizes the NSIS command line installer script compiler to generate a windows installer exe from a setup.nsi script.

Features of nsis-maven-plugin

  • Generate project.nsh containing variables from project's pom.xml suitable for inclusion in the setup.nsi main script. (see nsis:generate-project goal)
  • Compile setup.nsi into a windows installer EXE. (See nsis:compile goal)
  • Attach compiled installer EXE to the build deployment plan so that the install and deploy phases of the default lifecycle can process the created exe.
  • Continuous Integration friendly.
  • Maven 2 Repository system friendly.

Example flow / usage of the nsis-maven-plugin goals.

Project POM

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.company.product</groupId>
  <artifactId>my-installer</artifactId>
  <version>1.1</version>
  <packaging>pom</packaging>
  ...
</project>
arrow down
arrow down

Generated File

/target/project.nsh
arrow down

User Created File

/setup.nsi
arrow right

Plugin Goal

nsis:compile
arrow down

Compile Output

/target/my-installer-1.1.exe