ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: how to call a file in build.xml
Date Tue, 29 Jul 2008 13:06:18 GMT

You can still run the exec task in a UNIX environment.  The command to use 
would be sh, ksh, or bash:


for windows:
          <exec executable="cmd" failonerror="true" 
                <arg line='/c "cvs status 
| findstr Working | findstr revision"'/>

for UNIX:
           <exec executable="sh" failonerror="true" 
                  <arg line="-c ${quote}cvs -d${common.setup.cvsRoot} 
status ${app.lar.source.clientpath}/${prop.cust.xml.basename}.xml | grep 

You can also use <arg value="some single argument">.  I like to use the 
<arg line="some line of arguments"> ...

I hope this helps ...

Ray Harper, Jr. 
Software Engineer II 
Wachovia Corporation 
1525 West WT Harris Blvd. Charlotte, NC, 28270 
Tel: 704-427-1717 ? Fax: 704-427-3234 ? Mailcode: NC1077 
The information accompanying this email transmission may contain 
confidential or legally privileged information that is intended only for 
the use of the individual or entity named in this message. If you are not 
the intended recipient, you are hereby notified that any disclosure, 
copying, distribution or reliance upon the contents of this email is 
strictly prohibited. If you receive this email in error, please notify the 
sender immediately.

"Kamran Hameed" <> 
07/29/2008 05:19 AM
Please respond to
"Ant Users List" <>

"Ant Users List" <>

Re: how to call a file in build.xml

But exec is not supported on Linux. if we are in Windows.. and we want to
call a batch file then we can use exec but under UNIX it is assumed that 
can run scripts in shell

So how do i call the makefile in my build.xml file??

any idea

On Tue, Jul 29, 2008 at 7:35 AM, Chris Green

> Try the exec command. This allows you to call external command files.
> On 7/29/08, Kamran Hameed <> wrote:
> > folks.. i am writting a java application that uses JNI. Now for
> generating c
> > files i am using Makefile. and for java files i am using ant[it is 
> that
> > i use Makefile].
> >
> > Now my question is that how can i call makefile in build.xml.. how
> > to call that so that when build.xml executes.. it calls Makefile that
> > compiles the C code
> >
> > --
> > Kamran Hameed
> >
> > <>
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Kamran Hameed

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