You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Anna Gadomska (JIRA)" <ji...@codehaus.org> on 2011/02/28 15:43:23 UTC
[jira] Created: (MJARSIGNER-13) signing in multi-module project
fails on windows
signing in multi-module project fails on windows
------------------------------------------------
Key: MJARSIGNER-13
URL: http://jira.codehaus.org/browse/MJARSIGNER-13
Project: Maven 2.x 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:
[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]
Attaching pom file which I am using.
Please help?
--
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
[jira] (MJARSIGNER-13) signing in multi-module project fails on
windows
Posted by "Paul Vonnahme (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290438#comment-290438 ]
Paul Vonnahme commented on MJARSIGNER-13:
-----------------------------------------
This appears to still be an issue. I tested it on Windows 2003 and maven 3.0.4 (the latest at this time). I found this info: http://stackoverflow.com/questions/7421710/android-maven-jarsigner-jarsigner-attempt-to-rename-x-but-failed
Which links to this blog with a workaround (workaround is to use maven-jar-plugin): http://www.jameselsey.co.uk/blogs/techblog/automating-android-application-signing-and-zipaligning-with-maven/
If I try to sign & verify via two different executions within the jarsigner plugin configuration, I get the error. However, if I sign with an execution step in the maven-jar-plugin and then verify with an execution step in the maven-jarsigner-plugin, it works.
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: https://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MJARSIGNER-13) signing in multi-module project
fails on windows
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=258015#action_258015 ]
Dennis Lundberg commented on MJARSIGNER-13:
-------------------------------------------
Also you can try to run mvn with the -X command line option to run in debug mode. Hopefully you'll get a helpful error message or stack trace at the end.
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MJARSIGNER-13) signing in multi-module project
fails on windows
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg updated MJARSIGNER-13:
--------------------------------------
Description:
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?
was:
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:
[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]
Attaching pom file which I am using.
Please help?
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MJARSIGNER-13) signing in multi-module project
fails on windows
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=258008#action_258008 ]
Dennis Lundberg commented on MJARSIGNER-13:
-------------------------------------------
What is the error message you get from jarsigner if you run it directly from the command line?
{noformat}
cmd.exe /X /C "C:\tools\JavaTMSEDevelopementKit\jre\..\bin\jarsigner.exe -verbose -keystore "C:\tmp\debug.keystore" -storepass '*****' -keypass '*****' xxx.jar '*****'debugkey"
{noformat}
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MJARSIGNER-13) signing in multi-module project
fails on windows
Posted by "Anna Gadomska (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=258010#action_258010 ]
Anna Gadomska commented on MJARSIGNER-13:
-----------------------------------------
Dennis, it works fine when I call it from command line, separately for every module
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MJARSIGNER-13) signing in multi-module project
fails on windows
Posted by "Ton van Bart (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=260685#action_260685 ]
Ton van Bart commented on MJARSIGNER-13:
----------------------------------------
I have the same problem with a build developed on OSX which fails on Windows (XP - my employer hasn't upgraded yet).
Running "mvn install -X" ends with the following messages and stack trace:
{{
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jarsigner-plugin:1.2:sign' -->
[DEBUG] (f) alias = mykey
[DEBUG] (f) arguments = []
[DEBUG] (f) keystore = src/main/signing/testkeys
[DEBUG] (f) processAttachedArtifacts = true
[DEBUG] (f) processMainArtifact = true
[DEBUG] (f) project = MavenProject: org.vanbart:testapplet:0.0.1-SNAPSHOT @ C:\workspaces_STS\rct-mavenized\test\testapplet\pom.xml
[DEBUG] (f) removeExistingSignatures = false
[DEBUG] (f) skip = false
[DEBUG] (f) storepass = test123
[DEBUG] (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [jarsigner:sign {execution: sign}]
[DEBUG] Processing C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar
[DEBUG] 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe" -keystore src/main/signing/testkeys -storepass '*****' C:\workspa
ces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"'
[DEBUG] jarsigner: attempt to rename C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar to C:\workspaces_STS\rct-mav
enized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar.orig failed
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe" -keystore src/main/signing/testkeys -storepass '*
****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"' - exitcode 1
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe"
-keystore src/main/signing/testkeys -storepass '*****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"' -
exitcode 1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.ex
e" -keystore src/main/signing/testkeys -storepass '*****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"'
- exitcode 1
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.processArchive(AbstractJarsignerMojo.java:495)
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.processArtifact(AbstractJarsignerMojo.java:372)
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.execute(AbstractJarsignerMojo.java:197)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Fri Mar 18 16:05:56 CET 2011
[INFO] Final Memory: 21M/38M
[INFO] ------------------------------------------------------------------------
C:\workspaces_STS\rct-mavenized\test\testapplet>
}}
This particular project is for test, but it is a proof-of-concept that will be merged into a production project.
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MJARSIGNER-13) signing in
multi-module project fails on windows
Posted by "Ton van Bart (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=260685#action_260685 ]
Ton van Bart edited comment on MJARSIGNER-13 at 3/18/11 10:16 AM:
------------------------------------------------------------------
I have the same problem with a build developed on OSX which fails on Windows (XP - my employer hasn't upgraded yet).
Running "mvn install -X" ends with the following messages and stack trace:
{code}
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jarsigner-plugin:1.2:sign' -->
[DEBUG] (f) alias = mykey
[DEBUG] (f) arguments = []
[DEBUG] (f) keystore = src/main/signing/testkeys
[DEBUG] (f) processAttachedArtifacts = true
[DEBUG] (f) processMainArtifact = true
[DEBUG] (f) project = MavenProject: org.vanbart:testapplet:0.0.1-SNAPSHOT @ C:\workspaces_STS\rct-mavenized\test\testapplet\pom.xml
[DEBUG] (f) removeExistingSignatures = false
[DEBUG] (f) skip = false
[DEBUG] (f) storepass = test123
[DEBUG] (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [jarsigner:sign {execution: sign}]
[DEBUG] Processing C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar
[DEBUG] 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe" -keystore src/main/signing/testkeys -storepass '*****' C:\workspa
ces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"'
[DEBUG] jarsigner: attempt to rename C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar to C:\workspaces_STS\rct-mav
enized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar.orig failed
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe" -keystore src/main/signing/testkeys -storepass '*
****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"' - exitcode 1
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe"
-keystore src/main/signing/testkeys -storepass '*****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"' -
exitcode 1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.ex
e" -keystore src/main/signing/testkeys -storepass '*****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"'
- exitcode 1
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.processArchive(AbstractJarsignerMojo.java:495)
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.processArtifact(AbstractJarsignerMojo.java:372)
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.execute(AbstractJarsignerMojo.java:197)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Fri Mar 18 16:05:56 CET 2011
[INFO] Final Memory: 21M/38M
[INFO] ------------------------------------------------------------------------
C:\workspaces_STS\rct-mavenized\test\testapplet>
{code}
This particular project is for test, but it is a proof-of-concept that will be merged into a production project.
was (Author: tonvanbart):
I have the same problem with a build developed on OSX which fails on Windows (XP - my employer hasn't upgraded yet).
Running "mvn install -X" ends with the following messages and stack trace:
{{
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jarsigner-plugin:1.2:sign' -->
[DEBUG] (f) alias = mykey
[DEBUG] (f) arguments = []
[DEBUG] (f) keystore = src/main/signing/testkeys
[DEBUG] (f) processAttachedArtifacts = true
[DEBUG] (f) processMainArtifact = true
[DEBUG] (f) project = MavenProject: org.vanbart:testapplet:0.0.1-SNAPSHOT @ C:\workspaces_STS\rct-mavenized\test\testapplet\pom.xml
[DEBUG] (f) removeExistingSignatures = false
[DEBUG] (f) skip = false
[DEBUG] (f) storepass = test123
[DEBUG] (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [jarsigner:sign {execution: sign}]
[DEBUG] Processing C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar
[DEBUG] 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe" -keystore src/main/signing/testkeys -storepass '*****' C:\workspa
ces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"'
[DEBUG] jarsigner: attempt to rename C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar to C:\workspaces_STS\rct-mav
enized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar.orig failed
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe" -keystore src/main/signing/testkeys -storepass '*
****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"' - exitcode 1
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.exe"
-keystore src/main/signing/testkeys -storepass '*****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"' -
exitcode 1
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_17\jre\..\bin\jarsigner.ex
e" -keystore src/main/signing/testkeys -storepass '*****' C:\workspaces_STS\rct-mavenized\test\testapplet\target\testapplet-0.0.1-SNAPSHOT.jar mykey"'
- exitcode 1
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.processArchive(AbstractJarsignerMojo.java:495)
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.processArtifact(AbstractJarsignerMojo.java:372)
at org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo.execute(AbstractJarsignerMojo.java:197)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Fri Mar 18 16:05:56 CET 2011
[INFO] Final Memory: 21M/38M
[INFO] ------------------------------------------------------------------------
C:\workspaces_STS\rct-mavenized\test\testapplet>
}}
This particular project is for test, but it is a proof-of-concept that will be merged into a production project.
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MJARSIGNER-13) signing in multi-module project
fails on windows
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=258013#action_258013 ]
Dennis Lundberg commented on MJARSIGNER-13:
-------------------------------------------
OK, what about from the parent?
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MJARSIGNER-13) signing in multi-module project
fails on windows
Posted by "Juan Pablo (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MJARSIGNER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=265235#action_265235 ]
Juan Pablo commented on MJARSIGNER-13:
--------------------------------------
Hello all,
I've this problem too and it seems to be (in my case), a problem when defining plugin configuration from parent's. POM.
I have a 3 level multimodule project with many modules inside and i choosed to configure jarsigner in topmost one (just to avoid duplicate configurations), and when using relative paths (or even ${basedir}), it always tries to load the keystore from withing "current" module path:
"H:\opt\java\jdk1.6.0_24_x86\jre\..\bin\jarsigner.exe -keystore H:\projects\ยทยทยท\java\trunk\client\launcher\workspace\keystore\signing-jar.keystore -storepass '*****' -keypass '*****' H:\projects\java\trunk\client\launcher\target\client-launcher-04.08.0000.jar '*****'"'
: java.lang.RuntimeException: keystore load: H:\projects\java\trunk\client\launcher\workspace\keystore\signing-jar.keystore (The system cannot find the path specified)
(seen when running maven with -X option (thanks, btw ;) ;))
Hope this helps ;)
jp
> signing in multi-module project fails on windows
> ------------------------------------------------
>
> Key: MJARSIGNER-13
> URL: http://jira.codehaus.org/browse/MJARSIGNER-13
> Project: Maven 2.x 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira