You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ja...@livemedia.com on 2000/10/26 03:27:40 UTC

trying to convert to 1.2...

this tag:

<exec dir="${SRC}/${FRAMEWORK}/metadata/123"^M
        command="clean.bat"^M
        output="${SRC}/${FRAMEWORK}/metadata/123/clean.out"^M
/>^M

runs under 1.1, but under 1.2  produces the following during the build:

metadata:
     [exec] The command attribute is deprecated. Please use the executable
attri
bute and nested arg elements.

BUILD FAILED

L:\src\comp\1.0\src\build2.xml:644: Execute failed: java.io.IOException: Cr
eateProcess: clean.bat error=2
java.io.IOException: CreateProcess: clean.bat error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:66)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:551)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:390)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:247)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:213)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:154)
        at org.apache.tools.ant.Target.execute(Target.java:142)
        at org.apache.tools.ant.Project.runTarget(Project.java:818)
        at org.apache.tools.ant.Project.executeTarget(Project.java:532)
        at org.apache.tools.ant.Project.executeTargets(Project.java:506)
        at org.apache.tools.ant.Main.runBuild(Main.java:420)
        at org.apache.tools.ant.Main.main(Main.java:149)


any clues are appreciated.

thanks,
james@livemedia.com


RE: trying to convert to 1.2...

Posted by ja...@livemedia.com.
thanks, but that doesn't seem to be it. i get the same error w/:


<exec dir="${SRC}/${FRAMEWORK}/metadata/123"^M
        executable="clean.bat"^M
        output="${SRC}/${FRAMEWORK}/metadata/123/clean.out"

/>^M



-----Original Message-----
From: ranger@scenespot.org [mailto:ranger@scenespot.org]On Behalf Of
Benjamin Reed
Sent: Wednesday, October 25, 2000 6:58 PM
To: ant-user@jakarta.apache.org
Subject: Re: trying to convert to 1.2...


james@livemedia.com wrote:

> <exec dir="${SRC}/${FRAMEWORK}/metadata/123"^M
>         command="clean.bat"^M
>         output="${SRC}/${FRAMEWORK}/metadata/123/clean.out"^M
> />^M

This syntax has changed (heh, I just went through the 1.2 conversion
today)

I believe it would now be:

<exec dir="${SRC}/${FRAMEWORK}/metadata/123"
      executable="clean.bat"
      output="${SRC}/${FRAMEWORK}/metadata/123/clean.out" />

...and if it had been, say "clean.bat all", you would have to make the
executable="clean.bat", and then have <arg value="all"/> inside of
<exec></exec>

-- 
Ben Reed a.k.a. Ranger Rick (ranger@befunk.com)
http://defiance.dyndns.org/ / http://radio.scenespot.org/
lOST: oNE 'cAPS lOCK' KEY.  rEWARD OFFERED.
Now playing on Defiance Radio: Dark Eyed Kid by William Orbit


Re: trying to convert to 1.2...

Posted by Benjamin Reed <ra...@befunk.com>.
james@livemedia.com wrote:

> <exec dir="${SRC}/${FRAMEWORK}/metadata/123"^M
>         command="clean.bat"^M
>         output="${SRC}/${FRAMEWORK}/metadata/123/clean.out"^M
> />^M

This syntax has changed (heh, I just went through the 1.2 conversion
today)

I believe it would now be:

<exec dir="${SRC}/${FRAMEWORK}/metadata/123"
      executable="clean.bat"
      output="${SRC}/${FRAMEWORK}/metadata/123/clean.out" />

...and if it had been, say "clean.bat all", you would have to make the
executable="clean.bat", and then have <arg value="all"/> inside of
<exec></exec>

-- 
Ben Reed a.k.a. Ranger Rick (ranger@befunk.com)
http://defiance.dyndns.org/ / http://radio.scenespot.org/
lOST: oNE 'cAPS lOCK' KEY.  rEWARD OFFERED.
Now playing on Defiance Radio: Dark Eyed Kid by William Orbit

RE: trying to convert to 1.2...

Posted by Adam Murdoch <ad...@yahoo.com>.
Hi,

This is usually a problem with the PATH environment variable.  The 1.3 JVM
resolves the executable name relative to its' working directory (ie the one
that ant is running in), not relative to the target directory (ie the one
given in the dir attribute of <exec>).  So, if 'clean.bat' is not in the
directory you're running ant from, then you'll need to add it to your PATH,
or alternatively, use a relative path to it in command="..." or
executable="...".


Adam

> -----Original Message-----
> From: james@livemedia.com [mailto:james@livemedia.com]
> Sent: Thursday, 26 October 2000 11:28 AM
> To: ant-user@jakarta.apache.org
> Subject: trying to convert to 1.2...
>
>
> this tag:
>
> <exec dir="${SRC}/${FRAMEWORK}/metadata/123"^M
>         command="clean.bat"^M
>         output="${SRC}/${FRAMEWORK}/metadata/123/clean.out"^M
> />^M
>
> runs under 1.1, but under 1.2  produces the following during the build:
>
> metadata:
>      [exec] The command attribute is deprecated. Please use the executable
> attri
> bute and nested arg elements.
>
> BUILD FAILED
>
> L:\src\comp\1.0\src\build2.xml:644: Execute failed:
> java.io.IOException: Cr
> eateProcess: clean.bat error=2
> java.io.IOException: CreateProcess: clean.bat error=2
>         at java.lang.Win32Process.create(Native Method)
>         at java.lang.Win32Process.<init>(Win32Process.java:66)
>         at java.lang.Runtime.execInternal(Native Method)
>         at java.lang.Runtime.exec(Runtime.java:551)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at
> org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
> ute.java:390)
>         at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:247)
>         at
> org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:213)
>         at
> org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:154)
>         at org.apache.tools.ant.Target.execute(Target.java:142)
>         at org.apache.tools.ant.Project.runTarget(Project.java:818)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:532)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:506)
>         at org.apache.tools.ant.Main.runBuild(Main.java:420)
>         at org.apache.tools.ant.Main.main(Main.java:149)
>
>
> any clues are appreciated.
>
> thanks,
> james@livemedia.com


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com