ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pritesh saharey <prit...@sqatester.com>
Subject RE: AW: exec command not working
Date Mon, 02 Jun 2003 11:17:03 GMT

Thanks Alex i got the solution i had done what rajat has suggested to like this 
<target name="call" >
		<exec dir="BUILD" executable="sh" os="Linux" failonerror="true" >
			<arg line="Build.sh" />
		</exec>
		
	</target>

now its working

--- "North Alex" <Alex.North@tapiola.fi> wrote:
>You don't have "sh" in /usr/bin
>
>type "which sh" or something like that.
>
>Can you run the build.sh from the command line?
>Does a .sh file have to have the location of the sh executable in the
>first line?
>Your build.sh should have that if so ... if not, then maybe that is part
>of the problem.
>
><= Alex =>
>
>
>>-----Original Message-----
>>From: Pritesh saharey [mailto:pritesh@sqatester.com] 
>>Sent: Monday, June 02, 2003 1:27 PM
>>To: Ant Users List
>>Subject: RE: AW: exec command not working
>>
>>
>>
>>Alex now it is giving m error like this
>>
>>call:
>>     [exec] Current OS is Linux
>>     [exec] Executing '/usr/bin/sh' with arguments:
>>     [exec] 'BUILD/Build.sh'
>>     [exec]
>>     [exec] The ' characters around the executable and arguments are
>>     [exec] not part of the command.
>> 
>>BUILD FAILED
>>file:/home/pritesh/CHPROJECT/build.xml:607: Execute failed: 
>>java.io.IOException: /usr/bin/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: /usr/bin/sh: not found
>>        at java.lang.UNIXProcess.forkAndExec(Native Method)
>>        at java.lang.UNIXProcess.<init>(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.exe
>>c(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: 7 seconds
>>
>>
>>--- "North Alex" <Alex.North@tapiola.fi> wrote:
>>>Sorry,
>>>
>>>I meant set the executabe attribute to a shell and then pass 
>>the shell 
>>>script as an argument, eg:
>>>
>>>  <exec executable="/usr/bin/sh" os="Linux" failonerror="true">
>>>    <arg line="BUILD/Build.sh"/>
>>>  </exec>
>>>
>>>
>>><= Alex =>
>>>
>>>>-----Original Message-----
>>>>From: Pritesh saharey [mailto:pritesh@sqatester.com]
>>>>Sent: Monday, June 02, 2003 1:03 PM
>>>>To: Ant Users List
>>>>Subject: RE: AW: exec command not working
>>>>
>>>>
>>>>Failing to understand Alex what youw want to say
>>>>
>>>>
>>>>--- "North Alex" <Alex.North@tapiola.fi> wrote:
>>>>>How about making the executable a shell and giving the 
>>build.sh as an
>>>>>argument for it to run?
>>>>>
>>>>><= Alex =>
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
>
>---------------------------------------------------------------------
>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

Mime
View raw message