From pritesh@sqatester.com Mon Jun 2 11:18:26 2003 Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 29335 invoked from network); 2 Jun 2003 11:18:26 -0000 Received: from sitemail3.everyone.net (HELO omta01.mta.everyone.net) (216.200.145.37) by daedalus.apache.org with SMTP; 2 Jun 2003 11:18:26 -0000 Received: from sitemail.everyone.net (dsnat [216.200.145.62]) by omta01.mta.everyone.net (Postfix) with ESMTP id B90081C3632 for ; Mon, 2 Jun 2003 04:18:26 -0700 (PDT) Received: by sitemail.everyone.net (Postfix, from userid 99) id 7EF833B90; Mon, 2 Jun 2003 04:18:26 -0700 (PDT) Content-Type: multipart/mixed; boundary="----------=_1054552706-17475-2" Content-Transfer-Encoding: binary Mime-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Date: Mon, 2 Jun 2003 04:18:26 -0700 (PDT) From: Pritesh saharey To: "Ant Users List" Subject: Re: exec command not working Reply-To: pritesh@sqatester.com X-Originating-Ip: [202.71.143.25] Message-Id: <20030602111826.7EF833B90@sitemail.everyone.net> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------------=_1054552706-17475-2 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 7bit Thanks rajat its working i used it like this --- message from Rajat Gupta attached: _____________________________________________________________ Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm _____________________________________________________________ Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag ------------=_1054552706-17475-2 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: binary Received: from apache.org (daedalus.apache.org [208.185.179.12]) by imta17.mta.everyone.net (Postfix) with SMTP id 58E334BCBE for ; Mon, 2 Jun 2003 03:40:47 -0700 (PDT) Received: (qmail 87852 invoked by uid 500); 2 Jun 2003 10:40:45 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 87839 invoked from network); 2 Jun 2003 10:40:45 -0000 Received: from inet-mail2.oracle.com (148.87.2.202) by daedalus.apache.org with SMTP; 2 Jun 2003 10:40:45 -0000 Received: from inet-mail2.oracle.com (localhost [127.0.0.1]) by inet-mail2.oracle.com (Switch-3.1.0/Switch-3.1.0) with ESMTP id h52Aef7T014218 for ; Mon, 2 Jun 2003 03:40:41 -0700 (PDT) Received: from rgmgw6.us.oracle.com (rgmgw6.us.oracle.com [138.1.191.15]) by inet-mail2.oracle.com (Switch-3.1.0/Switch-3.1.0) with ESMTP id h52Aef7T014207 for ; Mon, 2 Jun 2003 03:40:41 -0700 (PDT) Received: from rgmgw6.us.oracle.com (localhost [127.0.0.1]) by rgmgw6.us.oracle.com (Switch-2.1.5/Switch-2.1.0) with ESMTP id h52Aedt12832 for ; Mon, 2 Jun 2003 04:40:40 -0600 (MDT) Received: from rgmum6.us.oracle.com (rgmum6.us.oracle.com [138.1.191.27]) by rgmgw6.us.oracle.com (Switch-2.1.5/Switch-2.1.0) with ESMTP id h52AebQ12751 for ; Mon, 2 Jun 2003 04:40:37 -0600 (MDT) Received: from incq109b.idc.oracle.com by rgmum13.us.oracle.com with ESMTP id 212208121054550316; Mon, 02 Jun 2003 04:38:36 -0600 Message-ID: <3EDB2905.8060101@oracle.com> Date: Mon, 02 Jun 2003 16:07:57 +0530 From: Rajat Gupta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: exec command not working References: <20030602085120.11D98399D@sitemail.everyone.net> Content-Type: multipart/alternative; boundary="------------000600080809060301010502" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Sender: user-return-33273-pritesh=sqatester.com@ant.apache.org --------------000600080809060301010502 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello Pritesh, I have used the exec task to call executables in my application. What I do is something like follows : Why dont you try this. Hope this helps, Rajat Pritesh saharey wrote: >jan no spelling mistake yes my file Build.sh starts with capital B ,i had already tried Rajat what you had suggested to me and it give me error something like this > >[pritesh@apsora1 CHPROJECT]$ ant -v call >Apache Ant version 1.5.3 compiled on April 16 2003 >Buildfile: build.xml >Detected Java version: 1.3 in: /usr/local/java/jre >Detected OS: Linux >parsing buildfile build.xml with URI = file:/home/pritesh/CHPROJECT/build.xml >Project base dir set to: /home/pritesh/CHPROJECT >Override ignored for property user.name > [property] Loading /home/pritesh/CHPROJECT/build.properties >Build sequence for target `call' is [call] >Complete build sequence is [call, company, clean, init, compile, create-zipfile, create-jar, compile-exit, compile-entry, copy-def, parcel-distrib, copy-admin, distrib-admin, copy-assess, distrib-assess, copy-entry, distrib-entry, copy-exit, distrib-exit, copy-report, distrib-report, all, compile-services, compile-admin, splash-screen, testcase, compile-assess, database, compile-report, doc] > >call: > [exec] Current OS is Linux > [exec] Executing 'Build.sh' with > >BUILD FAILED >file:/home/pritesh/CHPROJECT/build.xml:607: Execute failed: java.io.IOException: Build.sh: not found > at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:371) > at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:250) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.Project.executeTargets(Project.java:1255) > at org.apache.tools.ant.Main.runBuild(Main.java:609) > at org.apache.tools.ant.Main.start(Main.java:196) > at org.apache.tools.ant.Main.main(Main.java:235) >--- Nested Exception --- >java.io.IOException: Build.sh: not found > at java.lang.UNIXProcess.forkAndExec(Native Method) > at java.lang.UNIXProcess.(UNIXProcess.java:139) > at java.lang.Runtime.execInternal(Native Method) > at java.lang.Runtime.exec(Runtime.java:546) > at java.lang.reflect.Method.invoke(Native Method) > at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:646) > at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:416) > at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427) > at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:329) > at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:368) > at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:250) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.Project.executeTargets(Project.java:1255) > at org.apache.tools.ant.Main.runBuild(Main.java:609) > at org.apache.tools.ant.Main.start(Main.java:196) > at org.apache.tools.ant.Main.main(Main.java:235) > >Total time: 4 seconds > >My Build.sh file is there where it tries to locate it and if i try to run my build.xml file without using dir command then it gives me error something like this. >call: > [exec] Current OS is Linux > [exec] Executing 'BUILD/Build.sh' with > >BUILD FAILED >file:/home/pritesh/CHPROJECT/build.xml:607: exec returned: -1 > at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:337) > at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:368) > at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:250) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.Project.executeTargets(Project.java:1255) > at org.apache.tools.ant.Main.runBuild(Main.java:609) > at org.apache.tools.ant.Main.start(Main.java:196) > at org.apache.tools.ant.Main.main(Main.java:235) > >Total time: 6 seconds > >can you guss whats wrong thanks jan and rajat for taking intrest in my problem >pritesh >--- Rajat Gupta wrote: > > >>Pritesh, >>Why not use the 'dir' attribute. Try something like the following ... >> >> >> >> >> >>if this does not work, then please send the error that is thrown. >> >>Hope this helps, >>Rajat >> >> >> >>Pritesh saharey wrote: >> >> >> >>>Hi all, >>> I would like to know what iam missing in my exec task >>> >>> >>> >>> >>>this simple call target is not working what i had done wrong. >>> >>>thanks >>>pritesh >>> >>>_____________________________________________________________ >>>Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm >>> >>>_____________________________________________________________ >>>Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>>For additional commands, e-mail: user-help@ant.apache.org >>> >>> >>> >>> >>> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>For additional commands, e-mail: user-help@ant.apache.org >> >> > >_____________________________________________________________ >Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm > >_____________________________________________________________ >Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org > > > --------------000600080809060301010502-- ------------=_1054552706-17475-2--