From: Inger, M. <inger@Synygy.com> - 2003-11-06 20:59:39
|
Through the right use of ThreadGroups and BuildListener, I suppose I could track the status of which targets get executed during the course of a command. I can then build an XML document, and send this with the response. How we would want to display these results in the calling buildfile, i'm not really sure yet. -----Original Message----- From: Scott Hebert [mailto:sc...@ca...] Sent: Thursday, November 06, 2003 2:57 PM To: 'Inger, Matthew'; 'ant...@li...' Subject: RE: [Ant-contrib-developers] Potential New Ant-Contrib tasks: A ntServer and RemoteAnt Here is what I would expect to see as the response that gets sent back to the client: Buildfile: build.xml BUILD FAILED Target `target1' does not exist in this project. Total time: 1 second It may nice to also see which targets have been called out by the build. Not the target's output though. Example: Buildfile: build.xml [target1] [target2] [target3] [targetN] BUILD SUCCESSFUL Total time: 25 seconds Does this seem reasonable? SH -----Original Message----- From: Inger, Matthew [mailto:inger@Synygy.com] Sent: Thursday, November 06, 2003 2:41 PM To: 'Scott Hebert'; 'ant...@li...' Subject: RE: [Ant-contrib-developers] Potential New Ant-Contrib tasks: A ntServer and RemoteAnt Right now, the initial implementation just does straight socket communication, using ObjectInputStream and ObjectOutputStream. The buildfiles have to be on the remote host as well. Trying to have the build file on the local host and send it over would be a tough thing to do, since you'd have to worry about all the dependencies (such as other .xml files, .jar files, and any external resources). Using SOAP seems a little complicated for what this task is designed to do. I'd rather not force it to have to run a webserver. Right now, you just start the ant build on the remote machine, and let it sit there waiting for requests. It's a lot more lightweight. The other thing i was wondering was what to send back to the client. I've built in a Response object which is streamed back to the client, but right now it only has two items, a boolean flag which indicates if the command was successfull, and a string which contains the error stack trace if any (it's a string due to possible task limitations. BuildException is not Serializable [blame the Location class], and it's possible other exceptions that occur might not be). Would we want other information sent back along with the response? Thoughts? -----Original Message----- From: Scott Hebert [mailto:sc...@ca...] Sent: Thursday, November 06, 2003 12:21 PM To: 'ant...@li...' Subject: RE: [Ant-contrib-developers] Potential New Ant-Contrib tasks: A ntServer and RemoteAnt I think this is super idea. I liked some of the features of RANT ( http://sourceforge.net/projects/remoteant/ <http://sourceforge.net/projects/remoteant/> ) but development seems dead. It made use of a SOAP service to perform the build. It was not without its limitations though. I believe the build file had to be located on the remote host and the output wasn't stream back to the client making the call. I would vote to have to the AntServer built to communicate over HTTP to permit implentations in firewalled environments. SH -----Original Message----- From: Inger, Matthew [mailto:inger@Synygy.com] Sent: Thursday, November 06, 2003 10:28 AM To: 'ant...@li...' Subject: [Ant-contrib-developers] Potential New Ant-Contrib tasks: AntServer and RemoteAnt I know there's probably one or two out there, but the ones I saw didn't quite fit what I was looking for. The basic idea is that on a host machine, someone could run a buildfile which contains a call to the <antserver> task. This would block the host build, and the <antserver> task would wait for connections on a specified port. When a connection is received, it would read commands from the socket, and execute the specified commands in the context of the current build file. Example: <antserver port="12345" /> On the client machine (which could be the same as the host machine), a buildfile would contain a call to the <remoteant> task, and as subelements, would specify what commands they'd like to send to the server. it would then open a connection to the server, and send the commands to be executed. Example: <remoteant machine="server.machine" port="12345"> <runtarget target="execute.build"> <property name="build.type" value="full" /> </runtarget> <runant dir="tests" target="build.tests"> <property name="build.type" value="full" /> <reference refid="my.ref" torefid="inherited.ref" /> </runtarget> </remoteant> would be the equivalent of running the following directly on the server machine, from within the same buildfile where the <antserver> task was run <antcall target="execute.build"> <param name="build.type" value="full" /> </antcall> <ant dir="tests"> <property name="build.type" value="full" /> <reference refid="my.ref" torefid="inherited.ref" /> </antcall> Does anyone have any thoughts on this? |