ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnús Þór Torfason <mag...@handtolvur.is>
Subject RE: stopping an <exec> - <exec> vs. <ant>
Date Tue, 25 Sep 2001 15:50:51 GMT
Yes, I realize that the test IS doing specific stuff that causes it to fail.
The point was that they fail using <ant> but not <exec>, presumably because
the directory information is not handled correctly.

The things that I have found to fail are of two sorts:

1 - Using an <exec> task to run an executable in the bin directory,
presumably because the exe-file is not found.

2 - Using a System.loadLibrary() call inside my test code, presumably
because the dll-file is not found.


Thanks and regards,

Magnus


> -----Original Message-----
> From: Jason Rogers [mailto:jason.rogers@tumbleweed.com]
> Sent: 25. september 2001 15:15
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: stopping an <exec> - <exec> vs. <ant>
>
>
> Do you have a call in that test to System.getProperty("user.dir") or
> something like that?  Certainly ant is running the build file
> like you would
> expect it to, it seems that it is actually something in the
> test that is
> failing to pass.
>
> :p
>
> -Jason
>
>     > -----Original Message-----
>     > From: Magnús Þór Torfason [mailto:magnus@handtolvur.is]
>     > Sent: Tuesday, September 25, 2001 10:48 AM
>     > To: ant-user@jakarta.apache.org
>     > Subject: RE: stopping an <exec> - <exec> vs. <ant>
>     >
>     >
>     > I think I must add to this an important note regarding
>     > the <ant> task.  It
>     > does not seem to handle directories correctly.  Consider
>     > the following
>     > build.xml file
>     >
>     > <project name="call-bin-build" default="exec-bin-build"
>     > basedir=".">
>     > 	<target name="exec-bin-build">
>     > 		<exec executable="ant.bat" dir="bin"/>
>     > 	</target>
>     > 	<target name="ant-bin-build">
>     > 		<ant antfile="build.xml" dir="bin"/>
>     > 	</target>
>     > </project>
>     >
>     > and the output when calling these two targets, first with exec
>     >
>     > C:\project>ant exec-bin-build
>     > Buildfile: build.xml
>     > exec-bin-build:
>     >      [exec] Buildfile: build.xml
>     >      [exec]
>     >      [exec] init:
>     >      ...
>     >      [exec]     [junit] Running
>     > com.handpoint.util.registry.test.RegTest
>     >      [exec]     [junit] Tests run: 2, Failures: 0,
>     > Errors: 0, Time elapsed:
>     > 0,03 sec
>     >      [exec] BUILD SUCCESSFUL
>     >      [exec]
>     >      [exec] Total time: 5 seconds
>     > BUILD SUCCESSFUL
>     >
>     > and then with the ant task
>     >
>     > C:\project>ant ant-bin-build
>     > Buildfile: build.xml
>     > ant-bin-build:
>     > init:
>     > ...
>     >     [junit] Running com.handpoint.util.registry.test.RegTest
>     >     [junit] Tests run: 2, Failures: 1, Errors: 0, Time
>     > elapsed: 0,03 sec
>     > BUILD FAILED
>     >
>     > Note that the bin-build fails when using the ant call,
>     > but it is successful
>     > when using an exec call !
>     >
>     > Regards, Magnus
>     >
>     > > -----Original Message-----
>     > > From: T Master [mailto:tmaster@iknowledgeinc.com]
>     > > Sent: 24. september 2001 22:19
>     > > To: ant-user@jakarta.apache.org
>     > > Subject: Re: stopping an <exec>
>     > >
>     > >
>     > > Why are you using <exec> to call other buildfiles?
>     > > use <ant>:
>     > >         <ant antfile="${buildfile.dir}/${mybuildfile}"
>     > target="build">
>     > >
>     > > Unless of course, this is the way you want....
>     > >
>     > >
>     > >
>     > > ----- Original Message -----
>     > > From: "Joe St. Germain" <jstg@metrocast.net>
>     > > To: <ant-user@jakarta.apache.org>
>     > > Sent: Monday, September 24, 2001 4:06 PM
>     > > Subject: stopping an <exec>
>     > >
>     > >
>     > > Does anyone know how to stop the processing of an <exec>.
>     > > My <exec> kicks off a <javac> in another build.xml file.  If
>     > > <javac> reports errors, I'd like the calling exec to
>     > stop execution
>     > > and anything passed that exec to also stop.  If you
>     > haven't already
>     > > guest, I've got a build.xml that controls the
> execution of other
>     > > XML files via the <exec> task.  I tried the failonerror
>     > flag on both
>     > > tasks, but it dosen't work.  I don't believe that
> javac returns
>     > > anything, and that may be the reason.
>     > >
>     > >
>     > > -Joe
>     > >
>     > >
>     >
>     >
>     >
>


Mime
View raw message