ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <...@one2team.com>
Subject Re: how to call the .py from wsadmin using ant
Date Thu, 11 Dec 2008 08:25:44 GMT
Le jeudi 11 décembre 2008, Shaaf Syed M a écrit :
> The following works okay for me.
> 
> 
>               <exec dir="." executable="wsadmin.bat" logError="true"
> failonerror="true" output="wsconfig.out">
>                 <arg line="-lang jython -f ../../createQFactory.py"/>
>               </exec>
> 

I don't know how it works with Windows, but using arg line="" is not a good 
idea. I don't know whether ant splits the line for arguments and calls 
execve() in this case. It may call system(), which is a Bad Thing(tm).

> Fail on error doesnt work if the file was not found. I am not sure if it
> works with wsadmin at all.

Putting this before the <exec> can do that for you:

<fail message="File not found">
	<condition>
		<not>
			<available file="thefile"/>
		</not>
	</condition>
</fail>

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message