Installing
Troubleshooting
With the default templates, all the files from the directory denoted by the
maven.nsis.build.dir
property are installed,
together with an uninstaller if the end-user so desires.
If you call the dist goal before calling the nsis goal, e.g. (maven dist nsis), it will set the property correctly.
The default templates currently doesn't support this.
It does however support a nsis script function called AssertJavaHome
,
which you can run before installing. See the documentation.
There is nothing stopping you to write a template that includes a jvm. And there is nothing stopping you to contribute it to the Maven community either :)
The default templates mirror a few pom properties into the NSIS script. Using them you can set the start menu shortcuts like this:
CreateShortCut "${PROJECT_STARTMENU_FOLDER}\${PROJECT_NAME} ${PROJECT_VERSION}.lnk" "$INSTDIR\${PROJECT_FINAL_NAME}.jar" CreateShortCut "${PROJECT_STARTMENU_FOLDER}\Uninstall ${PROJECT_NAME} ${PROJECT_VERSION}.lnk" "$INSTDIR\Uninst.exe" CreateShortCut "${PROJECT_STARTMENU_FOLDER}\${PROJECT_NAME} site.lnk" "${PROJECT_URL}"
[exec] Error: command Section not valid in section
when I run the nsis
goal?
For the nsis plugin to work, nsis must be installed on your system
and the maven.nsis.exe
property must be set correctly.
You can download nsis from .
If you installed nsis to the default directory, the maven.nsis.exe
property
will have the correct value by default, otherwise you must set it accordingly,
for example:
maven.nsis.exe=C:/develop/build/NSIS/makensis.exe
As the NSIS installation directory is probably different between you and other team
members, it is best to set this in build.properties
.
org.apache.commons.jelly.JellyTagException: ...
'maven.nsis.build.dir' must be specified ...
when I run the nsis
goal?
The nsis goal counts on the maven.nsis.build.dir
property being set.
You could also pass it in when running the goal, e.g.
maven -maven.nsis.build.dir=c:/develop/build/files nsis