Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
812 views
in Technique[技术] by (71.8m points)

maven 2 - Automating NSIS script build using maven2

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...