ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hawkins, Keith" <>
Subject RE: Executing keytool within ant
Date Mon, 10 Feb 2003 17:04:20 GMT
Thanks.  That was it.  

Just out of is an command line built differently specifying
<arg value="-foo bar"/>  versus  <arg line="-foo bar"/>

i.e.  What difference does the target executable see in specifying the
command line the first way versus the second way?

I would have thought that both would result in the same command line, but
apparently not.


-----Original Message-----
From: Dominique Devienne []
Sent: Monday, February 10, 2003 11:41 AM
To: 'Ant Users List'
Subject: RE: Executing keytool within ant

Lookup  the manual for differences between <arg value="" /> and <arg line=""
/>. --DD

-----Original Message-----
From: Hawkins, Keith [] 
Sent: Monday, February 10, 2003 10:20 AM
To: ''
Subject: Executing keytool within ant


When I try to run keytool via an ant executable target, it complains about
arguments saying that they are invalid when they are not.  If I run the
command outside of ant, it works fine.   Has anyone gotten keytool to run as
part of an ant target?


Here is my target in my build.xml

<target name="generate_certificate">
			<arg value="-v" />
			<arg value="-genkey"/>
			<arg value="-alias fscu" />
			<arg value='-dname "CN=SysApps, OU=MBS, O=Nomura
Securities, L=New York, ST=New York,C=US"  ' />
			<arg value="-keypass secret"/>
			<arg value="-keystore ${src.dir}/fscu.keystore"/>
			<arg value="-storepass secret"/>

Here is the output from executing the target in ant.  Note how it complains
that -alias is an illegal argument when it isn't

Detected Java version: 1.4 in: C:\FiSys\VendorSoftware\IntelliJ-IDEA-3.0\jre
Detected OS: Windows 2000
parsing buildfile C:\FiSys\Modules\FSCU\Src\build.xml with URI =
Project base dir set to: C:\FiSys\Modules\FSCU\Src
Loading C:\FiSys\Modules\FSCU\Src\
Build sequence for target `generate_certificate' is [generate_certificate]
Complete build sequence is [generate_certificate, clean, prepare,
do_compile, build_webstart_patch, signjar, do_createwar, compile, do_jarall,
jarall, pf-jar-generic-ejb, fscu-jar-generic-ejb, create-tbapricer-jar,
do_earApplication, sign_weblogic_jar, fscu-ejbc, pf-ejbc, do_signjars,
signjars, createwar, earApplication, do_deployToWeblogicServer,
Current OS is Windows 2000
Executing 'C:\FiSys\VendorSoftware\Java\j2sdk1.4.1\bin\keytool' with
'-alias fscu'
'-dname "CN=SysApps, OU=MBS, O=Nomura Securities, L=New York, ST=New
York,C=US"  '
'-keypass secret'
'-keystore ./fscu.keystore'
'-storepass secret'

The ' characters around the executable and arguments are
not part of the command.

Illegal option:  -alias fscu
keytool usage:

-genkey      [-v] [-alias <alias>] [-keyalg <keyalg>]
	     [-keysize <keysize>] [-sigalg <sigalg>]
	     [-dname <dname>] [-validity <valDays>]
	     [-keypass <keypass>] [-keystore <keystore>]
	     [-storepass <storepass>] [-storetype <storetype>]
	     [-provider <provider_class_name>] ...

[Rest of the keytool usage text deleted]

To unsubscribe, e-mail:
For additional commands, e-mail:
-----  This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please delete it and all copies from your
system, destroy any hard copies and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. Nomura Holding
America Inc., Nomura Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail communications
through its networks. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorized to state the views of such entity. Unless otherwise stated,
any pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message