dion 2004/09/30 22:05:14 Modified: nsis/xdocs customizing.xml index.xml process.xml faq.fml changes.xml nsis plugin.properties plugin.jelly project.xml nsis/src/plugin-resources/templates project.jelly Log: MPNSIS-9. nsis-plugin should not depend on dist props, should support deploy and install Revision Changes Path 1.8 +3 -3 maven-plugins/nsis/xdocs/customizing.xml Index: customizing.xml =================================================================== RCS file: /home/cvs/maven-plugins/nsis/xdocs/customizing.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- customizing.xml 10 Jul 2004 08:57:27 -0000 1.7 +++ customizing.xml 1 Oct 2004 05:05:14 -0000 1.8 @@ -83,9 +83,9 @@ <table> <tr><th>Constant</th> <th>Value</th></tr> <tr><td>PROJECT_BUILD_DIR</td> <td>${maven.build.dir}</td></tr> - <tr><td>PROJECT_DIST_BIN_DIR</td> <td>${maven.dist.bin.assembly.dir}</td></tr> - <tr><td>PROJECT_DIST_DIR</td> <td>${maven.dist.dir}</td></tr> - <tr><td>PROJECT_FINAL_NAME</td> <td>${maven.final.name}</td></tr> + <tr><td>PROJECT_DIST_BIN_DIR</td> <td>${maven.nsis.build.dir}</td></tr> + <tr><td>PROJECT_DIST_DIR</td> <td>${maven.build.dir}</td></tr> + <tr><td>PROJECT_FINAL_NAME</td> <td>${maven.nsis.final.name}</td></tr> <tr><td>PROJECT_LICENSE_FILE</td> <td>${maven.license.licenseFile}</td></tr> <tr><td>PROJECT_LICENSE_TEXT</td> <td>${maven.nsis.license.text}</td></tr> <tr><td>PROJECT_LOGO</td> <td>${maven.nsis.logo}</td></tr> 1.5 +4 -3 maven-plugins/nsis/xdocs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/maven-plugins/nsis/xdocs/index.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- index.xml 5 Jul 2004 05:39:59 -0000 1.4 +++ index.xml 1 Oct 2004 05:05:14 -0000 1.5 @@ -64,12 +64,13 @@ <section name="Using the NSIS Plugin"> <p> The plugin creates an installation program from your <code>distribution</code>, - as created by <code>maven dist</code>. The <code>dist</code> goal must be + as created by <code>maven dist</code>. The <code>dist</code> goal is usually run before using the plugin. </p> <p> - Once you've run <code>dist</code>, run the <code>nsis</code> goal. This - produces an executable in <code>${maven.build.dir}/${maven.final.name}.exe</code> + Once you've run <code>dist</code>, or created your directory with the installation contents, + run the <code>nsis</code> goal. This produces an executable in + <code>${maven.build.dir}/${maven.nsis.final.name}.exe</code> </p> </section> </body> 1.2 +1 -1 maven-plugins/nsis/xdocs/process.xml Index: process.xml =================================================================== RCS file: /home/cvs/maven-plugins/nsis/xdocs/process.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- process.xml 4 Jul 2004 12:26:09 -0000 1.1 +++ process.xml 1 Oct 2004 05:05:14 -0000 1.2 @@ -27,7 +27,7 @@ <body> <section name="How it works"> <p> - The process of creating an installer from your <code>${maven.dist.bin.dir}</code> + The process of creating an installer from your <code>${maven.nsis.build.dir}</code> using the plugin is as follows: <ol> <li> 1.2 +7 -7 maven-plugins/nsis/xdocs/faq.fml Index: faq.fml =================================================================== RCS file: /home/cvs/maven-plugins/nsis/xdocs/faq.fml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- faq.fml 8 Jul 2004 04:19:05 -0000 1.1 +++ faq.fml 1 Oct 2004 05:05:14 -0000 1.2 @@ -11,12 +11,12 @@ <answer> <p> With the default templates, all the files from the directory denoted by the - <code>maven.dist.bin.assembly.dir</code> property are installed, + <code>maven.nsis.build.dir</code> property are installed, together with an uninstaller if the end-user so desires. </p> <p> - If you call the dist goal before calling the nsis goal, - it will set the property correctly and generate files into that directory. + If you call the dist goal before calling the nsis goal, e.g. (maven dist nsis), + it will set the property correctly. </p> </answer> </faq> @@ -82,15 +82,15 @@ <faq id="troubleshooting.assemblyDir"> <question> Why am I getting <code>org.apache.commons.jelly.JellyTagException: ... - 'maven.dist.bin.assembly.dir' must be specified ...</code> + 'maven.nsis.build.dir' must be specified ...</code> when I run the <code>nsis</code> goal? </question> <answer> <p> - The nsis goal counts on the <code>maven.dist.bin.assembly.dir</code> property being set. - Normally the dist goal does this. You could also pass it in when running the goal, e.g. + The nsis goal counts on the <code>maven.nsis.build.dir</code> property being set. + You could also pass it in when running the goal, e.g. </p> - <source>maven -Dmaven.dist.bin.assembly.dir=c:/develop/build/files nsis</source> + <source>maven -maven.nsis.build.dir=c:/develop/build/files nsis</source> </answer> </faq> </part> 1.19 +3 -2 maven-plugins/nsis/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven-plugins/nsis/xdocs/changes.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- changes.xml 1 Oct 2004 00:25:49 -0000 1.18 +++ changes.xml 1 Oct 2004 05:05:14 -0000 1.19 @@ -25,7 +25,8 @@ </properties> <body> - <release version="1.2-SNAPSHOT" date="In CVS"> + <release version="2.0-SNAPSHOT" date="In CVS"> + <action dev="dion" type="fix" due-to="Matthias Kerkhoff" issue="MPNSIS-9">Use maven.nsis.build.dir instead of maven.dist.assembly.dir.</action> <action dev="dion" type="fix" due-to="Matthias Kerkhoff" issue="MPNSIS-8">Fail when makensis fails.</action> <action dev="dion" type="update">Rename <code>ORGANIZATION</code> constant to <code>PROJECT_ORGANIZATION</code>.</action> <action dev="dion" type="fix" due-to="Geoffrey">Check maven.nsis.exe exists before using it.</action> @@ -43,7 +44,7 @@ <code>PROJECT_DIST_DIR</code>constant to <code>PROJECT_DIST_BIN_DIR</code>, and define <code>PROJECT_DIST_DIR</code>to be - <code>${maven.dist.dir></code> + <code>${maven.dist.dir}</code> </action> <action dev="dion" type="update">Add docs on how the plugin process works</action> <action dev="dion" type="update">Add some basic documentation</action> 1.6 +6 -0 maven-plugins/nsis/plugin.properties Index: plugin.properties =================================================================== RCS file: /home/cvs/maven-plugins/nsis/plugin.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- plugin.properties 10 Mar 2004 11:11:23 -0000 1.5 +++ plugin.properties 1 Oct 2004 05:05:14 -0000 1.6 @@ -43,3 +43,9 @@ # size of the logo on the first page #maven.nsis.logo.widthHeight= + +# directory containing contents to be bundled +maven.nsis.build.dir= + +# name of generated exe +maven.nsis.final.name=${maven.final.name} \ No newline at end of file 1.10 +70 -6 maven-plugins/nsis/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/maven-plugins/nsis/plugin.jelly,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- plugin.jelly 1 Oct 2004 00:24:56 -0000 1.9 +++ plugin.jelly 1 Oct 2004 05:05:14 -0000 1.10 @@ -21,6 +21,7 @@ <project xmlns:j="jelly:core" xmlns:ant="jelly:ant" + xmlns:artifact="artifact" xmlns:license="license" xmlns:maven="jelly:maven" xmlns:util="jelly:util"> @@ -32,14 +33,17 @@ <goal name="nsis" description="Generate NSIS Installer .exe" prereqs="nsis:installer"> - <ant:echo>Installer generated successfully</ant:echo> </goal> <goal name="nsis:generate-project" description="Generate NSIS project.nsh file"> - <maven:get var="maven.dist.bin.assembly.dir" plugin="maven-dist-plugin" property="maven.dist.bin.assembly.dir"/> - <maven:param-check value="${maven.dist.bin.assembly.dir}" fail="true" - message="'maven.dist.bin.assembly.dir' must be specified. It is the directory containing files to be placed in the installer"/> + + <!-- if maven.nsis.build.dir isn't specified, grab the dist setting --> + <j:if test="${context.getVariable('maven.nsis.build.dir') == null}"> + <maven:get var="maven.nsis.build.dir" plugin="maven-dist-plugin" property="maven.dist.bin.assembly.dir"/> + </j:if> + <maven:param-check value="${maven.nsis.build.dir}" fail="true" + message="'maven.nsis.build.dir' must be specified. It is the directory containing files to be placed in the installer"/> <mkdir dir="${maven.build.dir}"/> @@ -80,14 +84,74 @@ <j:if test="${!nsisExeFile.exists()}"> <fail>The NSIS executable '${maven.nsis.exe}' could not be found</fail> </j:if> - <maven:get var="maven.dist.dir" plugin="maven-dist-plugin" property="maven.dist.dir"/> - <mkdir dir="${maven.dist.dir}"/> + <!-- call makensis.exe with the setup.nsi file --> <ant:exec executable="${maven.nsis.exe}" failonerror="true"> <arg value="/V2"/> <arg value="${script}"/> </ant:exec> + <ant:echo>Installer ${maven.build.dir}/${maven.nsis.final.name}.exe generated successfully</ant:echo> + </goal> + + <!-- ================================================================== --> + <!-- D E P L O Y S N A P S H O T --> + <!-- ================================================================== --> + + <goal + name="nsis:deploy-snapshot" + prereqs="nsis:installer" + description="Deploy a snapshot exe to the remote repository"> + + <artifact:deploy-snapshot + artifact="${maven.build.dir}/${maven.nsis.final.name}.exe" + type="exe" + project="${pom}" + /> + </goal> + + <!-- ================================================================== --> + <!-- D E P L O Y J A R --> + <!-- ================================================================== --> + + <goal + name="nsis:deploy" + prereqs="nsis:installer" + description="Deploy an exe to the remote repository"> + + <artifact:deploy + artifact="${maven.build.dir}/${maven.nsis.final.name}.exe" + type="exe" + project="${pom}" + /> + </goal> + + <!-- ================================================================== --> + <!-- I N S T A L L J A R --> + <!-- ================================================================== --> + + <goal name="nsis:install" prereqs="nsis:installer" + description="Install the exe in the local repository"> + + <artifact:install + artifact="${maven.build.dir}/${maven.nsis.final.name}.exe" + type="exe" + project="${pom}" + /> </goal> + <!-- ================================================================== --> + <!-- I N S T A L L S N A P S H O T --> + <!-- ================================================================== --> + + <goal + name="nsis:install-snapshot" prereqs="nsis:installer" + description="Install a snapshot exe in the local repository"> + + <artifact:install-snapshot + artifact="${maven.build.dir}/${maven.nsis.final.name}.exe" + type="exe" + project="${pom}" + /> + </goal> </project> 1.14 +1 -1 maven-plugins/nsis/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/maven-plugins/nsis/project.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- project.xml 8 Jul 2004 01:51:40 -0000 1.13 +++ project.xml 1 Oct 2004 05:05:14 -0000 1.14 @@ -21,7 +21,7 @@ <pomVersion>3</pomVersion> <name>Maven NSIS Plug-in</name> <artifactId>maven-nsis-plugin</artifactId> - <currentVersion>1.2-SNAPSHOT</currentVersion> + <currentVersion>2.0-SNAPSHOT</currentVersion> <organization/> <description>A plugin to generate Win32 installer programs using NSIS</description> <shortDescription>NSIS Plugin for Maven</shortDescription> 1.12 +4 -4 maven-plugins/nsis/src/plugin-resources/templates/project.jelly Index: project.jelly =================================================================== RCS file: /home/cvs/maven-plugins/nsis/src/plugin-resources/templates/project.jelly,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- project.jelly 10 Jul 2004 08:57:27 -0000 1.11 +++ project.jelly 1 Oct 2004 05:05:14 -0000 1.12 @@ -25,16 +25,16 @@ <maven:get var="maven.license.licenseFile" plugin="maven-license-plugin" property="maven.license.licenseFile"/> <maven:makeAbsolutePath var="license" basedir="${basedir}" path="${maven.license.licenseFile}"/> <maven:makeAbsolutePath var="build" basedir="${basedir}" path="${maven.build.dir}"/> -<maven:makeAbsolutePath var="dist" basedir="${basedir}" path="${maven.dist.bin.assembly.dir}"/> +<maven:makeAbsolutePath var="dist" basedir="${basedir}" path="${maven.nsis.build.dir}"/> <ant:tstamp /> ; template for project details ; generated by ${user.name} from project.xml version ${pom.currentVersion} ; on date ${TODAY}, time ${TSTAMP} !define PROJECT_BUILD_DIR "${build}" -!define PROJECT_DIST_BIN_DIR "${maven.dist.bin.assembly.dir}" -!define PROJECT_DIST_DIR "${maven.dist.dir}" -!define PROJECT_FINAL_NAME "${maven.final.name}" +!define PROJECT_DIST_BIN_DIR "${maven.nsis.build.dir}" +!define PROJECT_DIST_DIR "${maven.build.dir}" +!define PROJECT_FINAL_NAME "${maven.nsis.final.name}" <util:available file="${license}"> !define PROJECT_LICENSE_FILE "${license}" !define PROJECT_LICENSE_TEXT "${maven.nsis.license.text}"
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]