You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Nesbitt, David" <DN...@gensys.com> on 2001/06/12 02:54:00 UTC
ExecOn issue
Greetings,
I too have a build process that requires building many standalone
projects. Prior to trying the optional foreach task, I am trying to get
the build to work using execon. Essentially, I am trying to cascade the
target to build.xml in the next level subdirectory. However, I get an
IOException in CreateProcess.
Here is a snippet from the top level build file:
<target name="abc" >
<execon executable="ant" >
<arg value="-buildfile"/>
<srcfile/>
<arg value="abc"/>
<fileset dir=".">
<patternset>
<include name="*/build.xml"/>
</patternset>
</fileset>
</execon>
</target>
Here is the error message:
D:\projects>ant abc -verbose
Ant version 1.3 compiled on June 8 2001
Buildfile: build.xml
Detected Java Version: 1.3
Detected OS: Windows 2000
parsing buildfile D:\projects\build.xml with URI =
file:D:/projects/build.xml
Project base dir set to: D:\projects
[property] Loading D:\projects\.ant.properties
[property] Unable to find D:\projects\.ant.properties
[property] Loading C:\Documents and Settings\dnesbitt\.ant.properties
Build sequence for target `abc' is [abc]
abc:
[execon] Myos = Windows 2000
[execon] ant -buildfile abc
[execon] Executing ant -buildfile D:\projects\MyProject\build.xml abc
BUILD FAILED
D:\projects\build.xml:61: Execute failed: java.io.IOException:
CreateProcess: ant -buildfile D:\projects\MyProject\build.xml abc
error=2
--- Nested Exception ---
java.io.IOException: CreateProcess: ant -buildfile
D:\projects\MyProject\build.xml abc 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:509)
at
org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
at
org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:167)
at
org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
at org.apache.tools.ant.Target.execute(Target.java:153)
at org.apache.tools.ant.Project.runTarget(Project.java:898)
at org.apache.tools.ant.Project.executeTarget(Project.java:536)
at org.apache.tools.ant.Project.executeTargets(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)
at org.apache.tools.ant.Main.main(Main.java:149)
Total time: 1 second
Thanks in advance for any suggestions!
Regards,
Dave
Re: ExecOn issue
Posted by Don Taylor <do...@yahoo.com>.
--- Stefan Bodewig <bo...@apache.org> wrote:
> David Nesbitt <DN...@gensys.com> wrote:
>
> > Essentially, I am trying to cascade the target to build.xml in the
> > next level subdirectory. However, I get an IOException in
> > CreateProcess.
> >
> > Here is a snippet from the top level build file:
> >
> > <target name="abc" >
> > <execon executable="ant" >
>
> I'm not a Windows expert (not even a user), but vaguely remember that
> you cannot invoke ant.bat by the name ant directly (or any other
> batch
> file for that matter). IIRC you'd have to use ant.bat (or do you
> even
> have to invoke CMD? - memory failing sorry).
>
> Stefan
See if executing "cmd.exe /C ant.bat" works.
=====
Don
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
Re: ExecOn issue
Posted by Stefan Bodewig <bo...@apache.org>.
David Nesbitt <DN...@gensys.com> wrote:
> Essentially, I am trying to cascade the target to build.xml in the
> next level subdirectory. However, I get an IOException in
> CreateProcess.
>
> Here is a snippet from the top level build file:
>
> <target name="abc" >
> <execon executable="ant" >
I'm not a Windows expert (not even a user), but vaguely remember that
you cannot invoke ant.bat by the name ant directly (or any other batch
file for that matter). IIRC you'd have to use ant.bat (or do you even
have to invoke CMD? - memory failing sorry).
Stefan