[ 
https://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=332952#comment-332952
 ] 

Dennis Lundberg commented on MJARSIGNER-13:
-------------------------------------------

Hi Kurt,

Thanks for bringing a live project to the table. It is so much easier to debug 
when you have something real to work with.

We have several projects at my day job that uses this plugin, and they all work 
fine on Windows. I tried to see what differed between your project and ours. I 
took a while but finally I stumbled upon this comment in our POMs:

{code:xml}
        <!-- This needs to run after the Jarsigner plugin execution -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        ...
{code}

The problem seems to be that both jarsigner and assembly plugins are bound to 
the package phase. At least in our case the assembly should contain the signed 
artifact. So I think Chris is right in assuming that there is some file locking 
problem that is specific to the Windows platform.

Anyway the solution to this problem, and I have verified it on jUDDI, is to 
move the assembly execution so that it comes *after* the jarsigner execution in 
the POM. If this solves this issue for you I'll add an FAQ entry for it in the 
plugin documentation.
                
> signing in multi-module project fails on windows
> ------------------------------------------------
>
>                 Key: MJARSIGNER-13
>                 URL: https://jira.codehaus.org/browse/MJARSIGNER-13
>             Project: Maven Jar Signer Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP, android sdk 
>            Reporter: Anna Gadomska
>         Attachments: pom.xml
>
>
> I got multi-module (6 modules) android project with .pom file and "sign" 
> profile defined. When I execute with 'sign' profile:
> - in Maven 3.0.1 - it signs 3 modules and fails. when I resume the execution 
> (mv <goal> -rf) it signs another 3 modules and fails again. The reason for 
> failing is: [INFO] jarsigner: attempt to rename xxx.jar to xxx.jar.orig 
> failed.
> - in Maven 2.2.1 - it doesn't work at all, even for first module; it returns 
> "error code 1"
> However, I tried the same .pom - everything works perfectly in Linux 
> (Ubuntu). 
> I was afraid that it might be the issue with spaces, so I hardcoded the paths 
> - the error I got from maven than was:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-jarsigner-plugin:1.2:sign (signing) on project 
> MyProject: Failed executing 'cmd.exe /X /C 
> "C:\tools\JavaTMSEDevelopementKit\jre\..\bin\jarsigner.exe -verbose -keystore 
> "C:\tmp\debug.keystore" -storepass '*****' -keypass '*****' xxx.jar 
> '*****'debugkey"' - exitcode 1 -> [Help 1]
> {noformat}
> Attaching pom file which I am using.
> Please help?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to