[ 
http://jira.codehaus.org/browse/MOJO-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88265
 ] 

Frank Cornelis commented on MOJO-654:
-------------------------------------

If I run Maven2 with the -X parameter I get to see the following debug 
information:
[DEBUG] keytool executable=[C:\Program Files\Java\jdk1.5.0_11\jre\..\bin\keytool
.exe]
which means the plugin is correctly locating the executable. It's when the 
plugin tries to run the exec that it fails.

C:\work\keytool-test>mvn -X clean package
+ Error stacktraces are turned on.
Maven version: 2.0.5
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
gs\Frank Cornelis\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\Program Files\mave
n-2.0.5\bin\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Keytool test
[INFO]    task-segment: [clean, package]
[INFO] -------------------------------------------------------------------------
---
[DEBUG] maven-clean-plugin: resolved to version 2.1 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0
 for project: null:maven-clean-plugin:maven-plugin:2.1 from the repository.
[DEBUG] Skipping disabled repository central
[DEBUG] Skipping disabled repository central
[DEBUG] keytool-maven-plugin: using locally installed snapshot
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::11 for project: null:keyt
ool-maven-plugin:maven-plugin:1.0-beta-2-SNAPSHOT from the repository.
[DEBUG] keytool-maven-plugin: using locally installed snapshot
[DEBUG] org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.1:runtime (se
lected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apac
he.maven:maven-plugin-api:jar:2.0 from the repository.
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtim
e)
[DEBUG] Retrieving parent-POM: org.apache.maven.shared:shared-components-parent:
:1 for project: null:file-management:jar:1.0 from the repository.
[DEBUG]   org.apache.maven.shared:file-management:jar:1.0:runtime (selected for
runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for run
time)
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.1:clean'
 -->
[DEBUG]   (f) directory = C:\work\keytool-test\target
[DEBUG]   (f) outputDirectory = C:\work\keytool-test\target\classes
[DEBUG]   (f) testOutputDirectory = C:\work\keytool-test\target\test-classes
[DEBUG] -- end configuration --
[INFO] [clean:clean]
[INFO] Deleting directory C:\work\keytool-test\target
[DEBUG] Originally marked for delete: [classes, ]
[DEBUG] Marked for preserve (with followSymlinks == false): []
[DEBUG] Symlinks marked for deletion (originally mismarked): []
[DEBUG] Originally marked for delete: [classes, ]
[DEBUG] Marked for preserve (with followSymlinks == false): []
[DEBUG] Symlinks marked for deletion (originally mismarked): []
[DEBUG] Found deletable paths: [classes
 ]
[DEBUG] Checking for symlink:
Parent file's canonical path: C:\work\keytool-test\target
My canonical path: C:\work\keytool-test\target\classes
[DEBUG] Checking for symlink:
Parent file's canonical path: C:\work\keytool-test
My canonical path: C:\work\keytool-test\target
[INFO] Deleting directory C:\work\keytool-test\target\classes
[DEBUG] Found deletable paths: []
[INFO] Deleting directory C:\work\keytool-test\target\test-classes
[DEBUG] Found deletable paths: []
[DEBUG] maven-resources-plugin: resolved to version 2.2 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for pro
ject: null:maven-resources-plugin:maven-plugin:2.2 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org
.apache.maven.plugins:maven-plugins:pom:1 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.mave
n:maven-parent:pom:1 from the repository.
[DEBUG] maven-compiler-plugin: resolved to version 2.0.2 from repository central

[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::8 for pro
ject: null:maven-compiler-plugin:maven-plugin:2.0.2 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::5 for project: org
.apache.maven.plugins:maven-plugins:pom:8 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::3 for project: org.apache.mave
n:maven-parent:pom:5 from the repository.
[DEBUG] maven-surefire-plugin: resolved to version 2.2 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for pro
ject: null:maven-surefire-plugin:maven-plugin:2.2 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org
.apache.maven.plugins:maven-plugins:pom:1 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.mave
n:maven-parent:pom:1 from the repository.
[DEBUG] maven-jar-plugin: resolved to version 2.1 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::3 for pro
ject: null:maven-jar-plugin:maven-plugin:2.1 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::4 for project: org
.apache.maven.plugins:maven-plugins:pom:3 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::3 for project: org.apache.mave
n:maven-parent:pom:4 from the repository.
[DEBUG] keytool-maven-plugin: using locally installed snapshot
[DEBUG] org.codehaus.mojo:keytool-maven-plugin:maven-plugin:1.0-beta-2-SNAPSHOT:
runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.1 for project: null:m
aven-project:jar:2.0.1 from the repository.
[DEBUG]   org.apache.maven:maven-project:jar:2.0.1:runtime (selected for runtime
)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.1 for project: null:m
aven-profile:jar:2.0.1 from the repository.
[DEBUG]     org.apache.maven:maven-profile:jar:2.0.1:runtime (selected for runti
me)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.1 for project: org.ap
ache.maven:maven-model:jar:2.0.1 from the repository.
[DEBUG]       org.apache.maven:maven-model:jar:2.0.1:runtime (selected for runti
me)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: nu
ll:plexus-utils:jar:1.0.5 from the repository.
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime (selected for
 runtime)
[DEBUG]           classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for
runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime (selected for r
untime)
[DEBUG]         classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for ru
ntime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-containers::1.0.3 for
project: null:plexus-container-default:jar:1.0-alpha-9 from the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: or
g.codehaus.plexus:plexus-containers:pom:1.0.3 from the repository.
[DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:runti
me (selected for runtime)
[DEBUG]         junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - ne
arer found: 1.0.5)
[DEBUG]     org.apache.maven:maven-model:jar:2.0.1:runtime (selected for runtime
)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.1 for project: org.ap
ache.maven:maven-artifact-manager:jar:2.0.1 from the repository.
[DEBUG]     org.apache.maven:maven-artifact-manager:jar:2.0.1:runtime (selected
for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.1 for project: org.ap
ache.maven:maven-repository-metadata:jar:2.0.1 from the repository.
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:2.0.1:runtime (sele
cted for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.1 for project: org.ap
ache.maven:maven-artifact:jar:2.0.1 from the repository.
[DEBUG]       org.apache.maven:maven-artifact:jar:2.0.1:runtime (selected for ru
ntime)
[DEBUG]       org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime
(selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - ne
arer found: 1.0.5)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime (selected for run
time)
[DEBUG]       classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runt
ime)
[DEBUG]     org.apache.maven:maven-artifact:jar:2.0.1:runtime (selected for runt
ime)
[DEBUG]     org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:runtime
 (selected for runtime)
[DEBUG]       junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - near
er found: 1.0.5)
[DEBUG]   commons-lang:commons-lang:jar:2.1:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.5 for project: nu
ll:plexus-utils:jar:1.2 from the repository.
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime (removed - nearer f
ound: 1.2)
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.2:runtime (selected for runtime
)
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0-beta-3:runtime (selected for
 runtime)
[DEBUG] Configuring mojo 'org.codehaus.mojo:keytool-maven-plugin:1.0-beta-2-SNAP
SHOT:clean' -->
[DEBUG]   (s) keystore = C:\work\keytool-test\target/classes/keystore.jks
[DEBUG]   (f) workingDirectory = C:\work\keytool-test
[DEBUG] -- end configuration --
[INFO] [keytool:clean {execution: default}]
[WARNING] Keystore file 'C:\work\keytool-test\target/classes/keystore.jks' doesn
't exist.
[DEBUG] Configuring mojo 'org.codehaus.mojo:keytool-maven-plugin:1.0-beta-2-SNAP
SHOT:genkey' -->
[DEBUG]   (s) alias = alias
[DEBUG]   (s) dname = cn=Test Development, ou=Development,
                                                L=Herzele, ST=VL, o=FrankCorneli
s, c=BE
[DEBUG]   (s) keypass = secret
[DEBUG]   (s) keystore = C:\work\keytool-test\target/classes/keystore.jks
[DEBUG]   (s) storepass = secret
[DEBUG]   (s) verbose = true
[DEBUG]   (f) workingDirectory = C:\work\keytool-test
[DEBUG] -- end configuration --
[INFO] [keytool:genkey {execution: default}]
[DEBUG] keytool executable=[C:\Program Files\Java\jdk1.5.0_11\jre\..\bin\keytool
.exe]
[DEBUG] mdkirs: true C:\work\keytool-test\target\classes
[DEBUG] Executing: "C:\Program Files\Java\jdk1.5.0_11\jre\..\bin\keytool.exe" -g
enkey -v -dname "cn=Test Development, ou=Development,
                                                L=Herzele, ST=VL, o=FrankCorneli
s, c=BE" -alias alias -keypass secret -keystore C:\work\keytool-test\target/clas
ses/keystore.jks -storepass secret
[WARNING] C:\Program wordt niet herkend als een interne
[WARNING] of externe opdracht, programma of batchbestand.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Result of "C:\Program Files\Java\jdk1.5.0_11\jre\..\bin\keytool.exe" -gen
key -v -dname "cn=Test Development, ou=Development,
                                                L=Herzele, ST=VL, o=FrankCorneli
s, c=BE" -alias alias -keypass secret -keystore C:\work\keytool-test\target/clas
ses/keystore.jks -storepass secret execution is: '1': C:\Program wordt niet herk
end als een interneof externe opdracht, programma of batchbestand..
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Result of "C:\Program Fi
les\Java\jdk1.5.0_11\jre\..\bin\keytool.exe" -genkey -v -dname "cn=Test Developm
ent, ou=Development,
                                                L=Herzele, ST=VL, o=FrankCorneli
s, c=BE" -alias alias -keypass secret -keystore C:\work\keytool-test\target/clas
ses/keystore.jks -storepass secret execution is: '1': C:\Program wordt niet herk
end als een interneof externe opdracht, programma of batchbestand..
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:564)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        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: Result of "C:\Program
 Files\Java\jdk1.5.0_11\jre\..\bin\keytool.exe" -genkey -v -dname "cn=Test Devel
opment, ou=Development,
                                                L=Herzele, ST=VL, o=FrankCorneli
s, c=BE" -alias alias -keypass secret -keystore C:\work\keytool-test\target/clas
ses/keystore.jks -storepass secret execution is: '1': C:\Program wordt niet herk
end als een interneof externe opdracht, programma of batchbestand..
        at org.codehaus.mojo.keytool.GenkeyMojo.execute(GenkeyMojo.java:207)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:420)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Thu Feb 22 19:45:44 CET 2007
[INFO] Final Memory: 3M/8M
[INFO] ------------------------------------------------------------------------

C:\work\keytool-test>

> keytool-maven-plugin:genkey fails on "C:\Program Files\...\keytool.exe"
> -----------------------------------------------------------------------
>
>                 Key: MOJO-654
>                 URL: http://jira.codehaus.org/browse/MOJO-654
>             Project: Mojo
>          Issue Type: Bug
>          Components: General
>         Environment: Windows XP
>            Reporter: Frank Cornelis
>            Priority: Blocker
>         Attachments: pom.xml
>
>
> The keytool-maven-plugin works fine under Linux and Mac OS X, but when trying 
> to build the same project under Windows XP we get the following noise:
> [INFO] [keytool:genkey {execution: default}]
> [WARNING] C:\Program wordt niet herkend als een interne
> [WARNING] of externe opdracht, programma of batchbestand.
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> This is because the plugin tries to execute:
> C:\Program
> instead of
> C:\Program Files\Java\jdk1.5.0_11\bin\keytool.exe

-- 
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