2007-04-30 07:41:05 +00:00

114 lines
4.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<faqs title="Frequently Asked Questions">
<part id="installing">
<title>Installing</title>
<faq id="installing.files">
<question>
Which files are installed into the installation directory?
</question>
<answer>
<p>
With the default templates, all the files from the directory denoted by the
<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, e.g. (maven dist nsis),
it will set the property correctly.
</p>
</answer>
</faq>
<faq id="installing.includeJvm">
<question>
Can I include a jvm in my installer?
</question>
<answer>
<p>
The default templates currently doesn't support this.
It does however support a nsis script function called <code>AssertJavaHome</code>,
which you can run before installing. See the documentation.
</p>
<p>
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 :)
</p>
</answer>
</faq>
<faq id="installing.dynamicShortcuts">
<question>
Can I make my shortcuts dynamic based on my pom properties?
</question>
<answer>
<p>
The default templates mirror a few pom properties into the NSIS script.
Using them you can set the start menu shortcuts like this:
</p>
<source>
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}"
</source>
</answer>
</faq>
</part>
<part id="troubleshooting">
<title>Troubleshooting</title>
<faq id="troubleshooting.execCommandSection">
<question>
Why am I getting <code>[exec] Error: command Section not valid in section</code>
when I run the <code>nsis</code> goal?
</question>
<answer>
<p>
For the nsis plugin to work, nsis must be installed on your system
and the <code>maven.nsis.exe</code> property must be set correctly.
You can download nsis from <a href="http://nsis.sourceforge.net" target="_new"/>.
If you installed nsis to the default directory, the <code>maven.nsis.exe</code> property
will have the correct value by default, otherwise you must set it accordingly,
for example:
</p>
<source>
maven.nsis.exe=C:/develop/build/NSIS/makensis.exe
</source>
<p>
As the NSIS installation directory is probably different between you and other team
members, it is best to set this in <code>build.properties</code>.
</p>
</answer>
</faq>
<faq id="troubleshooting.assemblyDir">
<question>
Why am I getting <code>org.apache.commons.jelly.JellyTagException: ...
'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.nsis.build.dir</code> property being set.
You could also pass it in when running the goal, e.g.
</p>
<source>maven -maven.nsis.build.dir=c:/develop/build/files nsis</source>
</answer>
</faq>
</part>
</faqs>