[ 
http://jira.codehaus.org/browse/MOJO-1455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198172#action_198172
 ] 

Michael Rudolf commented on MOJO-1455:
--------------------------------------

In theory I agree, but the problem is that NSIS treats a relative outputPath as 
relative to the setup script and not to the project basedir. I stumbled upon 
this because I could not find a default location for setup scripts in the mojo, 
such as src/main/nsis. Therefore I just placed my script there and hoped that 
the installer would be generated in target/setup.exe, but it failed due to the 
path mangling. I tried with both absolute and relative outputPath values.

If a relative outputPath should be treated as relative to the project basedir 
instead, either some logic is needed inside the mojo to convert that to a 
relative path with respect to the setup script or (and this is probably best) 
that relative path should simply be converted to an absolute one.

> nsis-maven-plugin ignores that outputFile is relative to setupScript
> --------------------------------------------------------------------
>
>                 Key: MOJO-1455
>                 URL: http://jira.codehaus.org/browse/MOJO-1455
>             Project: Mojo
>          Issue Type: Bug
>          Components: nsis
>            Reporter: Michael Rudolf
>         Attachments: stop-mangling-outputFile.patch
>
>
> NSIS regards the outputPath parameter as relative to the setup script, if it 
> denotes a relative path. Therefore, messing around with it will break NSIS in 
> case the setup script is not in the default location. Example: if the setup 
> script is in src/main/nsis/setup.nsi and the outputPath is given as 
> ../../../target/setup.exe (note that this is relative to the setup script), 
> then the mojo erroneously converts the latter path to target/setup.exe, which 
> will be resolved to src/main/nsis/target/setup.exe and fails due to the 
> non-existence of the target subdirectory inside the nsis directory. Using an 
> absolute path instead of a relative one for the outputPath property will not 
> work either, since it will also be converted to target/setup.exe. Summing up, 
> making the outputPath property relative to the project basedir is wrong, 
> since it is relative to the setup script.
> The attached patch removes the lines converting the outputPath to a relative 
> path in case it is inside the project basedir.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to