ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Walsh" <graham_wals...@hotmail.com>
Subject using apply
Date Wed, 28 Apr 2004 08:57:40 GMT

Hi bit of a newbie here so apologies if this is silly...



I'm trying to use the apply task to recompile some source code. Essentially 
I have an executable called idl2cpp which takes files of type *.idl and 
generates files of *_c.cpp. Everything is fine except for one scenario. Its 
when there are no files that need to be updated. The task still tries to run 
the idl2cpp exe on an empty list which causes an error. Here's the XML I 
have written;

	<target name="recompile-idl">
		<property name="idl.dir" value="c:\tmp\"/>
		<apply failonerror="true" executable="idl2cpp" dest="c:\tmp" 
parallel="true">
			<arg line="-no_tie -hdr_suffix hh -src_suffix cpp -root_dir c:\tmp"/>
			<arg value=""/>
			<fileset dir="${idl.dir}" includes="*.idl"/>
			<mapper type="glob" from="*.idl" to="*_c.cpp"/>
		</apply>


The debug window verifies this with the following output;

   [apply] TableMaint.idl omitted as TableMaint_c.cpp is up to date.
   [apply] ThreadControlService.idl omitted as ThreadControlService_c.cpp is 
up to date.
   [apply] TicketingService.idl omitted as TicketingService_c.cpp is up to 
date.
   [apply] Executing 'idl2cpp' with arguments:
   [apply] '-no_tie'
   [apply] '-hdr_suffix'
   [apply] 'hh'
   [apply] '-src_suffix'
   [apply] 'cpp '
   [apply] '-root_dir'
   [apply] 'c:\tmp'
   [apply]
   [apply] The ' characters around the executable and arguments are
   [apply] not part of the command.
xecute:Java13CommandLauncher: Executing 'idl2cpp' with arguments:
-no_tie'
-hdr_suffix'
hh'
-src_suffix'
cpp '
-root_dir'
c:\tmp'

he ' characters around the executable and arguments are
ot part of the command.
   [apply] idl2cpp:no input files
   [apply] idl2cpp:usage


Any ideas how I can force the idl2cpp.exe NOT to be run IF there are no 
files that need to be updated?



Also, do I need to be worred about these warnings when I run ant.... ?

    [apply] Current OS is Windows XP
Could not load a dependent class 
(com/sun/media/jai/codec/FileSeekableStream) for type ima
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (org/apache/commons/net/SocketClient) for 
type rexec
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for 
type cvsversio
Could not load a dependent class (com/starbase/starteam/Item) for type 
stlist
Could not load a dependent class (org/apache/commons/net/SocketClient) for 
type telnet
Could not load a dependent class (org/apache/commons/net/ftp/FTP) for type 
ftp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (junit/framework/TestListener) for type 
junit
Could not load a dependent class (com/starbase/starteam/Item) for type 
stcheckin
Could not load a dependent class (com/starbase/starteam/Item) for type 
stcheckout
fileset: Setup scanner in dir C:\tmp with patternSet{ includes: [*.idl] 
excludes: [] }



thanks much for your help

GrahamO

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page  FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


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


Mime
View raw message