jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x JAR Plugin
  • MJAR-49

Jarsigner fails on windows due to spaces in pathnames

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1
  • Fix Version/s: 2.2
  • Component/s: sign
  • Labels:
    None
  • Environment:
    Windows XP

Description

This is a problem uncovered while running the latest (1.0-20060307.100605-1) version of the webstart plugin, which uses the jar plugin to sign jars. During the signing stage maven fails with
[debug] jarsigner executable=[C:\Program Files\Java\jdk1.5.0_06\jre\..\bin\jarsigner.exe]
[debug] Signing JAR in-place (overwritting original JAR).
[warn] 'C:\Program' is not recognized as an internal or external command,
[warn] operable program or batch file.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Result of "C:\Program Files\Java\jdk1.5.0_06\jre\..\bin\jarsigner.exe" -verbose -keystore "C:\Documents and Settings\jdt\.keystore" -storepass ****** -keypass ****** E:\jdt\data\workspace\tabview\tabview-webstart\target\jnlp\commons-logging-1.0.3.jar roe execution is: '1'.
[INFO] ------------------------------------------------------------------------
(full trace is attached).

It looks as though the plexus utils classes are tokenizing the path to the jarsigner executable wrongly due to it containing spaces.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    pathproblem.txt
    06/Jul/06 8:47 AM
    48 kB
    Jon Tayler

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MWEBSTART-29 Problem with keytool execution whitespace in path

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. MNG-2828 Upgrade the dependency on plexus-utils to a more recent version

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Jerome Lacoste added a comment - 06/Jul/06 9:54 AM

Looking at the plexus code, I believe the problem may be fixed by forcing the upgrade to plexus >= 1.2 (where the shell element was introduced).

Could you try building a local maven-jar-plugin that reuses the latest plexus and see if that fixes your issue ?

Show
Jerome Lacoste added a comment - 06/Jul/06 9:54 AM Looking at the plexus code, I believe the problem may be fixed by forcing the upgrade to plexus >= 1.2 (where the shell element was introduced). Could you try building a local maven-jar-plugin that reuses the latest plexus and see if that fixes your issue ?
Hide
Permalink
Jon Tayler added a comment - 06/Jul/06 10:48 AM

OK, this might not have been the right way to do it, but I hand-edited the pom for the jar plugin in my local repo and added
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>[1.2,]</version>
</dependency>

I then cleared out the plexus utils jars in my local repo to see what would be downloaded.

Rerunning the webstart plugin gave the same problem, and the repo was repopulated with plexus-utils versions 1.0.4, 1.1, 1.0.5, 1.2 and 1.2-SNAPSHOT.

John

Show
Jon Tayler added a comment - 06/Jul/06 10:48 AM OK, this might not have been the right way to do it, but I hand-edited the pom for the jar plugin in my local repo and added <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> <version>[1.2,]</version> </dependency> I then cleared out the plexus utils jars in my local repo to see what would be downloaded. Rerunning the webstart plugin gave the same problem, and the repo was repopulated with plexus-utils versions 1.0.4, 1.1, 1.0.5, 1.2 and 1.2-SNAPSHOT. John
Hide
Permalink
Jerome Lacoste added a comment - 06/Jul/06 12:20 PM

You might want to run mvn with -X option to see where each version of plexus-utils got used.

Show
Jerome Lacoste added a comment - 06/Jul/06 12:20 PM You might want to run mvn with -X option to see where each version of plexus-utils got used.
Hide
Permalink
Brett Porter added a comment - 06/Jul/06 7:32 PM

the version of plexus-utils used will always be the one in $MAVEN_HOME/lib, unfortunately

Show
Brett Porter added a comment - 06/Jul/06 7:32 PM the version of plexus-utils used will always be the one in $MAVEN_HOME/lib, unfortunately
Hide
Permalink
Jerome Lacoste added a comment - 25/Aug/07 2:50 PM

I believe that Brett's last comment is no longer valid starting from maven 2.0.6.

We could bump the plexus utils version to at least 1.4.2 to make sure this is fixed. (there was a regression between I think 1.2 and 1.4.1).

Show
Jerome Lacoste added a comment - 25/Aug/07 2:50 PM I believe that Brett's last comment is no longer valid starting from maven 2.0.6. We could bump the plexus utils version to at least 1.4.2 to make sure this is fixed. (there was a regression between I think 1.2 and 1.4.1).
Hide
Permalink
Jerome Lacoste added a comment - 06/Dec/07 6:02 PM

I seem to have similar problems with other plugins. But I've upgraded them to p-u 1.4.2 so it's perhaps not sufficient.
I don't run Windows so I don't see those issues. In a tentative to work around the problems encountered in the other plugins, I've bumped p-u to 1.4.8. See MWEBSTART-60 as an example.

Show
Jerome Lacoste added a comment - 06/Dec/07 6:02 PM I seem to have similar problems with other plugins. But I've upgraded them to p-u 1.4.2 so it's perhaps not sufficient. I don't run Windows so I don't see those issues. In a tentative to work around the problems encountered in the other plugins, I've bumped p-u to 1.4.8. See MWEBSTART-60 as an example.
Hide
Permalink
Jerome Lacoste added a comment - 07/Dec/07 6:53 AM

Olivier, according to my users, upgrading to 1.4.8 fixed their problems.

Show
Jerome Lacoste added a comment - 07/Dec/07 6:53 AM Olivier, according to my users, upgrading to 1.4.8 fixed their problems.
Hide
Permalink
Olivier Lamy added a comment - 07/Dec/07 7:02 AM

if we upgrade to p-u 1.4.8 we had to add a prerequisites to 2.0.6.
I have started to work on that but this upgrade causes some failures on the it tests.
Some tests use MavenEmbedder which causes some failures here.
This means some its tests need to be rewritte with using maven-invoker-plugin.

Show
Olivier Lamy added a comment - 07/Dec/07 7:02 AM if we upgrade to p-u 1.4.8 we had to add a prerequisites to 2.0.6. I have started to work on that but this upgrade causes some failures on the it tests. Some tests use MavenEmbedder which causes some failures here. This means some its tests need to be rewritte with using maven-invoker-plugin.
Hide
Permalink
Olivier Lamy added a comment - 07/Dec/07 5:10 PM

fixed in rev 602261.
snapshot deployed maven-jar-plugin 2.2-20071207.230654-4.
If any trouble reopen the issue.

Show
Olivier Lamy added a comment - 07/Dec/07 5:10 PM fixed in rev 602261. snapshot deployed maven-jar-plugin 2.2-20071207.230654-4. If any trouble reopen the issue.
Hide
Permalink
Stanilslav Spiridonov added a comment - 09/Dec/07 11:04 AM

I have a trouble

[INFO] Scanning for projects...

[INFO] ----------------------------------------------------------------------------

[INFO] Building Flexess: JCE provider

[INFO] task-segment: [clean, deploy]

[INFO] ----------------------------------------------------------------------------

[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from jinternal-sn

[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from jopen-sn

[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from apache snapshot repository

[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from codehaus snapshot repository

[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from codehaus-release-repo

[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from java.net

[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from spring-ext

Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom

7K downloaded

Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.jar

25K downloaded

[INFO] [clean:clean]

[INFO] Deleting directory /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target

[INFO] Deleting directory /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/classes

[INFO] Deleting directory /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/test-classes

[INFO] Deleting file-set: /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/bin (included: [], excluded: [])

[INFO] Preparing source:jar

[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.

[INFO] [org.jresearch.commons.obfuscate.:check {execution: default}]

[INFO] Skip the obfuscating activity for the project com.jresearchsoft.uam.license:com.jresearchsoft.uam.license.provider:1.0.0-SNAPSHOT - disable

[INFO] [source:jar {execution: attach-sources}]

[INFO] Building jar: /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT-sources.jar

[INFO] [org.jresearch.commons.obfuscate.:check {execution: default}]

[INFO] Skip the obfuscating activity for the project com.jresearchsoft.uam.license:com.jresearchsoft.uam.license.provider:1.0.0-SNAPSHOT - disable

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

Compiling 10 source files to /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/classes

[INFO] [resources:testResources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:testCompile]

Compiling 4 source files to /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/test-classes

[INFO] [surefire:test]

[INFO] Tests are skipped.

Downloading: http://server.jresearch.org:28080/internal-snapshot//org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom

Downloading: http://www.jresearch.org/open-snapshot/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom

Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom

7K downloaded

[INFO] [jar:jar]

[INFO] Building jar: /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT.jar

[INFO] [jar:sign {execution: default}]

[debug] jarsigner executable=[/usr/jdk/instances/jdk1.5.0/jre/../bin/jarsigner]

[debug] Executing: /bin/sh -c 'cd /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider && /usr/jdk/instances/jdk1.5.0/jre/../bin/jarsigner -verify -verbose "/var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT.jar"'

[warn] /bin/sh: /var/data/maven/hudson/jobs/Jresearch: does not exist

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Result of /bin/sh -c 'cd /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider && /usr/jdk/instances/jdk1.5.0/jre/../bin/jarsigner -verify -verbose "/var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT.jar"' execution is: '1'.

[INFO] ------------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 31 seconds

[INFO] Finished at: Sun Dec 09 17:54:44 CET 2007

[INFO] Final Memory: 11M/26M

[INFO] ------------------------------------------------------------------------

Show
Stanilslav Spiridonov added a comment - 09/Dec/07 11:04 AM I have a trouble [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building Flexess: JCE provider [INFO] task-segment: [clean, deploy] [INFO] ---------------------------------------------------------------------------- [INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from jinternal-sn [INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from jopen-sn [INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from apache snapshot repository [INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from codehaus snapshot repository [INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from codehaus-release-repo [INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from java.net [INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT: checking for updates from spring-ext Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom 7K downloaded Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.jar 25K downloaded [INFO] [clean:clean] [INFO] Deleting directory /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target [INFO] Deleting directory /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/classes [INFO] Deleting directory /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/test-classes [INFO] Deleting file-set: /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/bin (included: [], excluded: []) [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] [org.jresearch.commons.obfuscate.:check {execution: default}] [INFO] Skip the obfuscating activity for the project com.jresearchsoft.uam.license:com.jresearchsoft.uam.license.provider:1.0.0-SNAPSHOT - disable [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT-sources.jar [INFO] [org.jresearch.commons.obfuscate.:check {execution: default}] [INFO] Skip the obfuscating activity for the project com.jresearchsoft.uam.license:com.jresearchsoft.uam.license.provider:1.0.0-SNAPSHOT - disable [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] Compiling 10 source files to /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/classes [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] Compiling 4 source files to /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/test-classes [INFO] [surefire:test] [INFO] Tests are skipped. Downloading: http://server.jresearch.org:28080/internal-snapshot//org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom Downloading: http://www.jresearch.org/open-snapshot/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-jar-plugin/2.2-SNAPSHOT/maven-jar-plugin-2.2-20071207.230654-4.pom 7K downloaded [INFO] [jar:jar] [INFO] Building jar: /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT.jar [INFO] [jar:sign {execution: default}] [debug] jarsigner executable=[/usr/jdk/instances/jdk1.5.0/jre/../bin/jarsigner] [debug] Executing: /bin/sh -c 'cd /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider && /usr/jdk/instances/jdk1.5.0/jre/../bin/jarsigner -verify -verbose "/var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT.jar"' [warn] /bin/sh: /var/data/maven/hudson/jobs/Jresearch: does not exist [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Result of /bin/sh -c 'cd /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider && /usr/jdk/instances/jdk1.5.0/jre/../bin/jarsigner -verify -verbose "/var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/general/1.0.0/../../license/trunk/pom/../provider/target/com.jresearchsoft.uam.license.provider-1.0.0-SNAPSHOT.jar"' execution is: '1'. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 31 seconds [INFO] Finished at: Sun Dec 09 17:54:44 CET 2007 [INFO] Final Memory: 11M/26M [INFO] ------------------------------------------------------------------------
Hide
Permalink
Olivier Lamy added a comment - 09/Dec/07 3:24 PM

Looks to be related to PLXUTILS-54.
Can you test without spaces in your directory name because I see "bin/sh -c 'cd /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/genera....."
And not in a hudson context
Thanks.

Show
Olivier Lamy added a comment - 09/Dec/07 3:24 PM Looks to be related to PLXUTILS-54. Can you test without spaces in your directory name because I see "bin/sh -c 'cd /var/data/maven/hudson/jobs/Jresearch Flexess/workspace/new_root/genera....." And not in a hudson context Thanks.
Hide
Permalink
Olivier Lamy added a comment - 09/Dec/07 3:25 PM

upgrade to last p-u looks to cause failures on unix platform.

Show
Olivier Lamy added a comment - 09/Dec/07 3:25 PM upgrade to last p-u looks to cause failures on unix platform.
Hide
Permalink
Olivier Lamy added a comment - 10/Dec/07 5:52 PM

I have updated plexus-utils dependency version to last SNAPSHOT (see PLXUTILS-54) which should fix this.
Can you try and give feedback ?
Thanks in advance.

Show
Olivier Lamy added a comment - 10/Dec/07 5:52 PM I have updated plexus-utils dependency version to last SNAPSHOT (see PLXUTILS-54) which should fix this. Can you try and give feedback ? Thanks in advance.
Hide
Permalink
Stanilslav Spiridonov added a comment - 11/Dec/07 3:28 AM

Yes it works for me (with 2.2-20071210.234803-5)

Show
Stanilslav Spiridonov added a comment - 11/Dec/07 3:28 AM Yes it works for me (with 2.2-20071210.234803-5)
Hide
Permalink
Olivier Lamy added a comment - 11/Dec/07 7:38 AM

Closed it due to positive feeback from user.
Thanks for your tests.

Show
Olivier Lamy added a comment - 11/Dec/07 7:38 AM Closed it due to positive feeback from user. Thanks for your tests.

People

  • Assignee:
    Olivier Lamy
    Reporter:
    Jon Tayler
Vote (1)
Watch (2)

Dates

  • Created:
    06/Jul/06 8:47 AM
    Updated:
    11/Dec/07 7:38 AM
    Resolved:
    11/Dec/07 7:38 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.