Automating NSIS script build using maven2
Asked Answered
I

1

3

We have developed a script using NSIS Version 2.46 which would generate a installer for windows. Now that we would want to automate the build process of generating the installer by taking help of maven.

We currently use maven for building our java code projects and for building our end product.

For automating the build process of NSIS script, I am not able to find the maven plugin information which supports NSIS script build.

I googled for the information but I did not get any concrete information on how to start with it.

Could anyone explain how to start with it or point me to a page which explains about this with an example?

Issykkul answered 27/4, 2012 at 14:18 Comment(1)
Today I found a plugin maven-nsis-plugin 2.1. Which is suppose to be a plugin for generating windows installer using NSIS script. When I used this plugin in my POM, the plugin gets downloaded. After download it gives an error saying plugin descriptor not found. Could anyone confirm does maven-nsis-plugin work with maven2.2.1?Issykkul
C
6

Try this one from codehaus.

After you install or build 'makensis', you should be able to configure your pom to look something like this:

    <!-- Codehause Snapshots - Nsis plugin needs this -->
    <pluginRepository>
        <id>Codehaus Snapshots</id>
        <url>http://nexus.codehaus.org/snapshots/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>  <!-- Workaround for MNG-2974, see note below -->
        </releases>
    </pluginRepository>

   <!-- NSIS plugin for producing nsis installer -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>nsis-maven-plugin</artifactId>
            <version>1.0-SNAPSHOT</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>generate-project</goal>
                        <goal>compile</goal>
                    </goals>
                    <configuration>
                        <makensisBin>/usr/local/nsis/nsis-2.46/bin/makensis</makensisBin>
                        <setupScript>src/nsis/setup.nsi</setupScript>
                        <outputFile>${project.build.directory}/${project.build.finalName}.exe</outputFile>
                    </configuration>
                </execution>
            </executions>
        </plugin>
Catapult answered 15/5, 2012 at 6:26 Comment(1)
it seems that the <setupScript> should be replaced with <scriptFile>. The first one didn't work for me, while the second did.Cordalia

© 2022 - 2024 — McMap. All rights reserved.